diff --git a/configuration.nix b/configuration.nix index fd81b0b..9440909 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,6 +4,7 @@ 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; @@ -21,9 +22,7 @@ networking.networkmanager.enable = true; - services.resolved = { - enable = true; - }; + services.resolved.enable = true; networking.firewall.enable = true; # Required for Tailscale @@ -34,18 +33,6 @@ 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 @@ -53,8 +40,6 @@ 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 @@ -121,7 +106,6 @@ services.xserver.xkb = { layout = "us"; - variant = ""; }; services.printing.enable = true; @@ -146,10 +130,16 @@ }; nixpkgs.config.allowUnfree = true; - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; + nix.settings = { + experimental-features = [ + "nix-command" + "flakes" + ]; + auto-optimise-store = true; + max-jobs = "auto"; + cores = 0; + build-users-group = "nixbld"; + }; # Framework-specific services # Enable fwupd for BIOS updates (distributed through LVFS) @@ -158,19 +148,22 @@ # Enable periodic TRIM for NVMe/SSD health services.fstrim.enable = true; - # Enable automatic garbage collection to prevent old generations from slowing boot - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 7d"; + # 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 + ''; }; - nix.settings.auto-optimise-store = true; - nix.optimise.automatic = true; - - nix.settings = { - max-jobs = "auto"; - cores = 0; - build-users-group = "nixbld"; + systemd.timers.nix-cleanup = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnCalendar = "daily"; + Persistent = true; + }; }; # Power management for laptop @@ -198,18 +191,10 @@ }; }; - # 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) +# Disable power-profiles-daemon (conflicts with auto-cpufreq) services.power-profiles-daemon.enable = false; - # AMD specific power management - powerManagement.cpuFreqGovernor = "powersave"; - - # Enable power management + # Enable power management (governor managed dynamically by auto-cpufreq) powerManagement.enable = true; # v4l2loopback for OBS Virtual Camera @@ -221,8 +206,7 @@ # RAM optimizations for 96GB system boot.kernel.sysctl = { - "vm.swappiness" = 0; # Never swap to disk - "vm.vfs_cache_pressure" = 50; # Keep more filesystem cache in RAM +"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 }; diff --git a/flake.lock b/flake.lock index b42ce85..2139a8d 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1772674218, - "narHash": "sha256-1oc5zUFOjeK2Bro5cdCe3Fc/uzQIHyxfKMDZQ+Zm6Uo=", + "lastModified": 1772841847, + "narHash": "sha256-Qre73BGBcw1YlhBTTT+T/rVoqVtlCgHYYExUreIJoYs=", "owner": "ryoppippi", "repo": "claude-code-overlay", - "rev": "e177db5beaf0cd10761e1b4a6eac2906627ed119", + "rev": "871c9fa0d37c0d6b3bdbf30341a8d08a75b1793b", "type": "github" }, "original": { @@ -48,11 +48,11 @@ ] }, "locked": { - "lastModified": 1772633327, - "narHash": "sha256-jl+DJB2DUx7EbWLRng+6HNWW/1/VQOnf0NsQB4PlA7I=", + "lastModified": 1772985285, + "narHash": "sha256-wEEmvfqJcl9J0wyMgMrj1TixOgInBW/6tLPhWGoZE3s=", "owner": "nix-community", "repo": "home-manager", - "rev": "5a75730e6f21ee624cbf86f4915c6e7489c74acc", + "rev": "5be5d8245cbc7bc0c09fbb5f38f23f223c543f85", "type": "github" }, "original": { @@ -89,11 +89,11 @@ ] }, "locked": { - "lastModified": 1772341813, - "narHash": "sha256-/PQ0ubBCMj/MVCWEI/XMStn55a8dIKsvztj4ZVLvUrQ=", + "lastModified": 1772945408, + "narHash": "sha256-PMt48sEQ8cgCeljQ9I/32uoBq/8t8y+7W/nAZhf72TQ=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "a2051ff239ce2e8a0148fa7a152903d9a78e854f", + "rev": "1c1d8ea87b047788fd7567adf531418c5da321ec", "type": "github" }, "original": { @@ -104,11 +104,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1771969195, - "narHash": "sha256-qwcDBtrRvJbrrnv1lf/pREQi8t2hWZxVAyeMo7/E9sw=", + "lastModified": 1772972630, + "narHash": "sha256-mUJxsNOrBMNOUJzN0pfdVJ1r2pxeqm9gI/yIKXzVVbk=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "41c6b421bdc301b2624486e11905c9af7b8ec68e", + "rev": "3966ce987e1a9a164205ac8259a5fe8a64528f72", "type": "github" }, "original": { @@ -119,11 +119,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1772624091, - "narHash": "sha256-QKyJ0QGWBn6r0invrMAK8dmJoBYWoOWy7lN+UHzW1jc=", + "lastModified": 1772963539, + "narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "80bdc1e5ce51f56b19791b52b2901187931f5353", + "rev": "9dcb002ca1690658be4a04645215baea8b95f31d", "type": "github" }, "original": { @@ -141,11 +141,11 @@ ] }, "locked": { - "lastModified": 1772745558, - "narHash": "sha256-pVmX5Z0PLUZIL7TFcfYyWNqEKDVf72bAz0PORyNQHSQ=", + "lastModified": 1773086064, + "narHash": "sha256-w5cbHv8jVS+1iD7xPokoT3XPUnkiAxFCUtW2KEwgU5s=", "owner": "nix-community", "repo": "NUR", - "rev": "361709a61eebc0b1783dd478677b7ac4e1efa0a2", + "rev": "e5b002c3d53b380695fd161e6562570ed8e7d01d", "type": "github" }, "original": { @@ -173,11 +173,11 @@ ] }, "locked": { - "lastModified": 1772638901, - "narHash": "sha256-kzAyU054Mzpnzgx475MgmcjYJXxXWQWBG7LLsYtHXKw=", + "lastModified": 1772945022, + "narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "75de12ddd50616a3628499ec18b648bceb88eb0d", + "rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc", "type": "github" }, "original": { diff --git a/home.nix b/home.nix index ae39f13..f3b9ad6 100644 --- a/home.nix +++ b/home.nix @@ -2,7 +2,6 @@ config, pkgs, inputs, - lib, ... }: @@ -111,13 +110,9 @@ 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 = { @@ -200,7 +195,6 @@ "da" = "direnv allow"; "nfu" = "nix flake update"; "c" = "claude"; - "." = "z .."; ".." = "z .."; j = "jj"; jgf = "jj git fetch"; @@ -245,7 +239,6 @@ }; 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"; }; @@ -281,7 +274,6 @@ # Configure Zen Browser with about:config settings programs.zen-browser = { enable = true; - suppressXdgMigrationWarning = true; policies = { DisableTelemetry = true; DisableFirefoxStudies = true;