From 2d4dd9c45884a46cd3e83af8de8e97c28ae6b9e0 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Thu, 11 May 2023 22:36:25 -0500 Subject: [PATCH 1/4] get hyprland working! --- hosts/ace/configuration.nix | 2 +- hosts/dragon/configuration.nix | 2 +- hosts/eve/configuration.nix | 3 ++- hosts/loki/configuration.nix | 2 +- hosts/pocket2/configuration.nix | 2 +- hosts/smaug/configuration.nix | 2 +- {dm => wm}/kde/default.nix | 0 {dm => wm}/sway/default.nix | 0 workstation/default.nix | 26 ++++++++++++++++---------- 9 files changed, 23 insertions(+), 16 deletions(-) rename {dm => wm}/kde/default.nix (100%) rename {dm => wm}/sway/default.nix (100%) diff --git a/hosts/ace/configuration.nix b/hosts/ace/configuration.nix index a3e2150..0c01e48 100644 --- a/hosts/ace/configuration.nix +++ b/hosts/ace/configuration.nix @@ -6,7 +6,7 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway ]; networking.hostName = "ace"; } diff --git a/hosts/dragon/configuration.nix b/hosts/dragon/configuration.nix index 1e495dc..da1b705 100644 --- a/hosts/dragon/configuration.nix +++ b/hosts/dragon/configuration.nix @@ -6,7 +6,7 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway ]; networking.hostName = "dragon"; } diff --git a/hosts/eve/configuration.nix b/hosts/eve/configuration.nix index 33f7f93..b33cb49 100644 --- a/hosts/eve/configuration.nix +++ b/hosts/eve/configuration.nix @@ -7,7 +7,8 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway + /home/don/nixos/wm/hyperland ]; networking.hostName = "eve"; } diff --git a/hosts/loki/configuration.nix b/hosts/loki/configuration.nix index ac0d285..469e475 100644 --- a/hosts/loki/configuration.nix +++ b/hosts/loki/configuration.nix @@ -7,7 +7,7 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway ]; networking.hostName = "loki"; } diff --git a/hosts/pocket2/configuration.nix b/hosts/pocket2/configuration.nix index 12058d6..70e6cde 100644 --- a/hosts/pocket2/configuration.nix +++ b/hosts/pocket2/configuration.nix @@ -6,7 +6,7 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway ]; networking.hostName = "pocket2"; } diff --git a/hosts/smaug/configuration.nix b/hosts/smaug/configuration.nix index 73c591f..8acdd0f 100644 --- a/hosts/smaug/configuration.nix +++ b/hosts/smaug/configuration.nix @@ -7,7 +7,7 @@ /etc/nixos/hardware-configuration.nix /home/don/nixos/workstation /home/don/nixos/home - /home/don/nixos/dm/sway + /home/don/nixos/wm/sway ]; networking.hostName = "smaug"; } diff --git a/dm/kde/default.nix b/wm/kde/default.nix similarity index 100% rename from dm/kde/default.nix rename to wm/kde/default.nix diff --git a/dm/sway/default.nix b/wm/sway/default.nix similarity index 100% rename from dm/sway/default.nix rename to wm/sway/default.nix diff --git a/workstation/default.nix b/workstation/default.nix index a70ac29..faa28c1 100644 --- a/workstation/default.nix +++ b/workstation/default.nix @@ -24,7 +24,7 @@ in # Enable networking networking.networkmanager.enable = true; - networking.enableIPv6 = false; # FIXME this is to test connectivity @ the office via wireguard + networking.enableIPv6 = false; # FIXME this is to test connectivity @ the office via tailscale networking.networkmanager.wifi.powersave = true; networking.useDHCP = false; @@ -45,15 +45,20 @@ in boot.plymouth.enable = true; boot.plymouth.theme = "breeze"; - security.polkit.enable = true; - # Enable doas instead of sudo - security.sudo.enable = false; - security.doas.enable = true; - security.doas.extraRules = [{ - users = [ "don" ]; - keepEnv = true; - noPass = true; - }]; + security = { + polkit = { + enable = true; + }; + sudo.enable = false; + doas = { + enable = true; + extraRules = [{ + users = [ "don" ]; + keepEnv = true; + noPass = true; + }]; + }; + }; services = { avahi = { @@ -255,6 +260,7 @@ in vit wget widevine-cdm + wireplumber wlsunset xdg-utils xfce.thunar From e01f2036d25b4b284f397ea8c4d183c99dbe8fe8 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Fri, 12 May 2023 21:10:03 -0500 Subject: [PATCH 2/4] get hyprland working! pt 2 --- wm/hyperland/default.nix | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 wm/hyperland/default.nix diff --git a/wm/hyperland/default.nix b/wm/hyperland/default.nix new file mode 100644 index 0000000..76ab127 --- /dev/null +++ b/wm/hyperland/default.nix @@ -0,0 +1,65 @@ +{ config, pkgs, lib, ... }: +let + configure-gtk = pkgs.writeTextFile { + name = "configure-gtk"; + destination = "/bin/configure-gtk"; + executable = true; + text = let + schema = pkgs.gsettings-desktop-schemas; + datadir = "${schema}/share/gsettings-schemas/${schema.name}"; + in '' + export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS + gnome_schema=org.gnome.desktop.interface + gsettings set $gnome_schema gtk-theme 'Dracula' + ''; + }; + +in +{ + environment.systemPackages = with pkgs; [ + alacritty + bemenu + #configure-gtk + #dbus-sway-environment + dracula-theme # gtk theme + glib + gnome.adwaita-icon-theme + grim + mako + slurp + sway + swayidle + swayimg + swaylock-effects + swaynotificationcenter + waybar + wayland + wl-clipboard + ]; + + + # xdg-desktop-portal works by exposing a series of D-Bus interfaces + # known as portals under a well-known name + # (org.freedesktop.portal.Desktop) and object path + # (/org/freedesktop/portal/desktop). + # The portal interfaces include APIs for file access, opening URIs, + # printing and others. + services.dbus.enable = true; + xdg.portal = { + enable = true; + wlr.enable = true; + # gtk portal needed to make gtk apps happy + extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + #gtkUsePortal = true; + }; +# wayland.windowManager.hyprland = { +# enable = true; + +# extraConfig = '' +# bind = SUPER, Return, exec, kitty +# # ... +# ''; +# }; + programs.hyprland.enable = true; + +} From 1aa8036fe8d127c6fb48be51250e92bf38b0c98a Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sat, 13 May 2023 13:25:02 -0500 Subject: [PATCH 3/4] hosts| enable hyprland for loki --- hosts/loki/configuration.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/hosts/loki/configuration.nix b/hosts/loki/configuration.nix index 469e475..3c21a3c 100644 --- a/hosts/loki/configuration.nix +++ b/hosts/loki/configuration.nix @@ -8,6 +8,7 @@ /home/don/nixos/workstation /home/don/nixos/home /home/don/nixos/wm/sway + /home/don/nixos/wm/hyperland ]; networking.hostName = "loki"; } From 8317ed433e9dd6d066222062d6bf41861cc2f854 Mon Sep 17 00:00:00 2001 From: Don Harper Date: Sat, 13 May 2023 22:32:36 -0500 Subject: [PATCH 4/4] wm/hyperland/default.nix | sway->swaybg --- wm/hyperland/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wm/hyperland/default.nix b/wm/hyperland/default.nix index 76ab127..019461a 100644 --- a/wm/hyperland/default.nix +++ b/wm/hyperland/default.nix @@ -27,7 +27,7 @@ in grim mako slurp - sway + swaybg swayidle swayimg swaylock-effects