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 = {
express-ny = {
config = ''
config /home/daylin/.config/openvpn/express-ny/config.ovpn
auth-user-pass /home/daylin/.config/openvpn/express-ny/credentials
config /home/${config.oizys.user}/.config/openvpn/express-ny/config.ovpn
auth-user-pass /home/${config.oizys.user}/.config/openvpn/express-ny/credentials
'';
autoStart = false;
updateResolvConf = true;

View file

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

View file

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

View file

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