diff --git a/flake.nix b/flake.nix index ae599fc..e4dfa1a 100644 --- a/flake.nix +++ b/flake.nix @@ -43,13 +43,13 @@ inputs.flake-parts.lib.mkFlake { inherit (inputs) self; } { systems = [ "x86_64-linux" "aarch64-darwin" ]; imports = [ + inputs.flake-root.flakeModule + inputs.mission-control.flakeModule ./lib.nix ./users ./home ./nixos ./nix-darwin - inputs.mission-control.flakeModule - inputs.flake-root.flakeModule ]; flake = { diff --git a/lib.nix b/lib.nix index af9c0bd..5b11545 100644 --- a/lib.nix +++ b/lib.nix @@ -55,7 +55,7 @@ }; }; - perSystem = { system, pkgs, lib, ... }: { + perSystem = { system, config, pkgs, lib, ... }: { mission-control.scripts = { update-primary = { description = '' @@ -76,8 +76,9 @@ # TODO: Replace with deploy-rs or (new) nixinate if system == "aarch64-darwin" then '' + cd "$(${lib.getExe config.flake-root.package})" ${self.darwinConfigurations.default.system}/sw/bin/darwin-rebuild \ - switch --flake ${self}#default + switch --flake .#default '' else ''