all repos — nixfiles @ 21398bece441d9afaa8e74539d993c3e976ebce0

System and user configuration, managed by nix and home-manager

use `nh` as a nixos-rebuild wrapper with nice output

Alan Pearce
commit

21398bece441d9afaa8e74539d993c3e976ebce0

parent

7a3f06fe4aa3a61b9d86b6aebdb404eba95d9eb5

M .envrc.envrc
@@ -4,3 +4,4 @@ else
echo 'while direnv evaluated .envrc, could not find the command "lorri" [https://github.com/nix-community/lorri]' use flake fi +FLAKE=$PWD
M system/settings/configuration/nix.nixsystem/settings/configuration/nix.nix
@@ -1,4 +1,5 @@
{ config +, lib , pkgs , ... }: {
@@ -22,7 +23,7 @@ warn-dirty = false
''; gc = { - automatic = true; + automatic = lib.mkDefault true; options = "--delete-older-than 14d"; }; };
M system/settings/user-interface.nixsystem/settings/user-interface.nix
@@ -61,6 +61,15 @@ };
programs.dconf.enable = true; + programs.nh = { + enable = true; + clean = { + enable = true; + extraArgs = "--keep-since 14d"; + }; + }; + nix.gc.automatic = ! config.programs.nh.enable; + imports = [ ./services/xserver.nix ];
M user/settings/fish.nixuser/settings/fish.nix
@@ -25,7 +25,7 @@ }
]; # TODO: pre-generate nix-your-shell interactiveShellInit = '' - ${pkgs.nix-your-shell}/bin/nix-your-shell fish | source + ${pkgs.nix-your-shell}/bin/nix-your-shell --nom env fish | source bind \es __ghq_repository_search # don't bind ctrl-t, it does nice things on macOS/BSD set FZF_CTRL_T_COMMAND
M user/settings/nixos.nixuser/settings/nixos.nix
@@ -5,9 +5,9 @@ ./nixpkgs.nix
]; home.shellAliases = { - srb = "sudo nixos-rebuild"; - rbs = "sudo nixos-rebuild switch --fast"; - rbb = "sudo nixos-rebuild boot"; - rbr = "sudo nixos-rebuild switch --rollback"; + srb = "nh os"; + rbs = "nh os switch --fast"; + rbb = "nh os boot"; + rbr = "nh os switch --rollback"; }; }