hosts/sarien/sops.nix: overcomplicate for no reason
hosts/sarien/configuration.nix: change theme to helios Signed-off-by: unexplrd <unexplrd@linerds.us>
This commit is contained in:
@ -3,10 +3,15 @@
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
s = inputs.mysecrets;
|
||||
inherit (inputs) mysecrets;
|
||||
# TODO: stop relying on networking.hostName
|
||||
hostname = "sarien";
|
||||
sopsFile = "${s}/hosts/${hostname}.yaml";
|
||||
sopsFile = mysecrets + "/hosts/${hostname}.yaml";
|
||||
dotSsh = name: "/home/user/.ssh/" + name;
|
||||
sshKey = {
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
in {
|
||||
imports = with inputs; [
|
||||
sops-nix.nixosModules.sops
|
||||
@ -18,45 +23,39 @@ in {
|
||||
keyFile = "/var/lib/sops-nix/key.txt";
|
||||
generateKey = true;
|
||||
};
|
||||
defaultSopsFile = "${s}/common.yaml";
|
||||
defaultSopsFile = mysecrets + "/common.yaml";
|
||||
secrets = {
|
||||
"user-password-hashed".neededForUsers = true;
|
||||
"ssh-config" = {
|
||||
path = "/home/user/.ssh/config";
|
||||
path = dotSsh "config";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
};
|
||||
"ssh-${hostname}-user" = {
|
||||
inherit sopsFile;
|
||||
path = "/home/user/.ssh/id_ed25519";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519";
|
||||
};
|
||||
"ssh-${hostname}-user.pub" = {
|
||||
inherit sopsFile;
|
||||
path = "/home/user/.ssh/id_ed25519.pub";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_ed25519.pub";
|
||||
};
|
||||
"ssh-unexplrd" = {
|
||||
path = "/home/user/.ssh/id_unexplrd_ed25519";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519";
|
||||
};
|
||||
"ssh-unexplrd.pub" = {
|
||||
path = "/home/user/.ssh/id_unexplrd_ed25519.pub";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_unexplrd_ed25519.pub";
|
||||
};
|
||||
"ssh-uni" = {
|
||||
path = "/home/user/.ssh/id_uni_ed25519";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519";
|
||||
};
|
||||
"ssh-uni.pub" = {
|
||||
path = "/home/user/.ssh/id_uni_ed25519.pub";
|
||||
mode = "0400";
|
||||
owner = "user";
|
||||
inherit (sshKey) mode owner;
|
||||
path = dotSsh "id_uni_ed25519.pub";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
Reference in New Issue
Block a user