Skip to content

Commit

Permalink
Revert "use deploy's overlay to prevent nixpkgs dep"
Browse files Browse the repository at this point in the history
This reverts commit 8ae19a33c1c34620ce843e286fa69852db791d5c.

fix: #75

see that issue also for an unresolvable situation induced by this
  • Loading branch information
blaggacao authored and Pacman99 committed Feb 23, 2022
1 parent 33474e6 commit 0a5325d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 20 deletions.
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@
inputs =
{
nixpkgs.url = "github:nixos/nixpkgs";
deploy = {
url = "github:serokell/deploy-rs";
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "utils";
};
};
devshell.url = "github:numtide/devshell";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus/staging";
nixlib.url = "github:divnix/nixpkgs.lib";

# Only overlay is used, so nixpkgs isn't a cost here
deploy.url = "github:serokell/deploy-rs";

# We only use the nixosModules output which only needs nixpkgs lib
# TODO: don't pull another 'nixpkgs' when only nixpkgs lib is needed
nixos-generators = {
Expand Down
24 changes: 10 additions & 14 deletions src/generators.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,16 @@
**/

lib.mapAttrs
(_: config:
let
pkgs = config.pkgs.appendOverlays [ deploy.overlay ];
in
lib.recursiveUpdate
{
hostname = config.config.networking.hostName;
(_: config: lib.recursiveUpdate
{
hostname = config.config.networking.hostName;

profiles.system = {
user = "root";
path = pkgs.deploy-rs.lib.activate.nixos config;
};
}
extraConfig)
profiles.system = {
user = "root";
path = deploy.lib.${config.config.nixpkgs.system}.activate.nixos config;
};
}
extraConfig)
hosts;

# DEPRECATED, suites no longer needs an explicit function after the importables generalization
Expand All @@ -46,5 +42,5 @@
value = lib.mkProfileAttrs (toString path);
});
in
lib.mapAttrs (_: v: lib.profileMap v) (suites profileSet);
lib.mapAttrs (_: v: lib.profileMap v) (suites profileSet);
}

0 comments on commit 0a5325d

Please sign in to comment.