commit 949d6a7706aaecd64150072dd111e3832bf28a18
parent 29a228e88dc78935f21dd58700c89b92bacc4e77
Author: MTRNord <mtrnord1@gmail.com>
Date: Sat, 12 Aug 2023 11:05:57 +0200
Prepare deploy-rs and add formatting hook
Diffstat:
4 files changed, 85 insertions(+), 10 deletions(-)
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
@@ -0,0 +1,5 @@
+repos:
+ - repo: https://github.com/nix-community/nixpkgs-fmt
+ rev: v1.3.0
+ hooks:
+ - id: nixpkgs-fmt
diff --git a/flake.lock b/flake.lock
@@ -1,8 +1,44 @@
{
"nodes": {
+ "deploy-rs": {
+ "inputs": {
+ "flake-compat": "flake-compat",
+ "nixpkgs": "nixpkgs",
+ "utils": "utils"
+ },
+ "locked": {
+ "lastModified": 1686747123,
+ "narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=",
+ "owner": "serokell",
+ "repo": "deploy-rs",
+ "rev": "724463b5a94daa810abfc64a4f87faef4e00f984",
+ "type": "github"
+ },
+ "original": {
+ "owner": "serokell",
+ "repo": "deploy-rs",
+ "type": "github"
+ }
+ },
"flake-compat": {
"flake": false,
"locked": {
+ "lastModified": 1668681692,
+ "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "rev": "009399224d5e398d03b22badca40a37ac85412a1",
+ "type": "github"
+ },
+ "original": {
+ "owner": "edolstra",
+ "repo": "flake-compat",
+ "type": "github"
+ }
+ },
+ "flake-compat_2": {
+ "flake": false,
+ "locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
@@ -54,8 +90,8 @@
},
"kubenix": {
"inputs": {
- "flake-compat": "flake-compat",
- "nixpkgs": "nixpkgs",
+ "flake-compat": "flake-compat_2",
+ "nixpkgs": "nixpkgs_2",
"systems": "systems",
"treefmt": "treefmt"
},
@@ -75,11 +111,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1686488075,
- "narHash": "sha256-2otSBt2hbeD+5yY25NF3RhWx7l5SDt1aeU3cJ/9My4M=",
+ "lastModified": 1671417167,
+ "narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "9401a0c780b49faf6c28adf55764f230301d0dce",
+ "rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
"type": "github"
},
"original": {
@@ -123,6 +159,22 @@
},
"nixpkgs_2": {
"locked": {
+ "lastModified": 1686488075,
+ "narHash": "sha256-2otSBt2hbeD+5yY25NF3RhWx7l5SDt1aeU3cJ/9My4M=",
+ "owner": "NixOS",
+ "repo": "nixpkgs",
+ "rev": "9401a0c780b49faf6c28adf55764f230301d0dce",
+ "type": "github"
+ },
+ "original": {
+ "owner": "NixOS",
+ "ref": "nixpkgs-unstable",
+ "repo": "nixpkgs",
+ "type": "github"
+ }
+ },
+ "nixpkgs_3": {
+ "locked": {
"lastModified": 1691592289,
"narHash": "sha256-Lqpw7lrXlLkYra33tp57ms8tZ0StWhbcl80vk4D90F8=",
"owner": "nixos",
@@ -137,7 +189,7 @@
"type": "github"
}
},
- "nixpkgs_3": {
+ "nixpkgs_4": {
"locked": {
"lastModified": 1690026219,
"narHash": "sha256-oOduRk/kzQxOBknZXTLSEYd7tk+GoKvr8wV6Ab+t4AU=",
@@ -155,17 +207,18 @@
},
"root": {
"inputs": {
+ "deploy-rs": "deploy-rs",
"hardware": "hardware",
"home-manager": "home-manager",
"kubenix": "kubenix",
- "nixpkgs": "nixpkgs_2",
+ "nixpkgs": "nixpkgs_3",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
- "nixpkgs": "nixpkgs_3",
+ "nixpkgs": "nixpkgs_4",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
@@ -216,6 +269,21 @@
"repo": "treefmt-nix",
"type": "github"
}
+ },
+ "utils": {
+ "locked": {
+ "lastModified": 1667395993,
+ "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
+ "type": "github"
+ },
+ "original": {
+ "owner": "numtide",
+ "repo": "flake-utils",
+ "type": "github"
+ }
}
},
"root": "root",
diff --git a/flake.nix b/flake.nix
@@ -21,9 +21,10 @@
# nix-colors.url = "github:misterio77/nix-colors";
kubenix.url = "github:hall/kubenix";
+ deploy-rs.url = "github:serokell/deploy-rs";
};
- outputs = { self, nixpkgs, home-manager, sops-nix, ... }@inputs:
+ outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, ... }@inputs:
let
inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs [
@@ -85,5 +86,6 @@
];
};
};
+ checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
}
diff --git a/nixos/worker-1/configuration.nix b/nixos/worker-1/configuration.nix
@@ -119,7 +119,7 @@
hostName = "worker-1";
# networkmanager.enable = true;
- nameservers = ["8.8.8.8" "8.8.4.4"];
+ nameservers = [ "8.8.8.8" "8.8.4.4" ];
# Open ports in the firewall.