flakes: add age and agenix

This commit is contained in:
Motiejus Jakštys 2023-04-05 14:46:57 +03:00
parent 87c748146c
commit c4acd525c7
2 changed files with 44 additions and 12 deletions

View File

@ -1,5 +1,26 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": [],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1680281360,
"narHash": "sha256-XdLTgAzjJNDhAG2V+++0bHpSzfvArvr2pW6omiFfEJk=",
"owner": "ryantm",
"repo": "agenix",
"rev": "e64961977f60388dd0b49572bb0fc453b871f896",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"deploy-rs": { "deploy-rs": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
@ -73,6 +94,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"

View File

@ -1,26 +1,30 @@
{ {
description = "motiejus/config"; description = "motiejus/config";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
flake-utils.url = "github:numtide/flake-utils";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.darwin.follows = "";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.inputs.utils.follows = "flake-utils";
};
nixConfig = { nixConfig = {
trusted-substituters = "https://cache.nixos.org/"; trusted-substituters = "https://cache.nixos.org/";
trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="; trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=";
extra-experimental-features = "nix-command flakes"; extra-experimental-features = "nix-command flakes";
}; };
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11-small";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.inputs.utils.follows = "flake-utils";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
agenix,
deploy-rs, deploy-rs,
flake-utils, flake-utils,
}: let }: let
@ -33,6 +37,8 @@
./configuration.nix ./configuration.nix
./hardware-configuration.nix ./hardware-configuration.nix
./zfs.nix ./zfs.nix
agenix.nixosModules.default
]; ];
}; };
@ -55,7 +61,11 @@
in { in {
devShells.default = with pkgs; devShells.default = with pkgs;
mkShell { mkShell {
packages = [deploy-rs.packages.x86_64-linux.deploy-rs]; packages = [
pkgs.age
agenix.packages.${system}.agenix
deploy-rs.packages.${system}.deploy-rs
];
}; };
formatter = pkgs.alejandra; formatter = pkgs.alejandra;