From f09ed59b061875b23f9a181dd29196cc7630ea3e Mon Sep 17 00:00:00 2001 From: oqyude Date: Tue, 30 Dec 2025 16:25:26 +0300 Subject: [PATCH] 123 --- home/server.nix | 73 ++++++++++++++++++++++++++++++++++--------------- 1 file changed, 51 insertions(+), 22 deletions(-) diff --git a/home/server.nix b/home/server.nix index a581efc..33e1d2d 100644 --- a/home/server.nix +++ b/home/server.nix @@ -6,6 +6,34 @@ ... }: let + symlinksPaths = { + "${config.home.homeDirectory}/External/Music" = "Music"; + "${xlib.dirs.storage}/ssh" = ".ssh/config"; + "${xlib.dirs.storage}/ssh" = ".ssh/known_hosts"; + "${xlib.dirs.storage}/beets" = ".config/beets"; + + # "hypr" = ".config/hypr"; + # "waybar" = ".config/waybar"; + # "rofi" = ".config/rofi"; + # "yazi" = ".config/yazi"; + + # "alacritty" = ".config/alacritty"; + # "zellij" = ".config/zellij"; + + # "zed" = ".config/zed"; + + # "lazygit" = ".config/lazygit"; + + # "fish/config.fish" = ".config/fish/config.fish"; + # "git/.gitconfig" = ".gitconfig"; + # "npm/.npmrc" = ".npmrc"; + }; + + mkLinks = lib.mapAttrs' (sourcePath: targetPath: { + name = targetPath; + value.source = config.lib.file.mkOutOfStoreSymlink "${sourcePath}"; + }) symlinksPaths; + # Paths beetsPath = "${xlib.dirs.storage}/beets"; sshPath = "${xlib.dirs.storage}/ssh"; @@ -16,12 +44,12 @@ in # ./minimal.nix # ]; xdg = { - configFile = { - "beets" = { - source = config.lib.file.mkOutOfStoreSymlink beetsPath; - target = "beets"; - }; - }; + # configFile = { + # "beets" = { + # source = config.lib.file.mkOutOfStoreSymlink beetsPath; + # target = "beets"; + # }; + # }; enable = true; autostart.enable = true; userDirs = { @@ -37,20 +65,21 @@ in videos = null; }; }; - home = { - file = { - "ssh-config" = { - source = config.lib.file.mkOutOfStoreSymlink "${sshPath}/config"; - target = ".ssh/config"; - }; - "ssh-known" = { - source = config.lib.file.mkOutOfStoreSymlink "${sshPath}/known_hosts"; - target = ".ssh/known_hosts"; - }; - "Music" = { - source = config.lib.file.mkOutOfStoreSymlink musicPath; - target = "${config.home.homeDirectory}/Music"; - }; - }; - }; + home.file = mkLinks; + # home = { + # file = { + # "ssh-config" = { + # source = config.lib.file.mkOutOfStoreSymlink "${sshPath}/config"; + # target = ".ssh/config"; + # }; + # "ssh-known" = { + # source = config.lib.file.mkOutOfStoreSymlink "${sshPath}/known_hosts"; + # target = ".ssh/known_hosts"; + # }; + # "Music" = { + # source = config.lib.file.mkOutOfStoreSymlink musicPath; + # target = "${config.home.homeDirectory}/Music"; + # }; + # }; + # }; }