mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-01-11 20:40:24 +01:00
feat: refactor flake.nix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
]
|
||||
++ (
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user