From eed323b3e784845868b7c607c1c4c6a3b1940cb3 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 2 Aug 2023 10:23:16 +0100 Subject: [PATCH] Split desktop config into plasma and hyprland Change Ronin to use plasma wayland instead of hyprland --- home/wezterm/wezterm.lua | 4 +- hosts/Ronin/configuration.nix | 7 +-- hosts/Ronin/home.nix | 51 ---------------------- hosts/desktop.nix | 48 ++++++++------------ hosts/hyprland.nix | 22 ++++++++++ hosts/plasma.nix | 11 +++++ pkgs/sddm-catppuccin-macchiato/default.nix | 23 ++++++++++ 7 files changed, 78 insertions(+), 88 deletions(-) create mode 100644 hosts/hyprland.nix create mode 100644 hosts/plasma.nix create mode 100644 pkgs/sddm-catppuccin-macchiato/default.nix diff --git a/home/wezterm/wezterm.lua b/home/wezterm/wezterm.lua index a2f00862..7115e8b0 100644 --- a/home/wezterm/wezterm.lua +++ b/home/wezterm/wezterm.lua @@ -15,8 +15,8 @@ config.set_environment_variables = { } config.audible_bell = "Disabled" config.font_size = 14 -config.window_background_opacity = 0.80 -config.macos_window_background_blur = 20 +-- config.window_background_opacity = 0.80 +-- config.macos_window_background_blur = 20 config.color_scheme = "tokyonight_night" config.hide_tab_bar_if_only_one_tab = true config.hide_mouse_cursor_when_typing = true diff --git a/hosts/Ronin/configuration.nix b/hosts/Ronin/configuration.nix index 879173a5..e37dee76 100644 --- a/hosts/Ronin/configuration.nix +++ b/hosts/Ronin/configuration.nix @@ -8,7 +8,7 @@ in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ../desktop.nix + ../plasma.nix ../../services/${hostName}.nix ]; # Bootloader. @@ -31,10 +31,7 @@ in { ''; programs.light.enable = true; users.users.${user} = userConfig; - services.greetd.settings = { - initial_session.user = user; - default_session.user = user; - }; + services.xserver.displayManager.defaultSession = "plasmawayland"; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/Ronin/home.nix b/hosts/Ronin/home.nix index e125beea..39ae51ff 100644 --- a/hosts/Ronin/home.nix +++ b/hosts/Ronin/home.nix @@ -2,12 +2,6 @@ let username = "elitherl"; homeDirectory = "/home/${username}"; - monitors = { - eDP-1 = "preferred,auto,1.25"; - Iiyama = "preferred,0x185,1"; - Dell = "preferred,1920x0,1,transform,1"; - Acer = "highrr,auto,1"; - }; in { imports = [ shellConfig @@ -15,7 +9,6 @@ in { ../../home/git/work.nix ../../home/ssh/work.nix ../../home/tui - ../../home/hyprland ../../home/wezterm ]; home = { @@ -25,48 +18,4 @@ in { }; programs.home-manager.enable = true; programs.chromium.enable = true; - services.kanshi = { - enable = true; - systemdTarget = "hyprland-session.target"; - profiles = { - default.outputs = [{ - criteria = "eDP-1"; - status = "enable"; - }]; - workDock.outputs = [ - { - criteria = "eDP-1"; - status = "disable"; - } - { - criteria = "Iiyama North America PLB2403WS 0574281251316"; - status = "enable"; - } - { - criteria = "Dell Inc. DELL U2417H 5K9YD872FY1L"; - status = "enable"; - } - ]; - homeDock.outputs = [ - { - criteria = "eDP-1"; - status = "disable"; - } - { - criteria = "Acer Technologies ED270R TJMEE0043W01"; - status = "enable"; - } - ]; - }; - }; - xdg.configFile."hypr/display.conf".text = '' - monitor=eDP-1,${monitors.eDP-1} - monitor=desc:Iiyama North America PLB2403WS 0574281251316,${monitors.Iiyama} - monitor=desc:Dell Inc. DELL U2417H 5K9YD872FY1L,${monitors.Dell} - monitor=desc:Acer Technologies ED270R TJMEE0043W01,${monitors.Acer} - - bindl=,switch:Lid Switch,exec,rfkill unblock wlan - bindl=,switch:Lid Switch,exec,pkill -9 kanshi - bindl=,switch:Lid Switch,exec,pkill -9 hyprpaper && hyprctl dispatch exec hyprpaper - ''; } diff --git a/hosts/desktop.nix b/hosts/desktop.nix index 6f7eacde..ac6c0ba7 100644 --- a/hosts/desktop.nix +++ b/hosts/desktop.nix @@ -1,27 +1,17 @@ -{ - pkgs, - hyprland, - ... -}: { - imports = [ - hyprland.nixosModules.default - ./common.nix - ]; +{ pkgs, ... }: +let + sddm-catppuccin-macchiato = + pkgs.callPackage ../pkgs/sddm-catppuccin-macchiato { }; +in { + imports = [ ./common.nix ]; environment.systemPackages = with pkgs; [ - xdg-utils - gsettings-desktop-schemas - pavucontrol - grim - slurp + sddm-catppuccin-macchiato bitwarden signal-desktop libreoffice zotero ]; - security = { - pam.services.swaylock = {}; - rtkit.enable = true; - }; + security.rtkit.enable = true; sound.enable = true; hardware.pulseaudio.enable = false; services = { @@ -31,20 +21,18 @@ alsa.support32Bit = true; pulse.enable = true; }; - blueman.enable = true; - gvfs.enable = true; - tumbler.enable = true; - greetd = { + xserver = { enable = true; - settings = { - default_session.command = "Hyprland"; - initial_session.command = "Hyprland"; + layout = "gb"; + xkbVariant = ""; + displayManager.sddm = { + enable = true; + theme = "catppuccin-macchiato"; + settings = { General = { InputMethod = ""; }; }; }; }; }; - xdg.portal = { - enable = true; - extraPortals = with pkgs; [xdg-desktop-portal-gtk]; - }; - programs.hyprland.enable = true; + console.keyMap = "uk"; + programs.dconf.enable = true; + xdg.portal.enable = true; } diff --git a/hosts/hyprland.nix b/hosts/hyprland.nix new file mode 100644 index 00000000..04b171f7 --- /dev/null +++ b/hosts/hyprland.nix @@ -0,0 +1,22 @@ +{ pkgs, hyprland, ... }: { + imports = [ ./desktop.nix hyprland.nixosModules.default ]; + environment.systemPackages = with pkgs; [ + xdg-utils + gsettings-desktop-schemas + pavucontrol + grim + slurp + ]; + security.pam.services.swaylock = { }; + services = { + blueman.enable = true; + gvfs.enable = true; + tumbler.enable = true; + greetd.settings = { + default_session.command = "Hyprland"; + initial_session.command = "Hyprland"; + }; + }; + xdg.portal.extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; + programs.hyprland.enable = true; +} diff --git a/hosts/plasma.nix b/hosts/plasma.nix new file mode 100644 index 00000000..c1149b55 --- /dev/null +++ b/hosts/plasma.nix @@ -0,0 +1,11 @@ +{ pkgs, ... }: { + imports = [ ./desktop.nix ]; + services.xserver.desktopManager.plasma5.enable = true; + # programs.kdeconnect.enable = true; + environment.systemPackages = [ + pkgs.libsForQt5.lightly + pkgs.libsForQt5.kwindowsystem + # pkgs.libsForQt5.ktorrent + pkgs.libsForQt5.krdc + ]; +} diff --git a/pkgs/sddm-catppuccin-macchiato/default.nix b/pkgs/sddm-catppuccin-macchiato/default.nix new file mode 100644 index 00000000..cf0d43ea --- /dev/null +++ b/pkgs/sddm-catppuccin-macchiato/default.nix @@ -0,0 +1,23 @@ +{ + stdenvNoCC, + fetchFromGitHub, +}: +stdenvNoCC.mkDerivation rec { + pname = "sddm-catppuccin-macchiato-theme"; + version = "1.0"; + dontBuild = true; + + src = fetchFromGitHub { + owner = "catppuccin"; + repo = "sddm"; + rev = "bde6932e1ae0f8fdda76eff5c81ea8d3b7d653c0"; + sha256 = "ceaK/I5lhFz6c+UafQyQVJIzzPxjmsscBgj8130D4dE="; + }; + + installPhase = '' + runHook preInstall + mkdir -p $out/share/sddm/themes + cp -aR $src/src/catppuccin-macchiato $out/share/sddm/themes/catppuccin-macchiato + runHook postInstall + ''; +}