diff options
Diffstat (limited to 'users/ryan/linux/foreign.nix')
| -rw-r--r-- | users/ryan/linux/foreign.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/users/ryan/linux/foreign.nix b/users/ryan/linux/foreign.nix new file mode 100644 index 0000000..b1b06ab --- /dev/null +++ b/users/ryan/linux/foreign.nix | |||
| @@ -0,0 +1,25 @@ | |||
| 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 | } | ||
