From e6a442be5694d5362283fdcc334ac72237ea1193 Mon Sep 17 00:00:00 2001 From: cspark Date: Sat, 16 Mar 2024 13:01:51 +0000 Subject: [PATCH 1/9] Copy over hardware configuration for laptop, more laptop configuration --- configurations/laptop/configuration.nix | 17 +++++++ .../laptop/hardware-configuration.nix | 19 +++---- configurations/laptop/home.nix | 7 +++ .../home-manager/.config/foot/foot.ini | 23 +++++++++ .../.config/networkmanager-dmenu/config.ini | 49 +++++++++++++++++++ .../home-manager/.config/sway/config | 24 +++++++-- flake.nix | 1 + 7 files changed, 127 insertions(+), 13 deletions(-) create mode 100644 configurations/laptop/resources/home-manager/.config/foot/foot.ini create mode 100644 configurations/laptop/resources/home-manager/.config/networkmanager-dmenu/config.ini diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index bdafb8ce..46b68215 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -30,16 +30,20 @@ foot # Terminal Emulator dmenu # Application Launcher wmenu # Application Launcher - Wayland + networkmanager_dmenu # Network Manager dmenu script wdisplays # Manage wayland displays wlsunset # Day/night gamma adjustment/filter for wayland sway-contrib.grimshot # Screenshot tool for wayland mako # Notification Daemon + themix-gui # Application to design GTK themes + lxqt.pcmanfm-qt # File Manager lxqt.lxqt-archiver # Archiver qt6Packages.qt6ct # Manage QT6 Themes libsForQt5.qt5ct # Manage QT5 Themes lxappearance # Manage GTK Themes + kdePackages.polkit-kde-agent-1 # Polkit Prompt for password prompts etc ]; }; # XDG Portal Integration (For file chooser/screensharing etc) @@ -50,6 +54,8 @@ qt.enable = true; # Enable xwayland support programs.xwayland.enable = true; + # Enable polkit + security.polkit.enable = true; # GTK themes are not applied in Wayland applications / Window Decorations missing / Cursor looks different programs.dconf.enable = true; @@ -106,14 +112,25 @@ python3 usbutils nvtop-intel + xdg-user-dirs ]; # Set konsole to be default terminal environment.sessionVariables = { TERM = "foot"; + QT_QPA_PLATFORM = "wayland-egl"; + QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = "1"; }; environment.variables = { TERM = "foot"; + QT_QPA_PLATFORM = "wayland-egl"; + QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = "1"; }; } diff --git a/configurations/laptop/hardware-configuration.nix b/configurations/laptop/hardware-configuration.nix index b918328a..d38a3cdd 100644 --- a/configurations/laptop/hardware-configuration.nix +++ b/configurations/laptop/hardware-configuration.nix @@ -8,26 +8,26 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "uas" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" "sdhci_pci" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" "vendor-reset" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/f25f2830-a778-4ecd-ad9b-93331ec13ff0"; + { device = "/dev/disk/by-uuid/502edf37-4301-4517-87dd-4b030310f869"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-542de15a-e6a5-4c6d-8c6a-62f916805da8".device = "/dev/disk/by-uuid/542de15a-e6a5-4c6d-8c6a-62f916805da8"; - boot.initrd.luks.devices."luks-9658340a-9d7d-4dbd-be1c-c8c7393ddfc3".device = "/dev/disk/by-uuid/9658340a-9d7d-4dbd-be1c-c8c7393ddfc3"; + boot.initrd.luks.devices."luks-a014fc29-65ec-4cbc-9ef2-d601c5157425".device = "/dev/disk/by-uuid/a014fc29-65ec-4cbc-9ef2-d601c5157425"; + boot.initrd.luks.devices."luks-5917f8ad-73ed-4839-ba81-be53a90685a1".device = "/dev/disk/by-uuid/5917f8ad-73ed-4839-ba81-be53a90685a1"; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/386A-F58F"; + { device = "/dev/disk/by-uuid/F323-67BC"; fsType = "vfat"; }; swapDevices = - [ { device = "/dev/disk/by-uuid/6a8760a6-b720-455d-8ff6-af76365374bf"; } + [ { device = "/dev/disk/by-uuid/aa1c6777-0afa-4fdf-84e8-5fead5e987d4"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -35,8 +35,9 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s25.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/configurations/laptop/home.nix b/configurations/laptop/home.nix index 47c7b304..0237de01 100644 --- a/configurations/laptop/home.nix +++ b/configurations/laptop/home.nix @@ -40,10 +40,17 @@ # Config Files (typically $HOME/.config) xdg.configFile = { "sway/config".source = ./resources/home-manager/.config/sway/config; + "foot/foot.ini".source = ./resources/home-manager/.config/foot/foot.ini; + "networkmanager-dmenu/config.ini".source = ./resources/home-manager/.config/networkmanager-dmenu/config.ini; }; home.sessionVariables = { TERM = "foot"; + QT_QPA_PLATFORM = "wayland-egl"; + QT_QPA_PLATFORMTHEME = "qt6ct"; + QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; + SDL_VIDEODRIVER = "wayland"; + _JAVA_AWT_WM_NONREPARENTING = "1"; }; programs.bash = { diff --git a/configurations/laptop/resources/home-manager/.config/foot/foot.ini b/configurations/laptop/resources/home-manager/.config/foot/foot.ini new file mode 100644 index 00000000..6d453088 --- /dev/null +++ b/configurations/laptop/resources/home-manager/.config/foot/foot.ini @@ -0,0 +1,23 @@ +# -*- conf -*- +font=HackNerdFontMono-Regular:size=13 + +# Gruvbox - Light +[colors] +background=fbf1c7 +foreground=3c3836 +regular0=fbf1c7 +regular1=cc241d +regular2=98971a +regular3=d79921 +regular4=458588 +regular5=b16286 +regular6=689d6a +regular7=7c6f64 +bright0=928374 +bright1=9d0006 +bright2=79740e +bright3=b57614 +bright4=076678 +bright5=8f3f71 +bright6=427b58 +bright7=3c3836 \ No newline at end of file diff --git a/configurations/laptop/resources/home-manager/.config/networkmanager-dmenu/config.ini b/configurations/laptop/resources/home-manager/.config/networkmanager-dmenu/config.ini new file mode 100644 index 00000000..70107298 --- /dev/null +++ b/configurations/laptop/resources/home-manager/.config/networkmanager-dmenu/config.ini @@ -0,0 +1,49 @@ +[dmenu] +compact = True +dmenu_command = wmenu -N f9f5d7 -n 3c3836 -S 8f3f71 -s fbf1c7 -f "Hack Nerd Font Mono 14" +# # Note that dmenu_command can contain arguments as well like: +# # `dmenu_command = rofi -dmenu -i -theme nmdm` +# # `dmenu_command = rofi -dmenu -width 30 -i` +# # `dmenu_command = dmenu -i -l 25 -b -nb #909090 -nf #303030` +# # `dmenu_command = fuzzel --dmenu` +# # `dmenu_command = wofi --dmenu` +# active_chars = == +# highlight = # (Default: False) use highlighting instead of active_chars (only applicable to Rofi / Wofi) +# highlight_fg = # (Default: None) foreground color of active connection (only applicable to Wofi) +# highlight_bg = # (Default: None) background color of active connection (only applicable to Wofi) +# highlight_bold = # (Default: True) make active connection bold (only applicable to Wofi) +# compact = # (Default: False). Remove extra spacing from display +# pinentry = # (Default: None) e.g. `pinentry-gtk` +# wifi_chars = +# wifi_chars = ▂▄▆█ +# wifi_icons = +# wifi_icons = 󰤯󰤟󰤢󰤥󰤨 +# format = +# format = {name} {sec} {bars} +# # Available variables are: +# # * {name} - Access point name +# # * {sec} - Security type +# # * {signal} - Signal strength on a scale of 0-100 +# # * {bars} - Bar-based display of signal strength (see wifi_chars) +# # * {icon} - Icon-based display of signal strength (see wifi_icons) +# # * {max_len_name} and {max_len_sec} are the maximum lengths of {name} / {sec} +# # respectively and may be useful for formatting. +# list_saved = # (Default: False) list saved connections + +[dmenu_passphrase] +# # Uses the -password flag for Rofi, -x for bemenu. For dmenu, sets -nb and +# # -nf to the same color or uses -P if the dmenu password patch is applied +# # https://tools.suckless.org/dmenu/patches/password/ +# obscure = True +# obscure_color = #222222 + +[pinentry] +# description = (Default: Get network password) +# prompt = (Default: Password:) + +[editor] +# terminal = +# gui_if_available = (Default: True) + +[nmdm] +# rescan_delay = # (seconds to wait after a wifi rescan before redisplaying the results) \ No newline at end of file diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index b7c2eee8..1f11affa 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -18,7 +18,7 @@ set $term foot # Your preferred application launcher # Note: pass the final command to swaymsg so that the resulting window can be opened # on the original workspace that the command was run on. -set $menu dmenu_path | wmenu | xargs swaymsg exec -- +set $menu dmenu_path | wmenu -N f9f5d7 -n 3c3836 -S 8f3f71 -s fbf1c7 -f "Hack Nerd Font Mono 14" | xargs swaymsg exec -- include /etc/sway/config-vars.d/* @@ -60,6 +60,20 @@ output * bg ~/Pictures/Wallpapers/gruvbox_light_linux.png fill # You can get the names of your inputs by running: swaymsg -t get_inputs # Read `man 5 sway-input` for more information about this section. +# Font Configuration +font pango:Hack Nerd Font Mono 12 + +# Border Configuration +default_border pixel 3 +default_floating_border normal 3 +client.focused #b16286 #b16286 #f9f5d7 +client.focused_inactive #f9f5d7 #f9f5d7 #3c3836 +client.unfocused #f9f5d7 #f9f5d7 #3c3836 + +# Gaps Configuration +gaps inner 5 +gaps outer 5 + ### Key bindings # # Basics: @@ -213,9 +227,11 @@ bar { status_command while echo "`date +'%Y-%m-%d %I:%M:%S %p'` \| Battery: %`cat /sys/class/power_supply/BAT0/capacity` \(`cat /sys/class/power_supply/BAT0/status`\)"; do sleep 1; done colors { - statusline #ffffff - background #323232 - inactive_workspace #32323200 #32323200 #5c5c5c + statusline #3c3836 + background #f9f5d7 + focused_workspace #b16286 #8f3f71 #fbf1c7 + active_workspace #b16286 #8f3f71 #fbf1c7 + inactive_workspace #ebdbb2 #d5c4a1 #3c3836 } } diff --git a/flake.nix b/flake.nix index ec4e2b73..478f26af 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,7 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + }; outputs = { self, nixpkgs, ... }@inputs: { From d01f2b92fd07381ee4a56e19535e4d44859f94d8 Mon Sep 17 00:00:00 2001 From: cspark Date: Sat, 16 Mar 2024 13:26:03 +0000 Subject: [PATCH 2/9] Mako notification manager config for laptop --- configurations/laptop/configuration.nix | 2 ++ configurations/laptop/home.nix | 4 ++++ .../home-manager/.config/mako/config | 24 +++++++++++++++++++ 3 files changed, 30 insertions(+) create mode 100644 configurations/laptop/resources/home-manager/.config/mako/config diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 46b68215..5f09f14c 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -56,6 +56,8 @@ programs.xwayland.enable = true; # Enable polkit security.polkit.enable = true; + # For udiskie + services.udisks2.enable = true; # GTK themes are not applied in Wayland applications / Window Decorations missing / Cursor looks different programs.dconf.enable = true; diff --git a/configurations/laptop/home.nix b/configurations/laptop/home.nix index 0237de01..cdb1baa4 100644 --- a/configurations/laptop/home.nix +++ b/configurations/laptop/home.nix @@ -40,10 +40,14 @@ # Config Files (typically $HOME/.config) xdg.configFile = { "sway/config".source = ./resources/home-manager/.config/sway/config; + "mako/config".source = ./resources/home-manager/.config/mako/config; "foot/foot.ini".source = ./resources/home-manager/.config/foot/foot.ini; "networkmanager-dmenu/config.ini".source = ./resources/home-manager/.config/networkmanager-dmenu/config.ini; }; + services.udiskie.enable = true; + services.udiskie.tray = "never"; + home.sessionVariables = { TERM = "foot"; QT_QPA_PLATFORM = "wayland-egl"; diff --git a/configurations/laptop/resources/home-manager/.config/mako/config b/configurations/laptop/resources/home-manager/.config/mako/config new file mode 100644 index 00000000..64eb6fcf --- /dev/null +++ b/configurations/laptop/resources/home-manager/.config/mako/config @@ -0,0 +1,24 @@ +sort=-time +layer=overlay +background-color=#f9f5d7 +text-color=#3c3836 +width=300 +height=110 +border-size=3 +border-color=#b16286 +border-radius=0 +icons=0 +max-icon-size=64 +default-timeout=5000 +ignore-timeout=1 +font=Hack Nerd Font Mono 12 + +[urgency=low] +border-color=#b16286 + +[urgency=normal] +border-color=#b16286 + +[urgency=high] +border-color=#b16286 +default-timeout=0 \ No newline at end of file From 06fc826f7d1f1be850135864cf9fd86222b1c74d Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:02:17 +0000 Subject: [PATCH 3/9] Enable virt manager/libvirt globally, laptop sway workspace/rules configuration --- configurations/laptop/configuration.nix | 1 + .../home-manager/.config/sway/config | 25 ++++++++++++++----- global.nix | 5 ++++ 3 files changed, 25 insertions(+), 6 deletions(-) diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 5f09f14c..171e9187 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -35,6 +35,7 @@ wlsunset # Day/night gamma adjustment/filter for wayland sway-contrib.grimshot # Screenshot tool for wayland mako # Notification Daemon + wlprop # Clone of X11 xprop for wayland (To get window class names etc) themix-gui # Application to design GTK themes diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index 1f11affa..0643918e 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -137,9 +137,9 @@ gaps outer 5 bindsym $mod+5 workspace number 5 bindsym $mod+6 workspace number 6 bindsym $mod+7 workspace number 7 - bindsym $mod+8 workspace number 8 - bindsym $mod+9 workspace number 9 - bindsym $mod+0 workspace number 10 + bindsym $mod+8 workspace number 8 Chat + bindsym $mod+9 workspace number 9 Games + bindsym $mod+0 workspace number 10 Audio # Move focused container to workspace bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+2 move container to workspace number 2 @@ -148,11 +148,21 @@ gaps outer 5 bindsym $mod+Shift+5 move container to workspace number 5 bindsym $mod+Shift+6 move container to workspace number 6 bindsym $mod+Shift+7 move container to workspace number 7 - bindsym $mod+Shift+8 move container to workspace number 8 - bindsym $mod+Shift+9 move container to workspace number 9 - bindsym $mod+Shift+0 move container to workspace number 10 + bindsym $mod+Shift+8 move container to workspace number 8 Chat + bindsym $mod+Shift+9 move container to workspace number 9 Games + bindsym $mod+Shift+0 move container to workspace number 10 Audio # Note: workspaces can have any name you want, not just numbers. # We just use 1-10 as the default. + + # A bit of window rules in regards to Chat/Games/Audio workspaces + assign [class="discord"] number 8 Chat + assign [class="org.telegram.desktop"] number 8 Chat + assign [title="Telegram"] number 8 Chat + assign [class="steam"] number 9 Games + assign [title="steam"] number 9 Games + assign [class="ardour"] number 10 Audio + # qpwgraph + assign [title="A PipeWire Graph Qt GUI Interface"] number 10 Audio # # Layout stuff: # @@ -236,3 +246,6 @@ bar { } include /etc/sway/config.d/* + +# Autostart +exec qpwgraph \ No newline at end of file diff --git a/global.nix b/global.nix index d639f275..ded689b3 100644 --- a/global.nix +++ b/global.nix @@ -107,6 +107,11 @@ "; }; + # Virt Manager Installation + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + + # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; From 516f64b144c10c1f7ea91d82ecc757a73c8685b4 Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:11:53 +0000 Subject: [PATCH 4/9] Passmenu initial integration --- .../laptop/resources/home-manager/.config/sway/config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index 0643918e..c96c2ff7 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -87,6 +87,9 @@ gaps outer 5 # Start your launcher bindsym $mod+d exec $menu + # Start password manager + bindsym Control+Mod1+p exec passmenu + # Lock screen bindsym Mod4+l exec swaylock -c 000000 From 7900fe71ba1fc5dc8dd34e53015a7354f3a21c9e Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:21:28 +0000 Subject: [PATCH 5/9] Ssh askpass and keyboard config for laptop --- configurations/laptop/configuration.nix | 1 + .../laptop/resources/home-manager/.config/sway/config | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 171e9187..9232e38f 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -45,6 +45,7 @@ libsForQt5.qt5ct # Manage QT5 Themes lxappearance # Manage GTK Themes kdePackages.polkit-kde-agent-1 # Polkit Prompt for password prompts etc + lxqt.lxqt-openssh-askpass # GUI to query passwords on behalf of SSH agents ]; }; # XDG Portal Integration (For file chooser/screensharing etc) diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index c96c2ff7..b6e708f5 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -47,6 +47,14 @@ output * bg ~/Pictures/Wallpapers/gruvbox_light_linux.png fill # resumed. It will also lock your screen before your computer goes to sleep. ### Input configuration + +input "1:1:AT_Translated_Set_2_keyboard" { + xkb_layout "gb" +} +input "6058:20564:ThinkPad_Extra_Buttons" { + xkb_layout "gb" +} + # # Example configuration: # From fccfed38417d709b4ed8da708be725dd3ba2654a Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:30:56 +0000 Subject: [PATCH 6/9] SSH Askpass configuration for latpop --- configurations/laptop/configuration.nix | 2 ++ configurations/laptop/home.nix | 1 + 2 files changed, 3 insertions(+) diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 9232e38f..2e51c116 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -127,6 +127,7 @@ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; SDL_VIDEODRIVER = "wayland"; _JAVA_AWT_WM_NONREPARENTING = "1"; + SSH_ASKPASS = "lxqt-openssh-askpass"; }; environment.variables = { TERM = "foot"; @@ -135,6 +136,7 @@ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; SDL_VIDEODRIVER = "wayland"; _JAVA_AWT_WM_NONREPARENTING = "1"; + SSH_ASKPASS = lib.mkForce "lxqt-openssh-askpass"; }; } diff --git a/configurations/laptop/home.nix b/configurations/laptop/home.nix index cdb1baa4..50dc6f22 100644 --- a/configurations/laptop/home.nix +++ b/configurations/laptop/home.nix @@ -55,6 +55,7 @@ QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; SDL_VIDEODRIVER = "wayland"; _JAVA_AWT_WM_NONREPARENTING = "1"; + SSH_ASKPASS = "lxqt-openssh-askpass"; }; programs.bash = { From 4f05af3880f7d2ca76ea367075bf7afec52e09f8 Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:35:56 +0000 Subject: [PATCH 7/9] Enable spice usb redirection for libvirt globally --- global.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/global.nix b/global.nix index ded689b3..c157fc3e 100644 --- a/global.nix +++ b/global.nix @@ -110,6 +110,7 @@ # Virt Manager Installation virtualisation.libvirtd.enable = true; programs.virt-manager.enable = true; + virtualisation.spiceUSBRedirection.enable = true; # Some programs need SUID wrappers, can be configured further or are From b8e14dd11440cf0e1daa7b2ed730faa68e04cd10 Mon Sep 17 00:00:00 2001 From: cspark Date: Tue, 19 Mar 2024 13:54:33 +0000 Subject: [PATCH 8/9] Remove old comment --- configurations/laptop/configuration.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 2e51c116..09574ff7 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -119,7 +119,6 @@ xdg-user-dirs ]; - # Set konsole to be default terminal environment.sessionVariables = { TERM = "foot"; QT_QPA_PLATFORM = "wayland-egl"; From 55f1349e145b7181138ab55b2de814a4bdeea821 Mon Sep 17 00:00:00 2001 From: cspark Date: Wed, 20 Mar 2024 18:57:57 +0000 Subject: [PATCH 9/9] Laptop backlight configuration --- configurations/laptop/configuration.nix | 15 +++++++++++++++ .../resources/home-manager/.config/sway/config | 8 ++++++++ 2 files changed, 23 insertions(+) diff --git a/configurations/laptop/configuration.nix b/configurations/laptop/configuration.nix index 09574ff7..dd32d115 100644 --- a/configurations/laptop/configuration.nix +++ b/configurations/laptop/configuration.nix @@ -33,6 +33,7 @@ networkmanager_dmenu # Network Manager dmenu script wdisplays # Manage wayland displays wlsunset # Day/night gamma adjustment/filter for wayland + light # GNU/Linux application to control backlights sway-contrib.grimshot # Screenshot tool for wayland mako # Notification Daemon wlprop # Clone of X11 xprop for wayland (To get window class names etc) @@ -119,6 +120,20 @@ xdg-user-dirs ]; + security.sudo = { + extraRules = [ + { + commands = [ + { + command = "/run/current-system/sw/bin/light"; + options = [ "NOPASSWD" ]; + } + ]; + groups = [ "wheel" ]; + } + ]; + }; + environment.sessionVariables = { TERM = "foot"; QT_QPA_PLATFORM = "wayland-egl"; diff --git a/configurations/laptop/resources/home-manager/.config/sway/config b/configurations/laptop/resources/home-manager/.config/sway/config index b6e708f5..bc602278 100755 --- a/configurations/laptop/resources/home-manager/.config/sway/config +++ b/configurations/laptop/resources/home-manager/.config/sway/config @@ -101,6 +101,10 @@ gaps outer 5 # Lock screen bindsym Mod4+l exec swaylock -c 000000 + # Brightness Controls + bindsym XF86MonBrightnessUp exec sudo light -A 10 + bindsym XF86MonBrightnessDown exec sudo light -U 10 + # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. @@ -259,4 +263,8 @@ bar { include /etc/sway/config.d/* # Autostart + +# London Longitude/Latitude +exec wlsunset -l 51.5 -L -0.1 + exec qpwgraph \ No newline at end of file