refactor: move email to global variable

This commit is contained in:
2024-10-27 16:40:34 +05:30
parent 1a59094c57
commit f5e87d9be2
10 changed files with 33 additions and 21 deletions

View File

@ -2,6 +2,7 @@
pkgs,
username,
config,
email,
...
}: {
imports = [
@ -48,7 +49,7 @@
acme = {
acceptTerms = true;
defaults.email = "0xtux@pm.me";
defaults.email = "${email}";
certs = {
"tux.rs" = {
domain = "*.tux.rs";

View File

@ -2,6 +2,7 @@
pkgs,
username,
config,
email,
...
}: {
imports = [
@ -84,7 +85,7 @@
acme = {
acceptTerms = true;
defaults.email = "0xtux@pm.me";
defaults.email = "${email}";
certs = {
"tux.rs" = {
domain = "*.tux.rs";

View File

@ -5,6 +5,7 @@
config,
lib,
inputs,
email,
...
}: let
# Sops needs acess to the keys before the persist dirs are even mounted; so
@ -118,7 +119,7 @@ in {
isNormalUser = true;
extraGroups = ["networkmanager" "wheel" "storage"];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${email}''
];
};
};
@ -126,7 +127,7 @@ in {
home-manager = {
backupFileExtension = "backup";
useUserPackages = true;
extraSpecialArgs = {inherit inputs outputs username;};
extraSpecialArgs = {inherit inputs outputs username email;};
users.${username} = {
imports = [
./home.nix

View File

@ -4,6 +4,7 @@
outputs,
pkgs,
username,
email,
...
}: {
imports = [
@ -110,7 +111,7 @@
isNormalUser = true;
extraGroups = ["networkmanager" "wheel" "storage"];
openssh.authorizedKeys.keys = [
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D 0xtux@pm.me''
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${email}''
];
};
};