use a custom NixOS option instead of relying on hostname to determine inclusion of rootless container services
This commit is contained in:
parent
d2639a7cc6
commit
91974d1042
|
@ -8,6 +8,7 @@
|
|||
{
|
||||
imports = [
|
||||
./bootloader-configuration.nix
|
||||
./custom-options.nix
|
||||
./misc-configuration.nix
|
||||
./network-configuration.nix
|
||||
./packages/system-packages.nix
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{ lib, ... } :
|
||||
|
||||
{
|
||||
options = {
|
||||
custom-options = {
|
||||
enableRootlessContainers = lib.mkOption {
|
||||
description = "Enable all systemd services that start rootless (Podman) containers for the home-manager user";
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -78,7 +78,7 @@ in
|
|||
imports = [
|
||||
./common-home.nix
|
||||
./virt-ovmf.nix
|
||||
] ++ (lib.optionals (osConfig.networking.hostName == "reddish") [
|
||||
] ++ (lib.optionals osConfig.custom-options.enableRootlessContainers [
|
||||
# TODO: self-host flakestry.dev so that I don't go over the piddly rate-limit of GitHub
|
||||
../systemd-services/podman/podman-init.nix
|
||||
../systemd-services/podman/container-caddy-vishwambhar.nix
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
fsType = "xfs";
|
||||
};
|
||||
|
||||
custom-options.enableRootlessContainers = true;
|
||||
networking.firewall.allowedTCPPorts = [
|
||||
8001 # caddy HTTP
|
||||
8002 # caddy HTTPS
|
||||
|
|
Loading…
Reference in New Issue