fix: change flake base path for winters

This commit is contained in:
Swarsel 2024-09-23 22:37:25 +02:00
parent 9e6fd597b2
commit b019b1562f
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
5 changed files with 18 additions and 6 deletions

View file

@ -2040,6 +2040,8 @@ My work machine. Built for more security, this is the gold standard of my config
hasFingerprint = false; hasFingerprint = false;
impermanence = false; impermanence = false;
isBtrfs = false; isBtrfs = false;
initialSetup = true;
flakePath = "/home/swarsel/.dotfiles";
server = { server = {
enable = true; enable = true;
kavita = true; kavita = true;
@ -4657,6 +4659,10 @@ I usually use =mutableUsers = false= in my NixOS configuration. However, on a ne
{ lib, ... }: { lib, ... }:
{ {
options.swarselsystems.flakePath = mkOption {
type = types.attrsOf types.str;
default = "";
};
options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)"; options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)";
options.swarselsystems.server.enable = lib.mkEnableOption "is a server machine"; options.swarselsystems.server.enable = lib.mkEnableOption "is a server machine";
options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server"; options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server";
@ -6531,8 +6537,8 @@ Also, the system state version is set here. No need to touch it.
}; };
environment.shellAliases = lib.recursiveUpdate { environment.shellAliases = lib.recursiveUpdate {
npswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;"; npswitch = "cd ${config.swarselsystems.flakePath}; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
nswitch = "cd /.dotfiles; nixos-rebuild --flake .#$(hostname) switch; cd -;"; nswitch = "cd ${config.swarselsystems.flakePath}; nixos-rebuild --flake .#$(hostname) switch; cd -;";
} }
config.swarselsystems.shellAliases; config.swarselsystems.shellAliases;
@ -6566,7 +6572,7 @@ Also, the system state version is set here. No need to touch it.
{ {
sops = { sops = {
age.sshKeyPaths = [ "/etc/ssh/sops" ]; age.sshKeyPaths = [ "/etc/ssh/sops" ];
defaultSopsFile = "/.dotfiles/secrets/server/winters/secrets.yaml"; defaultSopsFile = "${config.swarselsystems.flakePath}/secrets/server/winters/secrets.yaml";
validateSopsFiles = false; validateSopsFiles = false;
}; };

View file

@ -1,6 +1,10 @@
{ lib, ... }: { lib, ... }:
{ {
options.swarselsystems.flakePath = mkOption {
type = types.attrsOf types.str;
default = "";
};
options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)"; options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)";
options.swarselsystems.server.enable = lib.mkEnableOption "is a server machine"; options.swarselsystems.server.enable = lib.mkEnableOption "is a server machine";
options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server"; options.swarselsystems.server.kavita = lib.mkEnableOption "enable kavita on server";

View file

@ -41,8 +41,8 @@
environment.shellAliases = lib.recursiveUpdate environment.shellAliases = lib.recursiveUpdate
{ {
npswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;"; npswitch = "cd ${config.swarselsystems.flakePath}; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
nswitch = "cd /.dotfiles; nixos-rebuild --flake .#$(hostname) switch; cd -;"; nswitch = "cd ${config.swarselsystems.flakePath}; nixos-rebuild --flake .#$(hostname) switch; cd -;";
} }
config.swarselsystems.shellAliases; config.swarselsystems.shellAliases;

View file

@ -2,7 +2,7 @@
{ {
sops = { sops = {
age.sshKeyPaths = [ "/etc/ssh/sops" ]; age.sshKeyPaths = [ "/etc/ssh/sops" ];
defaultSopsFile = "/.dotfiles/secrets/server/winters/secrets.yaml"; defaultSopsFile = "${config.swarselsystems.flakePath}/secrets/server/winters/secrets.yaml";
validateSopsFiles = false; validateSopsFiles = false;
}; };

View file

@ -37,6 +37,8 @@
hasFingerprint = false; hasFingerprint = false;
impermanence = false; impermanence = false;
isBtrfs = false; isBtrfs = false;
initialSetup = true;
flakePath = "/home/swarsel/.dotfiles";
server = { server = {
enable = true; enable = true;
kavita = true; kavita = true;