summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-11-14 23:21:10 -0500
committerseth <[email protected]>2023-11-15 01:54:45 -0500
commit6cce6f2211910a668976442cf66608b4fb780611 (patch)
treef0d7b43773114cbabca1280f0626eb0d5a29e4b6
parentb450cfc9937966ffca2fa71a63ddca8be6af8ae1 (diff)
Revert "systems: nixinate -> deploy-rs (again)"
This reverts commit f281097023293a482498412d3760f350663b7314. Revert "ci: fix typo in deploy nix develop command" This reverts commit 2f15e8997f3086a1dc0fc6f472b46aaee11c98bf.
-rw-r--r--README.md2
-rw-r--r--dev.nix1
-rw-r--r--flake.lock50
-rw-r--r--flake.nix14
-rw-r--r--justfile8
-rw-r--r--systems/atlas/default.nix8
-rw-r--r--systems/default.nix8
-rw-r--r--systems/deploy.nix43
8 files changed, 45 insertions, 89 deletions
diff --git a/README.md b/README.md
index 06cc37b..7f07641 100644
--- a/README.md
+++ b/README.md
@@ -38,7 +38,7 @@ there are some amazing tools i use to make/manage this flake that i would highly
- [home-manager](https://github.com/nix-community/home-manager)
- [agenix](https://github.com/ryantm/agenix)
- [flake-parts](https://github.com/hercules-ci/flake-parts)
-- [deploy-rs](https://github.com/serokell/deploy-rs)
+- [nixinate](https://github.com/MatthewCroughan/nixinate)
- [lanzaboote](https://github.com/nix-community/lanzaboote)
- [nixos-wsl](https://github.com/nix-community/nixos-wsl)
- [nix-openwrt-imagebuilder](https://github.com/astro/nix-openwrt-imagebuilder)
diff --git a/dev.nix b/dev.nix
index ae56627..896dd84 100644
--- a/dev.nix
+++ b/dev.nix
@@ -24,7 +24,6 @@
actionlint
alejandra
deadnix
- deploy-rs
fzf
just
nil
diff --git a/flake.lock b/flake.lock
index 333fea5..d34206c 100644
--- a/flake.lock
+++ b/flake.lock
@@ -121,34 +121,6 @@
"type": "github"
}
},
- "deploy": {
- "inputs": {
- "flake-compat": [
- "pre-commit",
- "flake-compat"
- ],
- "nixpkgs": [
- "nixpkgs"
- ],
- "utils": [
- "pre-commit",
- "flake-utils"
- ]
- },
- "locked": {
- "lastModified": 1698921442,
- "narHash": "sha256-7KmvhQ7FuXlT/wG4zjTssap6maVqeAMBdtel+VjClSM=",
- "owner": "serokell",
- "repo": "deploy-rs",
- "rev": "660180bbbeae7d60dad5a92b30858306945fd427",
- "type": "github"
- },
- "original": {
- "owner": "serokell",
- "repo": "deploy-rs",
- "type": "github"
- }
- },
"flake-compat": {
"flake": false,
"locked": {
@@ -326,6 +298,26 @@
"type": "github"
}
},
+ "nixinate": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1688141737,
+ "narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=",
+ "owner": "MatthewCroughan",
+ "repo": "nixinate",
+ "rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9",
+ "type": "github"
+ },
+ "original": {
+ "owner": "MatthewCroughan",
+ "repo": "nixinate",
+ "type": "github"
+ }
+ },
"nixos-hardware": {
"locked": {
"lastModified": 1699159446,
@@ -486,12 +478,12 @@
"arkenfox": "arkenfox",
"catppuccin": "catppuccin",
"darwin": "darwin",
- "deploy": "deploy",
"getchoo": "getchoo",
"getchvim": "getchvim",
"hm": "hm",
"lanzaboote": "lanzaboote",
"nix-index-database": "nix-index-database",
+ "nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixos-wsl": "nixos-wsl",
"nixpkgs": "nixpkgs",
diff --git a/flake.nix b/flake.nix
index 029478a..f342e34 100644
--- a/flake.nix
+++ b/flake.nix
@@ -46,15 +46,6 @@
};
};
- deploy = {
- url = "github:serokell/deploy-rs";
- inputs = {
- nixpkgs.follows = "nixpkgs";
- utils.follows = "pre-commit/flake-utils";
- flake-compat.follows = "pre-commit/flake-compat";
- };
- };
-
getchoo = {
url = "github:getchoo/nix-exprs";
inputs.nixpkgs.follows = "nixpkgs";
@@ -85,6 +76,11 @@
};
};
+ nixinate = {
+ url = "github:MatthewCroughan/nixinate";
+ inputs.nixpkgs.follows = "nixpkgs";
+ };
+
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
diff --git a/justfile b/justfile
index dcbd65e..00cedab 100644
--- a/justfile
+++ b/justfile
@@ -32,10 +32,14 @@ check:
nix flake check
deploy host:
- deploy -s .#{{ host }}
+ nix run .#{{ host }}
deploy-all:
- deploy -s
+ nix eval \
+ --json ".#apps.x86_64-linux" \
+ --apply builtins.attrNames \
+ | , jq -c '.[]' | grep -v "dry-run" \
+ | while read -r c; do nix run ".#$c"; done
[linux]
[macos]
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)
- ];
- };
-}