update(services): update to use flakeRoot for paths
This commit is contained in:
parent
40a9483bd0
commit
f86394d5a2
4 changed files with 20 additions and 5 deletions
|
@ -19,7 +19,7 @@ in
|
|||
enable = true;
|
||||
clean.enable = true;
|
||||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "${config.home-manager.users.philipp.home.homeDirectory}/Documents/nix-config";
|
||||
flake = "${config.flakeRoot}";
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -36,8 +36,7 @@ in
|
|||
default = "reddit.stahl.sh";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.allowedTCPPorts = mkIf cfg.nginx.enable [
|
||||
|
|
16
modules/nixos/system/flakeRoot/default.nix
Normal file
16
modules/nixos/system/flakeRoot/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
with lib.${namespace};
|
||||
{
|
||||
options.flakeRoot = mkOption {
|
||||
type = types.str;
|
||||
description = "Path to the flake root directory.";
|
||||
};
|
||||
|
||||
config.flakeRoot = "${config.users.users.philipp.home}/Documents/nix-config";
|
||||
}
|
|
@ -72,8 +72,8 @@ in
|
|||
hostname = "invidious-db";
|
||||
volumes = [
|
||||
"postgresdata:/var/lib/postgresql/data"
|
||||
"/home/philipp/nix-config/modules/nixos/virtualisation/podman/invidious/config/sql:/config/sql"
|
||||
"/home/philipp/nix-config/modules/nixos/virtualisation/podman/invidious/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh"
|
||||
"${config.flakeRoot}/modules/nixos/virtualisation/podman/invidious/config/sql:/config/sql"
|
||||
"${config.flakeRoot}/modules/nixos/virtualisation/podman/invidious/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh"
|
||||
];
|
||||
environmentFiles = [ /run/secrets/invidious-db ];
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue