From c42e4f5a98688d1c27e3120e6da7adc146540505 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Mon, 26 Aug 2024 16:54:22 -0500 Subject: [PATCH] fix icons --- .../desktop/hyprland/config/hypr/default.nix | 55 ++++++++++--------- .../hyprland/config/waybar/default.nix | 14 ++--- .../config/waybar/scripts/waybar-updates.py | 2 +- .../config/waybar/scripts/waybar-wttr.py | 22 ++++++++ hosts/desktop/hyprland/default.nix | 2 + hosts/desktop/hyprland/environment.nix | 2 +- hosts/desktop/hyprland/home.nix | 16 ++++-- hosts/nas/apps.nix | 2 + hosts/nas/configuration.nix | 1 - hosts/nas/impermanence.nix | 13 +++-- hosts/nas/services.nix | 2 +- hosts/nas/sops.nix | 10 +++- modules/apps/manyfold/default.nix | 37 +++++++++++++ modules/apps/manyfold/options.nix | 52 ++++++++++++++++++ modules/apps/orca-slicer/default.nix | 9 ++- modules/apps/orca-slicer/options.nix | 5 ++ modules/default.nix | 1 + secrets/secrets.yaml | 6 +- share/gaming/default.nix | 14 ++--- share/impermanence/default.nix | 17 +----- 20 files changed, 206 insertions(+), 76 deletions(-) create mode 100644 modules/apps/manyfold/default.nix create mode 100644 modules/apps/manyfold/options.nix diff --git a/hosts/desktop/hyprland/config/hypr/default.nix b/hosts/desktop/hyprland/config/hypr/default.nix index aa4cf16..7ea7695 100644 --- a/hosts/desktop/hyprland/config/hypr/default.nix +++ b/hosts/desktop/hyprland/config/hypr/default.nix @@ -1,3 +1,6 @@ +let + drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i Colloid-nord-dark"; +in { wayland.windowManager.hyprland = { enable = true; @@ -33,7 +36,7 @@ "$mod, M, exec, wlogout --protocol layer-shell" "$mod, E, exec, nautilus" "$mod, V, togglefloating, " - "$mod, D, exec, nwg-drawer -fm nautilus -term kitty" + "$mod, D, exec, ${drawer}" "$mod, P, pseudo, " # dwindle "$mod, S, togglesplit, " # dwindle "$mod SHIFT, Q, exec, hyprlock" @@ -193,45 +196,27 @@ "float, title:wlogout" "fullscreen, title:wlogout" "idleinhibit stayfocused, mpv" - "fullscreen, title:BBar" - "fullscreen, title:Remote Desktop Connection" - "norounding, class:Remote Desktop Connection" - "noshadow, class:Remote Desktop Connection" - "immediate, class:Remote Desktop Connection" - "syncfullscreen, class:Remote Desktop Connection" - "allowsinput, class:Remote Desktop Connection" - "noanim, class:Remote Desktop Connection" - "noblur, class:Remote Desktop Connection" - "noborder, class:Remote Desktop Connection" - "nodim, class:Remote Desktop Connection" - "nomaxsize, class:Remote Desktop Connection" - "minsize 3840 2160, class:Remote Desktop Connection" ]; windowrulev2 = [ - "float, class:Vmware-view,title:VMware Horizon Client" - "size 3840 2160, class:Remote Desktop Connection" - # "float, class:Remote Desktop Connection,title:BBar" - # "float, class:Remote Desktop Connection,title:Remote Desktop Connection" - "float, class:Credential Manager UI Host,title:Windows Security" "float, title:^(Media viewer)$" "float, class:^(it.mijorus.smile)$,title:^(Smile)$" + "float, class:^(.blueman-manager-wrapped)$,title:^(Bluetooth Devices)$" # Picture in picture windows # "float, class:pavucontrol,title:pavucontrol" # ????? "float, title:^(Picture-in-Picture)$" "pin, title:^(Picture-in-Picture)$" + + # discord/vesktop + "workspace: name:discord, class:^(vesktop)$" "float, class:^(vesktop)$,title:^(Discord Popout)$" "pin, class:^(vesktop)$,title:^(Discord Popout)$" - "float, class:^(steam)$,title:^(Friends List)$" - # Workspace assign - # "workspace: 1, class:^(kitty)$" - # "workspace: name:discord, class:^(firefox)$" - "workspace: name:discord, class:^(vesktop)$" # Steam "float, class:^([Ss]team)$, title:^((?![Ss]team).*)$" "workspace name:steam silent, class:^([Ss]team)$, title:^([Ss]team)$" "tile, class:^([Ss]team)$, title:^([Ss]team)$" + "float, class:^(steam)$,title:^(Friends List)$" # Code # "pin, class:^(code)$,title:^(Save As)$" @@ -240,6 +225,26 @@ # Game Tearing??? https://wiki.hyprland.org/Configuring/Tearing/ "immediate, class:gamescope" + + # todo properly fix this shit instead of using gamescope + # vmware + "tag +horizonrdp, class:Remote Desktop Connection,title:BBar" + "tag +horizonrdp, class:Remote Desktop Connection,title:Remote Desktop Connection" + + "noanim, tag:horizonrdp" + "noblur, tag:horizonrdp" + "norounding, tag:horizonrdp" + "noshadow, tag:horizonrdp" + "immediate, tag:horizonrdp" + "allowsinput, tag:horizonrdp" + "noborder, tag:horizonrdp" + "nodim, tag:horizonrdp" + "nomaxsize, tag:horizonrdp" + + "float, class:Vmware-view,title:VMware Horizon Client" + "float, class:Remote Desktop Connection,title:^(Remote Desktop Connection)$" + "float, class:Remote Desktop Connection,title:^(5cd238b4x0)$" + "float, class:Credential Manager UI Host,title:Windows Security" ]; input = { @@ -268,7 +273,7 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 exec-once = nwg-look -a exec-once = nm-applet - exec-once = blueberry + exec-once = blueberry-tray exec-once = [silent] firefox exec-once = [silent] vesktop exec-once = [silent] spotify diff --git a/hosts/desktop/hyprland/config/waybar/default.nix b/hosts/desktop/hyprland/config/waybar/default.nix index de209cf..d13c167 100644 --- a/hosts/desktop/hyprland/config/waybar/default.nix +++ b/hosts/desktop/hyprland/config/waybar/default.nix @@ -56,7 +56,7 @@ "custom/updates" = { tooltip = true; format = { }; - interval = 60; + interval = 30; exec = "sudo waybar-updates"; return-type = "json"; }; @@ -147,17 +147,17 @@ format = "{icon}"; format-icons = { locked = "󰪛"; - unlocked = ""; + unlocked = " "; }; }; "keyboard-state#numlock" = { numlock = true; - icon-size = 30; + icon-size = 60; format = "{icon}"; format-icons = { locked = "󰎣"; - unlocked = ""; + unlocked = " "; }; }; }; @@ -302,16 +302,16 @@ #keyboard-state.numlock { color: @maroon; background-color: @surface0; - padding: 0.5rem 1rem; + padding: 0.5rem; margin: 5px 0; border-radius: 0; - font-size: 50px; + font-size: 10rem; } #keyboard-state.capslock { color: @peach; background-color: @surface0; - padding: 0.5rem 1rem; + padding: 0.5rem; margin: 5px 0; border-radius: 0; font-size: 18px; diff --git a/hosts/desktop/hyprland/config/waybar/scripts/waybar-updates.py b/hosts/desktop/hyprland/config/waybar/scripts/waybar-updates.py index 9a7ebd5..f76cbec 100755 --- a/hosts/desktop/hyprland/config/waybar/scripts/waybar-updates.py +++ b/hosts/desktop/hyprland/config/waybar/scripts/waybar-updates.py @@ -55,7 +55,7 @@ def check(): if len(updates_dict.keys()) > 0: data["text"] = ("󰏕") else: - data["text"] = ("") + data["text"] = (u"\u00A0") if len(updates_dict.keys()) <= 0: data["tooltip"] = ("flake inputs up to date") else: diff --git a/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py b/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py index 8a13d9d..5b2e535 100755 --- a/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py +++ b/hosts/desktop/hyprland/config/waybar/scripts/waybar-wttr.py @@ -56,6 +56,28 @@ WWO_CODE = { "395": "HeavySnowShowers", } +WEATHER_SYMBOL_EMOJI = { + "Unknown": "✨", + "Cloudy": "☁️", + "Fog": "🌫", + "HeavyRain": "🌧", + "HeavyShowers": "🌧", + "HeavySnow": "❄️", + "HeavySnowShowers": "❄️", + "LightRain": "🌦", + "LightShowers": "🌦", + "LightSleet": "🌧", + "LightSleetShowers": "🌧", + "LightSnow": "🌨", + "LightSnowShowers": "🌨", + "PartlyCloudy": "⛅️", + "Sunny": "☀️", + "ThunderyHeavyRain": "🌩", + "ThunderyShowers": "⛈", + "ThunderySnowShowers": "⛈", + "VeryCloudy": "☁️", +} + WEATHER_SYMBOL = { "Unknown": "✨", "Cloudy": "☁️", diff --git a/hosts/desktop/hyprland/default.nix b/hosts/desktop/hyprland/default.nix index 0da5116..9fba23a 100644 --- a/hosts/desktop/hyprland/default.nix +++ b/hosts/desktop/hyprland/default.nix @@ -21,6 +21,8 @@ in dbus.enable = true; ddccontrol.enable = true; + + blueman.enable = true; }; programs.hyprland = { diff --git a/hosts/desktop/hyprland/environment.nix b/hosts/desktop/hyprland/environment.nix index 4f556b2..71b7b76 100644 --- a/hosts/desktop/hyprland/environment.nix +++ b/hosts/desktop/hyprland/environment.nix @@ -15,7 +15,6 @@ in environment.systemPackages = with pkgs; [ adwaita-icon-theme apple-cursor - blueberry catppuccin catppuccin-gtk catppuccin-qt5ct @@ -34,6 +33,7 @@ in meson nautilus networkmanagerapplet + nm-tray nwg-drawer nwg-look pamixer diff --git a/hosts/desktop/hyprland/home.nix b/hosts/desktop/hyprland/home.nix index 1fee0d4..8866d8f 100644 --- a/hosts/desktop/hyprland/home.nix +++ b/hosts/desktop/hyprland/home.nix @@ -13,8 +13,13 @@ let accents = [ gtkThemeAccent ]; variant = gtkThemeVariant; }; - iconTheme = "Colloid-dark"; # Colloid, Colloid-light, Colloid-dark - iconThemePkg = pkgs.colloid-icon-theme; + iconThemeColor = "dark"; # "" "light" "dark" + iconThemeVariant = "default"; # "" "purple" "pink" "red" "orange" "yellow" "green" "teal" "grey" + iconThemeScheme = "nord"; # "" "nord" "dracula" "gruvbox" "everforest" "catppuccin" + iconTheme = "Colloid-${iconThemeScheme}-${iconThemeColor}"; + iconThemePkg = pkgs.colloid-icon-theme.override { + schemeVariants = [ iconThemeScheme ]; + }; in { imports = [ @@ -140,6 +145,7 @@ in XDG_CONFIG_HOME = "\${HOME}/.config"; #XDG_BIN_HOME = "\${HOME}/.local/bin"; XDG_DATA_HOME = "\${HOME}/.local/share"; + ICON_THEME = iconTheme; }; home.pointerCursor = { @@ -168,13 +174,11 @@ in }; gtk3.extraConfig = { - # gtk-application-prefer-dark-theme = true; - "AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK"; + gtk-application-prefer-dark-theme = true; }; gtk4.extraConfig = { - # gtk-application-prefer-dark-theme = true; - "AdwStyleManager:color-scheme" = "ADW_COLOR_SCHEME_PREFER_DARK"; + gtk-application-prefer-dark-theme = true; }; }; diff --git a/hosts/nas/apps.nix b/hosts/nas/apps.nix index 539da52..2101941 100644 --- a/hosts/nas/apps.nix +++ b/hosts/nas/apps.nix @@ -18,6 +18,8 @@ jellyseerr.enable = true; + manyfold.enable = true; + mariadb = { enable = true; environmentFiles = [ diff --git a/hosts/nas/configuration.nix b/hosts/nas/configuration.nix index 47c46ed..7678e45 100755 --- a/hosts/nas/configuration.nix +++ b/hosts/nas/configuration.nix @@ -188,7 +188,6 @@ in "jallen-nas" "docker" "podman" - config.services.redis.servers.nextcloud.user ]; # Enable ‘sudo’ for the user. hashedPasswordFile = passwordFile; }; diff --git a/hosts/nas/impermanence.nix b/hosts/nas/impermanence.nix index a7faaf4..4ff1508 100644 --- a/hosts/nas/impermanence.nix +++ b/hosts/nas/impermanence.nix @@ -17,14 +17,15 @@ group = "colord"; mode = "u=rwx,g=rx,o="; } + { + directory = "/etc/nix"; + user = "root"; + group = "root"; + mode = "u=rwx,g=rx,o=rx"; + } ]; files = [ - { - file = "/etc/nix/id_rsa"; - parentDirectory = { - mode = "u=rwx,g=,o="; - }; - } + "/etc/machine-id" ]; }; } diff --git a/hosts/nas/services.nix b/hosts/nas/services.nix index c6f3268..7fe5492 100644 --- a/hosts/nas/services.nix +++ b/hosts/nas/services.nix @@ -116,7 +116,7 @@ in port = 6379; }; - nextcloud = { + manyfold = { enable = true; port = 6380; # user = "911";#"${config.users.users.nix-apps.name}:${config.users.groups.jallen-nas.name}"; diff --git a/hosts/nas/sops.nix b/hosts/nas/sops.nix index f2a117a..8d01ac9 100644 --- a/hosts/nas/sops.nix +++ b/hosts/nas/sops.nix @@ -24,13 +24,17 @@ }; sops.secrets."jallen-nas/nextcloud/dbpassword" = { - restartUnits = [ "container@nextcloud.service" ]; + restartUnits = [ "podman-nextcloud.service" ]; }; sops.secrets."jallen-nas/nextcloud/adminpassword" = { - restartUnits = [ "container@nextcloud.service" ]; + restartUnits = [ "podman-nextcloud.service" ]; }; sops.secrets."jallen-nas/nextcloud/smtppassword" = { - restartUnits = [ "container@nextcloud.service" ]; + restartUnits = [ "podman-nextcloud.service" ]; + }; + + sops.secrets."jallen-nas/manyfold/secretkeybase" = { + restartUnits = [ "podman-manyfold.service" ]; }; sops.templates."nextcloud-smtp".content = '' diff --git a/modules/apps/manyfold/default.nix b/modules/apps/manyfold/default.nix new file mode 100644 index 0000000..f62011b --- /dev/null +++ b/modules/apps/manyfold/default.nix @@ -0,0 +1,37 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.nas-apps.manyfold; +in +{ + imports = [ ./options.nix ]; + + config = mkIf cfg.enable { + virtualisation.oci-containers.containers."${cfg.name}" = { + autoStart = cfg.autoStart; + image = cfg.image; + ports = [ "${cfg.httpPort}:3214" ]; + extraOptions = [ + "--cap-drop=ALL" + "--cap-add=CHOWN" + "--cap-add=DAC_OVERRIDE" + "--cap-add=SETUID" + "--cap-add=SETGID" + "--security-opt=no-new-privileges:true" + ]; + volumes = [ + "${cfg.configPath}:/config" + "${cfg.dataPath}:/libraries" + ]; + environment = { + PUID = cfg.puid; + PGID = cfg.pgid; + TZ = cfg.timeZone; + # For postgres or mariadb use ://:@:/ where is postgresql or mysql2 + DATABASE_URL = "sqlite3:/config/manyfold.sqlite3"; + # REDIS_URL = "redis://10.0.1.18:6380/0"; # redis://:/ + }; + environmentFiles = [ config.sops.secrets."jallen-nas/manyfold/secretkeybase".path ]; + }; + }; +} diff --git a/modules/apps/manyfold/options.nix b/modules/apps/manyfold/options.nix new file mode 100644 index 0000000..c07a45b --- /dev/null +++ b/modules/apps/manyfold/options.nix @@ -0,0 +1,52 @@ +{ lib, ... }: +with lib; +{ + options.nas-apps.manyfold = { + enable = mkEnableOption "manyfold docker service"; + + autoStart = mkOption { + type = types.bool; + default = true; + }; + + httpPort = mkOption { + type = types.str; + default = "3214"; + }; + + name = mkOption { + type = types.str; + default = "manyfold"; + }; + + image = mkOption { + type = types.str; + default = "ghcr.io/manyfold3d/manyfold"; + }; + + configPath = mkOption { + type = types.str; + default = "/media/nas/ssd/nix-app-data/manyfold"; + }; + + dataPath = mkOption { + type = types.str; + default = "/media/nas/main/3d_printer"; + }; + + puid = mkOption { + type = types.str; + default = "911"; + }; + + pgid = mkOption { + type = types.str; + default = "1000"; + }; + + timeZone = mkOption { + type = types.str; + default = "America/Chicago"; + }; + }; +} diff --git a/modules/apps/orca-slicer/default.nix b/modules/apps/orca-slicer/default.nix index 29bc443..09781e6 100644 --- a/modules/apps/orca-slicer/default.nix +++ b/modules/apps/orca-slicer/default.nix @@ -10,15 +10,22 @@ in virtualisation.oci-containers.containers."${cfg.name}" = { autoStart = cfg.autoStart; image = cfg.image; + extraOptions = [ "--device=nvidia.com/gpu=0" ]; ports = [ "${cfg.httpPort}:3000" "${cfg.httpsPort}:3001" ]; - volumes = [ "${cfg.configPath}:/config" ]; + volumes = [ + "${cfg.configPath}:/config" + "${cfg.dataPath}:/data" + ]; environment = { PUID = cfg.puid; PGID = cfg.pgid; TZ = cfg.timeZone; + TITLE = "orca-slicer"; + DRINODE = "/dev/dri/renderD128"; + NO_DECOR = "1"; }; }; }; diff --git a/modules/apps/orca-slicer/options.nix b/modules/apps/orca-slicer/options.nix index 8b7c602..02ac2a5 100644 --- a/modules/apps/orca-slicer/options.nix +++ b/modules/apps/orca-slicer/options.nix @@ -34,6 +34,11 @@ with lib; default = "/media/nas/ssd/ssd_app_data/orca-slicer"; }; + dataPath = mkOption { + type = types.str; + default = "/media/nas/main/3d_printer"; + }; + puid = mkOption { type = types.str; default = "911"; diff --git a/modules/default.nix b/modules/default.nix index 8e26b74..e6fca58 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -10,6 +10,7 @@ ./apps/jackett ./apps/jellyfin ./apps/jellyseerr + ./apps/manyfold ./apps/mariadb ./apps/mealie ./apps/nextcloud diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index 25fc9c7..3455c3d 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -12,6 +12,8 @@ jallen-nas: dbpassword: ENC[AES256_GCM,data:Xu92h2psR4jAJDM=,iv:UsJD1zq9Uy0Exxk58nkyPGyI8m2BOuvr2DK843h5pSk=,tag:k4MvHT8BoahCf9ZxQw8ovA==,type:str] adminpassword: ENC[AES256_GCM,data:y4PXSbrAAw3A6cg=,iv:10Dm3IYqKJz2FNRteauuYSKXCHE2IKHv4ytidUvblXA=,tag:OAsZ69s4g2p0JEenLbkXdA==,type:str] smtppassword: ENC[AES256_GCM,data:AIn3HJ3oX90nzcmSLSIeizqL1w==,iv:EyIgk3mxJ1Pn9Gff6ia6c2ekreSFGUWDbLrtC/meMyI=,tag:LvkT98sSOVDV+mxMyJKnbQ==,type:str] + manyfold: + secretkeybase: ENC[AES256_GCM,data:b+fgTrtnZcp34DOQ0dtKc6bX6/dm9j0o3QJr,iv:e4hOwgTFCXVokGqhwKsYHt5IQgtaKcMmEqvDoMly5aI=,tag:E8gFiOuozA4T1mmcgXfbDg==,type:str] desktop: matt_password: ENC[AES256_GCM,data:z/Jjzr+/PREpNEQsAVl4soeKAwW3sdteIqjhZT2txQDiR0FvGvEBoE/aYCM9NS7XSCgTeTuOqgBGfq4xDLc5/ZBAl7KoGHmKIQ==,iv:qVONkw8PDI2ydqybqGIU2XFq4+qC1BeXnfwxbxbWBww=,tag:eYOD2EoBn9XMiYOaBDFlRw==,type:str] sops: @@ -47,8 +49,8 @@ sops: UGhsN2N0Mjl3UEJvUVlGRlJiN05WaUkKW37lU4G4CLTo6JoHC2OyhKsG/FuO+BiN pzlVJwzRnmAqwklRbc6RMbQLl2EQrp6KQcgYsUxCMH9OQ/9WJ98dxQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-08-23T16:35:44Z" - mac: ENC[AES256_GCM,data:gVu0zOwEB/Mup8fXdlFxg8qRMHULMmQeDAsoFw8dlZpFe2IOAHOdemiV1T4oVhhZ78Or+c4PHO0a0M1piscLoHeAVnwPURe5t8tu+8BlwmKRu0+B618ekMXnDs8OYeNvRkA0DcsBr7lF08dbVSLdjfOqrT72XIuCm8XWnPnLPyE=,iv:MoThEq02i+G4BFbHzi6B2QgF7o0TlX3Ew1pB9SUaBRc=,tag:11/5WaAfx9731mo07Vi/ZQ==,type:str] + lastmodified: "2024-08-26T14:10:01Z" + mac: ENC[AES256_GCM,data:vmu42Qg97HenH7qP3WfwvQGb0yPf4/ViIlFQDig1t1LRenIveY4ZI6WutdM7QQ32FEcqBjuBa0m+K3YYYOmvRqxjWrqgD4Zx9vKKhoAFgYNlLUDahzyuA/o6PTM0MxFA1LWAO7Qu37/DxWuKJ41blhCsiYITlpjrQAzRWagp9r8=,iv:XTxCuBhOY8q5ZiXDL2Qf8149K5xJGs5qFDxBvA6057o=,tag:FNeQfNrHKh45b+K16SFrxw==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.9.0 diff --git a/share/gaming/default.nix b/share/gaming/default.nix index f2a2bcd..fd4bc9d 100644 --- a/share/gaming/default.nix +++ b/share/gaming/default.nix @@ -1,9 +1,4 @@ -{ - lib, - pkgs, - config, - ... -}: +{ lib, config, ... }: with lib; let cfg = config.share.gaming; @@ -34,7 +29,12 @@ in "--adaptive-sync" ]; }; - };#"gamescope -f -H 2160 -W 3840 -r 240 --adaptive-sync --hdr-enabled + }; # "gamescope -f -H 2160 -W 3840 -r 240 --adaptive-sync --hdr-enabled + + programs.alvr = { + enable = true; + openFirewall = true; + }; # Hardware configs hardware = { diff --git a/share/impermanence/default.nix b/share/impermanence/default.nix index 1fca1a8..4ff1508 100644 --- a/share/impermanence/default.nix +++ b/share/impermanence/default.nix @@ -1,12 +1,4 @@ -{ - pkgs, - lib, - LT, - config, - utils, - inputs, - ... -}@args: +{ ... }@args: { # Set up impernance configuration for things like bluetooth # In this configuration with /etc and /var/log being persistent, only directories outside of that need to be done here. See hardware configuration for all mountpoints. @@ -33,12 +25,7 @@ } ]; files = [ - # { - # file = "/etc/nix/id_rsa"; - # parentDirectory = { - # mode = "u=rwx,g=,o="; - # }; - # } + "/etc/machine-id" ]; }; }