From 608a6ce9b868923c951b7ba612ba18d94f1b4cf3 Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Sun, 20 Jul 2025 18:35:14 -0500 Subject: [PATCH] desktop building? --- flake.nix | 6 +- .../mattjallen@macbook-pro/default.nix | 0 .../aarch64-linux/matt@mac-nixos/default.nix | 0 .../aarch64-linux/matt@pi4/default.nix | 0 .../aarch64-linux/matt@pi5/default.nix | 0 homes/x86_64-linux/matt@desktop/default.nix | 19 +- modules/home/desktop/extra/kitty/default.nix | 105 ----------- .../home/desktop/extra/nwg-panel/options.nix | 12 -- modules/home/desktop/hyprland/default.nix | 6 +- modules/home/desktop/hyprland/options.nix | 57 +++++- .../hyprland/services/hypridle/default.nix | 6 +- modules/home/desktop/hyprland/theme.nix | 10 +- modules/home/desktop/hyprland/variables.nix | 12 +- modules/home/desktop/theme/nord.nix | 28 +++ modules/home/home/default.nix | 5 +- .../extra => programs}/btop/default.nix | 4 +- .../extra => programs}/btop/options.nix | 2 +- modules/home/programs/kitty/default.nix | 106 +++++++++++ .../extra => programs}/kitty/options.nix | 6 +- .../extra => programs}/mako/default.nix | 4 +- .../extra => programs}/mako/options.nix | 2 +- .../extra => programs}/nwg-dock/default.nix | 6 +- .../extra => programs}/nwg-dock/options.nix | 2 +- .../extra => programs}/nwg-drawer/default.nix | 6 +- .../extra => programs}/nwg-drawer/options.nix | 2 +- .../extra => programs}/nwg-panel/default.nix | 2 +- modules/home/programs/nwg-panel/options.nix | 23 +++ .../extra => programs}/waybar/default.nix | 14 +- .../extra => programs}/waybar/options.nix | 9 +- .../waybar/scripts/hass.nix | 5 +- .../waybar/scripts/weather.nix | 5 +- .../extra => programs}/wlogout/default.nix | 6 +- .../wlogout/icons/hibernate.png | Bin .../extra => programs}/wlogout/icons/lock.png | Bin .../wlogout/icons/logout.png | Bin .../wlogout/icons/reboot.png | Bin .../wlogout/icons/shutdown.png | Bin .../wlogout/icons/suspend.png | Bin .../extra => programs}/wlogout/options.nix | 2 +- .../extra => programs}/wofi/default.nix | 4 +- .../extra => programs}/wofi/options.nix | 2 +- modules/home/sops/default.nix | 18 ++ overlays/jdk/default.nix | 5 + .../default.nix} | 0 .../default.nix} | 0 overlays/{waybar.nix => waybar/default.nix} | 0 .../x86_64-linux/desktop/configuration.nix | 22 +-- systems/x86_64-linux/desktop/default.nix | 3 + .../desktop/hyprland-settings.nix | 170 +++++++++--------- .../specialisations/hyprland/default.nix | 52 +++++- .../specialisations/hyprland/home/default.nix | 86 +++++++++ 51 files changed, 535 insertions(+), 299 deletions(-) rename systems/aarch64-darwin/mac/home.nix => homes/aarch64-darwin/mattjallen@macbook-pro/default.nix (100%) rename systems/aarch64-linux/mac-nixos/home.nix => homes/aarch64-linux/matt@mac-nixos/default.nix (100%) rename systems/aarch64-linux/pi4/home.nix => homes/aarch64-linux/matt@pi4/default.nix (100%) rename systems/aarch64-linux/pi5/home.nix => homes/aarch64-linux/matt@pi5/default.nix (100%) delete mode 100755 modules/home/desktop/extra/kitty/default.nix delete mode 100644 modules/home/desktop/extra/nwg-panel/options.nix rename modules/home/{desktop/extra => programs}/btop/default.nix (98%) rename modules/home/{desktop/extra => programs}/btop/options.nix (64%) create mode 100755 modules/home/programs/kitty/default.nix rename modules/home/{desktop/extra => programs}/kitty/options.nix (71%) rename modules/home/{desktop/extra => programs}/mako/default.nix (88%) rename modules/home/{desktop/extra => programs}/mako/options.nix (80%) rename modules/home/{desktop/extra => programs}/nwg-dock/default.nix (91%) rename modules/home/{desktop/extra => programs}/nwg-dock/options.nix (63%) rename modules/home/{desktop/extra => programs}/nwg-drawer/default.nix (90%) rename modules/home/{desktop/extra => programs}/nwg-drawer/options.nix (63%) rename modules/home/{desktop/extra => programs}/nwg-panel/default.nix (93%) create mode 100644 modules/home/programs/nwg-panel/options.nix rename modules/home/{desktop/extra => programs}/waybar/default.nix (96%) rename modules/home/{desktop/extra => programs}/waybar/options.nix (70%) rename modules/home/{desktop/extra => programs}/waybar/scripts/hass.nix (95%) rename modules/home/{desktop/extra => programs}/waybar/scripts/weather.nix (99%) rename modules/home/{desktop/extra => programs}/wlogout/default.nix (95%) rename modules/home/{desktop/extra => programs}/wlogout/icons/hibernate.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/icons/lock.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/icons/logout.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/icons/reboot.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/icons/shutdown.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/icons/suspend.png (100%) rename modules/home/{desktop/extra => programs}/wlogout/options.nix (79%) rename modules/home/{desktop/extra => programs}/wofi/default.nix (96%) rename modules/home/{desktop/extra => programs}/wofi/options.nix (80%) create mode 100644 modules/home/sops/default.nix create mode 100644 overlays/jdk/default.nix rename overlays/{nixpkgs-stable.nix => stable/default.nix} (100%) rename overlays/{nixpkgs-unstable.nix => unstable/default.nix} (100%) rename overlays/{waybar.nix => waybar/default.nix} (100%) create mode 100644 systems/x86_64-linux/desktop/specialisations/hyprland/home/default.nix diff --git a/flake.nix b/flake.nix index c276b37..2a4a229 100644 --- a/flake.nix +++ b/flake.nix @@ -89,7 +89,6 @@ modules.nixos = with inputs; [ chaotic.nixosModules.default disko.nixosModules.disko - home-manager.nixosModules.home-manager impermanence.nixosModules.impermanence lanzaboote.nixosModules.lanzaboote sops-nix.nixosModules.sops @@ -172,6 +171,11 @@ ]; users = { + "matt@desktop" = { + modules = with inputs; [ + sops-nix.homeManagerModules.sops + ]; + }; "deck@deck" = { modules = with inputs; [ steam-rom-manager.homeManagerModules.default diff --git a/systems/aarch64-darwin/mac/home.nix b/homes/aarch64-darwin/mattjallen@macbook-pro/default.nix similarity index 100% rename from systems/aarch64-darwin/mac/home.nix rename to homes/aarch64-darwin/mattjallen@macbook-pro/default.nix diff --git a/systems/aarch64-linux/mac-nixos/home.nix b/homes/aarch64-linux/matt@mac-nixos/default.nix similarity index 100% rename from systems/aarch64-linux/mac-nixos/home.nix rename to homes/aarch64-linux/matt@mac-nixos/default.nix diff --git a/systems/aarch64-linux/pi4/home.nix b/homes/aarch64-linux/matt@pi4/default.nix similarity index 100% rename from systems/aarch64-linux/pi4/home.nix rename to homes/aarch64-linux/matt@pi4/default.nix diff --git a/systems/aarch64-linux/pi5/home.nix b/homes/aarch64-linux/matt@pi5/default.nix similarity index 100% rename from systems/aarch64-linux/pi5/home.nix rename to homes/aarch64-linux/matt@pi5/default.nix diff --git a/homes/x86_64-linux/matt@desktop/default.nix b/homes/x86_64-linux/matt@desktop/default.nix index 89b8beb..630ed8a 100755 --- a/homes/x86_64-linux/matt@desktop/default.nix +++ b/homes/x86_64-linux/matt@desktop/default.nix @@ -10,22 +10,6 @@ in { home.username = "matt"; - sops = { - age.keyFile = "/home/matt/.config/sops/age/keys.txt"; - defaultSopsFile = "/etc/nixos/secrets/secrets.yaml"; - validateSopsFiles = false; - secrets = { - "ssh-keys-public/desktop-nixos" = { - path = "/home/matt/.ssh/id_ed25519.pub"; - mode = "0644"; - }; - "ssh-keys-private/desktop-nixos" = { - path = "/home/matt/.ssh/id_ed25519"; - mode = "0600"; - }; - }; - }; - services = { remmina = { enable = true; @@ -41,7 +25,7 @@ in home.packages = with pkgs; [ bottles - unstable.compose2nix + compose2nix discord distrobox heroic @@ -56,7 +40,6 @@ in protontricks protonvpn-gui python3 - qmk smile unigine-heaven via diff --git a/modules/home/desktop/extra/kitty/default.nix b/modules/home/desktop/extra/kitty/default.nix deleted file mode 100755 index a15f7a3..0000000 --- a/modules/home/desktop/extra/kitty/default.nix +++ /dev/null @@ -1,105 +0,0 @@ -{ lib, config, ... }: -with lib; -let - cfg = config.mjallen.desktop.extra.kitty; -in -{ - imports = [ ./options.nix ]; - - config = mkIf cfg.enable { - programs.kitty = { - enable = true; - shellIntegration.enableZshIntegration = true; - - font = { - name = settings.fontName; - package = settings.fontPackage; - size = settings.fontSize; - }; - - settings = { - bold_font = "auto"; - italic_font = "auto"; - bold_italic_font = "auto"; - mouse_hide_wait = "2.0"; - cursor_shape = "block"; - url_style = "dotted"; - confirm_os_window_close = "0"; - background_opacity = "0.85"; - - # The basic colors - foreground = settings.theme.snowStorm.nord6; - background = settings.theme.polarNight.nord0; - selection_foreground = settings.theme.polarNight.nord0; - selection_background = settings.theme.aurora.nord15; - - # Cursor colors - cursor = settings.theme.aurora.nord15; - cursor_text_color = settings.theme.polarNight.nord0; - - # URL underline color when hovering with mouse - url_color = settings.theme.aurora.nord15; - - # Kitty window border colors - active_border_color = settings.theme.frost.nord10; - inactive_border_color = settings.theme.polarNight.nord1; - bell_border_color = settings.theme.aurora.nord13; - - # OS Window titlebar colors - wayland_titlebar_color = settings.theme.polarNight.nord0; - macos_titlebar_color = settings.theme.polarNight.nord0; - - # Tab bar colors - active_tab_foreground = settings.theme.polarNight.nord3; - active_tab_background = settings.theme.aurora.nord15; - inactive_tab_foreground = settings.theme.snowStorm.nord6; - inactive_tab_background = settings.theme.polarNight.nord1; - tab_bar_background = settings.theme.polarNight.nord3; - - # Colors for marks (marked text in the terminal) - mark1_foreground = settings.theme.polarNight.nord0; - mark1_background = settings.theme.frost.nord10; - mark2_foreground = settings.theme.polarNight.nord0; - mark2_background = settings.theme.aurora.nord15; - mark3_foreground = settings.theme.polarNight.nord0; - mark3_background = settings.theme.frost.nord8; - - # The 16 terminal colors - - # black - color0 = settings.theme.polarNight.nord0; - - # Autosuggestion - color8 = settings.theme.frost.nord10; - - # red - color1 = settings.theme.aurora.nord11; - color9 = settings.theme.aurora.nord11; - - # green - color2 = settings.theme.aurora.nord14; - color10 = settings.theme.aurora.nord14; - - # yellow - color3 = settings.theme.aurora.nord13; - color11 = settings.theme.aurora.nord13; - - # blue - color4 = settings.theme.frost.nord10; - color12 = settings.theme.frost.nord10; - - # magenta - color5 = settings.theme.aurora.nord15; - color13 = settings.theme.aurora.nord15; - - # cyan - color6 = settings.theme.frost.nord8; - color14 = settings.theme.frost.nord8; - - # white - color7 = settings.theme.snowStorm.nord5; - color15 = settings.theme.snowStorm.nord4; - }; - }; - }; -} diff --git a/modules/home/desktop/extra/nwg-panel/options.nix b/modules/home/desktop/extra/nwg-panel/options.nix deleted file mode 100644 index 7056680..0000000 --- a/modules/home/desktop/extra/nwg-panel/options.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ lib, ... }: -with lib; -{ - options.mjallen.desktop.extra.nwg-panel = { - enable = mkEnableOption "enable nwg-panel"; - - defaultApps = mkOption { - type = attrs; - default = { }; - }; - }; -} \ No newline at end of file diff --git a/modules/home/desktop/hyprland/default.nix b/modules/home/desktop/hyprland/default.nix index 01d39d6..0417198 100755 --- a/modules/home/desktop/hyprland/default.nix +++ b/modules/home/desktop/hyprland/default.nix @@ -2,7 +2,7 @@ with lib; let cfg = config.mjallen.desktop.hyprland; - drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${config.home-manager.users.matt.gtk.iconTheme.name}"; + drawer = "nwg-drawer -fm nautilus -term kitty -mb 10 -mt 10 -ml 10 -mr 10 -pbuseicontheme -i ${cfg.iconThemeName}"; in { imports = [ @@ -71,8 +71,8 @@ in "$mod SHIFT, F, fullscreen, 0" "$mod SHIFT, E, exec, smile" - "$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.displayLeft.input}" - "$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.displayRight.input}" + "$mod, mouse:276, movecurrentworkspacetomonitor, ${cfg.display1.input}" + "$mod, mouse:275, movecurrentworkspacetomonitor, ${cfg.display2.input}" # alt-tab between workspaces on active monitor "$mod, Tab, workspace, m+1" diff --git a/modules/home/desktop/hyprland/options.nix b/modules/home/desktop/hyprland/options.nix index eafbc2b..15f2217 100644 --- a/modules/home/desktop/hyprland/options.nix +++ b/modules/home/desktop/hyprland/options.nix @@ -5,13 +5,48 @@ with lib; enable = mkEnableOption "enable hyprland desktop"; primaryDisplay = mkOption { - type = types.string; + type = types.str; default = "DP-1"; }; + display1 = { + input = mkOption { + type = types.str; + default = "DP-1"; + }; + + resolution = mkOption { + type = types.str; + default = "3840x2160"; + }; + + refreshRate = mkOptions { + type = types.str; + default = "240.00000"; + }; + }; + + display2 = { + input = mkOption { + type = types.str; + default = "DP-1"; + }; + + resolution = mkOption { + type = types.str; + default = "3840x2160"; + }; + + refreshRate = mkOptions { + type = types.str; + default = "240.00000"; + }; + }; + wallpaper = mkOption { - type = types.string; - default = "/run/wallpaper.jpeg"; + type = with types; listOf str; + default = []; + description = "list of hyprland wallpaper configs"; }; monitor = mkOption { @@ -44,6 +79,16 @@ with lib; description = "any extra options"; }; + iconThemeName = mkOption { + type = types.str; + default = "Colloid-Dark"; + }; + + gtkThemeName = mkOption { + type = types.str; + default = "Colloid-Dark"; + }; + defaultApps = mkOption { type = types.submodule { options = { @@ -62,15 +107,15 @@ with lib; hyprIdle = { lockScreenTimer = mkOption { - type = with types; null || signed integer || floating point number; + type = with types; int; default = 5; }; screenOffTimer = mkOption { - type = with types; null || signed integer || floating point number; + type = with types; int; default = 15; }; suspendTimer = mkOption { - type = with types; null || signed integer || floating point number; + type = with types; int; default = 30; }; }; diff --git a/modules/home/desktop/hyprland/services/hypridle/default.nix b/modules/home/desktop/hyprland/services/hypridle/default.nix index 757106e..f26d2db 100644 --- a/modules/home/desktop/hyprland/services/hypridle/default.nix +++ b/modules/home/desktop/hyprland/services/hypridle/default.nix @@ -22,16 +22,16 @@ in # on-resume = "brightnessctl -r"; # monitor backlight restore. # } { - timeout = cfg.hypridle.lockScreenTimer; + timeout = cfg.hyprIdle.lockScreenTimer; on-timeout = "loginctl lock-session"; # lock screen when timeout has passed } { - timeout = cfg.hypridle.screenOffTimer; + timeout = cfg.hyprIdle.screenOffTimer; on-timeout = "hyprctl dispatch dpms off"; # screen off when timeout has passed on-resume = "hyprctl dispatch dpms on"; # screen on when activity is detected after timeout has fired. } { - timeout = cfg.hypridle.suspendTimer; + timeout = cfg.hyprIdle.suspendTimer; on-timeout = "systemctl suspend"; # suspend pc } ]; diff --git a/modules/home/desktop/hyprland/theme.nix b/modules/home/desktop/hyprland/theme.nix index 509ecbd..23249cb 100644 --- a/modules/home/desktop/hyprland/theme.nix +++ b/modules/home/desktop/hyprland/theme.nix @@ -16,10 +16,10 @@ let cursorSize = 24; # GTK - gtkThemeSize = themeSize; - gtkThemeAccent = themeAccent; - gtkThemeVariant = themeVariant; - gtkThemeColor = themeColor; + # gtkThemeSize = themeSize; + # gtkThemeAccent = themeAccent; + # gtkThemeVariant = themeVariant; + # gtkThemeColor = themeColor; gtkTheme = "Colloid-Dark-Compact-Nord"; gtkThemePkg = pkgs.colloid-gtk-theme.override { sizeVariants = [ themeSize ]; @@ -29,7 +29,7 @@ let }; # Icons - iconThemeScheme = iconScheme; + # iconThemeScheme = iconScheme; iconTheme = "Colloid-Nord-Dark"; iconThemePkg = pkgs.colloid-icon-theme.override { schemeVariants = [ iconScheme ]; diff --git a/modules/home/desktop/hyprland/variables.nix b/modules/home/desktop/hyprland/variables.nix index 8678f5d..e7515e3 100644 --- a/modules/home/desktop/hyprland/variables.nix +++ b/modules/home/desktop/hyprland/variables.nix @@ -10,12 +10,12 @@ in CLUTTER_BACKEND = "wayland"; EDITOR = "${cfg.defaultApps.editor.pname}"; VISUAL = "${cfg.defaultApps.visual.pname}"; - ICON_THEME = settings.iconTheme; + ICON_THEME = cfg.iconThemeName; GTK_CSD = "0"; - GTK_THEME = settings.gtkTheme; + GTK_THEME = cfg.gtkThemeName; GTK_USE_PORTAL = "1"; - HYPRCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name; - HYPRCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size; + HYPRCURSOR_THEME = config.home.pointerCursor.name; + HYPRCURSOR_SIZE = config.home.pointerCursor.size; MOZ_ENABLE_WAYLAND = "1"; NIXOS_OZONE_WL = "1"; NIXOS_XDG_OPEN_USE_PORTAL = "1"; @@ -26,8 +26,8 @@ in QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; SDL_VIDEODRIVER = "wayland"; TERMINAL = "${cfg.defaultApps.terminal.pname}"; - XCURSOR_THEME = config.home-manager.users.matt.pointerCursor.name; - XCURSOR_SIZE = config.home-manager.users.matt.pointerCursor.size; + XCURSOR_THEME = config.home.pointerCursor.name; + XCURSOR_SIZE = config.home.pointerCursor.size; XDG_CACHE_HOME = "\${HOME}/.cache"; XDG_CONFIG_HOME = "\${HOME}/.config"; XDG_CURRENT_DESKTOP = "Hyprland"; diff --git a/modules/home/desktop/theme/nord.nix b/modules/home/desktop/theme/nord.nix index c9f65d8..9678a1c 100644 --- a/modules/home/desktop/theme/nord.nix +++ b/modules/home/desktop/theme/nord.nix @@ -31,4 +31,32 @@ nord14 = "#a3be8c"; nord15 = "#b48ead"; }; + + defaultOpacity = "opacity: 0.85;"; + defaultBorderRadius = "border-radius: 1rem;"; + defaultCenterOptions = '' + padding-top: 0.2rem; + padding-bottom: 0.2rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + margin: 3px 0; + ''; + borderRight = '' + padding-top: 0.2rem; + padding-bottom: 0.2rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + margin: 3px 0; + border-radius: 0rem 1rem 1rem 0rem; + margin-right: 0.5rem; + ''; + borderLeft = '' + padding-top: 0.2rem; + padding-bottom: 0.2rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + margin: 3px 0; + border-radius: 1rem 0rem 0rem 1rem; + margin-left: 0.5rem; + ''; } \ No newline at end of file diff --git a/modules/home/home/default.nix b/modules/home/home/default.nix index 65a5b84..c9f661b 100644 --- a/modules/home/home/default.nix +++ b/modules/home/home/default.nix @@ -39,7 +39,10 @@ btop.enable = lib.mkDefault true; fastfetch.enable = lib.mkDefault true; home-manager.enable = lib.mkDefault true; - java.enable = lib.mkDefault true; + java = { + enable = lib.mkDefault true; + package = pkgs.jdk17; + }; mangohud.enable = lib.mkDefault true; password-store.enable = true; nh = { diff --git a/modules/home/desktop/extra/btop/default.nix b/modules/home/programs/btop/default.nix similarity index 98% rename from modules/home/desktop/extra/btop/default.nix rename to modules/home/programs/btop/default.nix index d5b52a0..1842b14 100755 --- a/modules/home/desktop/extra/btop/default.nix +++ b/modules/home/programs/btop/default.nix @@ -1,8 +1,8 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.btop; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.btop; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; diff --git a/modules/home/desktop/extra/btop/options.nix b/modules/home/programs/btop/options.nix similarity index 64% rename from modules/home/desktop/extra/btop/options.nix rename to modules/home/programs/btop/options.nix index 66d4b1a..9828d5e 100644 --- a/modules/home/desktop/extra/btop/options.nix +++ b/modules/home/programs/btop/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.btop = { + options.mjallen.programs.btop = { enable = mkEnableOption "enable btop"; }; } \ No newline at end of file diff --git a/modules/home/programs/kitty/default.nix b/modules/home/programs/kitty/default.nix new file mode 100755 index 0000000..ce5222f --- /dev/null +++ b/modules/home/programs/kitty/default.nix @@ -0,0 +1,106 @@ +{ lib, config, ... }: +with lib; +let + cfg = config.mjallen.programs.kitty; + nord = import ../../desktop/theme/nord.nix; +in +{ + imports = [ ./options.nix ]; + + config = mkIf cfg.enable { + programs.kitty = { + enable = true; + shellIntegration.enableZshIntegration = true; + + font = { + name = cfg.font.name; + package = cfg.font.package; + size = cfg.font.size; + }; + + settings = { + bold_font = "auto"; + italic_font = "auto"; + bold_italic_font = "auto"; + mouse_hide_wait = "2.0"; + cursor_shape = "block"; + url_style = "dotted"; + confirm_os_window_close = "0"; + background_opacity = "0.85"; + + # The basic colors + foreground = nord.snowStorm.nord6; + background = nord.polarNight.nord0; + selection_foreground = nord.polarNight.nord0; + selection_background = nord.aurora.nord15; + + # Cursor colors + cursor = nord.aurora.nord15; + cursor_text_color = nord.polarNight.nord0; + + # URL underline color when hovering with mouse + url_color = nord.aurora.nord15; + + # Kitty window border colors + active_border_color = nord.frost.nord10; + inactive_border_color = nord.polarNight.nord1; + bell_border_color = nord.aurora.nord13; + + # OS Window titlebar colors + wayland_titlebar_color = nord.polarNight.nord0; + macos_titlebar_color = nord.polarNight.nord0; + + # Tab bar colors + active_tab_foreground = nord.polarNight.nord3; + active_tab_background = nord.aurora.nord15; + inactive_tab_foreground = nord.snowStorm.nord6; + inactive_tab_background = nord.polarNight.nord1; + tab_bar_background = nord.polarNight.nord3; + + # Colors for marks (marked text in the terminal) + mark1_foreground = nord.polarNight.nord0; + mark1_background = nord.frost.nord10; + mark2_foreground = nord.polarNight.nord0; + mark2_background = nord.aurora.nord15; + mark3_foreground = nord.polarNight.nord0; + mark3_background = nord.frost.nord8; + + # The 16 terminal colors + + # black + color0 = nord.polarNight.nord0; + + # Autosuggestion + color8 = nord.frost.nord10; + + # red + color1 = nord.aurora.nord11; + color9 = nord.aurora.nord11; + + # green + color2 = nord.aurora.nord14; + color10 = nord.aurora.nord14; + + # yellow + color3 = nord.aurora.nord13; + color11 = nord.aurora.nord13; + + # blue + color4 = nord.frost.nord10; + color12 = nord.frost.nord10; + + # magenta + color5 = nord.aurora.nord15; + color13 = nord.aurora.nord15; + + # cyan + color6 = nord.frost.nord8; + color14 = nord.frost.nord8; + + # white + color7 = nord.snowStorm.nord5; + color15 = nord.snowStorm.nord4; + }; + }; + }; +} diff --git a/modules/home/desktop/extra/kitty/options.nix b/modules/home/programs/kitty/options.nix similarity index 71% rename from modules/home/desktop/extra/kitty/options.nix rename to modules/home/programs/kitty/options.nix index fed553d..53bc3f9 100644 --- a/modules/home/desktop/extra/kitty/options.nix +++ b/modules/home/programs/kitty/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.kitty = { + options.mjallen.programs.kitty = { enable = mkEnableOption "enable kitty terminal"; font = { @@ -14,14 +14,14 @@ with lib; default = pkgs.dejavu_fonts; }; size = mkOption { - type = with types; null || signed integer || floating point number; + type = with types; int; default = 8; }; }; theme = mkOption { type = types.attrs; - default = import ../../theme/nord.nix; + default = import ../../desktop/theme/nord.nix; }; }; } \ No newline at end of file diff --git a/modules/home/desktop/extra/mako/default.nix b/modules/home/programs/mako/default.nix similarity index 88% rename from modules/home/desktop/extra/mako/default.nix rename to modules/home/programs/mako/default.nix index 9d38cd9..7aa1b30 100755 --- a/modules/home/desktop/extra/mako/default.nix +++ b/modules/home/programs/mako/default.nix @@ -1,8 +1,8 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.mako; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.mako; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; diff --git a/modules/home/desktop/extra/mako/options.nix b/modules/home/programs/mako/options.nix similarity index 80% rename from modules/home/desktop/extra/mako/options.nix rename to modules/home/programs/mako/options.nix index 3b8cc98..9911c57 100644 --- a/modules/home/desktop/extra/mako/options.nix +++ b/modules/home/programs/mako/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.mako = { + options.mjallen.programs.mako = { enable = mkEnableOption "enable mako"; fontName = mkOption { diff --git a/modules/home/desktop/extra/nwg-dock/default.nix b/modules/home/programs/nwg-dock/default.nix similarity index 91% rename from modules/home/desktop/extra/nwg-dock/default.nix rename to modules/home/programs/nwg-dock/default.nix index e2f9549..6c8b878 100644 --- a/modules/home/desktop/extra/nwg-dock/default.nix +++ b/modules/home/programs/nwg-dock/default.nix @@ -1,8 +1,8 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; let - cfg = config.mjallen.desktop.extra.nwg-dock; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.nwg-dock; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; diff --git a/modules/home/desktop/extra/nwg-dock/options.nix b/modules/home/programs/nwg-dock/options.nix similarity index 63% rename from modules/home/desktop/extra/nwg-dock/options.nix rename to modules/home/programs/nwg-dock/options.nix index a101c81..9cb6299 100644 --- a/modules/home/desktop/extra/nwg-dock/options.nix +++ b/modules/home/programs/nwg-dock/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.nwg-dock = { + options.mjallen.programs.nwg-dock = { enable = mkEnableOption "enable nwg-dock"; }; } \ No newline at end of file diff --git a/modules/home/desktop/extra/nwg-drawer/default.nix b/modules/home/programs/nwg-drawer/default.nix similarity index 90% rename from modules/home/desktop/extra/nwg-drawer/default.nix rename to modules/home/programs/nwg-drawer/default.nix index 361da8e..4ce2b84 100644 --- a/modules/home/desktop/extra/nwg-drawer/default.nix +++ b/modules/home/programs/nwg-drawer/default.nix @@ -1,8 +1,8 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: with lib; let - cfg = config.mjallen.desktop.extra.nwg-drawer; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.nwg-drawer; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; diff --git a/modules/home/desktop/extra/nwg-drawer/options.nix b/modules/home/programs/nwg-drawer/options.nix similarity index 63% rename from modules/home/desktop/extra/nwg-drawer/options.nix rename to modules/home/programs/nwg-drawer/options.nix index 74e35a2..6064d53 100644 --- a/modules/home/desktop/extra/nwg-drawer/options.nix +++ b/modules/home/programs/nwg-drawer/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.nwg-drawer = { + options.mjallen.programs.nwg-drawer = { enable = mkEnableOption "enable nwg-drawer"; }; } \ No newline at end of file diff --git a/modules/home/desktop/extra/nwg-panel/default.nix b/modules/home/programs/nwg-panel/default.nix similarity index 93% rename from modules/home/desktop/extra/nwg-panel/default.nix rename to modules/home/programs/nwg-panel/default.nix index 170e29b..d1d17b7 100644 --- a/modules/home/desktop/extra/nwg-panel/default.nix +++ b/modules/home/programs/nwg-panel/default.nix @@ -1,7 +1,7 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.nwg-dock; + cfg = config.mjallen.programs.nwg-panel; in { imports = [ ./options.nix ]; diff --git a/modules/home/programs/nwg-panel/options.nix b/modules/home/programs/nwg-panel/options.nix new file mode 100644 index 0000000..c3a529b --- /dev/null +++ b/modules/home/programs/nwg-panel/options.nix @@ -0,0 +1,23 @@ +{ lib, pkgs, ... }: +with lib; +{ + options.mjallen.programs.nwg-panel = { + enable = mkEnableOption "enable nwg-panel"; + + defaultApps = mkOption { + type = types.submodule { + options = { + browser = mkOption { type = types.package; default = pkgs.firefox; }; + editor = mkOption { type = types.package; default = pkgs.micro; }; + fileExplorer = mkOption { type = types.package; default = pkgs.nemo; }; + visual = mkOption { type = types.package; default = pkgs.vscodium; }; + terminal = mkOption { type = types.package; default = pkgs.kitty; }; + office = mkOption { type = types.package; default = pkgs.onlyoffice-bin_latest; }; + video = mkOption { type = types.package; default = pkgs.vlc; }; + imageViewer = mkOption { type = types.package; default = pkgs.gnome-photos; }; + }; + }; + description = "Default applications used across the system."; + }; + }; +} \ No newline at end of file diff --git a/modules/home/desktop/extra/waybar/default.nix b/modules/home/programs/waybar/default.nix similarity index 96% rename from modules/home/desktop/extra/waybar/default.nix rename to modules/home/programs/waybar/default.nix index 8fd464b..b5b2892 100755 --- a/modules/home/desktop/extra/waybar/default.nix +++ b/modules/home/programs/waybar/default.nix @@ -1,8 +1,8 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.waybar; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.waybar; + nord = import ../../desktop/theme/nord.nix; defaultOpacity = "opacity: 0.85;"; defaultBorderRadius = "border-radius: 1rem;"; @@ -371,8 +371,8 @@ in ${defaultOpacity} ${defaultBorderRadius} ${defaultCenterOptions} - margin-left: ${hyprlandSettings.waybar.moduleStyle.window.margin-left or "4rem"}; - margin-right: ${hyprlandSettings.waybar.moduleStyle.window.margin-right or "4rem"}; + margin-left: 4rem + margin-right: 4rem } /* make window module transparent when no windows present */ @@ -513,8 +513,8 @@ in color: ${nord.frost.nord9}; background-color: ${nord.polarNight.nord0}; ${defaultOpacity} - ${hyprlandSettings.waybar.moduleStyle.temperature.location or defaultCenterOptions} - border-radius: ${hyprlandSettings.waybar.moduleStyle.temperature.border-radius or "0"} + ${defaultCenterOptions} + border-radius: 0 } /* ------------- */ @@ -528,7 +528,7 @@ in } /* ------------- */ - '' + hyprlandSettings.waybar.extraModulesStyle or ''''; + '' + cfg.extraModulesStyle or ''''; }; }; } diff --git a/modules/home/desktop/extra/waybar/options.nix b/modules/home/programs/waybar/options.nix similarity index 70% rename from modules/home/desktop/extra/waybar/options.nix rename to modules/home/programs/waybar/options.nix index 56a9f28..4fa8c5e 100644 --- a/modules/home/desktop/extra/waybar/options.nix +++ b/modules/home/programs/waybar/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.waybar = { + options.mjallen.programs.waybar = { enable = mkEnableOption "enable waybar"; layer = mkOption { @@ -10,7 +10,7 @@ with lib; }; modules-right = mkOption { - type = with types; listOf string; + type = with types; listOf str; default = []; }; @@ -23,5 +23,10 @@ with lib; type = types.attrs; default = { }; }; + + extraModulesStyle = mkOption { + type = types.str; + default = ""; + }; }; } \ No newline at end of file diff --git a/modules/home/desktop/extra/waybar/scripts/hass.nix b/modules/home/programs/waybar/scripts/hass.nix similarity index 95% rename from modules/home/desktop/extra/waybar/scripts/hass.nix rename to modules/home/programs/waybar/scripts/hass.nix index 202031c..1dbe288 100755 --- a/modules/home/desktop/extra/waybar/scripts/hass.nix +++ b/modules/home/programs/waybar/scripts/hass.nix @@ -1,7 +1,6 @@ -{ config, lib, namespace, ... }: -with lib; +{ config, lib, namespace, pkgs, ... }: let - cfg = config.mjallen.desktop.extra.waybar; + cfg = config.mjallen.programs.waybar; pythonEnv = pkgs.python3.withPackages (ps: [ pkgs.${namespace}.homeassistant-api diff --git a/modules/home/desktop/extra/waybar/scripts/weather.nix b/modules/home/programs/waybar/scripts/weather.nix similarity index 99% rename from modules/home/desktop/extra/waybar/scripts/weather.nix rename to modules/home/programs/waybar/scripts/weather.nix index 8a5a2e9..36740f2 100644 --- a/modules/home/desktop/extra/waybar/scripts/weather.nix +++ b/modules/home/programs/waybar/scripts/weather.nix @@ -1,7 +1,6 @@ -{ config, lib, namespace, ... }: -with lib; +{ config, lib, pkgs, ... }: let - cfg = config.mjallen.desktop.extra.waybar; + cfg = config.mjallen.programs.waybar; waybar-weather = pkgs.writeScriptBin "waybar-weather" '' #!/usr/bin/env nix-shell diff --git a/modules/home/desktop/extra/wlogout/default.nix b/modules/home/programs/wlogout/default.nix similarity index 95% rename from modules/home/desktop/extra/wlogout/default.nix rename to modules/home/programs/wlogout/default.nix index b0e885c..ad92a90 100644 --- a/modules/home/desktop/extra/wlogout/default.nix +++ b/modules/home/programs/wlogout/default.nix @@ -1,14 +1,14 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.wlogout; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.wlogout; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; config = mkIf cfg.enable { programs.wlogout = { - enable = true; + enable = false; layout = { lock = { label = "lock"; diff --git a/modules/home/desktop/extra/wlogout/icons/hibernate.png b/modules/home/programs/wlogout/icons/hibernate.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/hibernate.png rename to modules/home/programs/wlogout/icons/hibernate.png diff --git a/modules/home/desktop/extra/wlogout/icons/lock.png b/modules/home/programs/wlogout/icons/lock.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/lock.png rename to modules/home/programs/wlogout/icons/lock.png diff --git a/modules/home/desktop/extra/wlogout/icons/logout.png b/modules/home/programs/wlogout/icons/logout.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/logout.png rename to modules/home/programs/wlogout/icons/logout.png diff --git a/modules/home/desktop/extra/wlogout/icons/reboot.png b/modules/home/programs/wlogout/icons/reboot.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/reboot.png rename to modules/home/programs/wlogout/icons/reboot.png diff --git a/modules/home/desktop/extra/wlogout/icons/shutdown.png b/modules/home/programs/wlogout/icons/shutdown.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/shutdown.png rename to modules/home/programs/wlogout/icons/shutdown.png diff --git a/modules/home/desktop/extra/wlogout/icons/suspend.png b/modules/home/programs/wlogout/icons/suspend.png similarity index 100% rename from modules/home/desktop/extra/wlogout/icons/suspend.png rename to modules/home/programs/wlogout/icons/suspend.png diff --git a/modules/home/desktop/extra/wlogout/options.nix b/modules/home/programs/wlogout/options.nix similarity index 79% rename from modules/home/desktop/extra/wlogout/options.nix rename to modules/home/programs/wlogout/options.nix index 32a687d..fc51271 100644 --- a/modules/home/desktop/extra/wlogout/options.nix +++ b/modules/home/programs/wlogout/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.wlogout = { + options.mjallen.programs.wlogout = { enable = mkEnableOption "enable wlogout"; fontName = mkOption { diff --git a/modules/home/desktop/extra/wofi/default.nix b/modules/home/programs/wofi/default.nix similarity index 96% rename from modules/home/desktop/extra/wofi/default.nix rename to modules/home/programs/wofi/default.nix index 4e99d48..c87f7c1 100755 --- a/modules/home/desktop/extra/wofi/default.nix +++ b/modules/home/programs/wofi/default.nix @@ -1,8 +1,8 @@ { config, lib, ... }: with lib; let - cfg = config.mjallen.desktop.extra.wofi; - nord = import ../../theme/nord.nix; + cfg = config.mjallen.programs.wofi; + nord = import ../../desktop/theme/nord.nix; in { imports = [ ./options.nix ]; diff --git a/modules/home/desktop/extra/wofi/options.nix b/modules/home/programs/wofi/options.nix similarity index 80% rename from modules/home/desktop/extra/wofi/options.nix rename to modules/home/programs/wofi/options.nix index 12862e8..0eb6a64 100644 --- a/modules/home/desktop/extra/wofi/options.nix +++ b/modules/home/programs/wofi/options.nix @@ -1,7 +1,7 @@ { lib, ... }: with lib; { - options.mjallen.desktop.extra.wofi = { + options.mjallen.programs.wofi = { enable = mkEnableOption "enable wofi"; fontName = mkOption { diff --git a/modules/home/sops/default.nix b/modules/home/sops/default.nix new file mode 100644 index 0000000..f64cef1 --- /dev/null +++ b/modules/home/sops/default.nix @@ -0,0 +1,18 @@ +{ config, ... }: +{ + # sops = { + # age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; + # defaultSopsFile = "/etc/nixos/secrets/secrets.yaml"; + # validateSopsFiles = false; + # secrets = { + # "ssh-keys-public/desktop-nixos" = { + # path = "/home/matt/.ssh/id_ed25519.pub"; + # mode = "0644"; + # }; + # "ssh-keys-private/desktop-nixos" = { + # path = "/home/matt/.ssh/id_ed25519"; + # mode = "0600"; + # }; + # }; + # }; +} \ No newline at end of file diff --git a/overlays/jdk/default.nix b/overlays/jdk/default.nix new file mode 100644 index 0000000..c11e07f --- /dev/null +++ b/overlays/jdk/default.nix @@ -0,0 +1,5 @@ +{ inputs, ... }: +final: prev: { + jdk = final.openjdk17; + openjdk8 = final.openjdk17; +} diff --git a/overlays/nixpkgs-stable.nix b/overlays/stable/default.nix similarity index 100% rename from overlays/nixpkgs-stable.nix rename to overlays/stable/default.nix diff --git a/overlays/nixpkgs-unstable.nix b/overlays/unstable/default.nix similarity index 100% rename from overlays/nixpkgs-unstable.nix rename to overlays/unstable/default.nix diff --git a/overlays/waybar.nix b/overlays/waybar/default.nix similarity index 100% rename from overlays/waybar.nix rename to overlays/waybar/default.nix diff --git a/systems/x86_64-linux/desktop/configuration.nix b/systems/x86_64-linux/desktop/configuration.nix index 04f9462..31b9778 100755 --- a/systems/x86_64-linux/desktop/configuration.nix +++ b/systems/x86_64-linux/desktop/configuration.nix @@ -52,16 +52,16 @@ let ]; in { - nix = { - settings = { - substituters = [ - "https://cache.mjallen.dev" - ]; - trusted-public-keys = [ - "cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc=" - ]; - }; - }; + # nix = { + # settings = { + # substituters = [ + # "https://cache.mjallen.dev" + # ]; + # trusted-public-keys = [ + # "cache.mjallen.dev-1:IzFmKCd8/gggI6lcCXsW65qQwiCLGFFN9t9s2iw7Lvc=" + # ]; + # }; + # }; chaotic.mesa-git.enable = false; @@ -76,7 +76,7 @@ in hardware = { # Enable the QMK firmware flashing tool. keyboard = { - qmk.enable = true; + qmk.enable = false; }; # Enable Sane and Brother printer support. diff --git a/systems/x86_64-linux/desktop/default.nix b/systems/x86_64-linux/desktop/default.nix index f7f1ed4..40c6053 100644 --- a/systems/x86_64-linux/desktop/default.nix +++ b/systems/x86_64-linux/desktop/default.nix @@ -28,6 +28,9 @@ ./nix.nix ./sops.nix ./users.nix + + + ./specialisations/hyprland ]; ${namespace} = { diff --git a/systems/x86_64-linux/desktop/hyprland-settings.nix b/systems/x86_64-linux/desktop/hyprland-settings.nix index 6937700..1fafe9b 100644 --- a/systems/x86_64-linux/desktop/hyprland-settings.nix +++ b/systems/x86_64-linux/desktop/hyprland-settings.nix @@ -1,97 +1,97 @@ -let - theme = import ../../modules/nixos/hyprland/theme.nix; - defaultOpacity = theme.waybar.defaultOpacity; - defaultBorderRadius = theme.waybar.defaultBorderRadius; - defaultCenterOptions = theme.waybar.defaultCenterOptions; - borderLeft = theme.waybar.borderLeft; - borderRight = theme.waybar.borderRight; +# let +# theme = import ../../modules/nixos/hyprland/theme.nix; +# defaultOpacity = theme.waybar.defaultOpacity; +# defaultBorderRadius = theme.waybar.defaultBorderRadius; +# defaultCenterOptions = theme.waybar.defaultCenterOptions; +# borderLeft = theme.waybar.borderLeft; +# borderRight = theme.waybar.borderRight; - # Displays - displayLeft = { - input = "DP-1"; - resolution = "3840x2160"; - refreshRate = "240.00000"; - }; - displayRight = { - input = "DP-2"; - resolution = "3840x2160"; - refreshRate = "240.00000"; - }; -in -{ - primaryDisplay = displayLeft; - networkInterface = "wlp9s0"; +# # Displays +# displayLeft = { +# input = "DP-1"; +# resolution = "3840x2160"; +# refreshRate = "240.00000"; +# }; +# displayRight = { +# input = "DP-2"; +# resolution = "3840x2160"; +# refreshRate = "240.00000"; +# }; +# in +# { +# primaryDisplay = displayLeft; +# networkInterface = "wlp9s0"; - wallpaper = [ - "${displayLeft.input}, /run/wallpaper.jpg" - "${displayRight.input}, /run/wallpaper.jpg" - ]; +# wallpaper = [ +# "${displayLeft.input}, /run/wallpaper.jpg" +# "${displayRight.input}, /run/wallpaper.jpg" +# ]; - monitor = [ - "${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" - "${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98" - ]; +# monitor = [ +# "${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" +# "${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98" +# ]; - workspace = [ - "name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)" - "name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" - "name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)" - ]; +# workspace = [ +# "name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)" +# "name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" +# "name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)" +# ]; - windowRule = [ - "size 2160 7680, tag:horizonrdp" - ]; +# windowRule = [ +# "size 2160 7680, tag:horizonrdp" +# ]; - extraConfig = '' - exec-once = nm-applet - exec-once = [silent] firefox - exec-once = [silent] vesktop - exec-once = [silent] chromium --app="https://music.apple.com" - exec-once = [silent] steam - ''; +# extraConfig = '' +# exec-once = nm-applet +# exec-once = [silent] firefox +# exec-once = [silent] vesktop +# exec-once = [silent] chromium --app="https://music.apple.com" +# exec-once = [silent] steam +# ''; - waybar = { +# waybar = { - layer = "bottom"; +# layer = "bottom"; - modules-right = [ - "tray" - "custom/lights" - "temperature" - "temperature#gpu" - "keyboard-state#capslock" - "keyboard-state#numlock" - "wireplumber#sink" - "wireplumber#source" - "bluetooth" - "network" - "idle_inhibitor" - "clock" - "custom/weather" - ]; +# modules-right = [ +# "tray" +# "custom/lights" +# "temperature" +# "temperature#gpu" +# "keyboard-state#capslock" +# "keyboard-state#numlock" +# "wireplumber#sink" +# "wireplumber#source" +# "bluetooth" +# "network" +# "idle_inhibitor" +# "clock" +# "custom/weather" +# ]; - extraModules = { - "custom/lights" = { - tooltip = false; - exec = "waybar-hass --get_light light.living_room_lights"; - interval = "once"; - format = "{text}";#"󱉓"; - on-click = "waybar-hass --toggle_light light.living_room_lights"; - return-type = "json"; - }; - }; +# extraModules = { +# "custom/lights" = { +# tooltip = false; +# exec = "waybar-hass --get_light light.living_room_lights"; +# interval = "once"; +# format = "{text}";#"󱉓"; +# on-click = "waybar-hass --toggle_light light.living_room_lights"; +# return-type = "json"; +# }; +# }; - extraModulesStyle = '' - #custom-lights { - color: ${theme.nord.frost.nord8}; - background-color: ${theme.nord.polarNight.nord0}; - ${defaultOpacity} - ${borderLeft} - } +# extraModulesStyle = '' +# #custom-lights { +# color: ${theme.nord.frost.nord8}; +# background-color: ${theme.nord.polarNight.nord0}; +# ${defaultOpacity} +# ${borderLeft} +# } - #custom-lights:hover { - background: ${theme.nord.polarNight.nord3}; - } - ''; - }; -} \ No newline at end of file +# #custom-lights:hover { +# background: ${theme.nord.polarNight.nord3}; +# } +# ''; +# }; +# } \ No newline at end of file diff --git a/systems/x86_64-linux/desktop/specialisations/hyprland/default.nix b/systems/x86_64-linux/desktop/specialisations/hyprland/default.nix index c70de82..24e0672 100755 --- a/systems/x86_64-linux/desktop/specialisations/hyprland/default.nix +++ b/systems/x86_64-linux/desktop/specialisations/hyprland/default.nix @@ -1,10 +1,56 @@ -{ namespace, ... }: +{ lib, namespace, ... }: +let + # Displays + displayLeft = { + input = "DP-1"; + resolution = "3840x2160"; + refreshRate = "240.00000"; + }; + displayRight = { + input = "DP-2"; + resolution = "3840x2160"; + refreshRate = "240.00000"; + }; +in { + specialisation.hyprland.inheritParentConfig = true; specialisation.hyprland.configuration = { + home-manager.users.matt = import ./home/default.nix; ${namespace} = { desktop = { - hyprland.enable = true; - gnome.enable = false; + hyprland = { + enable = true; + primaryDisplay = "DP-1"; + + wallpaper = [ + "${displayLeft.input}, /run/wallpaper.jpg" + "${displayRight.input}, /run/wallpaper.jpg" + ]; + + monitor = [ + "${displayLeft.input},${displayLeft.resolution}@${displayLeft.refreshRate},0x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.2,sdrsaturation,0.98" + "${displayRight.input},${displayRight.resolution}@${displayRight.refreshRate},3840x0,1,bitdepth,10,cm,hdr,sdrbrightness,1.5,sdrsaturation,0.98" + ]; + + workspace = [ + "name:firefox, monitor:${displayRight.input}, default:false, special, class:(.*firefox.*)" + "name:discord, monitor:${displayRight.input}, default:true, special, title:(.*vesktop.*), title:(.*Apple Music.*)" + "name:steam, monitor:${displayLeft.input}, default:false, special, class:(.*[Ss]team.*)" + ]; + + windowRule = [ + "size 2160 7680, tag:horizonrdp" + ]; + + extraConfig = '' + exec-once = nm-applet + exec-once = [silent] firefox + exec-once = [silent] vesktop + exec-once = [silent] chromium --app="https://music.apple.com" + exec-once = [silent] steam + ''; + }; + gnome.enable = lib.mkForce false; }; }; environment.etc."specialisation".text = "hyprland"; diff --git a/systems/x86_64-linux/desktop/specialisations/hyprland/home/default.nix b/systems/x86_64-linux/desktop/specialisations/hyprland/home/default.nix new file mode 100644 index 0000000..56f1433 --- /dev/null +++ b/systems/x86_64-linux/desktop/specialisations/hyprland/home/default.nix @@ -0,0 +1,86 @@ +{ pkgs, ... }: +let + theme = import ../../../../../../modules/home/desktop/theme/nord.nix; + fontName = "JetBrainsMono NFM"; + fontPackage = pkgs.nerd-fonts.jetbrains-mono; +in +{ + mjallen = { + desktop.hyprland = { + enable = true; + defaultApps = { + browser = pkgs.firefox; + }; + }; + programs = { + btop.enable = true; + kitty = { + enable = true; + font = { + name = fontName; + package = fontPackage; + }; + }; + mako = { + enable = true; + fontName = fontName; + }; + nwg-dock.enable = true; + nwg-drawer.enable = true; + nwg-panel = { + enable = true; + defaultApps = { + browser = pkgs.firefox; + }; + }; + waybar = { + enable = true; + + networkInterface = "wlp9s0"; + layer = "bottom"; + + modules-right = [ + "tray" + "custom/lights" + "temperature" + "temperature#gpu" + "keyboard-state#capslock" + "keyboard-state#numlock" + "wireplumber#sink" + "wireplumber#source" + "bluetooth" + "network" + "idle_inhibitor" + "clock" + "custom/weather" + ]; + + extraModules = { + "custom/lights" = { + tooltip = false; + exec = "waybar-hass --get_light light.living_room_lights"; + interval = "once"; + format = "{text}";#"󱉓"; + on-click = "waybar-hass --toggle_light light.living_room_lights"; + return-type = "json"; + }; + }; + + extraModulesStyle = '' + #custom-lights { + color: ${theme.frost.nord8}; + background-color: ${theme.polarNight.nord0}; + ${theme.defaultOpacity} + ${theme.borderLeft} + } + + #custom-lights:hover { + background: ${theme.polarNight.nord3}; + } + ''; + }; + wlogout.enable = true; + wofi.enable = true; + }; + }; +} \ No newline at end of file