flake.lock: update mysecrets
hosts/dunamis/sops.nix: make it more composable Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@ -1003,11 +1003,11 @@
|
|||||||
"mysecrets": {
|
"mysecrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742907009,
|
"lastModified": 1743273192,
|
||||||
"narHash": "sha256-BP5CUVdaXcBdeiPeeF4lQWd/FweyaNTv9Td6doem/O0=",
|
"narHash": "sha256-G9VhIc+Fc+w4LDR81xmkj3xxbrvYJUOTM9sM4191ucY=",
|
||||||
"ref": "refs/heads/main",
|
"ref": "refs/heads/main",
|
||||||
"rev": "ef50249e9e26737dde7d9095ce528c2c47097494",
|
"rev": "e8f749354223905785f4510fde10b528bf1b2ba2",
|
||||||
"revCount": 12,
|
"revCount": 13,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"
|
"url": "ssh://gitea@gitea.linerds.us/unexplrd/nix-secrets"
|
||||||
},
|
},
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
{inputs, ...}: {
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
s = inputs.mysecrets;
|
||||||
|
hostname = config.networking.hostName;
|
||||||
|
sopsFile = "${s}/hosts/${hostname}.yaml";
|
||||||
|
in {
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
@ -9,7 +17,7 @@
|
|||||||
keyFile = "/var/lib/sops-nix/key.txt";
|
keyFile = "/var/lib/sops-nix/key.txt";
|
||||||
generateKey = true;
|
generateKey = true;
|
||||||
};
|
};
|
||||||
defaultSopsFile = "${toString inputs.mysecrets}/secrets.yaml";
|
defaultSopsFile = "${s}/common.yaml";
|
||||||
secrets = {
|
secrets = {
|
||||||
"user-password-hashed".neededForUsers = true;
|
"user-password-hashed".neededForUsers = true;
|
||||||
"ssh-config" = {
|
"ssh-config" = {
|
||||||
@ -17,12 +25,14 @@
|
|||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = "user";
|
owner = "user";
|
||||||
};
|
};
|
||||||
"ssh-dunamis-user" = {
|
"ssh-${hostname}-user" = {
|
||||||
|
inherit sopsFile;
|
||||||
path = "/home/user/.ssh/id_ed25519";
|
path = "/home/user/.ssh/id_ed25519";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = "user";
|
owner = "user";
|
||||||
};
|
};
|
||||||
"ssh-dunamis-user.pub" = {
|
"ssh-${hostname}-user.pub" = {
|
||||||
|
inherit sopsFile;
|
||||||
path = "/home/user/.ssh/id_ed25519.pub";
|
path = "/home/user/.ssh/id_ed25519.pub";
|
||||||
mode = "0400";
|
mode = "0400";
|
||||||
owner = "user";
|
owner = "user";
|
||||||
|
Reference in New Issue
Block a user