From 75289b6cd3a8e5800f366330bd25b8940280063b Mon Sep 17 00:00:00 2001 From: foosinn Date: Fri, 30 Sep 2022 09:41:10 +0200 Subject: [PATCH 01/19] x --- configuration.nix | 6 +- dotfiles/i3/config | 167 ++++++++++++++++++++++++++++++++++++++ dotfiles/i3/status.toml | 107 ++++++++++++++++++++++++ dotfiles/sway/config | 3 + dotfiles/sway/status.toml | 8 -- hardware/xps15-sphere.nix | 5 +- roles/desktop.nix | 35 +++++++- roles/dev.nix | 1 + roles/work.nix | 3 + 9 files changed, 322 insertions(+), 13 deletions(-) create mode 100644 dotfiles/i3/config create mode 100644 dotfiles/i3/status.toml diff --git a/configuration.nix b/configuration.nix index e2e0a3a..364eb1e 100644 --- a/configuration.nix +++ b/configuration.nix @@ -21,8 +21,7 @@ ./roles/network.nix ./roles/nix.nix ./roles/vpn.nix - ./roles/private.nix - ./roles/game.nix + ./roles/work.nix ]; networking.useDHCP = false; @@ -35,7 +34,8 @@ nixpkgs.config.permittedInsecurePackages = [ "openssl-1.0.2u" ]; - system.autoUpgrade.enable = true; + # removed for mobile working + # system.autoUpgrade.enable = true; system.stateVersion = "20.03"; # We can stay here } diff --git a/dotfiles/i3/config b/dotfiles/i3/config new file mode 100644 index 0000000..1620807 --- /dev/null +++ b/dotfiles/i3/config @@ -0,0 +1,167 @@ +# config +set $mod Mod1 +set $left h +set $down j +set $up k +set $right l +set $term alacritty +set $wallpaper /home/stefan/Downloads/bg.jpg +set $lock swaylock -t -i $wallpaper --scaling=fill +set $font CaskaydiaCove Nerd Font 10 +set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36 +set $menu dmenu_run + +#input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de +#input "0:0:TUXEDO_Keyboard" xkb_layout de +# +#output * bg $wallpaper fill +#output "BenQ Corporation BenQ SW2700 83H03922SL0" res --custom 2560x1440@60Hz +#output "Dell Inc. Dell U4919DW HZVZWP2" res 5120x1440 + +# user keybinds +bindsym $mod+Return exec $term +bindsym $mod+Shift+q kill +bindsym $mod+d exec $menu +floating_modifier $mod normal +bindsym $mod+Shift+c reload +bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' +bindsym $mod+o exec keepassxc +bindsym $mod+z exec $lock +bindsym $mod+Up exec light -A 5 +bindsym $mod+Down exec light -U 5 +bindsym $mod+c exec alacritty --class float -t pyCalc -e python +bindsym $mod+i exec alacritty --class float -t insect -e insect +bindsym $mod+Space exec swayr switch-to +bindsym $mod+n exec swayr switch-to-urgent-or-lru-window +bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png +#bindswitch --reload --locked lid:on output eDP-1 disable +#bindswitch --reload --locked lid:off output eDP-1 enable + +# app rules +#for_window [app_id="org.keepassxc.KeePassXC"] floating enable +#for_window [title="Firefox — Sharing Indicator"] floating enable +#for_window [title="Picture-in-Picture"] floating enable +#for_window [title="pyCalc"] floating enable +#for_window [title="insect"] floating enable + +# font +font $font + +# colors +set $black #282a36 +set $red #ff6188 +set $cyan #78dce8 +set $white #fcfcfa +set $yellow #f1fa8c +set $violet #bd93f9 +set $black2 #323232 + +# border backgnd text indicator childborder +client.focused $violet $black $white $violet $violet +client.focused_inactive $black $black $white $black2 $black +client.unfocused $black $black $white $black2 $black +client.urgent $red $red $black $black2 $white + + +# movement +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right + +bindsym $mod+1 workspace 1 +bindsym $mod+2 workspace 2 +bindsym $mod+3 workspace 3 +bindsym $mod+4 workspace 4 +bindsym $mod+5 workspace 5 +bindsym $mod+6 workspace 6 +bindsym $mod+7 workspace 7 +bindsym $mod+8 workspace 8 +bindsym $mod+9 workspace 9 +bindsym $mod+0 workspace 10 +bindsym $mod+Shift+1 move container to workspace 1 +bindsym $mod+Shift+2 move container to workspace 2 +bindsym $mod+Shift+3 move container to workspace 3 +bindsym $mod+Shift+4 move container to workspace 4 +bindsym $mod+Shift+5 move container to workspace 5 +bindsym $mod+Shift+6 move container to workspace 6 +bindsym $mod+Shift+7 move container to workspace 7 +bindsym $mod+Shift+8 move container to workspace 8 +bindsym $mod+Shift+9 move container to workspace 9 +bindsym $mod+Shift+0 move container to workspace 10 + +bindsym $mod+b splith +bindsym $mod+v splitv +bindsym $mod+s layout stacking +bindsym $mod+w layout tabbed +bindsym $mod+e layout toggle split +bindsym $mod+f fullscreen +bindsym $mod+Shift+space floating toggle +bindsym $mod+space focus mode_toggle +bindsym $mod+a focus parent + +bindsym $mod+Shift+minus move scratchpad +bindsym $mod+minus scratchpad show + +mode "resize" { + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +mode "umlaut" { + bindsym s exec wtype ß + bindsym a exec wtype ä + bindsym o exec wtype ö + bindsym u exec wtype ü + bindsym Shift+a exec wtype Ä + bindsym Shift+o exec wtype Ö + bindsym Shift+u exec wtype Ü + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+u mode "umlaut" + +bar { + font $font + position bottom + colors { + background $black + statusline $white + separator $violet + + # border back text + focused_workspace $violet $violet $black + active_workspace $violet $violet $black + urgent_workspace $red $red $white + inactive_workspace $black $black $white + } + status_command i3status-rs /etc/sway/status.toml +} + +set $gnome-schema org.gnome.desktop.interface +exec_always { + gsettings set $gnome-schema gtk-theme 'Dracula' + gsettings set $gnome-schema icon-theme 'Dracula' + gsettings set $gnome-schema cursor-theme 'Capitaine Cursors - White' +} + +# autostarts +exec dunst +exec emacs --daemon +#exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 +exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR +exec bash -c '[ "$HOSTNAME" == sphere ] && cloudstation' +#exec swayrd + +# pastebin +#exec wl-paste --primary -t text --watch clipman store +#bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "$font" -l 10 $menucolor' diff --git a/dotfiles/i3/status.toml b/dotfiles/i3/status.toml new file mode 100644 index 0000000..7f94a43 --- /dev/null +++ b/dotfiles/i3/status.toml @@ -0,0 +1,107 @@ +[theme] +name = "plain" +[theme.overrides] +idle_bg = "#282a36" +idle_fg = "#f8f8f2" +info_bg = "#282a36" +info_fg = "#f8f8f2" +good_bg = "#282a36" +good_fg = "#50fa7b" +warning_bg = "#282a36" +warning_fg = "#f1fa8c" +critical_bg = "#282a36" +critical_fg = "#ff5555" +separator_bg = "#282a36" +separator_fg = "#bd93f9" +separator = "|" + +[icons] +name = "none" +[icons.overrides] +backlight_empty = "" +backlight_full = "" +backlight_partial1 = "" +backlight_partial2 = "" +backlight_partial3 = "" +bat = "" +bat_charging = "" +bat_discharging = "" +bat_empty = "" +bat_quarter = "" +bat_half = "" +bat_three_quarters = "" +bat_full = "" +cogs = "龍" +disk_drive = "" +headphones = "  " +memory_mem = "" +net_down = "DOWN" +net_up = "UP" +net_vpn = " " +net_wired = "" +net_wireless = " " +thermometer = "  " +time = "" +volume_empty = "" +volume_full = "" +volume_half = "" +volume_muted= " MUTE" + + +[[block]] +block = "net" +device = "wg" +hide_inactive = true +hide_missing = true + +[[block]] +block = "net" +device = "wlo1" +hide_inactive = true +hide_missing = true + +[[block]] +block = "custom" +command = '''echo " $(cat /sys/class/thermal/thermal_zone0/temp | head -c 2) °C"''' + +[[block]] +block = "disk_space" +path = "/" +info_type = "available" +unit = "GB" +format = "{icon} {available}" +interval = 20 +warning = 20.0 +alert = 10.0 + +[[block]] +block = "memory" +display_type = "memory" +format_mem = "{mem_total_used_percents}" +icons_format = " {icon}" +clickable = false + +[[block]] +block = "load" +interval = 1 +format = "{1m}" + +[[block]] +block = "sound" +driver = "pulseaudio" + +[[block]] +block = "backlight" + +[[block]] +block = "battery" +device = "BAT0" +interval = 10 +format = "{percentage} ({time})" +full_format = "{percentage} ({time}) " +icons_format = " {icon} " + +[[block]] +block = "time" +interval = 60 +format = "%Y-%m-%d %H:%M" diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 1ae619f..3359a4f 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -31,6 +31,8 @@ bindsym $mod+Up exec light -A 5 bindsym $mod+Down exec light -U 5 bindsym $mod+c exec alacritty --class float -t pyCalc -e python bindsym $mod+i exec alacritty --class float -t insect -e insect +bindsym $mod+Space exec swayr switch-to +bindsym $mod+n exec swayr switch-to-urgent-or-lru-window bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png bindswitch --reload --locked lid:on output eDP-1 disable bindswitch --reload --locked lid:off output eDP-1 enable @@ -162,6 +164,7 @@ exec swayidle before-sleep "$lock" exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR exec bash -c '[ "$HOSTNAME" == sphere ] && cloudstation' +exec swayrd # pastebin exec wl-paste --primary -t text --watch clipman store diff --git a/dotfiles/sway/status.toml b/dotfiles/sway/status.toml index 90c512f..7f94a43 100644 --- a/dotfiles/sway/status.toml +++ b/dotfiles/sway/status.toml @@ -101,14 +101,6 @@ format = "{percentage} ({time})" full_format = "{percentage} ({time}) " icons_format = " {icon} " -[[block]] -block = "battery" -device = "BAT1" -interval = 10 -format = "{percentage} ({time})" -full_format = "{percentage} ({time}) " -icons_format = " {icon} " - [[block]] block = "time" interval = 60 diff --git a/hardware/xps15-sphere.nix b/hardware/xps15-sphere.nix index d2299a1..f16c81c 100644 --- a/hardware/xps15-sphere.nix +++ b/hardware/xps15-sphere.nix @@ -10,7 +10,7 @@ in { boot.extraModulePackages = [ ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "i915" ]; boot.kernelModules = [ "kvm-intel" ]; boot.kernelParams = [ "intel_pstate=active" ]; boot.extraModprobeConfig = '' @@ -29,6 +29,9 @@ in { libvdpau-va-gl ]; }; + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; fileSystems."/" = { device = "tank/work/nixos"; diff --git a/roles/desktop.nix b/roles/desktop.nix index ca0b359..d8e9780 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -11,6 +11,37 @@ let in { + services.autorandr.enable = true; + services.xserver = { + enable = true; + dpi = 96; + + displayManager = { + sddm.enable = true; + defaultSession = "none+i3"; + }; + + libinput = { + enable = true; + }; + + windowManager.i3 = { + enable = true; + extraPackages = with pkgs; [ + autorandr + dmenu + dunst + feh + i3lock + i3status-rust + maim + xclip + ]; + }; + }; + + + programs.dconf.enable = true; programs.sway = { enable = true; extraPackages = with pkgs; [ @@ -21,10 +52,13 @@ in i3status-rust kanshi mako + picom slurp swayidle swaylock + swayr wf-recorder + wofi xwayland ]; extraSessionCommands = ""; @@ -162,7 +196,6 @@ in numix-icon-theme alacritty - ferdi imv inkscape keepassxc diff --git a/roles/dev.nix b/roles/dev.nix index 9c5a762..92cda0c 100644 --- a/roles/dev.nix +++ b/roles/dev.nix @@ -17,6 +17,7 @@ in { (python39.withPackages (python-packages: with python-packages; [ black + diagrams pymemcache pyyaml requests diff --git a/roles/work.nix b/roles/work.nix index 0de8954..8a7485e 100644 --- a/roles/work.nix +++ b/roles/work.nix @@ -20,6 +20,9 @@ in { 172.20.0.2 dashboard.kind 172.20.0.2 grafana.kind 172.20.0.2 alert.kind + + #127.0.0.1 auth-dev.thobits.com + 127.0.0.1 database ''; environment.systemPackages = with pkgs; [ From b4a40fa36d99e9b7f0144a9b9fdd4806d3771995 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Mon, 20 Feb 2023 10:55:17 +0100 Subject: [PATCH 02/19] feat(wallpaper): fix wallpaper --- dotfiles/sway/config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 3359a4f..c6487e0 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -5,7 +5,7 @@ set $down j set $up k set $right l set $term alacritty -set $wallpaper /home/stefan/Downloads/bg.jpg +set $wallpaper /home/stefan/wall.png set $lock swaylock -t -i $wallpaper --scaling=fill set $font CaskaydiaCove Nerd Font 10 set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36 From ed4af6d356971d276383aa5e6e1e22efbb9f57b8 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Mon, 20 Feb 2023 10:55:34 +0100 Subject: [PATCH 03/19] fix(sway): keybindings --- dotfiles/sway/config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/sway/config b/dotfiles/sway/config index c6487e0..39ba6ac 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -31,8 +31,8 @@ bindsym $mod+Up exec light -A 5 bindsym $mod+Down exec light -U 5 bindsym $mod+c exec alacritty --class float -t pyCalc -e python bindsym $mod+i exec alacritty --class float -t insect -e insect -bindsym $mod+Space exec swayr switch-to -bindsym $mod+n exec swayr switch-to-urgent-or-lru-window +bindsym $mod+m exec swayr switch-to +bindsym $mod+n exec emacsclient -cn bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png bindswitch --reload --locked lid:on output eDP-1 disable bindswitch --reload --locked lid:off output eDP-1 enable From 458ce0ccf6df6e30d177581db8926a2aa8117c72 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:32:53 +0100 Subject: [PATCH 04/19] fix(sway): remove cursor theme resetting (breaks it) --- dotfiles/sway/config | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 39ba6ac..471ed1a 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -17,6 +17,7 @@ input "0:0:TUXEDO_Keyboard" xkb_layout de output * bg $wallpaper fill output "BenQ Corporation BenQ SW2700 83H03922SL0" res --custom 2560x1440@60Hz output "Dell Inc. Dell U4919DW HZVZWP2" res 5120x1440 +output eDP-1 scale 1.25 # user keybinds bindsym $mod+Return exec $term @@ -149,9 +150,8 @@ bar { set $gnome-schema org.gnome.desktop.interface exec_always { - gsettings set $gnome-schema gtk-theme 'Dracula' - gsettings set $gnome-schema icon-theme 'Dracula' - gsettings set $gnome-schema cursor-theme 'Capitaine Cursors - White' + gsettings set $gnome-schema icon-theme 'capitaine-cursors-white' + gsettings set $gnome-schema cursor-theme 'capitaine-cursors-white' } # autostarts @@ -163,8 +163,11 @@ exec emacs --daemon exec swayidle before-sleep "$lock" exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR +exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP exec bash -c '[ "$HOSTNAME" == sphere ] && cloudstation' exec swayrd +exec xinput set-prop "PIXA3854:00 093A:0274 Touchpad" 365 1 + # pastebin exec wl-paste --primary -t text --watch clipman store From 5f1cd851b9df793aef5179e82625c83d7398a684 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:33:08 +0100 Subject: [PATCH 05/19] fix(status): use correct battery number for framework --- dotfiles/sway/status.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/sway/status.toml b/dotfiles/sway/status.toml index 7f94a43..5586edd 100644 --- a/dotfiles/sway/status.toml +++ b/dotfiles/sway/status.toml @@ -95,7 +95,7 @@ block = "backlight" [[block]] block = "battery" -device = "BAT0" +device = "BAT1" interval = 10 format = "{percentage} ({time})" full_format = "{percentage} ({time}) " From 0d4265f5f1e9d484635da6e97b4cb96263e8c54e Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:33:20 +0100 Subject: [PATCH 06/19] feat(alacritty): smaller fontsize --- dotfiles/alacritty.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dotfiles/alacritty.yml b/dotfiles/alacritty.yml index 4d524b9..6e675f3 100644 --- a/dotfiles/alacritty.yml +++ b/dotfiles/alacritty.yml @@ -1,7 +1,7 @@ font: normal: family: CaskaydiaCove Nerd Font - size: 12 + size: 8 draw_bold_text_with_bright_colors: true From b528bbd88f435125e652b52f83f22c0aa407877d Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:33:29 +0100 Subject: [PATCH 07/19] feat(hardware): framework --- hardware/framework.nix | 85 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 hardware/framework.nix diff --git a/hardware/framework.nix b/hardware/framework.nix new file mode 100644 index 0000000..4dbb97c --- /dev/null +++ b/hardware/framework.nix @@ -0,0 +1,85 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +let + #nixkernel = import {}; +in +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "uas" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" "i915" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "workpool/nixos/root"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "workpool/nixos/home"; + fsType = "zfs"; + }; + + fileSystems."/var/lib/docker" = + { device = "workpool/nixos/docker"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AA17-42AD"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/18ae41eb-e32e-46a3-9e22-3395c37782df"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # 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.wlp166s0.useDHCP = lib.mkDefault true; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + # custom + boot.loader.systemd-boot.enable = true; + networking.hostId = "f0000001"; + networking.hostName = "sphere"; + services.tlp.enable = true; + services.hardware.bolt.enable = true; + + # framework hardware + #boot.kernelPackages = nixkernel.linuxPackages_5_19; + #boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + boot.kernelParams = [ + "mem_sleep_default=deep" + "nvme.noacpi=1" + "i915.enable_psr=1" + ]; + boot.blacklistedKernelModules = [ "hid-sensor-hub" ]; + hardware.acpilight.enable = true; + hardware.video.hidpi.enable = lib.mkDefault true; + services.xserver.dpi = 125; + environment.variables = { + VDPAU_DRIVER = lib.mkIf config.hardware.opengl.enable (lib.mkDefault "va_gl"); + }; + hardware.opengl.extraPackages = with pkgs; [ + vaapiIntel + libvdpau-va-gl + intel-media-driver + ]; + services.tlp.settings = { + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "performance"; + }; +} From f40031327f06694a09ef7a95491f53c245fcbe31 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:33:39 +0100 Subject: [PATCH 08/19] fix(nagstamon): fix package and update to 3.10 --- packages/nagstamon.nix | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/nagstamon.nix b/packages/nagstamon.nix index 86fe18f..1e72611 100644 --- a/packages/nagstamon.nix +++ b/packages/nagstamon.nix @@ -1,17 +1,17 @@ -{ lib, fetchFromGitHub, python39Packages, wrapQtAppsHook }: +{ lib, fetchFromGitHub, python310Packages, wrapQtAppsHook, pkgs }: let pname = "nagstamon"; - version = "v3.8.0"; -in python39Packages.buildPythonApplication rec { + version = "v3.10.1"; +in python310Packages.buildPythonApplication rec { inherit pname; inherit version; src = fetchFromGitHub { owner = "HenriWahl"; repo = "Nagstamon"; - rev = "${version}"; - sha256 = "0a8aqw44z58pabsgxlvndnmzzvc50wrb4g12yp6zgajn40b2l8pw"; + rev = version; + sha256 = "sha256-TdwvHQDDQqZ6uvdCTJCMCdivM/vaZpMrpLRMKN2y76Y="; }; doCheck = false; @@ -21,17 +21,18 @@ in python39Packages.buildPythonApplication rec { wrapQtApp $out/bin/nagstamon.py ''; - propagatedBuildInputs = with python39Packages; [ - beautifulsoup4 - configparser - dateutil - keyring - lxml - psutil - pyqt5_with_qtmultimedia - requests - setuptools - xlib + propagatedBuildInputs = [ + python310Packages.beautifulsoup4 + python310Packages.configparser + python310Packages.dateutil + python310Packages.keyring + python310Packages.lxml + python310Packages.psutil + python310Packages.pyqt5_with_qtmultimedia + python310Packages.requests + python310Packages.requests-kerberos + python310Packages.setuptools + python310Packages.xlib ]; meta = with lib; { @@ -42,4 +43,3 @@ in python39Packages.buildPythonApplication rec { inherit version; }; } - From 959c3c0fe94e8815fddd17fb1c740b14e0f82034 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:34:11 +0100 Subject: [PATCH 09/19] feat(work): add google cloud sdk plugins --- roles/work.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/work.nix b/roles/work.nix index 8a7485e..1026c2e 100644 --- a/roles/work.nix +++ b/roles/work.nix @@ -34,11 +34,13 @@ in { nagstamon drone-cli - go-jira govc ttyd unstable.discord - unstable.google-cloud-sdk + unstable.go-jira + (unstable.google-cloud-sdk.withExtraComponents [ + unstable.google-cloud-sdk.components.gke-gcloud-auth-plugin + ]) unstable.slack unstable.velero From f8690d90e6e7f09add077683c5d5f9a1300f8fe6 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:34:23 +0100 Subject: [PATCH 10/19] feat(network): add openconnect vpn support --- roles/network.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/network.nix b/roles/network.nix index 4dce0d4..843b7c8 100644 --- a/roles/network.nix +++ b/roles/network.nix @@ -9,5 +9,6 @@ in { environment.systemPackages = with pkgs; [ networkmanagerapplet networkmanager-vpnc + openconnect_openssl ]; } From e361a43b48ebab3073421b28a3d604b99d74ef66 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:34:48 +0100 Subject: [PATCH 11/19] feat(golang): update to 1.19 --- roles/dev.nix | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/roles/dev.nix b/roles/dev.nix index 92cda0c..f74fbce 100644 --- a/roles/dev.nix +++ b/roles/dev.nix @@ -3,9 +3,16 @@ let unstable = import { }; in { + services.emacs.package = pkgs.emacsPgtk; + nixpkgs.overlays = [ + (import (builtins.fetchTarball { + url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz; + })) + ]; + environment.systemPackages = with pkgs; [ gnumake - go_1_17 + go_1_19 rustup shellcheck unstable.golangci-lint @@ -27,7 +34,7 @@ in { musl dbeaver - emacs + emacs-gtk gitAndTools.delta lazygit ltrace From 58a0d3f1d8a446ec862c9ea044656c348c1a1526 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:35:21 +0100 Subject: [PATCH 12/19] feat(admin): add nmap and ipcalc --- roles/admin.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/admin.nix b/roles/admin.nix index 7a58cb8..e7614e9 100644 --- a/roles/admin.nix +++ b/roles/admin.nix @@ -10,9 +10,11 @@ in { kind kubectl kubeseal + nmap pwgen terraform whois + ipcalc unstable.argocd unstable.kubernetes-helm From 2660ebc7afcba003774069f3a8f0f8a9c2b2f139 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:35:35 +0100 Subject: [PATCH 13/19] feat(desktop): desktop changes --- roles/desktop.nix | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/roles/desktop.nix b/roles/desktop.nix index d8e9780..405171b 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -14,7 +14,6 @@ in services.autorandr.enable = true; services.xserver = { enable = true; - dpi = 96; displayManager = { sddm.enable = true; @@ -28,6 +27,7 @@ in windowManager.i3 = { enable = true; extraPackages = with pkgs; [ + arandr autorandr dmenu dunst @@ -41,9 +41,10 @@ in }; - programs.dconf.enable = true; + programs.droidcam.enable = true; programs.sway = { enable = true; + wrapperFeatures.gtk = true; extraPackages = with pkgs; [ bemenu brightnessctl @@ -59,16 +60,11 @@ in swayr wf-recorder wofi - xwayland ]; extraSessionCommands = ""; }; + xdg.portal.enable = true; - xdg.portal = { - enable = true; - gtkUsePortal = true; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; - }; boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; colors = { @@ -125,11 +121,10 @@ in }; }; - programs.qt5ct.enable = true; + qt5.platformTheme = "qt5ct"; hardware.pulseaudio.enable = false; security.rtkit.enable = true; - security.polkit.enable = true; services.pipewire = { enable = true; alsa.enable = true; @@ -194,6 +189,7 @@ in libsForQt5.qtstyleplugins lxappearance numix-icon-theme + numix-cursor-theme alacritty imv @@ -209,6 +205,7 @@ in pcmanfm pulseeffects-pw qrencode + uxplay solaar gdk-pixbuf @@ -259,8 +256,14 @@ in services.printing.enable = true; services.printing.drivers = [ pkgs.gutenprint ]; - services.avahi.enable = true; - services.avahi.nssmdns = true; - - hardware.opengl = { enable = true; }; + services.avahi = { + enable = true; + nssmdns = true; + publish = { + enable = true; + addresses = true; + workstation = true; + userServices = true; + }; + }; } From c426807bceeef64d57a980a267e0809b10f756b1 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:35:53 +0100 Subject: [PATCH 14/19] fix(configuration): allow broken kerberos package --- configuration.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 364eb1e..23c4c58 100644 --- a/configuration.nix +++ b/configuration.nix @@ -32,7 +32,10 @@ services.openssh.enable = true; networking.firewall.enable = true; - nixpkgs.config.permittedInsecurePackages = [ "openssl-1.0.2u" ]; + nixpkgs.config.permittedInsecurePackages = [ + "openssl-1.0.2u" + "python3.10-kerberos-1.3.1" + ]; # removed for mobile working # system.autoUpgrade.enable = true; From 18902b41c33a75b6643ea9be7d712d15b3f203a1 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 3 Mar 2023 10:38:23 +0100 Subject: [PATCH 15/19] chore: remove x --- dotfiles/i3/config | 167 ---------------------------------------- dotfiles/i3/status.toml | 107 ------------------------- roles/desktop.nix | 31 -------- 3 files changed, 305 deletions(-) delete mode 100644 dotfiles/i3/config delete mode 100644 dotfiles/i3/status.toml diff --git a/dotfiles/i3/config b/dotfiles/i3/config deleted file mode 100644 index 1620807..0000000 --- a/dotfiles/i3/config +++ /dev/null @@ -1,167 +0,0 @@ -# config -set $mod Mod1 -set $left h -set $down j -set $up k -set $right l -set $term alacritty -set $wallpaper /home/stefan/Downloads/bg.jpg -set $lock swaylock -t -i $wallpaper --scaling=fill -set $font CaskaydiaCove Nerd Font 10 -set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36 -set $menu dmenu_run - -#input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de -#input "0:0:TUXEDO_Keyboard" xkb_layout de -# -#output * bg $wallpaper fill -#output "BenQ Corporation BenQ SW2700 83H03922SL0" res --custom 2560x1440@60Hz -#output "Dell Inc. Dell U4919DW HZVZWP2" res 5120x1440 - -# user keybinds -bindsym $mod+Return exec $term -bindsym $mod+Shift+q kill -bindsym $mod+d exec $menu -floating_modifier $mod normal -bindsym $mod+Shift+c reload -bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' -bindsym $mod+o exec keepassxc -bindsym $mod+z exec $lock -bindsym $mod+Up exec light -A 5 -bindsym $mod+Down exec light -U 5 -bindsym $mod+c exec alacritty --class float -t pyCalc -e python -bindsym $mod+i exec alacritty --class float -t insect -e insect -bindsym $mod+Space exec swayr switch-to -bindsym $mod+n exec swayr switch-to-urgent-or-lru-window -bindsym Print exec grim -g "$(slurp)" - | wl-copy -t image/png -#bindswitch --reload --locked lid:on output eDP-1 disable -#bindswitch --reload --locked lid:off output eDP-1 enable - -# app rules -#for_window [app_id="org.keepassxc.KeePassXC"] floating enable -#for_window [title="Firefox — Sharing Indicator"] floating enable -#for_window [title="Picture-in-Picture"] floating enable -#for_window [title="pyCalc"] floating enable -#for_window [title="insect"] floating enable - -# font -font $font - -# colors -set $black #282a36 -set $red #ff6188 -set $cyan #78dce8 -set $white #fcfcfa -set $yellow #f1fa8c -set $violet #bd93f9 -set $black2 #323232 - -# border backgnd text indicator childborder -client.focused $violet $black $white $violet $violet -client.focused_inactive $black $black $white $black2 $black -client.unfocused $black $black $white $black2 $black -client.urgent $red $red $black $black2 $white - - -# movement -bindsym $mod+$left focus left -bindsym $mod+$down focus down -bindsym $mod+$up focus up -bindsym $mod+$right focus right -bindsym $mod+Shift+$left move left -bindsym $mod+Shift+$down move down -bindsym $mod+Shift+$up move up -bindsym $mod+Shift+$right move right - -bindsym $mod+1 workspace 1 -bindsym $mod+2 workspace 2 -bindsym $mod+3 workspace 3 -bindsym $mod+4 workspace 4 -bindsym $mod+5 workspace 5 -bindsym $mod+6 workspace 6 -bindsym $mod+7 workspace 7 -bindsym $mod+8 workspace 8 -bindsym $mod+9 workspace 9 -bindsym $mod+0 workspace 10 -bindsym $mod+Shift+1 move container to workspace 1 -bindsym $mod+Shift+2 move container to workspace 2 -bindsym $mod+Shift+3 move container to workspace 3 -bindsym $mod+Shift+4 move container to workspace 4 -bindsym $mod+Shift+5 move container to workspace 5 -bindsym $mod+Shift+6 move container to workspace 6 -bindsym $mod+Shift+7 move container to workspace 7 -bindsym $mod+Shift+8 move container to workspace 8 -bindsym $mod+Shift+9 move container to workspace 9 -bindsym $mod+Shift+0 move container to workspace 10 - -bindsym $mod+b splith -bindsym $mod+v splitv -bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed -bindsym $mod+e layout toggle split -bindsym $mod+f fullscreen -bindsym $mod+Shift+space floating toggle -bindsym $mod+space focus mode_toggle -bindsym $mod+a focus parent - -bindsym $mod+Shift+minus move scratchpad -bindsym $mod+minus scratchpad show - -mode "resize" { - bindsym $left resize shrink width 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+r mode "resize" - -mode "umlaut" { - bindsym s exec wtype ß - bindsym a exec wtype ä - bindsym o exec wtype ö - bindsym u exec wtype ü - bindsym Shift+a exec wtype Ä - bindsym Shift+o exec wtype Ö - bindsym Shift+u exec wtype Ü - bindsym Return mode "default" - bindsym Escape mode "default" -} -bindsym $mod+u mode "umlaut" - -bar { - font $font - position bottom - colors { - background $black - statusline $white - separator $violet - - # border back text - focused_workspace $violet $violet $black - active_workspace $violet $violet $black - urgent_workspace $red $red $white - inactive_workspace $black $black $white - } - status_command i3status-rs /etc/sway/status.toml -} - -set $gnome-schema org.gnome.desktop.interface -exec_always { - gsettings set $gnome-schema gtk-theme 'Dracula' - gsettings set $gnome-schema icon-theme 'Dracula' - gsettings set $gnome-schema cursor-theme 'Capitaine Cursors - White' -} - -# autostarts -exec dunst -exec emacs --daemon -#exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 -exec systemctl --user import-environment DBUS_SESSION_BUS_ADDRESS XDG_RUNTIME_DIR -exec bash -c '[ "$HOSTNAME" == sphere ] && cloudstation' -#exec swayrd - -# pastebin -#exec wl-paste --primary -t text --watch clipman store -#bindsym $mod+p exec clipman pick -t "bemenu" --tool-args='-b --fn "$font" -l 10 $menucolor' diff --git a/dotfiles/i3/status.toml b/dotfiles/i3/status.toml deleted file mode 100644 index 7f94a43..0000000 --- a/dotfiles/i3/status.toml +++ /dev/null @@ -1,107 +0,0 @@ -[theme] -name = "plain" -[theme.overrides] -idle_bg = "#282a36" -idle_fg = "#f8f8f2" -info_bg = "#282a36" -info_fg = "#f8f8f2" -good_bg = "#282a36" -good_fg = "#50fa7b" -warning_bg = "#282a36" -warning_fg = "#f1fa8c" -critical_bg = "#282a36" -critical_fg = "#ff5555" -separator_bg = "#282a36" -separator_fg = "#bd93f9" -separator = "|" - -[icons] -name = "none" -[icons.overrides] -backlight_empty = "" -backlight_full = "" -backlight_partial1 = "" -backlight_partial2 = "" -backlight_partial3 = "" -bat = "" -bat_charging = "" -bat_discharging = "" -bat_empty = "" -bat_quarter = "" -bat_half = "" -bat_three_quarters = "" -bat_full = "" -cogs = "龍" -disk_drive = "" -headphones = "  " -memory_mem = "" -net_down = "DOWN" -net_up = "UP" -net_vpn = " " -net_wired = "" -net_wireless = " " -thermometer = "  " -time = "" -volume_empty = "" -volume_full = "" -volume_half = "" -volume_muted= " MUTE" - - -[[block]] -block = "net" -device = "wg" -hide_inactive = true -hide_missing = true - -[[block]] -block = "net" -device = "wlo1" -hide_inactive = true -hide_missing = true - -[[block]] -block = "custom" -command = '''echo " $(cat /sys/class/thermal/thermal_zone0/temp | head -c 2) °C"''' - -[[block]] -block = "disk_space" -path = "/" -info_type = "available" -unit = "GB" -format = "{icon} {available}" -interval = 20 -warning = 20.0 -alert = 10.0 - -[[block]] -block = "memory" -display_type = "memory" -format_mem = "{mem_total_used_percents}" -icons_format = " {icon}" -clickable = false - -[[block]] -block = "load" -interval = 1 -format = "{1m}" - -[[block]] -block = "sound" -driver = "pulseaudio" - -[[block]] -block = "backlight" - -[[block]] -block = "battery" -device = "BAT0" -interval = 10 -format = "{percentage} ({time})" -full_format = "{percentage} ({time}) " -icons_format = " {icon} " - -[[block]] -block = "time" -interval = 60 -format = "%Y-%m-%d %H:%M" diff --git a/roles/desktop.nix b/roles/desktop.nix index 405171b..b8d115a 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -10,37 +10,6 @@ let unstable = import { config.allowUnfree = true; }; in { - - services.autorandr.enable = true; - services.xserver = { - enable = true; - - displayManager = { - sddm.enable = true; - defaultSession = "none+i3"; - }; - - libinput = { - enable = true; - }; - - windowManager.i3 = { - enable = true; - extraPackages = with pkgs; [ - arandr - autorandr - dmenu - dunst - feh - i3lock - i3status-rust - maim - xclip - ]; - }; - }; - - programs.droidcam.enable = true; programs.sway = { enable = true; From a4bff2a186f16daab7b8c6d1985247539bbea133 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 24 Mar 2023 08:44:05 +0100 Subject: [PATCH 16/19] feat(sway): lightmode --- dotfiles/sway/config | 66 ++++++++++++++++++++++----------------- dotfiles/sway/status.toml | 25 ++++++++------- 2 files changed, 51 insertions(+), 40 deletions(-) diff --git a/dotfiles/sway/config b/dotfiles/sway/config index 471ed1a..41b5865 100644 --- a/dotfiles/sway/config +++ b/dotfiles/sway/config @@ -1,15 +1,33 @@ +# colors +set $black #000000 +set $red #e75544 +set $cyan #3c74f6 +set $white #fafafa +set $yellow #908550 +set $violet #a73ca6 +#set $black2 #323232 +set $white2 #f0f0f0 + # config set $mod Mod1 set $left h set $down j set $up k set $right l -set $term alacritty +set $term wezterm set $wallpaper /home/stefan/wall.png set $lock swaylock -t -i $wallpaper --scaling=fill set $font CaskaydiaCove Nerd Font 10 -set $menucolor --ff=#f8f8f2 --nf=#f8f8f2 --tf=#bd93f9 --hf=#bd93f9 --tb=#282a36 --fb=#282a36 --nb=#282a36 --hb=#282a36 --sb=#282a36 +set $menucolor \ + --tf=$white --tb=$cyan \ + --ff=$black --fb=$white \ + --cf=$cyan --cb=$white \ + --nf=$black --nb=$white \ + --af=$black --ab=$white2 \ + --hf=$white --hb=$cyan \ + --sf=$white --sb=$cyan set $menu bemenu-run -H 23 -b -p run $menucolor +font $font input "1:1:AT_Translated_Set_2_keyboard" xkb_layout de input "0:0:TUXEDO_Keyboard" xkb_layout de @@ -45,23 +63,11 @@ for_window [title="Picture-in-Picture"] floating enable for_window [title="pyCalc"] floating enable for_window [title="insect"] floating enable -# font -font $font - -# colors -set $black #282a36 -set $red #ff6188 -set $cyan #78dce8 -set $white #fcfcfa -set $yellow #f1fa8c -set $violet #bd93f9 -set $black2 #323232 - # border backgnd text indicator childborder -client.focused $violet $black $white $violet $violet -client.focused_inactive $black $black $white $black2 $black -client.unfocused $black $black $white $black2 $black -client.urgent $red $red $black $black2 $white +client.focused $cyan $white $black $violet $cyan +client.focused_inactive $white2 $white2 $black $white2 $white +client.unfocused $white2 $white2 $black $white2 $white +client.urgent $red $red $white $white2 $black # movement @@ -135,30 +141,34 @@ bar { font $font position bottom colors { - background $black - statusline $white - separator $violet + background $white + statusline $black + separator $cyan # border back text - focused_workspace $violet $violet $black - active_workspace $violet $violet $black - urgent_workspace $red $red $white - inactive_workspace $black $black $white + focused_workspace $cyan $cyan $white + active_workspace $cyan $cyan $white + urgent_workspace $red $red $black + inactive_workspace $white $white $black } + status_command i3status-rs /etc/sway/status.toml } set $gnome-schema org.gnome.desktop.interface exec_always { + gsettings set $gnome-schema cursor-theme Adwaita gsettings set $gnome-schema icon-theme 'capitaine-cursors-white' gsettings set $gnome-schema cursor-theme 'capitaine-cursors-white' } # autostarts exec mako --font "$font" \ - --background-color=$black \ - --border-color=$violet \ - --text-color=$white + --background-color "$white" \ + --border-colo "$red" \ + --text-color "$black" \ + --default-timeout 1000 \ + --padding 10 exec emacs --daemon exec swayidle before-sleep "$lock" exec /run/current-system/sw/libexec/polkit-gnome-authentication-agent-1 diff --git a/dotfiles/sway/status.toml b/dotfiles/sway/status.toml index 5586edd..357d6bb 100644 --- a/dotfiles/sway/status.toml +++ b/dotfiles/sway/status.toml @@ -1,20 +1,21 @@ [theme] name = "plain" [theme.overrides] -idle_bg = "#282a36" -idle_fg = "#f8f8f2" -info_bg = "#282a36" -info_fg = "#f8f8f2" -good_bg = "#282a36" -good_fg = "#50fa7b" -warning_bg = "#282a36" -warning_fg = "#f1fa8c" -critical_bg = "#282a36" -critical_fg = "#ff5555" -separator_bg = "#282a36" -separator_fg = "#bd93f9" +idle_bg = "#fafafa" +idle_fg = "#000000" +info_bg = "#fafafa" +info_fg = "#000000" +good_bg = "#fafafa" +good_fg = "#000000" +warning_bg = "#fafafa" +warning_fg = "#908550" +critical_bg = "#fafafa" +critical_fg = "#e75544" +separator_bg = "#fafafa" +separator_fg = "#3c74f6" separator = "|" + [icons] name = "none" [icons.overrides] From 210bc59571fafd50d6c712ed9b877828113da42e Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 24 Mar 2023 08:44:33 +0100 Subject: [PATCH 17/19] feat(wezterm): add wezterm --- dotfiles/wezterm.lua | 42 ++++++++++++++++++++++++++++++++++++++++++ roles/desktop.nix | 4 +++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 dotfiles/wezterm.lua diff --git a/dotfiles/wezterm.lua b/dotfiles/wezterm.lua new file mode 100644 index 0000000..8c3982e --- /dev/null +++ b/dotfiles/wezterm.lua @@ -0,0 +1,42 @@ +local wezterm = require 'wezterm'; + +return { + audible_bell = "Disabled", + bold_brightens_ansi_colors = true, + color_scheme = "One Light (base16)", + enable_tab_bar = false, + enable_wayland = true, + font_size = 12, + font = wezterm.font("CaskaydiaCove Nerd Font"), + window_background_opacity = 0.97, + window_close_confirmation = 'NeverPrompt', + default_prog = { '/run/current-system/sw/bin/bash' }, + + selection_fg = 'black', + selection_bg = '#fafafa', + + keys = { + { + key = 'Escape', + mods = 'CTRL', + action = wezterm.action.QuickSelect, + }, + }, + + window_padding = { + left = 0, + right = 0, + top = 0, + bottom = 0, + }, + + quick_select_patterns = { + '^([^ ]+) +(?:ClusterIP|Bound)', + '^([^ ]+) +(?:[0-9]+/[0-9]+)', + '^([^ ]+) +(?:[0-9]+ )', + '^([^ ]+) +(?:Opaque|kubernetes\\.io|helm\\.sh)', + '^([^ ]+) +(?:Active)', + '[^ ]+@[^ ]+.service', + 'git push.*', + }, +} diff --git a/roles/desktop.nix b/roles/desktop.nix index b8d115a..d449adc 100644 --- a/roles/desktop.nix +++ b/roles/desktop.nix @@ -51,7 +51,6 @@ in environment = { etc = { - "i3/config".source = ../dotfiles/i3/config; "sway/config".source = ../dotfiles/sway/config; "sway/status.toml".source = ../dotfiles/sway/status.toml; "xdg/alacritty/alacritty.yml".text = '' @@ -87,6 +86,7 @@ in key_bindings: - { key: Escape, mods: Control, action: ToggleViMode } ''; + "wezterm.lua".source = ../dotfiles/wezterm.lua; }; }; @@ -175,6 +175,7 @@ in pulseeffects-pw qrencode uxplay + wezterm solaar gdk-pixbuf @@ -203,6 +204,7 @@ in export QT_QPA_PLATFORM=wayland-egl export QT_WAYLAND_FORCE_DPI=96 export SDL_VIDEODRIVER=wayland + export WEZTERM_CONFIG_FILE=/etc/wezterm.lua export XDG_CURRENT_DESKTOP=sway export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS export XDG_SESSION_TYPE=wayland From 2622bdb1444937f529ac6275e53cde4047b54be1 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 24 Mar 2023 08:44:56 +0100 Subject: [PATCH 18/19] feat(yubikey): add support --- roles/base.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/base.nix b/roles/base.nix index 2764f21..f3c625c 100644 --- a/roles/base.nix +++ b/roles/base.nix @@ -175,4 +175,7 @@ in { }; }; + # yubikey support + services.udev.packages = [ pkgs.yubikey-personalization ]; + services.pcscd.enable = true; } From 698e0b6ec2b49326da9de79eb9fc83b4837b8d19 Mon Sep 17 00:00:00 2001 From: Stefan Schwarz Date: Fri, 24 Mar 2023 08:46:34 +0100 Subject: [PATCH 19/19] feat(kubectx): test kubectl --- roles/admin.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/roles/admin.nix b/roles/admin.nix index e7614e9..0e76052 100644 --- a/roles/admin.nix +++ b/roles/admin.nix @@ -9,6 +9,7 @@ in { k9s kind kubectl + kubectx kubeseal nmap pwgen @@ -32,6 +33,11 @@ in { (import ../packages/certmanager.nix) ]; + programs.bash.shellAliases = { + kx = "kubectx"; + kns = "kubens"; + }; + virtualisation.docker = { enable = true; storageDriver = "zfs";