agenix
parent
4c28cd8b08
commit
4c1e532876
|
@ -1,12 +1,32 @@
|
|||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1665870395,
|
||||
"narHash": "sha256-Tsbqb27LDNxOoPLh0gw2hIb6L/6Ow/6lIBvqcHzEKBI=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "a630400067c6d03c9b3e0455347dc8559db14288",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1669140675,
|
||||
"narHash": "sha256-npzfyfLECsJWgzK/M4gWhykP2DNAJTYjgY2BWkz/oEQ=",
|
||||
"lastModified": 1671359686,
|
||||
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2788904d26dda6cfa1921c5abb7a2466ffe3cb8c",
|
||||
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -15,47 +35,10 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1671459584,
|
||||
"narHash": "sha256-6wRK7xmeHfClJ0ICOkax1avLZVGTDqBodQlkl/opccY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "87b58217c9a05edcf7630b9be32570f889217aef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-22.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"sops-nix": "sops-nix"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1671472949,
|
||||
"narHash": "sha256-9iHSGpljCX+RypahQssBXPwkru9onfKfceCTeVrMpH4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "32840f16ffa0856cdf9503a8658f2dd42bf70342",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"type": "github"
|
||||
"agenix": "agenix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,14 +1,24 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, agenix, ... }:
|
||||
let
|
||||
lib = nixpkgs.lib;
|
||||
proj_root = ./../..;
|
||||
base_modules = [agenix.nixosModule];
|
||||
# TODO: Change respectively to the system or make a nix shell to alias `nix run github:ryantm/agenix -- `
|
||||
additionalPackages = [agenix.defaultPackage.x86_64-linux];
|
||||
base_modules = [
|
||||
agenix.nixosModule
|
||||
{
|
||||
environment.systemPackages = additionalPackages;
|
||||
}
|
||||
];
|
||||
in {
|
||||
# Windows with NixOS WSL
|
||||
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
||||
|
@ -214,21 +224,21 @@
|
|||
(lib.mapAttrsToList (name: value: "${name}${lib.optionalString (value != null) "=${value}"}") conf));
|
||||
in "${mount_dest} ${confToBackendArg backend_args} ${s3fs-exec}#${bucket}";
|
||||
personalStorage = [
|
||||
(autofs-s3fs_entry {
|
||||
mount_dest = "hot";
|
||||
backend_args = {
|
||||
"-fstype" = "fuse";
|
||||
use_cache = "/tmp";
|
||||
del_cache = null;
|
||||
allow_other = null;
|
||||
url = "https://f5i0.ph.idrivee2-32.com";
|
||||
# TODO: builtins.readFile requires a Git-controlled file
|
||||
passwd_file = (pkgs.writeText "env.s3fs.idrive" (builtins.readFile
|
||||
./../../secrets/env.s3fs
|
||||
));
|
||||
};
|
||||
bucket = "hungtr-hot";
|
||||
})
|
||||
# (autofs-s3fs_entry {
|
||||
# mount_dest = "hot";
|
||||
# backend_args = {
|
||||
# "-fstype" = "fuse";
|
||||
# use_cache = "/tmp";
|
||||
# del_cache = null;
|
||||
# allow_other = null;
|
||||
# url = "https://f5i0.ph.idrivee2-32.com";
|
||||
# # TODO: builtins.readFile requires a Git-controlled file
|
||||
# passwd_file = (pkgs.writeText "env.s3fs.idrive" (builtins.readFile
|
||||
# ./../../secrets/env.s3fs
|
||||
# ));
|
||||
# };
|
||||
# bucket = "hungtr-hot";
|
||||
# })
|
||||
];
|
||||
persoConf = pkgs.writeText "personal" (builtins.concatStringsSep "\n" personalStorage);
|
||||
in {
|
||||
|
|
Loading…
Reference in New Issue