From 100b6fc2438db6ca2c7abe0ad525be3b1dd64895 Mon Sep 17 00:00:00 2001 From: lassulus Date: Sun, 30 Jan 2022 10:47:23 +0100 Subject: [PATCH] move acl module to krebs --- {lass => krebs}/3modules/acl.nix | 6 +++--- krebs/3modules/default.nix | 1 + lass/2configs/sync/the_playlist.nix | 6 +++--- lass/3modules/default.nix | 1 - 4 files changed, 7 insertions(+), 7 deletions(-) rename {lass => krebs}/3modules/acl.nix (93%) diff --git a/lass/3modules/acl.nix b/krebs/3modules/acl.nix similarity index 93% rename from lass/3modules/acl.nix rename to krebs/3modules/acl.nix index 81eeae920..9cdbb6cff 100644 --- a/lass/3modules/acl.nix +++ b/krebs/3modules/acl.nix @@ -6,7 +6,7 @@ [ dir ] ++ parents (builtins.dirOf dir) ; in { - options.lass.acl = lib.mkOption { + options.krebs.acl = lib.mkOption { type = lib.types.attrsOf (lib.types.attrsOf (lib.types.submodule ({ config, ... }: { options = { rule = lib.mkOption { @@ -32,7 +32,7 @@ in { }))); default = {}; }; - config = lib.mkIf (config.lass.acl != {}) { + config = { systemd.services = lib.mapAttrs' (path: rules: lib.nameValuePair "acl-${lib.replaceChars ["/"] ["_"] path}" { wantedBy = [ "multi-user.target" ]; path = [ @@ -50,6 +50,6 @@ in { RemainAfterExit = true; Type = "simple"; }; - }) config.lass.acl; + }) config.krebs.acl; }; } diff --git a/krebs/3modules/default.nix b/krebs/3modules/default.nix index e8f0d35e4..fc57d8188 100644 --- a/krebs/3modules/default.nix +++ b/krebs/3modules/default.nix @@ -6,6 +6,7 @@ let out = { imports = [ + ./acl.nix ./airdcpp.nix ./announce-activation.nix ./apt-cacher-ng.nix diff --git a/lass/2configs/sync/the_playlist.nix b/lass/2configs/sync/the_playlist.nix index 5bbf790a7..d8b17d239 100644 --- a/lass/2configs/sync/the_playlist.nix +++ b/lass/2configs/sync/the_playlist.nix @@ -3,7 +3,7 @@ path = "/home/lass/tmp/the_playlist"; devices = [ "mors" "phone" "prism" ]; }; - lass.acl."/home/lass/tmp/the_playlist"."u:syncthing:X".parents = true; - lass.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:syncthing:X".parents = true; + krebs.acl."/home/lass/tmp/the_playlist"."u:syncthing:rwX" = {}; + krebs.acl."/home/lass/tmp/the_playlist"."u:lass:rwX" = {}; } diff --git a/lass/3modules/default.nix b/lass/3modules/default.nix index 0373bd44c..570bb45be 100644 --- a/lass/3modules/default.nix +++ b/lass/3modules/default.nix @@ -1,7 +1,6 @@ _: { imports = [ - ./acl.nix ./dnsmasq.nix ./folderPerms.nix ./hosts.nix