Skip to content

Commit

Permalink
Use mkOutOfStoreSymlink where possible
Browse files Browse the repository at this point in the history
  • Loading branch information
simonrw committed Nov 5, 2024
1 parent 0c8f69c commit ece7a4c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions home/bat.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{...}: {
{config, ...}: {
programs.bat = {
enable = true;

Expand All @@ -8,7 +8,7 @@
};

xdg.configFile."bat" = {
source = ./bat;
source = config.lib.file.mkOutOfStoreSymlink ./bat;
recursive = true;
};
}
4 changes: 2 additions & 2 deletions home/emacs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ in
options.me.emacs.enable = mkEnableOption "emacs configuration";

config = mkIf cfg.enable {
home.file.".emacs.d/init.el".source = ./emacs/init.el;
home.file.".emacs.d/custom.el".source = ./emacs/custom.el;
home.file.".emacs.d/init.el".source = config.lib.file.mkOutOfStoreSymlink ./emacs/init.el;
home.file.".emacs.d/custom.el".source = config.lib.file.mkOutOfStoreSymlink ./emacs/custom.el;
};
}
2 changes: 1 addition & 1 deletion home/ghostty.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ in

config = mkIf cfg.enable {
# not xdg as this path is fixed even on macos
home.file.".config/ghostty/config".source = ./ghostty/config;
home.file.".config/ghostty/config".source = config.lib.file.mkOutOfStoreSymlink ./ghostty/config;
};
}
1 change: 1 addition & 0 deletions home/helix.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
pkgs,
config,
...
}: {
programs.helix = {
Expand Down
5 changes: 3 additions & 2 deletions home/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
pkgs,
isLinux,
isDarwin,
config,
lib,
...
}: let
Expand Down Expand Up @@ -131,7 +132,7 @@ in {

home.file = {
".bin" = {
source = ./bin;
source = config.lib.file.mkOutOfStoreSymlink ./bin;
recursive = true;
};

Expand Down Expand Up @@ -170,7 +171,7 @@ in {
xdg = {
enable = true;
configFile.karabiner = lib.mkIf isDarwin {
source = ./karabiner;
source = config.lib.file.mkOutOfStoreSymlink ./karabiner;
recursive = true;
};
};
Expand Down
2 changes: 1 addition & 1 deletion home/zellij.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ in {
};

xdg.configFile."zellij" = {
source = ./zellij;
source = config.lib.file.mkOutOfStoreSymlink ./zellij;
recursive = true;
};
};
Expand Down

0 comments on commit ece7a4c

Please sign in to comment.