Variablize username more

This commit is contained in:
Jimbo 2025-01-03 17:52:33 -05:00
parent 33236aedc6
commit ea3a6db5af
39 changed files with 93 additions and 102 deletions

View file

@ -1,7 +1,7 @@
{ home-manager, ... }:
{
imports = [
./jimbo
./main
home-manager.nixosModules.home-manager
];
}

View file

@ -1,8 +1,7 @@
{ pkgs, config, ... }:
{
users.users.jimbo = {
description = "Jimbo";
hashedPassword = config.secrets.jimboAccPass;
users.users."${config.sysusers.main}" = {
hashedPassword = config.secrets.mainAccPass;
isNormalUser = true;
openssh.authorizedKeys.keys = [
(builtins.readFile ../../../../../../hosts/tower/id_ed25519.pub)
@ -34,5 +33,5 @@
shell = pkgs.zsh;
};
home-manager.users.jimbo = import ../../../../../home;
home-manager.users."${config.sysusers.main}" = import ../../../../../home;
}

View file

@ -9,7 +9,7 @@
};
};
systemd.tmpfiles.rules = [ "f /var/lib/systemd/linger/jimbo" ];
systemd.tmpfiles.rules = [ "f /var/lib/systemd/linger/${config.sysusers.main}" ];
environment.persistence."/persist".directories = [ "/var/lib/bluetooth" ];
};

View file

@ -1,8 +1,8 @@
{ impermanence, ... }:
{
imports = [
./main
./root
./jimbo
impermanence.nixosModules.impermanence
];
}

View file

@ -1,8 +1,8 @@
{ ... }:
{ config, ... }:
{
environment.persistence."/persist" = {
hideMounts = true;
users.jimbo = {
users.${config.sysusers.main} = {
directories = [
"Keepers"
"Documents"

View file

@ -1,8 +1,8 @@
{ ... }:
{
imports = [
./main
./root
./jimbo
];
services.snapper = {

View file

@ -1,7 +1,7 @@
{ config, lib, ... }:
{
services.snapper.configs.jimbo = lib.mkIf config.environment.persistence."/persist".enable {
SUBVOLUME = "/persist/home/jimbo";
services.snapper.configs.${config.sysusers.main} = lib.mkIf config.environment.persistence."/persist".enable {
SUBVOLUME = "/persist/home/${config.sysusers.main}";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_DAILY = 1;

Binary file not shown.

View file

@ -52,6 +52,6 @@
"virbr1"
];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 jimbo libvirtd -" ];
systemd.tmpfiles.rules = [ "f /dev/shm/looking-glass 0660 ${config.sysusers.main} libvirtd -" ];
};
}

View file

@ -2,6 +2,6 @@
{
security.acme = {
acceptTerms = true;
defaults.email = "jimbo@${config.domains.p2}";
defaults.email = "contact@${config.domains.p2}";
};
}

View file

@ -1,9 +1,7 @@
{ ... }:
{
imports = [
#./nextcloud
./nfs
./samba
./seafile
];
}

View file

@ -1,18 +0,0 @@
{ lib, config, ... }:
{
services.nginx.virtualHosts."cloud.${config.domains.p2}" = lib.mkIf config.services.nextcloud.enable {
enableACME = true;
addSSL = true;
locations."/" = {
proxyWebsockets = true;
extraConfig = ''
location /.well-known/carddav {
return 301 $scheme://$host/remote.php/dav;
}
location /.well-known/caldav {
return 301 $scheme://$host/remote.php/dav;
}
'';
};
};
}

View file

@ -10,7 +10,7 @@
listen.port = 265;
hostname = "radio.${config.domains.p2}";
admin = {
user = "jimbo";
user = "${config.sysusers.main}";
password = "${config.secrets.castAdminPass}";
};
extraConf = ''