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:
2025-04-05 17:48:24 +03:00
parent 07814e5d0e
commit a107419818
2 changed files with 22 additions and 23 deletions

View File

@ -20,7 +20,7 @@
module.stylix = { module.stylix = {
enable = true; enable = true;
theme = "nord"; theme = "helios";
}; };
opentabletdriver.enable = false; opentabletdriver.enable = false;

View File

@ -3,10 +3,15 @@
inputs, inputs,
... ...
}: let }: let
s = inputs.mysecrets; inherit (inputs) mysecrets;
# TODO: stop relying on networking.hostName # TODO: stop relying on networking.hostName
hostname = "sarien"; hostname = "sarien";
sopsFile = "${s}/hosts/${hostname}.yaml"; sopsFile = mysecrets + "/hosts/${hostname}.yaml";
dotSsh = name: "/home/user/.ssh/" + name;
sshKey = {
mode = "0400";
owner = "user";
};
in { in {
imports = with inputs; [ imports = with inputs; [
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
@ -18,45 +23,39 @@ in {
keyFile = "/var/lib/sops-nix/key.txt"; keyFile = "/var/lib/sops-nix/key.txt";
generateKey = true; generateKey = true;
}; };
defaultSopsFile = "${s}/common.yaml"; defaultSopsFile = mysecrets + "/common.yaml";
secrets = { secrets = {
"user-password-hashed".neededForUsers = true; "user-password-hashed".neededForUsers = true;
"ssh-config" = { "ssh-config" = {
path = "/home/user/.ssh/config"; path = dotSsh "config";
mode = "0400"; mode = "0400";
owner = "user"; owner = "user";
}; };
"ssh-${hostname}-user" = { "ssh-${hostname}-user" = {
inherit sopsFile; inherit sopsFile;
path = "/home/user/.ssh/id_ed25519"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_ed25519";
owner = "user";
}; };
"ssh-${hostname}-user.pub" = { "ssh-${hostname}-user.pub" = {
inherit sopsFile; inherit sopsFile;
path = "/home/user/.ssh/id_ed25519.pub"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_ed25519.pub";
owner = "user";
}; };
"ssh-unexplrd" = { "ssh-unexplrd" = {
path = "/home/user/.ssh/id_unexplrd_ed25519"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_unexplrd_ed25519";
owner = "user";
}; };
"ssh-unexplrd.pub" = { "ssh-unexplrd.pub" = {
path = "/home/user/.ssh/id_unexplrd_ed25519.pub"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_unexplrd_ed25519.pub";
owner = "user";
}; };
"ssh-uni" = { "ssh-uni" = {
path = "/home/user/.ssh/id_uni_ed25519"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_uni_ed25519";
owner = "user";
}; };
"ssh-uni.pub" = { "ssh-uni.pub" = {
path = "/home/user/.ssh/id_uni_ed25519.pub"; inherit (sshKey) mode owner;
mode = "0400"; path = dotSsh "id_uni_ed25519.pub";
owner = "user";
}; };
}; };
}; };