From 596975a9cb1a7b9ea47cb7c065c2ed7bc02f9186 Mon Sep 17 00:00:00 2001 From: ene Date: Tue, 21 Feb 2023 17:44:49 +0100 Subject: Fix(home): permissions (hopefully) --- system/users/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'system/users/default.nix') diff --git a/system/users/default.nix b/system/users/default.nix index 116a96be..8efece26 100644 --- a/system/users/default.nix +++ b/system/users/default.nix @@ -8,7 +8,7 @@ cfg = config.soispha.users; in { options.soispha.users = { -# enable = lib.mkEnableOption (lib.mdDoc "users"); + # enable = lib.mkEnableOption (lib.mdDoc "users"); hashedPassword = lib.mkOption { type = lib.types.str; example = lib.literalExpression "$y$jFT$ONrCqZIJKB7engmfA4orD/$0GO58/wV5wrYWj0cyONhyujZPjFmbT0XKtx2AvXLG0B"; @@ -29,5 +29,12 @@ in { uid = 1000; }; }; + system.activationScripts.home_permissions = + pkgs.lib.stringAfter ["users"] + '' + mkdir /home/soispha + chmod 700 /home/soispha + chown -hR soispha:users /home/soispha + ''; }; } -- cgit 1.4.1