From 3ee4f473c9982f04d508136a1c4c5162f2915921 Mon Sep 17 00:00:00 2001 From: oqyude Date: Thu, 28 Aug 2025 14:15:47 +0300 Subject: [PATCH] 123 --- homeConfigurations/example of symlinking.nix | 38 ++++++++++++++++++++ nixosModules/essentials/settings.nix | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 homeConfigurations/example of symlinking.nix diff --git a/homeConfigurations/example of symlinking.nix b/homeConfigurations/example of symlinking.nix new file mode 100644 index 0000000..404db7b --- /dev/null +++ b/homeConfigurations/example of symlinking.nix @@ -0,0 +1,38 @@ +{ config, pkgs, lib, ... }: +let + dotfiles = "${config.home.homeDirectory}/dotfiles/.configs"; + + symlinks = { + "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' (src: target: { + name = target; + value.source = config.lib.file.mkOutOfStoreSymlink "${dotfiles}/${src}"; + }) symlinks; + +in { + home.username = "tedna"; + home.homeDirectory = "/home/tedna"; + home.stateVersion = "25.11"; + + programs.git.enable = true; + programs.starship.enable = true; + programs.fish.enable = false; + + home.file = mkLinks; +} diff --git a/nixosModules/essentials/settings.nix b/nixosModules/essentials/settings.nix index 063ce89..50fb859 100755 --- a/nixosModules/essentials/settings.nix +++ b/nixosModules/essentials/settings.nix @@ -7,7 +7,7 @@ nix = { channel = { - enable = false; + enable = true; }; settings = { substituters = [