From 9f55e8bc0fb7cf1b0204652871808130a45e8eee Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Wed, 13 Jan 2021 08:36:07 +0000 Subject: modules/home: remove I think when I implemented this I didn't know about tmpfiles.d(5). Now I do, so let's use that instead. I don't think the imperativeNix option is necessary any more since the home directory is created read-only, but if it turns out that .nix-defexpr and .nix-profile are coming back, I can look into the best way to solve that then. --- modules/workstation/weechat/default.nix | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'modules/workstation/weechat/default.nix') diff --git a/modules/workstation/weechat/default.nix b/modules/workstation/weechat/default.nix index 03219a772cce..135442b6b2ec 100644 --- a/modules/workstation/weechat/default.nix +++ b/modules/workstation/weechat/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ config, pkgs, lib, ... }: with lib; @@ -91,6 +91,8 @@ let -r /exit ''; + weechatHome = "${config.users.users.qyliss.home}/state/weechat"; + in { @@ -107,12 +109,15 @@ in }) ]; - home.qyliss.dirs."state/weechat".activationScripts.config = '' + systemd.tmpfiles.packages = [ (pkgs.runCommandNoCC "weechat-tmpfiles" {} '' + conf=$out/lib/tmpfiles.d/weechat.conf + mkdir -p $(dirname $conf) + echo "d ${weechatHome} 0700 qyliss qyliss" > $conf for file in ${cfg}/*.conf do if [ "$file" != ${cfg}/sec.conf ] - then ln -sf $file $(basename $file) + then echo "L+ ${weechatHome}/$(basename "$file") - - - - $file" >> $conf fi done - ''; + '') ]; } -- cgit 1.4.1