feat: refactor flake.nix

This commit is contained in:
Ryan Yin
2023-12-20 00:48:30 +08:00
parent 809a68fa27
commit 29511fa574
28 changed files with 416 additions and 422 deletions

View File

@@ -10,10 +10,7 @@
}: let
inherit (specialArgs) username;
in
{
name,
...
}: {
{name, ...}: {
deployment = {
inherit targetUser;
targetHost = name; # hostName or IP address
@@ -27,6 +24,8 @@ in
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
nix.registry.nixpkgs.flake = nixpkgs;
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
nixpkgs.overlays = import ../overlays specialArgs;
}
]
++ (

View File

@@ -23,6 +23,8 @@ in
# make `nix repl '<nixpkgs>'` use the same nixpkgs as the one used by this flake.
# discard all the default paths, and only use the one from this flake.
nix.nixPath = lib.mkForce ["/etc/nix/inputs"];
nixpkgs.overlays = import ../overlays specialArgs;
})
home-manager.darwinModules.home-manager

View File

@@ -18,6 +18,8 @@ in
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
nix.registry.nixpkgs.flake = nixpkgs;
nix.channel.enable = false; # disable nix-channel, we use flakes instead.
nixpkgs.overlays = import ../overlays specialArgs;
}
nixos-generators.nixosModules.all-formats