From c1fdb6faf8fb768bb0cb7e4c4f24ed4d34f298ff Mon Sep 17 00:00:00 2001 From: TheWanderingCrow Date: Mon, 20 Jan 2025 20:05:02 -0500 Subject: [PATCH] add homebox --- hosts/Parzival-Live/default.nix | 2 +- modules/software/usershell.nix | 77 ++++++++++++++--------------- modules/users/crow/user.nix | 2 +- modules/users/live/user.nix | 2 +- modules/users/overseer/services.nix | 25 +++++++--- modules/users/overseer/user.nix | 4 +- 6 files changed, 62 insertions(+), 50 deletions(-) diff --git a/hosts/Parzival-Live/default.nix b/hosts/Parzival-Live/default.nix index 78d9d96..cfd3f3d 100644 --- a/hosts/Parzival-Live/default.nix +++ b/hosts/Parzival-Live/default.nix @@ -18,7 +18,7 @@ users.users.nixos.authorizedKeys.keyFiles = lib.mkForce [ inputs.nix-secrets.keys.default -]; + ]; user.live.enable = true; diff --git a/modules/software/usershell.nix b/modules/software/usershell.nix index 5fe293e..9158e36 100644 --- a/modules/software/usershell.nix +++ b/modules/software/usershell.nix @@ -17,66 +17,65 @@ }; programs.starship = let - raisin_black = "#262932"; - blood_red = "#710000"; - rich_lemon = "#FDF500"; - keppel = "#1AC5B0"; - electric_blue = "#36EBF3"; - blushing_purple = "#9370DB"; - frostbite = "#E455AE"; - steel_pink = "#CB1DCD"; - pale_silver = "#D1C5C0"; - + raisin_black = "#262932"; + blood_red = "#710000"; + rich_lemon = "#FDF500"; + keppel = "#1AC5B0"; + electric_blue = "#36EBF3"; + blushing_purple = "#9370DB"; + frostbite = "#E455AE"; + steel_pink = "#CB1DCD"; + pale_silver = "#D1C5C0"; in { enable = true; settings = { format = "[ ](${rich_lemon})[ CrOS](bg:${rich_lemon} fg:${raisin_black})$username$hostname[ ](fg:${rich_lemon} bg:${blushing_purple})$directory[ ](fg:${blushing_purple} bg:${frostbite})$git_branch$git_status[ ](fg:${frostbite} bg:${steel_pink})$nix_shell[ ](${steel_pink})"; right_format = "[ ](${rich_lemon})$time[ ](${rich_lemon})"; - + # Left Modules username = { - disabled = false; - format = "[ $user]($style)"; - style_user = "fg:${keppel} bg:${rich_lemon}"; - style_root = "fg:${blood_red} bg:${rich_lemon}"; + disabled = false; + format = "[ $user]($style)"; + style_user = "fg:${keppel} bg:${rich_lemon}"; + style_root = "fg:${blood_red} bg:${rich_lemon}"; }; hostname = { - disabled = false; - format = "[@$hostname ]($style)"; - style = "fg:${keppel} bg:${rich_lemon}"; - ssh_only = false; - ssh_symbol = ""; + disabled = false; + format = "[@$hostname ]($style)"; + style = "fg:${keppel} bg:${rich_lemon}"; + ssh_only = false; + ssh_symbol = ""; }; directory = { - disabled = false; - format = "[ $path ]($style)"; - style = "bg:${blushing_purple} fg:${raisin_black}"; - truncation_length = 3; - truncation_symbol = "…/"; + disabled = false; + format = "[ $path ]($style)"; + style = "bg:${blushing_purple} fg:${raisin_black}"; + truncation_length = 3; + truncation_symbol = "…/"; }; git_branch = { - disabled = false; - format = "[ $symbol $branch ]($style)"; - symbol = ""; - style = "fg:${raisin_black} bg:${frostbite}"; + disabled = false; + format = "[ $symbol $branch ]($style)"; + symbol = ""; + style = "fg:${raisin_black} bg:${frostbite}"; }; git_status = { - disabled = false; - format = "[$all_status$ahead_behind]($style)"; - style = "fg:${raisin_black} bg:${frostbite}"; + disabled = false; + format = "[$all_status$ahead_behind]($style)"; + style = "fg:${raisin_black} bg:${frostbite}"; }; nix_shell = { - disabled = false; - format = "[$symbol $name]($style)"; - style = "bg:${steel_pink} fg:${electric_blue}"; - symbol = ""; + disabled = false; + format = "[$symbol $name]($style)"; + style = "bg:${steel_pink} fg:${electric_blue}"; + symbol = ""; }; # Right Modules time = { - disabled = false; - format = "[$time]($style)"; - style = "fg:${raisin_black} bg:${rich_lemon}"; + disabled = false; + format = "[$time]($style)"; + style = "fg:${raisin_black} bg:${rich_lemon}"; }; }; }; diff --git a/modules/users/crow/user.nix b/modules/users/crow/user.nix index a5b7a09..9930034 100644 --- a/modules/users/crow/user.nix +++ b/modules/users/crow/user.nix @@ -9,7 +9,7 @@ initialPassword = "changeme"; extraGroups = ["wheel" "networkmanager" "audio" "plugdev" "dialout"]; openssh.authorizedKeys.keyFiles = [ - inputs.nix-secrets.keys.default + inputs.nix-secrets.keys.default ]; }; diff --git a/modules/users/live/user.nix b/modules/users/live/user.nix index 15f90e7..3d81249 100644 --- a/modules/users/live/user.nix +++ b/modules/users/live/user.nix @@ -10,7 +10,7 @@ lib.mkIf config.user.live.enable { initialPassword = "live"; extraGroups = ["wheel" "networkmanager" "audio" "plugdev"]; openssh.authorizedKeys.keyFiles = [ - inputs.nix-secrets.keys.default + inputs.nix-secrets.keys.default ]; }; } diff --git a/modules/users/overseer/services.nix b/modules/users/overseer/services.nix index 3667425..e2707a5 100644 --- a/modules/users/overseer/services.nix +++ b/modules/users/overseer/services.nix @@ -22,6 +22,8 @@ in "d ${volumePath}/NPM/data 700 overseer" "d ${volumePath}/NPM/letsencrypt 700 overseer" + + "d ${volumePath}/homebox/data 700 overseer" ]; # Pull in the restic secrets from sops @@ -47,12 +49,13 @@ in # OCI services virtualisation.podman.enable = true; virtualisation.oci-containers.backend = "podman"; - - networking.firewall.allowedTCPPorts = [ - 81 - 443 - 80 - ]; + + # These ports are needed for NGINX Proxy Manager + networking.firewall.allowedTCPPorts = [ + 81 + 443 + 80 + ]; virtualisation.oci-containers.containers = { # NGINX Proxy Manager @@ -70,4 +73,14 @@ in ]; }; }; + + services = { + homebox = { + enable = true; + settings = { + HBOX_STORAGE_DATA = "${volumePath}/homebox/data"; + HBOX_STORAGE_SQLITE_URL = "${volumePath}/homebox/data/homebox.db?_fk=1&_time_format=sqlite"; + }; + }; + }; } diff --git a/modules/users/overseer/user.nix b/modules/users/overseer/user.nix index 4f21ad6..b0c4ac6 100644 --- a/modules/users/overseer/user.nix +++ b/modules/users/overseer/user.nix @@ -9,8 +9,8 @@ initialPassword = "changeme"; extraGroups = ["wheel" "libvirtd"]; openssh.authorizedKeys.keyFiles = [ - inputs.nix-secrets.keys.default - inputs.nix-secrets.keys.overseer + inputs.nix-secrets.keys.default + inputs.nix-secrets.keys.overseer ]; }; }