diff --git a/flake.lock b/flake.lock index 0610d00..b391b3d 100644 --- a/flake.lock +++ b/flake.lock @@ -687,16 +687,16 @@ "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1735985475, - "narHash": "sha256-7blkWqfcvYKfaL2hpy/nWTooHRfJSqaO0a2+XWccqkE=", + "lastModified": 1736029062, + "narHash": "sha256-7X65+TP0luFpQsA6KV80R05qnWp7NxMaIDryFfJ4MqI=", "owner": "pizzapim", "repo": "NixNG", - "rev": "dea65c6a83945c755b9d0097aa2535991daeb907", + "rev": "6211c11d7ef2cc8067efcd169e0b8fd02f1816b6", "type": "github" }, "original": { "owner": "pizzapim", - "ref": "kubernetes", + "ref": "dinit-fixes", "repo": "NixNG", "type": "github" } diff --git a/flake.nix b/flake.nix index b966856..ef37fa5 100644 --- a/flake.nix +++ b/flake.nix @@ -36,7 +36,7 @@ }; nixng = { - url = "github:pizzapim/NixNG/kubernetes"; + url = "github:pizzapim/NixNG/dinit-fixes"; inputs.nixpkgs.follows = "nixpkgs"; }; diff --git a/nixng-modules/radicale.nix b/nixng-modules/radicale.nix index f12b0bd..996788c 100644 --- a/nixng-modules/radicale.nix +++ b/nixng-modules/radicale.nix @@ -51,12 +51,17 @@ in { in { init.services.radicale = { enabled = true; + user = lib.mkDefault "radicale"; + group = lib.mkDefault "radicale"; + script = pkgs.writeShellScript "radicale-run" '' - chpst -u ${cfg.user}:${cfg.group} ${cfg.package}/bin/radicale \ + ${cfg.package}/bin/radicale \ --config ${configFile} ''; }; + environment.systemPackages = [cfg.package]; + users.users.${cfg.user} = nglib.mkDefaultRec { description = "radicale"; group = cfg.group; @@ -65,6 +70,7 @@ in { useDefaultShell = true; uid = config.ids.uids.radicale; }; + users.groups.${cfg.group} = nglib.mkDefaultRec {gid = config.ids.gids.radicale;}; ids = {