diff --git a/home/toph/rune/default.nix b/home/toph/rune/default.nix index 94caac1..e8d30df 100644 --- a/home/toph/rune/default.nix +++ b/home/toph/rune/default.nix @@ -72,8 +72,4 @@ scale = 1.20; } ]; - - # home.file = { - # "run-mac.sh".source = config.lib.file.mkOutOfStoreSymlink "${pkgs.macos-ventura-image.runScript}"; - # }; } diff --git a/hosts/common/optional/system/pool.nix b/hosts/common/optional/system/pool.nix index c4d14e1..f5a38da 100644 --- a/hosts/common/optional/system/pool.nix +++ b/hosts/common/optional/system/pool.nix @@ -5,10 +5,33 @@ let in { # Create the directories if they do not exist - systemd.tmpfiles.rules = [ - "d /pool 2775 ${username} ryot -" - "d ${homeDir}/git 2775 ${username} ryot -" - ]; + systemd = { + tmpfiles.rules = [ + "d /pool 2775 ${username} ryot -" + ]; + + services.createGitSymlink = { + description = "Create symlink from home directory to pool/git"; + after = [ + "network.target" + "pool.mount" + ]; + requires = [ "pool.mount" ]; + wantedBy = [ "multi-user.target" ]; + script = '' + mkdir -p /pool/git + chown ${username}:ryot /pool/git + chmod 2775 /pool/git + rm -rf ${homeDir}/git + ln -sf /pool/git ${homeDir}/git + chown -h ${username}:ryot ${homeDir}/git + ''; + serviceConfig = { + Type = "oneshot"; + RemainAfterExit = true; + }; + }; + }; # File system configuration fileSystems = { @@ -25,15 +48,6 @@ in "sec=sys" ]; }; - - "${homeDir}/git" = { - fsType = "none"; - device = "/pool/git"; - options = [ - "bind" - "nofail" - ]; - }; }; # Ensure NFS client support is complete