feat: set up deploy-rs

This commit is contained in:
Felix Schröter 2022-05-05 21:24:46 +02:00
parent 5f329f550e
commit b2bb30a24d
Signed by: felschr
GPG key ID: 671E39E6744C807D
3 changed files with 80 additions and 3 deletions

View file

@ -20,6 +20,44 @@
"type": "github"
}
},
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1648475189,
"narHash": "sha256-gAGAS6IagwoUr1B0ohE3iR6sZ8hP4LSqzYLC8Mq3WGU=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "83e0c78291cd08cb827ba0d553ad9158ae5a95c3",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1648199409,
"narHash": "sha256-JwPKdC2PoVBkG6E+eWw3j6BMR6sL3COpYWfif7RVb8Y=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "64a525ee38886ab9028e6f61790de0832aa3ef03",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1649676176,
@ -162,6 +200,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixos-hardware": "nixos-hardware",
@ -171,6 +210,21 @@
"nvim-kitty-navigator": "nvim-kitty-navigator",
"pre-commit-hooks": "pre-commit-hooks"
}
},
"utils": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",

View file

@ -19,6 +19,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
inputs.pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -31,7 +36,8 @@
};
outputs = { self, nixpkgs, nixos-hardware, flake-utils, home-manager, nur
, agenix, pre-commit-hooks, nvim-kitty-navigator, nixpkgs-glslls }@inputs:
, agenix, deploy-rs, pre-commit-hooks, nvim-kitty-navigator, nixpkgs-glslls
}@inputs:
let
overlays = {
neovim = self: super:
@ -112,8 +118,10 @@
samba.file = ./secrets/samba.age;
smtp.file = ./secrets/smtp.age;
};
environment.systemPackages = with pkgs;
[ agenix.defaultPackage.x86_64-linux ];
environment.systemPackages = with pkgs; [
agenix.defaultPackage.x86_64-linux
deploy-rs.defaultPackage.x86_64-linux
];
})
];
};
@ -179,6 +187,19 @@
];
};
deploy.nodes.felix-rpi4 = {
hostname = "192.168.1.234";
profiles.system = {
user = "felschr";
path = deploy-rs.lib.aarch64-linux.activate.nixos
self.nixosConfigurations.felix-rpi4;
};
};
# TODO `nix flake check` fails atm which causes this to fail, too
checks = builtins.mapAttrs
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};

View file

@ -7,6 +7,8 @@
options = "--delete-older-than 30d";
};
nix.trustedUsers = [ "@wheel" ];
nix.settings = {
auto-optimise-store = true;
substituters = [ "https://hydra.iohk.io" "https://shajra.cachix.org" ];