add user config setting for use in hardcoded paths

This commit is contained in:
Daylin Morgan 2024-08-02 10:10:11 -05:00
parent 7922dc210e
commit 097e1a1e35
Signed by: daylin
GPG key ID: 950D13E9719334AD
11 changed files with 22 additions and 14 deletions

View file

@ -13,8 +13,8 @@ mkOizysModule config "vpn" {
services.openvpn.servers = { services.openvpn.servers = {
express-ny = { express-ny = {
config = '' config = ''
config /home/daylin/.config/openvpn/express-ny/config.ovpn config /home/${config.oizys.user}/.config/openvpn/express-ny/config.ovpn
auth-user-pass /home/daylin/.config/openvpn/express-ny/credentials auth-user-pass /home/${config.oizys.user}/.config/openvpn/express-ny/credentials
''; '';
autoStart = false; autoStart = false;
updateResolvConf = true; updateResolvConf = true;

View file

@ -5,7 +5,7 @@
... ...
}: }:
let let
inherit (lib) mkEnableOption; inherit (lib) mkEnableOption mkOption;
in in
{ {
imports = with self.nixosModules; [ imports = with self.nixosModules; [
@ -39,8 +39,15 @@ in
restic restic
]; ];
options.oizys.desktop.enable = mkEnableOption "is desktop"; options.oizys = {
options.oizys.docker.enable = mkEnableOption "enable docker support"; user = mkOption {
type = lib.types.string;
default = "daylin";
description = "main user account";
};
desktop.enable = mkEnableOption "is desktop";
docker.enable = mkEnableOption "enable docker support";
};
config = { config = {
networking.hostName = hostName; networking.hostName = hostName;
time.timeZone = "US/Central"; time.timeZone = "US/Central";

View file

@ -12,8 +12,8 @@ mkOizysModule config "backups" {
# workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt` # workaround for now `mkdir ~/.conda && touch ~/.conda/environments.txt`
extraBackupArgs = [ extraBackupArgs = [
"--exclude-file /home/daylin/.config/restic/excludes.txt" "--exclude-file /home/${config.oizys.user}/.config/restic/excludes.txt"
"--exclude-file /home/daylin/.conda/environments.txt" "--exclude-file /home/${config.oizys.user}/.conda/environments.txt"
"--verbose" "--verbose"
"--one-file-system" "--one-file-system"
"--tag systemd.timer" "--tag systemd.timer"

View file

@ -16,3 +16,4 @@
> kernel: ucsi_acpi USBC000:00: error -EINVAL: PPM init failed > kernel: ucsi_acpi USBC000:00: error -EINVAL: PPM init failed
<!-- generated with <3 by daylinmorgan/todo --> <!-- generated with <3 by daylinmorgan/todo -->