summaryrefslogtreecommitdiff
path: root/systems
diff options
context:
space:
mode:
Diffstat (limited to 'systems')
-rw-r--r--systems/atlas/default.nix8
-rw-r--r--systems/default.nix8
-rw-r--r--systems/deploy.nix43
3 files changed, 12 insertions, 47 deletions
diff --git a/systems/atlas/default.nix b/systems/atlas/default.nix
index e8c28e3..d241658 100644
--- a/systems/atlas/default.nix
+++ b/systems/atlas/default.nix
@@ -9,6 +9,14 @@
./nginx.nix
];
+ _module.args.nixinate = {
+ host = "atlas";
+ sshUser = "root";
+ buildOn = "remote";
+ substituteOnTarget = true;
+ hermetic = false;
+ };
+
age.secrets.teawiebot.file = ../../secrets/systems/atlas/teawieBot.age;
boot = {
diff --git a/systems/default.nix b/systems/default.nix
index 5c6703e..023dc59 100644
--- a/systems/default.nix
+++ b/systems/default.nix
@@ -24,10 +24,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 = {
@@ -76,4 +72,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 186ff37..0000000
--- a/systems/deploy.nix
+++ /dev/null
@@ -1,43 +0,0 @@
-{
- lib,
- inputs,
- self,
- ...
-}: let
- targets = ["atlas"];
-
- getDeploy = pkgs:
- (import pkgs.path {
- inherit (pkgs) system;
- overlays = [
- inputs.deploy.overlay
- (_: prev: {
- deploy-rs = {
- inherit (pkgs) deploy-rs;
- inherit (prev.deploy-rs) lib;
- };
- })
- ];
- })
- .deploy-rs;
-
- getType = pkgs:
- if pkgs.stdenv.isDarwin
- then "darwin"
- else "nixos";
-
- toDeployNode = hostname: system: {
- sshUser = "root";
- inherit hostname;
- profiles.system.path = (getDeploy system.pkgs).lib.activate.${getType system.pkgs} system;
- };
-in {
- flake.deploy = {
- remoteBuild = true;
- fastConnection = false;
- nodes = lib.pipe (self.nixosConfigurations // self.darwinConfigurations) [
- (lib.getAttrs targets)
- (lib.mapAttrs toDeployNode)
- ];
- };
-}