Include env variable and aliases in nh configuration

This commit is contained in:
SebastianStork 2024-05-29 16:57:25 +02:00
parent 10bb7b5c31
commit 7c105b7d33
4 changed files with 12 additions and 16 deletions

View file

@ -7,8 +7,6 @@
networking.hostName = "inspiron"; networking.hostName = "inspiron";
environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config";
myConfig = { myConfig = {
boot-loader = { boot-loader = {
systemd-boot.enable = true; systemd-boot.enable = true;

View file

@ -7,8 +7,6 @@
networking.hostName = "north"; networking.hostName = "north";
environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config";
myConfig = { myConfig = {
boot-loader = { boot-loader = {
systemd-boot.enable = true; systemd-boot.enable = true;

View file

@ -13,17 +13,6 @@
home.shellAliases = home.shellAliases =
let let
nixAliases =
let
rebuild = "sudo -v && nh os";
in
{
nrs = "${rebuild} switch";
nrt = "${rebuild} test";
nrb = "${rebuild} boot";
nrrb = "nrb && reboot";
};
lsAliases = lsAliases =
let let
aliasList = aliasList =
@ -91,7 +80,6 @@
}; };
in in
lib.mkMerge [ lib.mkMerge [
nixAliases
lsAliases lsAliases
catAlias catAlias
]; ];

View file

@ -9,8 +9,20 @@ in
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.sessionVariables.FLAKE = "/home/seb/Projects/nixos/my-config";
programs.nh.enable = true; programs.nh.enable = true;
environment.shellAliases =
let
rebuild = "sudo -v && nh os";
in
{
nrs = "${rebuild} switch";
nrt = "${rebuild} test";
nrb = "${rebuild} boot";
nrrb = "nrb && reboot";
};
programs.nh.clean = lib.mkIf cfg.auto-gc.enable { programs.nh.clean = lib.mkIf cfg.auto-gc.enable {
enable = true; enable = true;
dates = "daily"; dates = "daily";