flake(linger): add linger-flaker to allow the pihole-flake to manage user lingering

Systemd's user lingering feature seems to be necessary to run rootless podman if the executing user is not logged in.
See https://github.com/NixOS/nixpkgs/issues/138423
This commit is contained in:
Christopher Bacher 2022-10-28 18:51:18 +02:00
parent 5fb27f33b3
commit 428baed6cf
2 changed files with 14 additions and 3 deletions

View file

@ -5,9 +5,11 @@
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
linger.url = "github:mindsbackyard/linger-flake";
};
outputs = { self, nixpkgs, flake-utils }: with flake-utils.lib; eachSystem (with system; [ x86_64-linux aarch64-linux ]) (curSystem:
outputs = { self, nixpkgs, flake-utils, linger }: with flake-utils.lib; eachSystem (with system; [ x86_64-linux aarch64-linux ]) (curSystem:
let
util = import ./lib/util.nix;
pkgs = nixpkgs.legacyPackages.${curSystem};
@ -34,7 +36,11 @@
default = piholeImage;
};
nixosModules.default = (import ./modules/pihole-container.factory.nix) { piholeFlake = self; inherit util; };
nixosModules.default = (import ./modules/pihole-container.factory.nix) {
piholeFlake = self;
lingerFlake = linger;
inherit util;
};
devShells.default = let
updatePiholeImageInfoScript = pkgs.writeShellScriptBin "update-pihole-image-info" ''