move acl module to krebs

This commit is contained in:
lassulus 2022-01-30 10:47:23 +01:00
parent 1fe702a083
commit 100b6fc243
4 changed files with 7 additions and 7 deletions

View File

@ -6,7 +6,7 @@
[ dir ] ++ parents (builtins.dirOf dir) [ dir ] ++ parents (builtins.dirOf dir)
; ;
in { in {
options.lass.acl = lib.mkOption { options.krebs.acl = lib.mkOption {
type = lib.types.attrsOf (lib.types.attrsOf (lib.types.submodule ({ config, ... }: { type = lib.types.attrsOf (lib.types.attrsOf (lib.types.submodule ({ config, ... }: {
options = { options = {
rule = lib.mkOption { rule = lib.mkOption {
@ -32,7 +32,7 @@ in {
}))); })));
default = {}; default = {};
}; };
config = lib.mkIf (config.lass.acl != {}) { config = {
systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" { systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
path = [ path = [
@ -50,6 +50,6 @@ in {
RemainAfterExit = true; RemainAfterExit = true;
Type = "simple"; Type = "simple";
}; };
}) config.lass.acl; }) config.krebs.acl;
}; };
} }

View File

@ -6,6 +6,7 @@ let
out = { out = {
imports = [ imports = [
./acl.nix
./airdcpp.nix ./airdcpp.nix
./announce-activation.nix ./announce-activation.nix
./apt-cacher-ng.nix ./apt-cacher-ng.nix

View File

@ -3,7 +3,7 @@
path = "/home/lass/tmp/the_playlist"; path = "/home/lass/tmp/the_playlist";
devices = [ "mors" "phone" "prism" ]; devices = [ "mors" "phone" "prism" ];
}; };
lass.acl."/home/lass/tmp/the_playlist"."u:syncthing:X".parents = true; krebs.acl."/home/lass/tmp/the_playlist"."u:syncthing:X".parents = true;
lass.acl."/home/lass/tmp/the_playlist"."u:syncthing:rwX" = {}; krebs.acl."/home/lass/tmp/the_playlist"."u:syncthing:rwX" = {};
lass.acl."/home/lass/tmp/the_playlist"."u:lass:rwX" = {}; krebs.acl."/home/lass/tmp/the_playlist"."u:lass:rwX" = {};
} }

View File

@ -1,7 +1,6 @@
_: _:
{ {
imports = [ imports = [
./acl.nix
./dnsmasq.nix ./dnsmasq.nix
./folderPerms.nix ./folderPerms.nix
./hosts.nix ./hosts.nix