users/ryan/linux/foreign.nix
a2c015245921f589bbd7cc787bfd092474a07992
· 807 B · 25 lines
raw
| 1 | { inputs, ... }: |
| 2 | |
| 3 | # Applies to any standalone (non-NixOS) home-manager install, where |
| 4 | # home-manager owns the user profile on its own instead of being wired in |
| 5 | # via a NixOS module. NixOS manages nix.conf/the flake registry and doesn't |
| 6 | # need the genericLinux target at all, so this is skipped on NixOS hosts. |
| 7 | { |
| 8 | targets.genericLinux.enable = true; |
| 9 | |
| 10 | xdg.configFile."nix/nix.conf".text = "experimental-features = nix-command flakes\n"; |
| 11 | xdg.configFile."nix/registry.json".text = builtins.toJSON { |
| 12 | version = 2; |
| 13 | flakes = [ |
| 14 | { |
| 15 | from = { type = "indirect"; id = "nixpkgs"; }; |
| 16 | to = { |
| 17 | type = "path"; |
| 18 | path = inputs.nixpkgs.outPath; |
| 19 | lastModified = inputs.nixpkgs.lastModified; |
| 20 | narHash = inputs.nixpkgs.narHash; |
| 21 | }; |
| 22 | } |
| 23 | ]; |
| 24 | }; |
| 25 | } |