From 1dd8c43caae07820f1c9275cf2bd677481875373 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 1 May 2026 14:33:50 -0700 Subject: [PATCH 01/10] feat(shell): remove dated, uncited, and deprecated manual cache disable setting --- defaults/shell.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/defaults/shell.nix b/defaults/shell.nix index e8df363..9091b88 100644 --- a/defaults/shell.nix +++ b/defaults/shell.nix @@ -50,9 +50,6 @@ in # use Fish, the nicest shell :) programs.fish.enable = lib.mkIf config.nixowos.allowAddingPackages true; users.defaultUserShell = lib.mkIf config.nixowos.allowAddingPackages pkgs.fish; - # avoid generating caches (enabled by fish) due to slowdowns during nixos-rebuild - # this may degrade autocompletion - documentation.man.generateCaches = false; environment.shellAliases = { # make nix-shell preserve the user's $SHELL From 482d42cc05f8e1baddc3b4a701ba68636a407757 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 1 May 2026 14:42:59 -0700 Subject: [PATCH 02/10] docs(system): explain /home/tmp --- defaults/system.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/defaults/system.nix b/defaults/system.nix index 6811152..e37b795 100644 --- a/defaults/system.nix +++ b/defaults/system.nix @@ -52,6 +52,9 @@ in tmpfsHugeMemoryPages = "within_size"; }; + # this is useful not only for having a user named "tmp" + # but also if any user wants to use a temporary directory, + # it's much nicer than /tmp because it isn't filled with system files fileSystems."/home/tmp" = lib.mkDefault { fsType = "tmpfs"; From dbc21e11bea8ce5c1df67973302baef4b148aa56 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 1 May 2026 14:45:21 -0700 Subject: [PATCH 03/10] feat(system): remove sshfs honestly, not sure why this was ever here. probably just carried over from a drastically different place --- defaults/system.nix | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/defaults/system.nix b/defaults/system.nix index e37b795..836c99c 100644 --- a/defaults/system.nix +++ b/defaults/system.nix @@ -1,5 +1,4 @@ { - pkgs, lib, config, ... @@ -12,19 +11,10 @@ in { options.nixowos.defaults.${name} = { enable = lib.mkEnableOption name; - - extraPackages = lib.mkOption { - type = lib.types.listOf lib.types.package; - default = with pkgs; [ - sshfs - ]; - }; }; config = lib.mkIf cfg.enable { - environment.systemPackages = lib.mkIf config.nixowos.allowAddingPackages cfg.extraPackages; - boot.loader.grub = lib.mkDefault { # modern installation device = "nodev"; From 8a60b5a1c1bd9d1717640de2112dbe59a45b0583 Mon Sep 17 00:00:00 2001 From: electria Date: Mon, 25 May 2026 21:16:20 -0700 Subject: [PATCH 04/10] feat(git): do enable push.autoSetupRemote the convinience is real --- defaults/git.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/defaults/git.nix b/defaults/git.nix index f1090db..95235bf 100644 --- a/defaults/git.nix +++ b/defaults/git.nix @@ -34,6 +34,8 @@ in # causing further problems pull.ff = "only"; + push.autoSetupRemote = true; + merge.conflictStyle = "zdiff3"; # easiest to understand style commit.verbose = true; # show diffs in commit editor } From f8f309c54bc0a7eb188a2f1e7ce887da0810f749 Mon Sep 17 00:00:00 2001 From: electria Date: Tue, 26 May 2026 11:44:33 -0700 Subject: [PATCH 05/10] fix: avoid hardcoding lix version --- defaults/lix.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/defaults/lix.nix b/defaults/lix.nix index 998a5a4..b1eae5d 100644 --- a/defaults/lix.nix +++ b/defaults/lix.nix @@ -17,11 +17,11 @@ in config = lib.mkIf cfg.enable { # use lix, a fork of nix # see: https://lix.systems/about - nix.package = pkgs.lixPackageSets.lix_2_95.lix; + nix.package = pkgs.lixPackageSets.latest.lix; # overlays so that all nix tools use lix nixpkgs.overlays = [ (final: prev: { - inherit (prev.lixPackageSets.lix_2_95) + inherit (prev.lixPackageSets.latest) nixpkgs-review nix-eval-jobs nix-fast-build From 6b65b1d3fd7af9f8956b161e63bdb9751bf1a696 Mon Sep 17 00:00:00 2001 From: electria Date: Tue, 26 May 2026 14:16:50 -0700 Subject: [PATCH 06/10] feat(nix): add settings to automatically run the gc this should make it slightly easier to use nix without manually running the GC, but also doesn't run anything in the bg for this because that could be poor UX --- defaults/nix.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/defaults/nix.nix b/defaults/nix.nix index 2f1364a..6825299 100644 --- a/defaults/nix.nix +++ b/defaults/nix.nix @@ -25,6 +25,13 @@ in # source: https://nix.dev/manual/nix/2.26/command-ref/new-cli/nix3-store-optimise nix.settings.auto-optimise-store = true; + # trigger the garbage collector automatically + # when free space in /nix/store goes below this + nix.settings.min-free = 1000000000; # 1GB + # free up to this many bytes in an automatic invocation + # to avoid it taking too long + nix.settings.max-free = 5000000000; # 5GB + environment.systemPackages = with pkgs; lib.mkIf config.nixowos.allowAddingPackages [ From f22e33c96736856e1a38a9a8eb54972331df7ed3 Mon Sep 17 00:00:00 2001 From: electria Date: Wed, 24 Jun 2026 10:11:14 -0700 Subject: [PATCH 07/10] feat(nvidia): enable powerManagment --- nvidia.nix | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nvidia.nix b/nvidia.nix index f35deef..5297906 100644 --- a/nvidia.nix +++ b/nvidia.nix @@ -22,7 +22,12 @@ in # Enable this if you have graphical corruption issues or application crashes after waking # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead # of just the bare essentials. - # powerManagement.enable = false; + powerManagement.enable = true; + # the following is from @tlater:matrix.tlater.net (Lix Off Topic, 2026-06-24) + # `powerManagement.enable` maps to this set of NVIDIA driver features: https://download.nvidia.com/XFree86/Linux-x86_64/610.43.02/README/powermanagement.html + # You can read through those docs yourself, but tl;dr: modern GPUs have more memory than can normally be stored on suspend, so they need a workaround. + # The modern open source drivers can use some cool kernel features that were behind the GPL lock beforehand to achieve that, the proprietary drivers are stuck with a hack. But basically, you always want to enable that option on NixOS. + # The `powermanagement.finegrained` stuff on the other hand has to do with multi-GPU setups. The two options should really not be grouped together like this. # Use the NVidia open source kernel module (not to be confused with the # independent third-party "nouveau" open source driver). From be3d0865f428bb28605e851169c96a680cf73b18 Mon Sep 17 00:00:00 2001 From: electria Date: Wed, 24 Jun 2026 10:19:33 -0700 Subject: [PATCH 08/10] feat(treewide): trim down packages --- defaults/nix.nix | 7 ------- defaults/plasma.nix | 5 ----- defaults/shell.nix | 3 --- 3 files changed, 15 deletions(-) diff --git a/defaults/nix.nix b/defaults/nix.nix index 6825299..d6e87a6 100644 --- a/defaults/nix.nix +++ b/defaults/nix.nix @@ -31,12 +31,5 @@ in # free up to this many bytes in an automatic invocation # to avoid it taking too long nix.settings.max-free = 5000000000; # 5GB - - environment.systemPackages = - with pkgs; - lib.mkIf config.nixowos.allowAddingPackages [ - nixd - nixfmt - ]; }; } diff --git a/defaults/plasma.nix b/defaults/plasma.nix index 4a042e9..060055c 100644 --- a/defaults/plasma.nix +++ b/defaults/plasma.nix @@ -28,11 +28,6 @@ in config = lib.mkIf cfg.enable { hardware.graphics.enable = true; - fonts = lib.mkIf config.nixowos.allowAddingPackages { - enableDefaultPackages = lib.mkDefault true; - packages = [ pkgs.noto-fonts-cjk-sans ]; - }; - environment.systemPackages = with pkgs; lib.mkIf config.nixowos.allowAddingPackages [ diff --git a/defaults/shell.nix b/defaults/shell.nix index 9091b88..cb9f022 100644 --- a/defaults/shell.nix +++ b/defaults/shell.nix @@ -28,8 +28,6 @@ in compsize ffmpeg - - python3 ] ++ ( if config.nixowos.nvidia.enable then @@ -40,7 +38,6 @@ in else [ btop-rocm - nvtopPackages.amd ] ); }; From a3b76963823d5840d622a2aa320c662402093476 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 26 Jun 2026 07:37:55 -0700 Subject: [PATCH 09/10] git: remove delta configuration delta is an extra package, makes the config weird, and makes it difficult to copy diffs to share. --- defaults/git.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/defaults/git.nix b/defaults/git.nix index 95235bf..564517a 100644 --- a/defaults/git.nix +++ b/defaults/git.nix @@ -8,16 +8,10 @@ let name = "git"; cfg = config.nixowos.defaults.${name}; - superCfg = config.programs.${name}; in { options = { nixowos.defaults.${name}.enable = lib.mkEnableOption name; - - # FIXME: this doesn't really belong in defaults/ - programs.${name}.delta.enable = lib.mkEnableOption "delta within git" // { - default = true; - }; }; config = lib.mkIf cfg.enable { @@ -38,13 +32,7 @@ in merge.conflictStyle = "zdiff3"; # easiest to understand style commit.verbose = true; # show diffs in commit editor - } - // (lib.optionalAttrs (superCfg.delta.enable && config.nixowos.allowAddingPackages) { - core.pager = "${lib.getExe pkgs.delta}"; - interactive.diffFilter = "${lib.getExe pkgs.delta} --color-only"; - delta.navigate = true; # use n and N to move between diff sections - delta.diff-highlight = true; # simpler mode, highlights inter-line changes - }); + }; }; }; From 934a07640e8691394e9ecedc1afcbc49c51b3d25 Mon Sep 17 00:00:00 2001 From: electria Date: Fri, 26 Jun 2026 07:39:25 -0700 Subject: [PATCH 10/10] git: unset conflictStyle diff3 adds a lot of lines to do the conflict, which can make it harder to understand in full sometimes. especially when the lsp is just filling it with errors --- defaults/git.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/defaults/git.nix b/defaults/git.nix index 564517a..94d5861 100644 --- a/defaults/git.nix +++ b/defaults/git.nix @@ -30,7 +30,6 @@ in push.autoSetupRemote = true; - merge.conflictStyle = "zdiff3"; # easiest to understand style commit.verbose = true; # show diffs in commit editor }; };