Compare commits
No commits in common. "97c8a8b2b9298e9dc107b056d7e3d6b074e59ae8" and "a386763b86e419617229eb946ac05b875c93da24" have entirely different histories.
97c8a8b2b9
...
a386763b86
3 changed files with 75 additions and 51 deletions
|
|
@ -4,7 +4,6 @@
|
|||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 3;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.timeout = 0;
|
||||
|
||||
|
|
@ -22,7 +21,9 @@
|
|||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.resolved.enable = true;
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.enable = true;
|
||||
# Required for Tailscale
|
||||
|
|
@ -33,6 +34,18 @@
|
|||
time.timeZone = "America/Los_Angeles";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Framework Laptop 13 AMD AI 300 Series specific configurations
|
||||
|
|
@ -40,6 +53,8 @@
|
|||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
# Add OpenCL support via Rusticl (recommended by NixOS wiki for DaVinci Resolve)
|
||||
extraPackages = with pkgs; [ mesa.opencl ];
|
||||
};
|
||||
|
||||
# Enable keyd for key remapping
|
||||
|
|
@ -106,6 +121,7 @@
|
|||
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
|
|
@ -130,16 +146,10 @@
|
|||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
build-users-group = "nixbld";
|
||||
};
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
# Framework-specific services
|
||||
# Enable fwupd for BIOS updates (distributed through LVFS)
|
||||
|
|
@ -148,22 +158,19 @@
|
|||
# Enable periodic TRIM for NVMe/SSD health
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# Keep only last 10 generations, GC everything else (daily)
|
||||
systemd.services.nix-cleanup = {
|
||||
description = "Nix generation cleanup and garbage collection";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
${pkgs.nix}/bin/nix-env --delete-generations +3 -p /nix/var/nix/profiles/system
|
||||
${pkgs.nix}/bin/nix-env --delete-generations +3 -p /nix/var/nix/profiles/per-user/jet/home-manager || true
|
||||
${pkgs.nix}/bin/nix-store --gc
|
||||
'';
|
||||
# Enable automatic garbage collection to prevent old generations from slowing boot
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
systemd.timers.nix-cleanup = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
nix.settings.auto-optimise-store = true;
|
||||
nix.optimise.automatic = true;
|
||||
|
||||
nix.settings = {
|
||||
max-jobs = "auto";
|
||||
cores = 0;
|
||||
build-users-group = "nixbld";
|
||||
};
|
||||
|
||||
# Power management for laptop
|
||||
|
|
@ -191,10 +198,18 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Disable power-profiles-daemon (conflicts with auto-cpufreq)
|
||||
# Enable thermald for thermal management
|
||||
services.thermald.enable = true;
|
||||
|
||||
# Framework Laptop 13 specific power optimizations
|
||||
# Enable power-profiles-daemon for better AMD power management
|
||||
# (Note: This conflicts with auto-cpufreq, so we'll keep auto-cpufreq disabled)
|
||||
services.power-profiles-daemon.enable = false;
|
||||
|
||||
# Enable power management (governor managed dynamically by auto-cpufreq)
|
||||
# AMD specific power management
|
||||
powerManagement.cpuFreqGovernor = "powersave";
|
||||
|
||||
# Enable power management
|
||||
powerManagement.enable = true;
|
||||
|
||||
# v4l2loopback for OBS Virtual Camera
|
||||
|
|
@ -206,7 +221,8 @@
|
|||
|
||||
# RAM optimizations for 96GB system
|
||||
boot.kernel.sysctl = {
|
||||
"vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM
|
||||
"vm.swappiness" = 0; # Never swap to disk
|
||||
"vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM
|
||||
"vm.dirty_ratio" = 15; # Write to disk when 15% of RAM is dirty
|
||||
"vm.dirty_background_ratio" = 5; # Start writing when 5% dirty
|
||||
};
|
||||
|
|
|
|||
42
flake.lock
generated
42
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772841847,
|
||||
"narHash": "sha256-Qre73BGBcw1YlhBTTT+T/rVoqVtlCgHYYExUreIJoYs=",
|
||||
"lastModified": 1772674218,
|
||||
"narHash": "sha256-1oc5zUFOjeK2Bro5cdCe3Fc/uzQIHyxfKMDZQ+Zm6Uo=",
|
||||
"owner": "ryoppippi",
|
||||
"repo": "claude-code-overlay",
|
||||
"rev": "871c9fa0d37c0d6b3bdbf30341a8d08a75b1793b",
|
||||
"rev": "e177db5beaf0cd10761e1b4a6eac2906627ed119",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -48,11 +48,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772985285,
|
||||
"narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=",
|
||||
"lastModified": 1772633327,
|
||||
"narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85",
|
||||
"rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -89,11 +89,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772945408,
|
||||
"narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=",
|
||||
"lastModified": 1772341813,
|
||||
"narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "1c1d8ea87b047788fd7567adf531418c5da321ec",
|
||||
"rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -104,11 +104,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1772972630,
|
||||
"narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=",
|
||||
"lastModified": 1771969195,
|
||||
"narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72",
|
||||
"rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -119,11 +119,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1772963539,
|
||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
||||
"lastModified": 1772624091,
|
||||
"narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
||||
"rev": "80bdc1e5ce51f56b19791b52b2901187931f5353",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -141,11 +141,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773086064,
|
||||
"narHash": "sha256-w5cbHv8jVS+1iD7xPokoT3XPUnkiAxFCUtW2KEwgU5s=",
|
||||
"lastModified": 1772745558,
|
||||
"narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "e5b002c3d53b380695fd161e6562570ed8e7d01d",
|
||||
"rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -173,11 +173,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772945022,
|
||||
"narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=",
|
||||
"lastModified": 1772638901,
|
||||
"narHash": "sha256-kzAyU054Mzpnzgx475MgmcjYJXxXWQWBG7LLsYtHXKw=",
|
||||
"owner": "0xc000022070",
|
||||
"repo": "zen-browser-flake",
|
||||
"rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc",
|
||||
"rev": "75de12ddd50616a3628499ec18b648bceb88eb0d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
8
home.nix
8
home.nix
|
|
@ -2,6 +2,7 @@
|
|||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
|
|
@ -110,9 +111,13 @@
|
|||
gnomeExtensions.wifi-qrcode
|
||||
];
|
||||
|
||||
# Set environment variables for OpenCL
|
||||
home.sessionVariables = {
|
||||
OCL_ICD_VENDORS = "/etc/OpenCL/vendors";
|
||||
POCL_DEVICES = "cpu";
|
||||
BROWSER = "zen";
|
||||
TERMINAL = "kitty";
|
||||
RUSTICL_ENABLE = "radeonsi";
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
|
|
@ -195,6 +200,7 @@
|
|||
"da" = "direnv allow";
|
||||
"nfu" = "nix flake update";
|
||||
"c" = "claude";
|
||||
"." = "z ..";
|
||||
".." = "z ..";
|
||||
j = "jj";
|
||||
jgf = "jj git fetch";
|
||||
|
|
@ -239,6 +245,7 @@
|
|||
};
|
||||
keybindings = {
|
||||
"ctrl+shift+c" = "copy_and_clear_or_interrupt";
|
||||
"ctrl+c" = "copy_and_clear_or_interrupt";
|
||||
"ctrl+shift+v" = "paste_from_clipboard";
|
||||
"ctrl+v" = "paste_from_clipboard";
|
||||
};
|
||||
|
|
@ -274,6 +281,7 @@
|
|||
# Configure Zen Browser with about:config settings
|
||||
programs.zen-browser = {
|
||||
enable = true;
|
||||
suppressXdgMigrationWarning = true;
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue