diff options
Diffstat (limited to 'systems')
| -rw-r--r-- | systems/atlas/default.nix | 8 | ||||
| -rw-r--r-- | systems/default.nix | 6 | ||||
| -rw-r--r-- | systems/deploy.nix | 44 |
3 files changed, 12 insertions, 46 deletions
diff --git a/systems/atlas/default.nix b/systems/atlas/default.nix index 836aef7..9e8f926 100644 --- a/systems/atlas/default.nix +++ b/systems/atlas/default.nix @@ -10,6 +10,14 @@ ./teawiebot.nix ]; + _module.args.nixinate = { + host = config.networking.hostName; + sshUser = "root"; + buildOn = "remote"; + substituteOnTarget = true; + hermetic = false; + }; + boot = { loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; diff --git a/systems/default.nix b/systems/default.nix index 47f6bf6..bdfaee0 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -28,8 +28,6 @@ mapNixOS = mapSystems inputs.nixpkgs.lib.nixosSystem; inherit (import ./common.nix {inherit inputs self;}) darwin nixos server; in { - imports = [./deploy.nix]; - flake = { darwinConfigurations = mapDarwin { caroline = { @@ -78,4 +76,8 @@ in { inherit (inputs) openwrt-imagebuilder; }); }; + + perSystem = {system, ...}: { + apps = (inputs.nixinate.nixinate.${system} self).nixinate; + }; } diff --git a/systems/deploy.nix b/systems/deploy.nix deleted file mode 100644 index fbf20d3..0000000 --- a/systems/deploy.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - lib, - inputs, - self, - ... -}: let - targets = ["atlas"]; - configurations = self.nixosConfigurations // self.darwinConfigurations; - - getDeploy = pkgs: - (pkgs.appendOverlays [ - inputs.deploy.overlay - (_: prev: { - deploy-rs = { - inherit (pkgs) deploy-rs; - inherit (prev.deploy-rs) lib; - }; - }) - ]) - .deploy-rs; - - toType = system: - { - "Linux" = "nixos"; - "Darwin" = "darwin"; - } - .${system}; - - toDeployNode = hostname: system: { - sshUser = "root"; - inherit hostname; - profiles.system.path = let - deploy = getDeploy system.pkgs; - type = toType system.pkgs.stdenv.hostPlatform.uname.system; - in - deploy.lib.activate.${type} system; - }; -in { - flake.deploy = { - remoteBuild = true; - fastConnection = false; - nodes = lib.mapAttrs toDeployNode (lib.getAttrs targets configurations); - }; -} |
