|
36 | 36 | home.packages = with pkgs; [ |
37 | 37 | ]; |
38 | 38 |
|
39 | | - home.file = { |
40 | | - ".aliases".source = ./.aliases; |
41 | | - ".bash_prompt".source = ./.bash_prompt; |
42 | | - ".dockerfunc".source = ./.dockerfunc; |
43 | | - ".exports".source = ./.exports; |
44 | | - ".functions".source = ./.functions; |
45 | | - "gitignore".source = ./.gitignore; |
46 | | - ".inputrc".source = ./.inputrc; |
47 | | - ".irssi".source = mkIfExists ./.irssi; |
48 | | - ".nixbash".source = ./.nixbash; |
49 | | - ".path".source = ./.path; |
50 | | - }; |
| 39 | + home.file = let |
| 40 | + baseFiles = { |
| 41 | + ".aliases".source = ./.aliases; |
| 42 | + ".bash_prompt".source = ./.bash_prompt; |
| 43 | + ".dockerfunc".source = ./.dockerfunc; |
| 44 | + ".exports".source = ./.exports; |
| 45 | + ".functions".source = ./.functions; |
| 46 | + "gitignore".source = ./.gitignore; |
| 47 | + ".inputrc".source = ./.inputrc; |
| 48 | + ".irssi".source = mkIfExists ./.irssi; |
| 49 | + ".nixbash".source = ./.nixbash; |
| 50 | + ".path".source = ./.path; |
| 51 | + }; |
| 52 | + |
| 53 | + linuxOnlyFiles = { |
| 54 | + ".config/fontconfig".source = mkIfExists ./.config/fontconfig; |
| 55 | + ".i3".source = mkIfExists ./.i3; |
| 56 | + ".urxvt".source = mkIfExists ./.urxvt; |
| 57 | + ".Xdefaults".source = ./.Xdefaults; |
| 58 | + ".Xprofile".source = ./.Xprofile; |
| 59 | + ".Xresources".source = ./.Xresources; |
| 60 | + ".xsessionrc".source = ./.xsessionrc; |
| 61 | + }; |
| 62 | + in |
| 63 | + if pkgs.stdenv.isLinux |
| 64 | + then baseFiles // linuxOnlyFiles |
| 65 | + else baseFiles; |
51 | 66 | }; |
52 | 67 |
|
53 | | - # Optional: Provide buildable homeConfigurations for testing |
54 | 68 | homeConfigurations = forAllSystems ( |
55 | 69 | system: |
56 | 70 | home-manager.lib.homeManagerConfiguration { |
|
0 commit comments