1
0
Fork 0

use a custom NixOS option instead of relying on hostname to determine inclusion of rootless container services

This commit is contained in:
Pratham Patel 2024-05-05 19:21:09 +05:30
parent d2639a7cc6
commit 91974d1042
Signed by: thefossguy
SSH Key Fingerprint: SHA256:HwRBy9H1FYXWcv/Qi1WY3kmcVtGz2ydZuPJgD4pkusY
4 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,7 @@
{
imports = [
./bootloader-configuration.nix
./custom-options.nix
./misc-configuration.nix
./network-configuration.nix
./packages/system-packages.nix

View File

@ -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;
};
};
};
}

View File

@ -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

View File

@ -26,6 +26,7 @@
fsType = "xfs";
};
custom-options.enableRootlessContainers = true;
networking.firewall.allowedTCPPorts = [
8001 # caddy HTTP
8002 # caddy HTTPS