From 3fce7adaaab375dd10fb33829670be433e48a6e1 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 20:49:01 +0200 Subject: [PATCH 01/16] chore: Add .idea to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index b2be92b..10ea189 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ result + +.idea From 378ef78b402e5698577707ab7d46b02bfcea6ee6 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 20:52:22 +0200 Subject: [PATCH 02/16] feat(zen-browser): Add input/pkg --- nixos/flake.nix | 16 +++--- nixos/users/tdpeuter/default.nix | 85 +++++++++++++++++--------------- 2 files changed, 54 insertions(+), 47 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index 95ac77c..2e337c4 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -5,17 +5,13 @@ nixpkgs.url = "nixpkgs/nixos-24.11"; nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; - devshell = { - url = "github:numtide/devshell"; - inputs.nixpkgs.follows = "nixpkgs"; - }; flake-utils.url = "github:numtide/flake-utils"; home-manager = { url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; openconnect-sso = { - url = github:ThinkChaos/openconnect-sso/fix/nix-flake; + url = "github:ThinkChaos/openconnect-sso/fix/nix-flake"; inputs = { flake-utils.follows = "utils"; nixpkgs.follows = "nixpkgs"; @@ -23,20 +19,24 @@ }; sops-nix = { url = "github:Mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs"; }; utils = { url = "github:gytis-ivaskevicius/flake-utils-plus"; inputs.flake-utils.follows = "flake-utils"; }; + zen-browser = { + url = "github:youwen5/zen-browser-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, - devshell, flake-utils, home-manager, openconnect-sso, sops-nix, utils, + flake-utils, home-manager, openconnect-sso, sops-nix, utils, zen-browser, ... }: let - system = "x86_64-linux"; + system = utils.lib.system.x86_64-linux; unfreePackages = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ "corefonts" diff --git a/nixos/users/tdpeuter/default.nix b/nixos/users/tdpeuter/default.nix index 6c1fcf3..3a92666 100644 --- a/nixos/users/tdpeuter/default.nix +++ b/nixos/users/tdpeuter/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, pkgs-unstable, ... }: +{ config, inputs, lib, pkgs, pkgs-unstable, ... }: let cfg = config.sisyphus.users.tdpeuter; @@ -33,6 +33,48 @@ in { ]; initialPassword = "ChangeMe"; shell = pkgs.zsh; + + packages = (with pkgs; [ + cmdtime # Zsh plugin + icosystem # Personal icon theme + nextcloud-client + spotify-adblock + brave # Internet browser + chafa # Terminal image viewer + duf # Df alternative + feishin # Jellyfin music client + foot + fzf + gh # GitHub CLI tool + glow # Terminal Markdown renderer + jellyfin-media-player + libreoffice-fresh # Office tools + librewolf # Internet browser + mpv # Media player + nsxiv # Lightweight image viewer + qalculate-gtk # Calculator + spotify + unzip + vifm # File manager + zathura # PDF viewer + zellij # Tmux + screen alternative + zsh + zsh-autosuggestions + zsh-syntax-highlighting + + # SMB + cifs-utils + psmisc + + # Linters and LSPs + statix # Nix + # TODO Move to devshells + # ruff pylint # Python + ]) ++ (with pkgs-unstable; [ + logseq # Note taking + ]) ++ [ + inputs.zen-browser.packages.${pkgs.system}.default + ]; }; fonts.packages = with pkgs; [ @@ -60,44 +102,9 @@ in { homeDirectory = "/home/${user}"; inherit (config.system) stateVersion; - packages = (with pkgs; [ - cmdtime # Zsh plugin - icosystem # Personal icon theme - nextcloud-client - spotify-adblock - ]) ++ (with pkgs-unstable; [ - brave - chafa # Terminal image viewer - duf # Df alternative - feishin # Jellyfin music client - foot - fzf - glow # Terminal Markdown renderer - jellyfin-media-player - libreoffice-fresh # Office tools - # FIXME Waiting for electron version to update, now insecure. - # logseq # Note taking - mpv # Media player - nsxiv # Lightweight image viewer - qalculate-gtk # Calculator - spotify - unzip - vifm # File manager - zathura # PDF viewer - zellij # Tmux + screen alternative - zsh - zsh-autosuggestions - zsh-syntax-highlighting - - # SMB - cifs-utils - psmisc - - # Linters and LSPs - statix # Nix - # TODO Move to devshells - # ruff pylint # Python - ]); + # packages = (with pkgs; [ + # ]) ++ (with pkgs-unstable; [ + # ]); pointerCursor = { inherit (cursor) package name size; From 2f1346651bd70495f887432b1cbd4b4064eaa69c Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 20:53:16 +0200 Subject: [PATCH 03/16] chore(tdpeuter): Tweak mail signatures --- nixos/users/tdpeuter/mail.nix | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/nixos/users/tdpeuter/mail.nix b/nixos/users/tdpeuter/mail.nix index d6b4928..2e05b4b 100644 --- a/nixos/users/tdpeuter/mail.nix +++ b/nixos/users/tdpeuter/mail.nix @@ -8,13 +8,17 @@ let Met vriendelijke groeten Tibo De Peuter ''; - UGent = '' + english = '' + Kind regards + Tibo De Peuter + ''; + academic = '' Met vriendelijke groeten Tibo De Peuter - Student 2Ba/3Ba Informatica + Student Ma Informatica ''; - MrFortem = '' + alias = '' Kind regards MrFortem Fiducia ''; @@ -61,7 +65,7 @@ in { realName = config.users.users.tdpeuter.description; signature = { showSignature = "append"; - text = signatures.UGent; + text = signatures.academic; }; thunderbird = { @@ -69,7 +73,7 @@ in { settings = id: { "mail.server.server_${id}.authMethod" = 10; "mail.smtpserver.smtp_${id}.authMethod" = 10; - "mail.identity.id_${id}.htmlSigText" = signatures.UGent; + "mail.identity.id_${id}.htmlSigText" = signatures.academic; # Allow PGP "mail.identity.id_${id}.openpgp_key_id" = "9B11F5243089DB5B"; # Your 'master' key @@ -109,7 +113,7 @@ in { settings = id: { "mail.server.server_${id}.directory" = ".thunderbird/tdpeuter/ImapMail/imap.gmail.com-mrfortem"; "mail.server.server_${id}.directory-rel" = "[ProfD]ImapMail/imap.gmail.com-mrfortem"; - "mail.identity.id_${id}.htmlSigText" = signatures.MrFortem; + "mail.identity.id_${id}.htmlSigText" = signatures.alias; }; }; }; From 04b72ededed78190c12126599f2069ad52d348b9 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 20:58:34 +0200 Subject: [PATCH 04/16] chore(plamsa): Update --- nixos/modules/desktop/plasma/default.nix | 35 ++++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/nixos/modules/desktop/plasma/default.nix b/nixos/modules/desktop/plasma/default.nix index 39e1ab7..8bdb62c 100644 --- a/nixos/modules/desktop/plasma/default.nix +++ b/nixos/modules/desktop/plasma/default.nix @@ -8,36 +8,41 @@ in { options.sisyphus.desktop.plasma.enable = lib.mkEnableOption "KDE Plasma"; config = lib.mkIf cfg.enable { - services.xserver = { - enable = true; - + services = { displayManager = { - defaultSession = "plasmawayland"; + defaultSession = "plasma"; sddm = { enable = true; + wayland.enable = true; # https://discourse.nixos.org/t/plasma-wayland-session-not-available-from-sddm/13447/2 - settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; + # settings.Wayland.SessionDir = "${pkgs.plasma5Packages.plasma-workspace}/share/wayland-sessions"; }; }; - desktopManager.plasma5 = { + desktopManager.plasma6.enable = true; + + # Use gnome keyring instead of KDE Wallet. + gnome.gnome-keyring.enable = true; + + xserver = { enable = true; - useQtScaling = true; + excludePackages = with pkgs; [ + xterm + ]; + videoDrivers = [ "nvidia" ]; }; - - excludePackages = with pkgs; [ - xterm - ]; }; - environment.plasma5.excludePackages = with pkgs.libsForQt5; [ + environment.plasma6.excludePackages = with pkgs.kdePackages; [ elisa - okular + gwenview + kate khelpcenter konsole - print-manager + kwalletmanager + okular plasma-systemmonitor - gwenview + print-manager ]; }; } From b7b0fa8ad39eef2235c7de59adabd5563897856d Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 20:59:18 +0200 Subject: [PATCH 05/16] chore(hyprland): Update --- nixos/modules/desktop/hyprland/default.nix | 48 ++++++++++++++++++++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/nixos/modules/desktop/hyprland/default.nix b/nixos/modules/desktop/hyprland/default.nix index 5209653..f4ee140 100644 --- a/nixos/modules/desktop/hyprland/default.nix +++ b/nixos/modules/desktop/hyprland/default.nix @@ -1,4 +1,4 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: let cfg = config.sisyphus.desktop.hyprland; @@ -6,9 +6,49 @@ in { options.sisyphus.desktop.hyprland.enable = lib.mkEnableOption "Hyprland"; config = lib.mkIf cfg.enable { - programs.hyprland = { - enable = true; - xwayland.enable = true; + environment = { + sessionVariables = { + # Hint Electron apps to use wayland + NIXOS_OZONE_WL = "1"; + + SCRIPT_DIR = ../../../../scripts; + }; + + systemPackages = with pkgs; [ + brightnessctl + dunst + libnotify + swaybg + waybar + waycorner + wlsunset + wl-clipboard # Copying to system clipboard in vim + + glib + + libva + + dmenu + jq + j4-dmenu-desktop + rofi + ]; + }; + + programs = { + hyprland = { + enable = true; + xwayland.enable = true; + }; + + waybar.enable = true; + }; + + services = { + displayManager.ly.enable = true; + gnome.gnome-keyring.enable = true; + power-profiles-daemon.enable = true; + xserver.videoDrivers = [ "nvidia" ]; }; }; } From f35a2c5e85af9f07395018889924266c87d7d3d5 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:02:35 +0200 Subject: [PATCH 06/16] chore: Update to 25.05 --- nixos/flake.nix | 3 ++- nixos/modules/hardware/nvidia/default.nix | 26 ++++++++++++++--------- nixos/modules/programs/direnv/default.nix | 2 +- nixos/users/tdpeuter/default.nix | 15 +++++++------ 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/nixos/flake.nix b/nixos/flake.nix index 2e337c4..80814dc 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -45,7 +45,7 @@ "spotify" "steam" "steam-unwrapped" "steam-run" "vista-fonts" - "nvidia-persistenced" # Docker + "intel-ocl" ]; in utils.lib.mkFlake { @@ -73,6 +73,7 @@ modules = [ home-manager.nixosModule sops-nix.nixosModules.sops + ./modules ./users ]; diff --git a/nixos/modules/hardware/nvidia/default.nix b/nixos/modules/hardware/nvidia/default.nix index 4418f36..e98ed6d 100644 --- a/nixos/modules/hardware/nvidia/default.nix +++ b/nixos/modules/hardware/nvidia/default.nix @@ -25,21 +25,27 @@ in { }; config = lib.mkIf cfg.enable { -# boot = { -# extraModprobeConfig = "options nvidia-drm modeset=1"; -# -# initrd.kernelModules = [ -# "nvidia" -# "nvidia_modeset" -# "nvidia_uvm" -# "nvidia_drm" -# ]; -# }; + boot = { + extraModprobeConfig = '' + options nvidia-drm modeset=1 + ''; + kernelParams = [ + "nvidia_drm.modeset=1" + ]; + }; hardware = { graphics = { enable = true; enable32Bit = true; + extraPackages = with pkgs; [ + intel-ocl + intel-compute-runtime + opencl-clhpp + opencl-clang + opencl-headers + ocl-icd + ]; }; nvidia = { diff --git a/nixos/modules/programs/direnv/default.nix b/nixos/modules/programs/direnv/default.nix index ad16c7c..f974886 100644 --- a/nixos/modules/programs/direnv/default.nix +++ b/nixos/modules/programs/direnv/default.nix @@ -8,7 +8,7 @@ in { config = lib.mkIf cfg.enable { programs.direnv = { enable = true; - nix-direnv.enable = true; # Use nix-specific direnv. + nix-direnv.enable = true; # Use nix-specific direnv, https://github.com/nix-community/nix-direnv }; # This is also done by setting programs.direnv.persistDerivations. diff --git a/nixos/users/tdpeuter/default.nix b/nixos/users/tdpeuter/default.nix index 3a92666..6435828 100644 --- a/nixos/users/tdpeuter/default.nix +++ b/nixos/users/tdpeuter/default.nix @@ -8,7 +8,7 @@ let cursor = { package = pkgs.phinger-cursors; - name = "phinger-cursors"; + name = "phinger-cursors-light"; size = 24; }; in { @@ -79,12 +79,13 @@ in { fonts.packages = with pkgs; [ corefonts # Calibri for Uni + dejavu_fonts font-awesome # Dependency of Vifm & zsh config letter # Personal font + noto-fonts # Dependency of Zellij config noto-fonts-cjk-sans # Dependency of Zellij config noto-fonts-cjk-serif # Dependency of Zellij config - noto-fonts # Dependency of Zellij config - noto-fonts-emoji # Dependency of Zellij config + noto-fonts-emoji noto-fonts-color-emoji # Emoji's! vistafonts # Microsoft fonts ]; @@ -109,7 +110,6 @@ in { pointerCursor = { inherit (cursor) package name size; gtk.enable = true; - x11.enable = true; }; }; @@ -140,9 +140,12 @@ in { }; }; - gtk = { + services.syncthing = { enable = true; - cursorTheme = cursor; + extraOptions = [ + "--no-default-folder" + ]; + tray.enable = true; }; xdg = { From caa24fb255d3c787b63fc48c43458a31e262cccc Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:04:48 +0200 Subject: [PATCH 07/16] chore(sway): Update --- nixos/modules/desktop/sway/default.nix | 47 ++++++++++++-------------- nixos/users/tdpeuter/dotfiles.nix | 2 +- 2 files changed, 22 insertions(+), 27 deletions(-) diff --git a/nixos/modules/desktop/sway/default.nix b/nixos/modules/desktop/sway/default.nix index 055bfb0..3dc3547 100644 --- a/nixos/modules/desktop/sway/default.nix +++ b/nixos/modules/desktop/sway/default.nix @@ -71,7 +71,7 @@ in { wayland xdg-utils # Open with default program glib # gsettings - wl-clipboard + wl-clipboard # Copying to system clipboard in vim wl-mirror # Mirror an output wdisplays # Tool to configure displays @@ -84,8 +84,10 @@ in { swaylock-effects waybar wlsunset + waycorner # TODO Turn into own module/package? + dmenu jq j4-dmenu-desktop rofi @@ -106,43 +108,36 @@ in { noto-fonts-emoji ]; - security.polkit.enable = true; - + hardware.graphics.enable = true; + services = { atd.enable = true; # Required by sunset.sh dbus.enable = true; + displayManager.ly.enable = true; gnome.gnome-keyring.enable = true; - - pipewire = { - enable = true; - alsa.enable = true; - pulse.enable = true; - }; - power-profiles-daemon.enable = true; - - xserver = { - displayManager.session = [{ - manage = "window"; - name = "Sway"; - start = '' - ${pkgs.sway}/bin/sway --unsupported-gpu & - waitPID=$! - ''; - }]; - videoDrivers = [ "nouveau" ]; - }; + xserver.videoDrivers = [ "nouveau" ]; + # xserver.videoDrivers = [ "nvidia" ]; }; xdg.portal = { enable = true; wlr.enable = true; - extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + gtk-session-lock + ]; + xdgOpenUsePortal = true; }; - programs.sway = { - enable = true; - wrapperFeatures.gtk = true; + programs = { + sway = { + enable = true; + package = pkgs.swayfx; + wrapperFeatures.gtk = true; + }; + + waybar.enable = true; }; sisyphus.users.wantedGroups = [ diff --git a/nixos/users/tdpeuter/dotfiles.nix b/nixos/users/tdpeuter/dotfiles.nix index 9766b08..8507bf0 100644 --- a/nixos/users/tdpeuter/dotfiles.nix +++ b/nixos/users/tdpeuter/dotfiles.nix @@ -17,7 +17,7 @@ in { source = ../../../stow/alacritty/.config/alacritty; }; ".config/dunst" = { - inherit (config.sisyphus.desktop.sway) enable; + enable = config.sisyphus.desktop.hyprland.enable || config.sisyphus.desktop.sway.enable; source = ../../../stow/dunst/.config/dunst; }; ".config/foot" = { From f4464866782e2b6d656d6b0197c7dc7119cb2377 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:05:04 +0200 Subject: [PATCH 08/16] chore: Update scripts --- scripts/do-not-disturb.sh | 19 ------------- scripts/toggle-light-dark.sh | 8 ++---- scripts/toggle-notifications.sh | 48 +++++++++++++++++++++++++++++++++ scripts/toggle-tailscale.sh | 41 ++++++++++++++++++++++++++++ 4 files changed, 91 insertions(+), 25 deletions(-) delete mode 100755 scripts/do-not-disturb.sh create mode 100755 scripts/toggle-notifications.sh create mode 100755 scripts/toggle-tailscale.sh diff --git a/scripts/do-not-disturb.sh b/scripts/do-not-disturb.sh deleted file mode 100755 index c9c5f21..0000000 --- a/scripts/do-not-disturb.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash -# Script to toggle Do not disturb mode for dunst - -# Get current state -if [ "$( command -v dunstctl )" ]; then - current_state="$( dunstctl is-paused )" -fi - -# Toggle -if [ "${current_state}" == "false" ] ; then - notify-send 'Hiding notifications' - sleep 5 - # makoctl set-mode do-not-disturb - dunstctl set-paused true -else - # makoctl set-mode default - dunstctl set-paused false - notify-send 'Showing notifications' -fi diff --git a/scripts/toggle-light-dark.sh b/scripts/toggle-light-dark.sh index 80e4d0d..c4667bf 100755 --- a/scripts/toggle-light-dark.sh +++ b/scripts/toggle-light-dark.sh @@ -30,10 +30,6 @@ declare -A wallpaper wallpaper[${THEME_LIGHT}]="bg-light" wallpaper[${THEME_DARK}]="bg-dark" -declare -A icon -icon[${THEME_LIGHT}]="\uf185" -icon[${THEME_DARK}]="\uf186" - ############# ### Logic ### ############# @@ -58,8 +54,8 @@ while getopts ":m:g" option; do class='activated' percentage=100 fi - printf '{"text": "%s", "alt": "%s", "tooltip": "Set theme to %s", "percentage": %d, "class": "%s"}' \ - "${icon[${current_state}]}" "${gsettings_alt[${next_state}]}" "${next_state}" "${percentage:=0}" "${class:="none"}" + printf '{"alt": "%s", "tooltip": "Set theme to %s", "percentage": %d, "class": "%s"}' \ + "${gsettings_alt[${current_state}]}" "${next_state}" "${percentage:=0}" "${class:="none"}" exit 0 ;; *) diff --git a/scripts/toggle-notifications.sh b/scripts/toggle-notifications.sh new file mode 100755 index 0000000..fe5624a --- /dev/null +++ b/scripts/toggle-notifications.sh @@ -0,0 +1,48 @@ +#!/usr/bin/env bash +# Script to toggle Do not disturb mode for dunst + +# Get current state +if [ "$( command -v dunstctl )" ]; then + current_state="$( dunstctl is-paused )" +fi + +while getopts ":g" option; do + case "${option}" in + g) + if [ "${current_state}" == "false" ]; then + state='normal' + tooltip='Hide notifications' + class='none' + else + state='paused' + tooltip='Show notifications' + class='activated' + fi + printf '{"alt": "%s", "tooltip": "%s", "class": "%s" }' \ + "${state}" "${tooltip}" "${class}" + exit 0 + ;; + esac +done + +# Toggle +if [ "${current_state}" == "false" ] ; then + notify-send 'Hiding notifications' + sleep 5 + + if [ "$(command -v makoctl)" ]; then + makoctl set-mode do-not-disturb + fi + if [ "$(command -v dunstctl)" ]; then + dunstctl set-paused true + fi +else + if [ "$(command -v makoctl)" ]; then + makoctl set-mode default + fi + if [ "$(command -v dunstctl)" ]; then + dunstctl set-paused false + fi + + notify-send 'Showing notifications' +fi diff --git a/scripts/toggle-tailscale.sh b/scripts/toggle-tailscale.sh new file mode 100755 index 0000000..0263c29 --- /dev/null +++ b/scripts/toggle-tailscale.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# Script to toggle Do not disturb mode for dunst + +STOPPED_MSG='Tailscale is stopped' + +# Check if tailscale is installed +if [ ! "$( command -v tailscale )" ]; then + echo 'Tailscale is not installed!' + exit 1 +fi + +# Get current state +status="$( tailscale status )" +current_state="$( grep -o "${STOPPED_MSG}" <<< "${status}" )" + +while getopts ":g" option; do + case "${option}" in + g) + if [ "${current_state}" == "${STOPPED_MSG}" ]; then + state='disconnected' + tooltip='Connect tailnet' + else + state='connected' + tooltip="${status:='Disconnect tailnet'}" + fi + + printf '{"alt": "%s", "tooltip": "%q", "class": "%s" }' \ + "${state}" "${tooltip}" "${state}" + exit 0 + ;; + esac +done + +# Toggle +if [ "${current_state}" == "${STOPPED_MSG}" ] ; then + notify-send 'Connecting tailnet' + notify-send 'Connected tailnet' "$( tailscale up )" +else + notify-send 'Disconnecting tailnet' + notify-send 'Disconnected tailnet' "$( tailscale down )" +fi From 913562b98b3278c7b6087827c375f5acfb6bcb66 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:06:29 +0200 Subject: [PATCH 09/16] feat(yubikey-touch-detector): fix? --- nixos/modules/hardware/yubikey/default.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nixos/modules/hardware/yubikey/default.nix b/nixos/modules/hardware/yubikey/default.nix index 708b9c1..2134c87 100644 --- a/nixos/modules/hardware/yubikey/default.nix +++ b/nixos/modules/hardware/yubikey/default.nix @@ -25,11 +25,17 @@ in { ]; # Send a notification if the YubiKey is waiting for touch. - systemd.user.services.yubikey-touch-detector = { + systemd.services.yubikey-touch-detector = { enable = true; description = "Detects when your YubiKey is waiting for a touch"; - path = with pkgs; [ yubikey-touch-detector ]; - script = ''exec yubikey-touch-detector --notify''; + path = with pkgs; [ + gnupg + yubikey-touch-detector + ]; + wantedBy = [ + "graphical-session.target" + ]; + script = ''exec yubikey-touch-detector --libnotify''; environment.YUBIKEY_TOUCH_DETECTOR_LIBNOTIFY = "true"; }; }; From 0e966c620128f3e577c984f16cb24356b9ec0ee7 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:09:26 +0200 Subject: [PATCH 10/16] chore: Updates --- colors.sh | 144 ++++++++++++++++++ nixos/hosts/Tibo-NixFat/default.nix | 13 +- .../Tibo-NixFat/hardware-configuration.nix | 6 +- nixos/modules/services/pipewire/default.nix | 6 +- .../virtualisation/virtualbox/default.nix | 2 + 5 files changed, 163 insertions(+), 8 deletions(-) diff --git a/colors.sh b/colors.sh index d7ccfdc..e51c155 100644 --- a/colors.sh +++ b/colors.sh @@ -79,3 +79,147 @@ printf "\033]4;14;#74C7EC\007" # FFFFFF # White 15 printf "\033]4;15;#FFFFFF\007" + +# NEW COLORS 20241101 +# +# Nr # R G B H S B # Name +# FG # 250 250 250 0 0 98 # Daisy (White) +printf "\033]10;#FAFAFA\007" +# BG # 19 19 19 0 0 7 # - +printf "\033]11;#131313\007" + +# Regular colors (0-7) + +# Nr # R G B H S B # Name +# 0 # 61 61 61 0 0 24 # - (Black) +printf "\033]4;0;#3D3D3D\007" +# 1 # 186 19 61 345 90 73 # - (Red) +printf "\033]4;1;#BA133D\007" +# 2 # 61 186 19 105 90 73 # - (Green) +printf "\033]4;2;#3DBA13\007" +# 3 # 186 144 19 45 90 73 # - (Yellow) +printf "\033]4;3;#BA9013\007" +# 4 # 19 61 186 225 90 73 # - (Blue) +printf "\033]4;4;#133DBA\007" +# 5 # 144 19 186 285 90 73 # - (Magenta) +printf "\033]4;5;#9013BA\007" +# 6 # 19 186 144 165 90 73 # - (Cyan) +printf "\033]4;6;#13BA90\007" +# 7 # 186 186 186 0 0 73 # - (White) +printf "\033]4;7;#BABABA\007" + +# Bright colors (8-15) + +# Nr # R G B H S B # Name +# 8 # 122 122 122 0 0 48 # - (Black) +printf "\033]4;8;#363636\007" +# 9 # 250 25 81 345 90 98 # - (Red) +printf "\033]4;9;#FA1951\007" +# 10 # 81 250 25 105 90 98 # - (Green) +printf "\033]4;10;#51FA19\007" +# 11 # 250 194 25 45 90 98 # - (Yellow) +printf "\033]4;11;#FAC219\007" +# 12 # 25 81 250 225 90 98 # - (Blue) +printf "\033]4;12;#1951FA\007" +# 13 # 194 25 250 285 90 98 # - (Magenta) +printf "\033]4;13;#C219FA\007" +# 14 # 25 259 194 165 90 98 # - (Cyan) +printf "\033]4;14;#19FAC2\007" +# 15 # 250 250 250 0 0 98 # - (White) +printf "\033]4;15;#FAFAFA\007" + +# BRIGHTER +# +# Nr # R G B H S B # Name +# FG # 250 250 250 0 0 98 # Daisy (White) +printf "\033]11;#FAFAFA\007" +# BG # 19 19 19 0 0 7 # - +printf "\033]10;#131313\007" + +# Regular colors (0-7) + +# Nr # R G B H S B # Name +# 0 # 61 61 61 0 0 24 # - (Black) +printf "\033]4;0;#3D3D3D\007" +# 1 # 186 19 61 345 90 73 # - (Red) +printf "\033]4;1;#E62E4D\007" +# 2 # 61 186 19 105 90 73 # - (Green) +printf "\033]4;2;#4DE62E\007" +# 3 # 186 144 19 45 90 73 # - (Yellow) +printf "\033]4;3;#E6C72E\007" +# 4 # 19 61 186 225 90 73 # - (Blue) +printf "\033]4;4;#2E4CE6\007" +# 5 # 144 19 186 285 90 73 # - (Magenta) +printf "\033]4;5;#C52DE3\007" +# 6 # 19 186 144 165 90 73 # - (Cyan) +printf "\033]4;6;#2EE6C7\007" +# 7 # 186 186 186 0 0 73 # - (White) +printf "\033]4;7;#BABABA\007" + +# Bright colors (8-15) + +# Nr # R G B H S B # Name +# 8 # 122 122 122 0 0 48 # - (Black) +printf "\033]4;8;#7A7A7A\007" +# 9 # 250 25 81 345 90 98 # - (Red) +printf "\033]4;9;#FF002B\007" +# 10 # 81 250 25 105 90 98 # - (Green) +printf "\033]4;10;#2BFF00\007" +# 11 # 250 194 25 45 90 98 # - (Yellow) +printf "\033]4;11;#FFd500\007" +# 12 # 25 81 250 225 90 98 # - (Blue) +printf "\033]4;12;#002AFF\007" +# 13 # 194 25 250 285 90 98 # - (Magenta) +printf "\033]4;13;#D400FF\007" +# 14 # 25 259 194 165 90 98 # - (Cyan) +printf "\033]4;14;#00FFC0\007" +# 15 # 250 250 250 0 0 98 # - (White) +printf "\033]4;15;#FAFAFA\007" + +# TEsting again + +# Nr # R G B H S B # Name +# FG # 250 250 250 0 0 98 # Daisy (White) +# FAFAFA # Daisy (Foreground) +printf "\033]10;#FAFAFA\007" +# 171717 # Background +printf "\033]11;#171717\007" + +# Nr # R G B H S B # Name +# 0 # 61 61 61 0 0 24 # - (Black) +printf "\033]4;0;#202124\007" +# 1 # 186 19 61 345 90 73 # - (Red) +printf "\033]4;1;#EA4335\007" +# 2 # 61 186 19 105 90 73 # - (Green) +printf "\033]4;2;#34A853\007" +# 3 # 186 144 19 45 90 73 # - (Yellow) +printf "\033]4;3;#FBBC04\007" +# 4 # 19 61 186 225 90 73 # - (Blue) +printf "\033]4;4;#4285F4\007" +# 5 # 144 19 186 285 90 73 # - (Magenta) +printf "\033]4;5;#A142F4\007" +# 6 # 19 186 144 165 90 73 # - (Cyan) +printf "\033]4;6;#24C1E0\007" +# 7 # 186 186 186 0 0 73 # - (White) +printf "\033]4;7;#FBFCF8\007" + +# Bright colors (8-15) + +# Nr # R G B H S B # Name +# 8 # 122 122 122 0 0 48 # - (Black) +printf "\033]4;8;#5F6368\007" +# 9 # 250 25 81 345 90 98 # - (Red) +printf "\033]4;9;#EA4335\007" +# 10 # 81 250 25 105 90 98 # - (Green) +printf "\033]4;10;#34A853\007" +# 11 # 250 194 25 45 90 98 # - (Yellow) +printf "\033]4;11;#FBBC05\007" +# 12 # 25 81 250 225 90 98 # - (Blue) +printf "\033]4;12;#4285F4\007" +# 13 # 194 25 250 285 90 98 # - (Magenta) +printf "\033]4;13;#A142F4\007" +# 14 # 25 259 194 165 90 98 # - (Cyan) +printf "\033]4;14;#24C1E0\007" +# 15 # 250 250 250 0 0 98 # - (White) +printf "\033]4;15;#FFFFFF\007" + diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 44554f0..0d2fcd6 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -19,7 +19,7 @@ networking = { networkmanager.enable = true; - # openconnect-sso.enable = true; + openconnect-sso.enable = true; }; nix = { @@ -87,7 +87,10 @@ powerOnBoot = false; }; - networking.hostName = "Tibo-NixFat"; + networking = { + hostName = "Tibo-NixFat"; + networkmanager.wifi.powersave = true; + }; services = { logind = { @@ -108,9 +111,13 @@ # Touchpad libinput.enable = true; + + thermald.enable = true; }; - system.stateVersion = "24.05"; + system.stateVersion = "24.11"; + + systemd.coredump.enable = false; time.timeZone = "Europe/Brussels"; diff --git a/nixos/hosts/Tibo-NixFat/hardware-configuration.nix b/nixos/hosts/Tibo-NixFat/hardware-configuration.nix index 30ba69a..b0dfd70 100644 --- a/nixos/hosts/Tibo-NixFat/hardware-configuration.nix +++ b/nixos/hosts/Tibo-NixFat/hardware-configuration.nix @@ -49,5 +49,9 @@ # networking.interfaces.wlp111s0.useDHCP = lib.mkDefault true; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + nixpkgs.config.allowUnfree = true; + hardware = { + enableAllFirmware = true; + cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + }; } diff --git a/nixos/modules/services/pipewire/default.nix b/nixos/modules/services/pipewire/default.nix index b83eedc..68985d3 100644 --- a/nixos/modules/services/pipewire/default.nix +++ b/nixos/modules/services/pipewire/default.nix @@ -29,10 +29,8 @@ in { # Headphone jack on laptop { "node.name" = "alsa_output.pci-0000_00_1f.3.analog-stereo"; } ]; - actions = { - update-props = { - "session.suspend-timeout-seconds" = 0; - }; + actions.update-props = { + "session.suspend-timeout-seconds" = 0; }; } ]; diff --git a/nixos/modules/virtualisation/virtualbox/default.nix b/nixos/modules/virtualisation/virtualbox/default.nix index ccd8fca..a86ada5 100644 --- a/nixos/modules/virtualisation/virtualbox/default.nix +++ b/nixos/modules/virtualisation/virtualbox/default.nix @@ -10,11 +10,13 @@ in { host = { enable = true; enableExtensionPack = true; + enableHardening = true; }; guest = { enable = true; clipboard = true; seamless = true; + vboxsf = false; # Module not found?... }; }; From 008ecba1a3c608ea32d684af13f050e4a2a81762 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:10:30 +0200 Subject: [PATCH 11/16] fix(foot): Remove padding --- stow/foot/.config/foot/foot.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stow/foot/.config/foot/foot.ini b/stow/foot/.config/foot/foot.ini index 51fdc7e..efcd8d9 100644 --- a/stow/foot/.config/foot/foot.ini +++ b/stow/foot/.config/foot/foot.ini @@ -29,7 +29,7 @@ dpi-aware=yes # initial-window-size-pixels=700x500 # Or, # initial-window-size-chars= # initial-window-mode=windowed -pad=10x10 # optionally append 'center' +#pad=10x10 # optionally append 'center' # resize-delay-ms=100 # notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} From 19a8cbf400893c6c84ba8d9d3262343673dcdc55 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:13:13 +0200 Subject: [PATCH 12/16] chore(sway): Update --- stow/sway/.config/sway/config | 4 ++ stow/sway/.config/sway/modes | 69 ++++++++++++++++++++--------------- stow/sway/.config/sway/style | 4 ++ 3 files changed, 47 insertions(+), 30 deletions(-) diff --git a/stow/sway/.config/sway/config b/stow/sway/.config/sway/config index 922a75b..e10c9dc 100644 --- a/stow/sway/.config/sway/config +++ b/stow/sway/.config/sway/config @@ -61,5 +61,9 @@ exec wlsunset -l 50.50 -L 4.00 -t 3000 -T 6500 exec gnome-keyring-daemon --start --components=secrets # Secrets exec dunst --verbosity crit # Notification manager exec swayidle -w +exec waycorner exec nextcloud --background + +# SwayFX +blur enable diff --git a/stow/sway/.config/sway/modes b/stow/sway/.config/sway/modes index 074dab5..d62608f 100644 --- a/stow/sway/.config/sway/modes +++ b/stow/sway/.config/sway/modes @@ -7,40 +7,49 @@ set $default "default" # Resizing set $mode_resize "Resize" bindsym $flag+r mode $mode_resize -mode $mode_resize bindsym { - $right resize grow width 10 px or 10 ppt - $up resize grow height 10 px or 10 ppt - $left resize shrink width 10 px or 10 ppt - $down resize shrink height 10 px or 10 ppt +mode $mode_resize { + bindsym { + $right resize grow width 10 px or 10 ppt + $up resize grow height 10 px or 10 ppt + $left resize shrink width 10 px or 10 ppt + $down resize shrink height 10 px or 10 ppt - Right resize grow width 10 px or 10 ppt - Up resize grow height 10 px or 10 ppt - Left resize shrink width 10 px or 10 ppt - Down resize shrink height 10 px or 10 ppt + Right resize grow width 10 px or 10 ppt + Up resize grow height 10 px or 10 ppt + Left resize shrink width 10 px or 10 ppt + Down resize shrink height 10 px or 10 ppt - Shift+$right resize grow width 50 px or 50 ppt - Shift+$up resize grow height 50 px or 50 ppt - Shift+$left resize shrink width 50 px or 50 ppt - Shift+$down resize shrink height 50 px or 50 ppt + Shift+$right resize grow width 50 px or 50 ppt + Shift+$up resize grow height 50 px or 50 ppt + Shift+$left resize shrink width 50 px or 50 ppt + Shift+$down resize shrink height 50 px or 50 ppt - Shift+Right resize grow width 50 px or 50 ppt - Shift+Up resize grow height 50 px or 50 ppt - Shift+Left resize shrink width 50 px or 50 ppt - Shift+Down resize shrink height 50 px or 50 ppt + Shift+Right resize grow width 50 px or 50 ppt + Shift+Up resize grow height 50 px or 50 ppt + Shift+Left resize shrink width 50 px or 50 ppt + Shift+Down resize shrink height 50 px or 50 ppt - $flag+$right move right - $flag+$up move up - $flag+$left move left - $flag+$down move down + $flag+$right move right + $flag+$up move up + $flag+$left move left + $flag+$down move down - $flag+Right move right - $flag+Up move up - $flag+Left move left - $flag+Down move down + $flag+Right move right + $flag+Up move up + $flag+Left move left + $flag+Down move down - $flag+r mode $default - Escape mode $default - Return mode $default + $flag+r mode $default + Escape mode $default + Return mode $default + } + + bindgesture { + swipe:2:right resize grow width 10 px or 10 ppt + swipe:2:down resize grow height 10 px or 10 ppt + swipe:2:left resize shrink width 10 px or 10 ppt + swipe:2:up resize shrink height 10 px or 10 ppt + } } # System actions @@ -94,8 +103,8 @@ mode $mode_screenshot bindsym { set $mode_launcher "Launch (f)irefox, (s)potify or (t)hunderbird." bindsym $flag+o mode $mode_launcher mode $mode_launcher bindsym { - f exec firefox - t exec thunderbird + f exec firefox, mode $default + t exec thunderbird, mode $default $flag+o mode $default Escape mode $default diff --git a/stow/sway/.config/sway/style b/stow/sway/.config/sway/style index 7377b3b..8aea2fc 100644 --- a/stow/sway/.config/sway/style +++ b/stow/sway/.config/sway/style @@ -15,6 +15,10 @@ default_border pixel 1 default_floating_border normal 1 hide_edge_borders smart smart_borders on +gaps { + inner 5 + outer 3 +} # Mimic no titles by setting the text color to background color # border backgr. text indic. child_border From a41cdeaf39730faed7e34b9d81c77ea7cc141361 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:17:34 +0200 Subject: [PATCH 13/16] chore(waybar): Update --- stow/waybar/.config/waybar/config | 42 -- stow/waybar/.config/waybar/config.jsonc | 60 +++ stow/waybar/.config/waybar/left.json | 7 +- stow/waybar/.config/waybar/modern.css | 80 ++++ stow/waybar/.config/waybar/modules.json | 438 ++++++++++++--------- stow/waybar/.config/waybar/style-dark.css | 14 + stow/waybar/.config/waybar/style-light.css | 14 + stow/waybar/.config/waybar/style.css | 196 ++++----- 8 files changed, 504 insertions(+), 347 deletions(-) delete mode 100644 stow/waybar/.config/waybar/config create mode 100644 stow/waybar/.config/waybar/config.jsonc create mode 100644 stow/waybar/.config/waybar/modern.css create mode 100644 stow/waybar/.config/waybar/style-dark.css create mode 100644 stow/waybar/.config/waybar/style-light.css diff --git a/stow/waybar/.config/waybar/config b/stow/waybar/.config/waybar/config deleted file mode 100644 index 3b1a053..0000000 --- a/stow/waybar/.config/waybar/config +++ /dev/null @@ -1,42 +0,0 @@ -// -// ~/.config/waybar/config -// - -[{ - "name": "toggle", - - "mode": "hide", - "ipc": true, - - "position": "top", - "height": 25, - "spacing": 4, - "margin": "-25px 0 0 0", // Show this bar on top of the other one, seemingly the "same" one. - - "custom/sep": { - "format": "\uf142" - }, - - "include": [ - // Import modules (!) - "~/.config/waybar/modules.json", -// "~/.config/waybar/default.json" - "~/.config/waybar/left.json" - ], - -}, - -{ - "name": "keep", - "position": "top", - "height": 25, - "modules-left": ["sway/mode"], - "modules-center": ["clock"], - "modules-right": ["privacy", "keyboard-state"], - - "include": [ - // Import modules (!) - "~/.config/waybar/modules.json" - ], -}] - diff --git a/stow/waybar/.config/waybar/config.jsonc b/stow/waybar/.config/waybar/config.jsonc new file mode 100644 index 0000000..2a4f8a4 --- /dev/null +++ b/stow/waybar/.config/waybar/config.jsonc @@ -0,0 +1,60 @@ +/* * * * * * * * * * * * * * * * * + * * + * ~/.config/waybar/config.jsonc * + * * + * * * * * * * * * * * * * * * * */ + +[ + /* Always visible, contains less information */ + { + "name": "keep", + "position": "top", + "height": 26, + "modules-left": [ + "group/mode" + ], + "modules-center": [ + "clock#center" + ], + "modules-right": [ + "keyboard-state#numlock", + "keyboard-state#capslock", + "privacy" + ], + "include": [ + "~/.config/waybar/modules.json" + ] + }, + + /* Toggle this bar, contains all information */ + { + "name": "toggle", + "mode": "hide", + "ipc": true, + "position": "top", + "height": 26, + /* Show this bar on top of the other one, seemingly replacing it. */ + "margin": "-26px 0 0 0", + "modules-left": [ + "custom/meta", + "sway/window", + "group/workspaces", + "custom/scratchpad-indicator", + ], + "modules-center": [ + "mpris" + ], + "modules-right": [ + "privacy", + "tray", + "group/control-center", + "group/network", + "pulseaudio", + "group/power", + "clock#bar" + ], + "include": [ + "~/.config/waybar/modules.json" + ] + } +] diff --git a/stow/waybar/.config/waybar/left.json b/stow/waybar/.config/waybar/left.json index 8ab0639..86b9a00 100644 --- a/stow/waybar/.config/waybar/left.json +++ b/stow/waybar/.config/waybar/left.json @@ -2,16 +2,15 @@ "modules-left": [ "sway/workspaces", "custom/scratchpad-indicator", - "mpris", "group/system" ], "modules-right": [ - "group/hardware", + "tray", + "sway/language", "bluetooth", "network", "pulseaudio", "group/battery", - "custom/sep", - "tray" + "mpris" ] } diff --git a/stow/waybar/.config/waybar/modern.css b/stow/waybar/.config/waybar/modern.css new file mode 100644 index 0000000..35ce570 --- /dev/null +++ b/stow/waybar/.config/waybar/modern.css @@ -0,0 +1,80 @@ +@define-color foreground rgb(202, 202, 202); +@define-color background rgb( 3, 3, 3); + +@define-color highlight-background alpha(@foreground, 0.4); + +@define-color accent #00897b; +@define-color white #ecf0f1; +@define-color warning-red #eb4d4b; + +* { + font-family: letter, "Font Awesome 6 Free", font-awesome, monospace; + font-size: 13px; + font-weight: 600; +} + +window#waybar { + border: none; + color: @white; + + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.keep { + background-color: @transparent; +} + +window#waybar.toggle { + background-color: alpha(@foreground, 0.4); +} + +tooltip { + background: alpha(@background, 0.8); +} +tooltip label { + color: @white; +} + +#workspaces button { + border: none; + padding: 0 8px; + border-radius: 5px; + animation: ws_normal 20s ease-in-out 1; +} + +#mode, +#workspaces button.focused { + background-color: alpha(@background, 0.2); +} + +#workspaces button:hover { + background-color: alpha(@background, 0.2); +} + +#battery, +#disk, +#bluetooth, +#clock, +#custom-browser, +#custom-scratchpad-indicator, +#custom-system-hibernate, #custom-system-lock, #custom-system-reboot, #custom-system-shutdown, #custom-system-sleep, +#custom-toggle-light-dark, +#custom-toggle-night-light, +#custom-toggle-notifications, +#cpu, +#idle_inhibitor, +#keyboard-state, +#memory, +#mpris, +#network, +#sway-language, +#sway-window, +#power-profiles-daemon, +#privacy, +#pulseaudio, +#temperature, +#tray { + color: @white; +} + diff --git a/stow/waybar/.config/waybar/modules.json b/stow/waybar/.config/waybar/modules.json index 026ad07..21b3534 100644 --- a/stow/waybar/.config/waybar/modules.json +++ b/stow/waybar/.config/waybar/modules.json @@ -2,148 +2,224 @@ "battery": { "format": "{capacity}% {icon}", "format-alt": "{time} {icon}", - "format-charging": "{capacity}% \uf0e7 {icon}", - "format-icons": ["\uf244", "\uf243", "\uf242", "\uf241", "\uf240"], + "format-charging": "{capacity}% \ue55b", /*  */ "format-plugged": "{capacity}% \ue55c", - "states": { - "warning": 30, - "critical": 15 + "format-icons": [ + "\uf244", /*  */ + "\uf243", /*  */ + "\uf242", /*  */ + "\uf241", /*  */ + "\uf240" /*  */ + ], + "states": { + "warning": 25, + "critical": 12 } }, - "disk": { - "interval": 30, - "format": "{percentage_used}% \uf0a0", - "on-click": "kitty -e duf /", - "path": "/", - "tooltip-format": "{used} used out of {total} on {path} ({percentage_free}% or {free} free)" - }, - "bluetooth": { - "format-disabled": "\uf294", - "format-off": "\uf294", - "format-on": "\uf294", - "format-connected": "\uf294c", + "format-disabled": "\uf294", /*  */ + "format-off": "\uf294", /*  */ + "format-on": "\uf294", /*  */ + "format-connected": "\uf294c", /* c */ "max-length": 10.3, "on-click": "bluetoothctl power $( bluetoothctl show | sed -n 's/\\s*Powered: \\(yes\\|no\\)/\\1/p' | sed 's/yes/off/;s/no/on/' )", - "on-click-right": "kitty -e bluetoothctl", "tooltip-format": "{status}", "tooltip-format-on": "{status}, no devices connected", "tooltip-format-connected": "{status} ({num_connections}):\n{device_enumerate}", "tooltip-format-enumerate-connected": "{device_alias} ({device_address})", "tooltip-format-enumerate-connected-battery": "{device_alias}\t{device_address}\t{device_battery_percentage}" }, - - "clock": { + + "clock#center": { "format": "{:%H:%M}", - "format-alt": "{:%d/%m/%Y %H:%M}", + "format-alt": "{:%a %b %d, %Y, %R}", "timezone": "Europe/Brussels", - "tooltip-format": "{:%Y %B}\n{calendar}" + "tooltip-format": "{:%Y %B}\n{calendar}", + "calendar": { + "mode": "month", + "week-pos": "left", + "format": { + /* Highlight todays date. */ + "today": "{}" + } + }, + "actions": { + "on-click": "mode" + } }, - "custom/browser": { - "format": "\uf120", - "on-click": "dmenu_run", - "tooltip-format": "Launch an application" + "clock#bar": { + "format": "{:%a %b %d, %R}", + "timezone": "Europe/Brussels", + "tooltip-format": "{:%Y %B}\n{calendar}", + "calendar": { + "mode-mon-col": 3, + "on-scroll": 1, + "format": { + /* Highlight today's date. */ + "today": "{}" + } + }, + "actions": { + "on-click": "mode" + } }, - "custom/light-dark-toggle": { - "exec": "bash ${SCRIPT_DIR}/toggle-light-dark.sh -g", - "exec-on-event": true, - "on-click": "bash ${SCRIPT_DIR}/toggle-light-dark.sh", - // "format": "\uf042 ", - "format": "{icon}", - "format-icons": [ - "\uf185", - "\uf111" - ], - "tooltip": true, - "tooltip-format": "Toggle between light and dark mode" + "custom/control-center": { + "format": "\uf085", /*  */ + "tooltip": false }, - "custom/keyboard-switch": { - "format": "\uf11c", - "on-click": "swaymsg input type:keyboard xkb_switch_layout next", - "tooltip-format": "Toggle keyboard layouts", - "tooltip": true - }, - - "custom/night-light-toggle": { - "on-click": "bash ${SCRIPT_DIR}/sunset.sh", - "format": "\uf0eb ", - "tooltip": true, - "tooltip-format": "Toggle night-light on or off" + "custom/meta": { + "format": "\uf17c", /*  */ + "tooltip": false, + "on-click": "dmenu_run" }, "custom/scratchpad-indicator": { "interval": 3, "return-type": "json", "exec": "swaymsg -t get_tree | jq --unbuffered --compact-output '(recurse(.nodes[]) | select(.name == \"__i3_scratch\") | .focus) as $scratch_ids | [.. | (.nodes? + .floating_nodes?) // empty | .[] | select(.id |IN($scratch_ids[]))] as $scratch_nodes | if ($scratch_nodes|length) > 0 then { text: \"\\($scratch_nodes | length)\", tooltip: $scratch_nodes | map(\"\\(.app_id // .window_properties.class) (\\(.id)): \\(.name)\") | join(\"\\n\") } else empty end'", - "format": "{} \uf2d2", + "format": "\uf2d2 {}", "on-click": "exec swaymsg 'scratchpad show'", "on-click-right": "exec swaymsg 'move scratchpad'" }, "custom/system-lock": { - "format": "\uf09c", + "format": "\uf09c", /*  */ "tooltip": true, "tooltip-format": "Lock device", "on-click": "swaylock -f" }, "custom/system-sleep": { - "format": "\uf186", + "format": "\uf186", /*  */ "tooltip": true, "tooltip-format": "Put device to sleep", "on-click": "swaylock -f; systemctl suspend" }, "custom/system-hibernate": { - "format": "\uf2dc", + "format": "\uf2dc", /*  */ "tooltip": true, "tooltip-format": "Hibernate device", "on-click": "swaylock -f; systemctl hibernate" }, "custom/system-reboot": { - "format": "\uf0e2", + "format": "\uf0e2", /*  */ "tooltip": true, "tooltip-format": "Reboot device", "on-click": "systemctl reboot" }, "custom/system-shutdown": { - "format": "\uf011", + "format": "\uf011", /*  */ "tooltip": true, "tooltip-format": "Shutdown device", "on-click": "systemctl poweroff -i" }, - "custom/toggle-notifications": { - "on-click": "bash ${SCRIPT_DIR}/do-not-disturb.sh", - "tooltip-format": "Toggle notifications", - "format": "\uf1f6 ", - "tooltip": true - }, - - "cpu": { - "format": "{usage}% \uf2db", - "on-click": "foot -e htop", + "custom/toggle-light-dark": { + "exec": "sleep 1 && bash ~/projects/sisyphus/scripts/toggle-light-dark.sh -g", + "return-type": "json", + "on-click": "bash ~/projects/sisyphus/scripts/toggle-light-dark.sh", + "format": "{icon}", + "format-icons": { + "default": "\uf185", + "prefer-dark": "\uf005" + }, "tooltip": true }, - "group/battery": { + "custom/toggle-notifications": { + "exec": "sleep 6 && bash ~/projects/sisyphus/scripts/toggle-notifications.sh -g", + "return-type": "json", + "on-click": "bash ~/projects/sisyphus/scripts/toggle-notifications.sh", + "format": "NOTIS {icon}", + "format-icons": { + "normal": "NRML", + "paused": "PAISED" + }, + "tooltip": true + }, + + "custom/toggle-tailscale": { + "exec": "sleep 2 && bash ~/projects/sisyphus/scripts/toggle-tailscale.sh -g", + "return-type": "json", + "on-click": "bash ~/projects/sisyphus/scripts/toggle-tailscale.sh", + "format": "{icon}", + "format-icons": { + "disconnected": "\ue50b", + "connected": "\ue509", + }, + "tooltip": true + }, + + "group/control-center": { "orientation": "inherit", "modules": [ + "custom/control-center", + "group/language", + /* "hyprland/language", "sway/language", */ + "custom/toggle-notifications", + "custom/toggle-light-dark", + "bluetooth" + ], + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false, + "children-class": "drawer-child" + } + }, + + "group/language": { + "orientation": "inherit", + "modules": [ + "hyprland/language", + "sway/language" + ] + }, + + "group/mode": { + "orientation": "inherit", + "modules": [ + "hyprland/submap", + "sway/mode" + ] + }, + + "group/network": { + "orientation": "inherit", + "modules": [ + /* Preview */ + "network", + /* Most-left */ + "custom/toggle-tailscale" + /* Most-right */ + ], + "drawer": { + "transition-duration": 500, + "transition-left-to-right": false, + "children-class": "drawer-child" + } + }, + + "group/power": { + "orientation": "inherit", + "modules": [ + /* Preview */ "battery", + /* Most-left */ "custom/system-shutdown", "custom/system-reboot", "custom/system-hibernate", "custom/system-sleep", "custom/system-lock", - "custom/sep", "power-profiles-daemon", - "custom/sep" + "idle_inhibitor" + /* Most-right */ ], "drawer": { "transition-duration": 500, @@ -152,170 +228,172 @@ } }, - "group/hardware": { + "group/workspaces": { "orientation": "inherit", "modules": [ - "custom/sep", - "memory", - "cpu", - "temperature" - ], - "drawer": { - "transition-duration": 500, - "transition-left-to-right": false, - "children-class": "drawer-child" - } + "hyprland/workspaces", + "sway/workspaces" + ] }, - "group/system": { - "orientation": "inherit", - "modules": [ - "idle_inhibitor", - "custom/light-dark-toggle", - "custom/night-light-toggle", - "custom/keyboard-switch", - "custom/toggle-notifications" - ], - "drawer": { - "transition-duration": 500, - "tansition-left-to-right": true, - "children-class": "drawer-child" + "hyprland/language": { + "format": "\uf11c", + "on-click": "hyprctl switchxkblayout at-translated-set-2-keyboard next && notify-send \"$(hyprctl devices -j | jq -r '.keyboards[] | select(.name == \"at-translated-set-2-keyboard\") | .active_keymap')\" --app-name 'waybar'", + "tooltip": true, + "tooltip-format": "Switch keyboard layouts", + "keyboard-name": "at-translated-set-2-keyboard" + }, + + "hyprland/workspaces": { + "all-outputs": false, + "disable-scroll": true, + "format": "{icon}{name}", + "format-icons": { + "default": "", + "urgent": "\uf071 " /*  */ } }, "idle_inhibitor": { "format": "{icon}", "format-icons": { - "activated": "\uf06e", - "deactivated": "\uf070" - }, + "activated": "\uf06e", /*  */ + "deactivated": "\uf070" /*  */ + }, "tooltip": false }, - "keyboard-state": { + "keyboard-state#capslock": { + "capslock": true, "format": { "capslock": "{icon}" }, "format-icons": { - "locked": "\uf023", + "locked": "\uf11c", /*  */ "unlocked": "" - }, - "numlock": false, - "capslock": true, - "scrollock": false + } }, - "memory": { - "format": "{}% \uf1c0", - "on-click": "kitty -e zenith" + "keyboard-state#numlock": { + "numlock": true, + "format": { + "numlock": "{icon}" + }, + "format-icons": { + "locked": "\uf1ec", /*  */ + "unlocked": "" + } }, "mpris": { - // "ignored-players": ["firefox"] "format": "{player_icon} {dynamic}", "format-paused": "{status_icon} {dynamic}", "tooltip-format": "{player} ({status}) {title} - {artist} - {album}", "player-icons": { - "default": "\uf51f", - "spotify": "\uf1bc", - "mpv": "🎵" + "default": "\uf8d9", /*  */ + "mpv": "\uf144", /*  */ + "spotify": "\uf1bc" /*  */ }, "status-icons": { - "paused": "⏸" + "paused": "\uf04c" /*  */ }, "dynamic-order": [ "title", "artist" ], - "dynamic-len": 40, + "dynamic-len": 40 }, "network": { - "format-disconnected": "\uf127", - "format-ethernet": "\uf6ff {ifname}: {ipadds}/{cidr}", - "format-wifi": "\uf1eb", + "format-disconnected": "\uf127", /*  */ + "format-ethernet": "\uf6ff", /*  */ + "format-linked": "\uf0c1", /*  */ + "format-wifi": "{icon}", "interval": 5, - "on-click-right": "kitty -e nmtui", + "tooltip": true, "tooltip-format": "{ifname}: {ipaddr}", "tooltip-format-disconnected": "Disconnected", - "tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ifname}: {ipaddr}" + "tooltip-format-wifi": "{essid} ({signalStrength}%)\n{ifname}: {ipaddr}", + "format-icons": [ + "\uf05e", /*  */ + "\uf1eb", /*  */ + "\uf1eb" /*  */ + ] + }, + + "power-profiles-daemon": { + "format": "{icon}", + "format-icons": { + "default": "\uf110", /*  */ + "performance": "\uf135", /*  */ + "balanced": "\uf24e", /*  */ + "power-saver": "\uf06c" /*  */ + }, + "tooltip": true, + "tooltip-format": "Profile: {profile}\nDriver: {driver}" + }, + + "privacy": { + "transition-duration": 250, + "icon-size": 16, + "modules": [ + { + "type": "screenshare", + "tooltip": true + }, + { + "type": "audio-in", + "tooltip": true + } + ] + }, + + "pulseaudio": { + "format": "{volume}% {icon}", + "format-headset": "{volume}% \uf58f", /*  */ + "format-muted": "\uf6a9", /*  */ + "format-icons": [ + "\uf026", /*  */ + "\uf027", /*  */ + "\uf028" /*  */ + ], + "scroll-step": 2.0, + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + }, + + "sway/language": { + "format": "{short}", + "on-click": "swaymsg input type:keyboard xkb_switch_layout next", + "tooltip": true, + "tooltip-format": "Switch keyboard layouts" }, "sway/window": { - "max-length": 85 + "format": "{title}", + "max-length": 20, + "tooltip": true, + "all-outputs": true, + "icon": false, + "icon-size": 18, + "rewrite": { + ".* - (.*)": "$1", + ".* — (.*)": "$1" + } }, "sway/workspaces": { "all-outputs": false, "disable-scroll": true, - "format": "{icon}{name}", + "format": "{icon}{name}", "format-icons": { - "default": "", // Prevent showing workspace name literal. - "urgent": "\uf071 " - }, - // "persistent_workspaces": { - // "0:¯\\_(ツ)_/¯": [] - // } - }, - - "power-profiles-daemon": { - "format": "{icon}", - "tooltip-format": "Power profile: {profile}\nDriver: {driver}", - "tooltip": true, - "format-icons": { - "default": "", - "performance": "", - "balanced": "", - "power-saver": "" + "default": "", + "urgent": "\uf071 " /*  */ } }, - "privacy": { - "icon-spacing": 4, - "icon-size": 18, - "transition-duration": 250, - "modules": [ - { - "type": "screenshare", - "tooltip": true, - "tooltip-icon-size": 18, - }, - { - "type": "audio-in", - "tooltip": true, - "tooltip-icon-size": 18, - }, - ], - }, - - "pulseaudio": { - "format": "{volume}% {icon}{format_source}", - "format-muted": "\uf6a9{format_source}", - "format-bluetooth": "{volume}% {icon}\uf294{format_source}", - "format-bluetooth-muted": "\uf6a9 {icon}\uf294{format_source}", - "format-source": " {volume}% \uf130", - "format-source-muted": "", - "format-icons": { - "headphone": "\uf58f", - "hands-free": "\uf590", - "headset": "\uf590", - "phone": "\uf3ce", - "portable": "\uf3ce", - "car": "\uf1b9", - "default": ["\uf026", "\uf027", "\uf028 "] - }, - "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", - "on-click-right": "pavucontrol", - "scroll-step": -2 - }, - - "temperature": { - "critical-threshold": 70, - "format": "{temperatureC}°C {icon}", - "format-icons": ["\uf2cb", "\uf2c9", "\uf2c7"] - }, - "tray": { + "icon-size": 16, + "show-passive-items": true, "spacing": 10 } } diff --git a/stow/waybar/.config/waybar/style-dark.css b/stow/waybar/.config/waybar/style-dark.css new file mode 100644 index 0000000..d99a2e8 --- /dev/null +++ b/stow/waybar/.config/waybar/style-dark.css @@ -0,0 +1,14 @@ +@import 'style.css'; + +* { + color: #C2C2C2; +} + +window#waybar { + background-color: #171717; +} + +window#waybar button.focused { + background-color: #C2C2C2; +} + diff --git a/stow/waybar/.config/waybar/style-light.css b/stow/waybar/.config/waybar/style-light.css new file mode 100644 index 0000000..a0bf37e --- /dev/null +++ b/stow/waybar/.config/waybar/style-light.css @@ -0,0 +1,14 @@ +@import 'style.css'; + +* { + color: #171717; +} + +window#waybar { + background-color: #C2C2C2; +} + +window#waybar button.focused { + background-color: #171717; +} + diff --git a/stow/waybar/.config/waybar/style.css b/stow/waybar/.config/waybar/style.css index f9fe080..11d3b20 100644 --- a/stow/waybar/.config/waybar/style.css +++ b/stow/waybar/.config/waybar/style.css @@ -1,165 +1,119 @@ -/* - * ~/.config/waybar/style.css - * - * `otf-font-awesome` is required to be installed for icons. - * - * Pick your stylesheet: - * - sharp.css - * - transparent.css - * - round.css - */ +/* * * * * * * * * * * * * * * * + * * + * ~/.config/waybar/style.css * + * * + * * * * * * * * * * * * * * * */ -@define-color transparent-black rgba(23, 23, 23, 0.9); -@define-color white #ecf0f1; -@define-color warning-red #eb4d4b; -@define-color accent #00897b; +@define-color background #C2C2C2; +@define-color foreground #171717; + +/* Pantone / PMS 18-1559 TCX / Red Alert */ +@define-color warning rgb(208, 52, 44); +/* Safety orange */ +@define-color safety rgb(255, 103, 0); + +* { + padding: 0 4px; +} window#waybar { + /* background: linear-gradient(90deg, #CECECE 0%, #D1D1D1 10%, #C9C9C9 50%, #BBBBBB 90%, #BABABA 100%); */ + font-family: letter, "Font Awesome 6 Free", font-awesome, monospace; font-size: 13px; - -webkit-font-smoothing: antialiased; - transition-property: background-color; - transition-duration: .5s; + font-weight: 600; } -#window, #workspaces { - margin: 0 5px; -} - -#workspaces button { - border: none; - border-radius: 0; - min-width: 30px; - padding: 0 5px; -} - -#workspaces button.focused { - background-color: transparent; - color: @white; -} - -#workspaces button:hover { - background-color: transparent; - color: @transparent-black; -} - -#workspaces button.urgent { - color: @white; - background-color: @warning-red; -} - -/* All modules individually. */ -#backlight, -#battery, -#bluetooth, -#clock, -#cpu, -#custom-browser, -#custom-light-dark-toggle, -#custom-night-light-toggle, -#custom-system-lock, #custom-system-sleep, #custom-system-hibernate, #custom-system-reboot, #custom-system-shutdown, -#custom-toggle-notifications, -#disk, -#group-hardware, -#group-system, -#idle_inhibitor, -#keyboard-state, -#memory, -#mode, -#mpd, -#mpris, -#network, -#power-profiles-daemon, -#privacy-item.audio-in, #privacy-item.audio-out, #privacy-item.screenshare, -#pulseaudio, -#temperature, -#tray { - padding: 0 5px; -} - -/* If workspaces is the leftmost module, omit left margin */ -.modules-left > widget:first-child > #workspaces { - margin-left: 0; -} - -/* If workspaces is the rightmost module, omit right margin */ -.modules-right > widget:last-child > #workspaces { +.modules-right, +.modules-right > widget:last-child { + padding-right: 0; margin-right: 0; } -@keyframes blink { - to { - background-color: #ffffff; - color: #000000; - } -} - -label:focus { - background-color: #000000; -} - -/* Module specific colours */ - -#battery.charging, #battery.plugged { - color: #ffffff; +#battery.charging { background-color: #26A65B; + color: #FFFFFF; } #battery.critical:not(.charging) { - background-color: #f53c3c; - color: #ffffff; + background-color: @warning; + color: #FFFFFF; animation-name: blink; animation-duration: 0.5s; - animation-timing-function: linear; + animation-timing-function: steps(12); + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#battery.plugged { + animation-name: blink; + animation-duration: 1.0s; + animation-timing-function: steps(12); animation-iteration-count: infinite; animation-direction: alternate; } #bluetooth.disabled, -#bluetooth.off, -#network.disconnected, -#pulseaudio.muted { +#bluetooth.off { opacity: 0.6; } -#mpris { - color: #2a5c45; - min-width: 100px; +#custom-toggle-tailscale.disconnected { + opacity: 0.6; +} + + +#mpris.Feishin { + background: linear-gradient(45deg, rgba(170,92,195,1) 100%, rgba(0,164,220,1) 0%); } #mpris.spotify { background-color: #66cc99; + color: #2a5c45; } #mpris.vlc { background-color: #ffa000; } -#temperature.critical { - background-color: #eb4d4b; +#network.disconnected { + opacity: 0.6; } -#custom_light-dark-toggle.activated, -#idle_inhibitor.activated { - background-color: #ecf0f1; - color: #2d3436; +#privacy, +#privacy-item, +#privacy-item.screenshare, +#privacy-item.audio-in { + background-color: @safety; +} + +#privacy-item.screenshare { + background-color: #000000; +} + +#pulseaudio.muted { + opacity: 0.6; +} + +#systemd-failed-units.degraded { + background-color: @warning; +} + +#temperature.critical { + background-color: @warning; +} + +#tray > .needs-attention { + -gtk-icon-effect: highlight; + background-color: @warning; } #tray > .passive { -gtk-icon-effect: dim; } -#tray > .needs-attention { - -gtk-icon-effect: highlight; - background-color: #eb4d4b; +#workspaces button.urgent { + background-color: @warning; + color: white; } -#privacy-item.audio-in, -#privacy-item.audio-out, -#privacy-item.screenshare { - background-color: #ffaa01; - color: #2d3436; -} - -@import "sharp.css"; - From a8ddc05ddd4fc98c7b32a5cabeab3b34ae4b5f4e Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:21:38 +0200 Subject: [PATCH 14/16] feat(gpg): Add config --- nixos/users/tdpeuter/dotfiles.nix | 24 ++++++++++++++------ stow/gnupg/.gnupg/gpg-agent.conf | 5 +++++ stow/gnupg/.gnupg/gpg.conf | 37 +++++++++++++++++++++++++++++++ stow/gnupg/.gnupg/scdaemon.conf | 7 ++++++ 4 files changed, 66 insertions(+), 7 deletions(-) create mode 100644 stow/gnupg/.gnupg/gpg-agent.conf create mode 100644 stow/gnupg/.gnupg/gpg.conf create mode 100644 stow/gnupg/.gnupg/scdaemon.conf diff --git a/nixos/users/tdpeuter/dotfiles.nix b/nixos/users/tdpeuter/dotfiles.nix index 8507bf0..8977c45 100644 --- a/nixos/users/tdpeuter/dotfiles.nix +++ b/nixos/users/tdpeuter/dotfiles.nix @@ -72,14 +72,15 @@ in { ".config/zellij" = { source = ../../../stow/zellij/.config/zellij; }; - ".oh-my-zsh" = { - enable = config.users.users.tdpeuter.shell == pkgs.zsh; - source = "${pkgs.oh-my-zsh}/share/oh-my-zsh"; + ".gnupg" = { + enable = false; + # inherit (config.programs.gnupg.agent) enable; # TODO Enable Me + source = ../../../stow/gnupg/.gnupg; recursive = true; - }; - ".oh-my-zsh/themes/tdpeuter.zsh-theme" = { - enable = config.users.users.tdpeuter.shell == pkgs.zsh; - source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme; +# onChange = '' +# chmod 700 /home/tdpeuter/.gnupg +# chmod 600 /home/tdpeuter/.gnupg/* +# ''; }; ".ssh/config" = lib.mkIf config.sisyphus.programs.ssh.enable { inherit (config.sisyphus.programs.ssh) enable; @@ -97,6 +98,15 @@ in { }; } (lib.mkIf (config.users.users.tdpeuter.shell == pkgs.zsh) { + ".oh-my-zsh" = { + enable = config.users.users.tdpeuter.shell == pkgs.zsh; + source = "${pkgs.oh-my-zsh}/share/oh-my-zsh"; + recursive = true; + }; + ".oh-my-zsh/themes/tdpeuter.zsh-theme" = { + enable = config.users.users.tdpeuter.shell == pkgs.zsh; + source = ../../../stow/zsh/.oh-my-zsh/themes/tdpeuter.zsh-theme; + }; ".zshrc" = { source = ../../../stow/zsh/.zshrc; }; diff --git a/stow/gnupg/.gnupg/gpg-agent.conf b/stow/gnupg/.gnupg/gpg-agent.conf new file mode 100644 index 0000000..a11a3bd --- /dev/null +++ b/stow/gnupg/.gnupg/gpg-agent.conf @@ -0,0 +1,5 @@ +enable-ssh-support +default-cache-ttl 60 +default-cache-ttl-ssh 60 +max-cache-ttl 120 +max-cache-ttl-ssh 120 diff --git a/stow/gnupg/.gnupg/gpg.conf b/stow/gnupg/.gnupg/gpg.conf new file mode 100644 index 0000000..bb37abf --- /dev/null +++ b/stow/gnupg/.gnupg/gpg.conf @@ -0,0 +1,37 @@ +# Use UTF-8 character encoding everywhere. +display-charset utf-8 +utf8-strings + +# When verifying a signature made from a subkey, require that the +# cross-certification "back signature" on the subkey is present and valid. +require-cross-certification + +# Method references +personal-cipher-preferences AES256 AES192 AES +personal-digest-preferences SHA512 SHA384 SHA256 +personal-compress-preferences ZLIB BZIP2 ZIP Uncompressed + +# New keys config +default-preference-list SHA512 SHA384 SHA256 AES256 AES192 AES ZLIB BZIP2 ZIP Uncompressed +cert-digest-algo SHA512 + +# Symmatric ops +s2k-digest-algo SHA512 +s2k-cipher-algo AES256 +# Disable cahcing of passphrase for symmatrical ops +no-symkey-cache + +# Don't leak comments or software version information +no-comments +no-emit-version + +# Display full fingerprints +keyid-format 0xlong +with-fingerprint + +# Other display preferences +list-options show-uid-validity +verify-options show-uid-validity + +# Enable smart card +use-agent diff --git a/stow/gnupg/.gnupg/scdaemon.conf b/stow/gnupg/.gnupg/scdaemon.conf new file mode 100644 index 0000000..9f0e146 --- /dev/null +++ b/stow/gnupg/.gnupg/scdaemon.conf @@ -0,0 +1,7 @@ +# Power down and ask PIN again after timout. +card-timeout 180 # 3 minutes + +# Fix repeatedly prompting for an already-inserted YubiKey. +# It works by disabling CCID-support, so it does not clash with pcsc. +disable-ccid + From 0fa44bc36786a25cbbde4fba9eb4e8579de354d2 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:22:11 +0200 Subject: [PATCH 15/16] chore(ssh): Add keys --- nixos/secrets/HomeLab.yaml | 6 ++++-- nixos/users/tdpeuter/secrets.nix | 1 + stow/ssh/.ssh/config | 6 ++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/nixos/secrets/HomeLab.yaml b/nixos/secrets/HomeLab.yaml index 9678afb..f749611 100644 --- a/nixos/secrets/HomeLab.yaml +++ b/nixos/secrets/HomeLab.yaml @@ -1,4 +1,6 @@ HomeLab: + Gitea: + ssh: ENC[AES256_GCM,data:+H9qhfOg5WlTB7pihvbJ9omY/zLTAADe8KzI4fbdZ7NuaM0auC95AIQqhwNNCZNglg9UGOVL662pY7dNhbQ/2iCLPHSPgFFXf3fx1moRRcYYQzoJxsgxp19FZQeGNJ0qfRf72xYbZQZKslyHQmcqDieoVTyhaLqTfgC8MQ/UZofw/ortmgME7z51rGV5sXXMjxpJpHz9JxiPwQEL0ABWDAeCqBVBzlqqwdmfKEdkcR4l3USHfH1iNF5XQ5V26I+UGDOyoixt1c/BXzD9xzKI7MUDoRz+qfC6C62LIlEgqZY5tWg+tVZnqobakxwH6d8pXtQ7vaIREEP0LqQMkrNcK8X+cDRteToQ1fcxtN1V+JfZSa9pVC+iGgvmSZ00q4bnOgTmgO9IZ80TvOR4bHpRhjM5l4JMbLBv2jqY1zeUx/5L3WNuYIm9sL5mWXkV/RAD8WCemNSWdKbGsvByEUeiFcxczL/vQ6y3fi+ntmXUgeXVy5zVNkNlYbqd+DemBmwZQb9D1T5T97i2ChciYb3/ON1NObja/bt0PTQa,iv:hIbwsPcDSfgDItlvFFy0vCjuQWvgoQHBH60v8nTVTNg=,tag:1T/TdTEy98TfgMzYAxfHKA==,type:str] Hugo: ssh: ENC[AES256_GCM,data:Tfuba25e4hJ8Ovl1IdVtDvg0L0sCc9sYTXstRg89IAUzwv/1u8mxdj9ka6ZKaSQr2QUaNWs0BoPV36O4bI2hTwoqhUarhXXZNnJKHtd8xBu/+kfMSOMGa5qD9V9m3L5OFdt+gdwhJxemeQNkvN0Vhsu4DJFPZRPmGflJ2HVRYaRW4AsI+JPqiWSEeKz40f3PQPJ2h26gF+pADmPwtEfcUGZdGnJXUsiYMC0aBEWWxyAgBgj5W+Nbe+OCopEX1qyRcR8qO+LONjuC0b5hcGeOXjWj/d1FnBfxDHeoxRGhNCo8TUk0ap1mpSAttdr55/C51duQfeV09Iow4nzUR2H0jmzojUAjKXXCkBsK6yjIKxW+4+4OKCC9ERz5mDmu5Z+4aFM7CpSquCAnDVFw1Uq9MJqAnSz6AGh29J4LUwMnVNtf+gQwzGyl/C9wE/Svm0UAwP19h6hLcM1rp6bV4xjfSXNDspUkz4Xr3RdPpTI1PemtMZIq8fP64q0FlFZeV62ctl9hCtDVRDo3fG3FUM08fa0OfJpVYjSEAOfC,iv:T8z+P5++cES9Co9d/2tcU0PbxZZM/5x63tcxIjBeQ0I=,tag:AjsulFme64/xEPjgZQFtow==,type:str] Nextcloud: @@ -18,8 +20,8 @@ sops: aDNUbFlhWWVoOWpjVlV1VTVJejlSMjQK6wCeCRdHY5oyTX6/R1U5AOGJyp0exi1A dWPUMfkKBBBkrR+G6ougd8o3FwFf+yfb5RhaTxxqjit6p2RyMjR64w== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-10-19T12:24:34Z" - mac: ENC[AES256_GCM,data:Bh/vHdsFCzk+YaRcZe/Eiq4xfLSDX1tSV4Jg8lFgzPqXCBwCgohDREZ8LSZPuQtStIugzyRNyPcnWrZcDwDiaS9klM5sIxjeGIF7ZDS81sQnQVNRyX/m9vl6AgVtP9KHgOpJwGObzuvNBE7XnOZ3q03/ah1LXRowJUn63wB4Qxk=,iv:GVLQUjm0bMHusD0F8gJ5DlZvqdDHPsT0VwxLhHh9ozE=,tag:cffv8wKTQ9UYrCPx+3zTMw==,type:str] + lastmodified: "2024-10-20T07:58:57Z" + mac: ENC[AES256_GCM,data:mmFgjE7rp7fXmPOnETGamHR3kUAguFCNNTQcEnD+uM4xeSp3QcB2g8tkKYaJAjkWWqKRSm9/Iu1NWOr9GWyu4O1h7ppWSvpKawWki6cHpqBl8JOwbx/SZi5bzU1lBtoJyT6hD1aCu9ENOMUkpPY3rKcYwbsRMJpKYsbXymPikcQ=,iv:kPB6ds8c4yc/w7Ny1d3DTyztQF4yTr0NyKgIHEzIKAg=,tag:VTpXRb5HaWDjVB52K7mByw==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.8.1 diff --git a/nixos/users/tdpeuter/secrets.nix b/nixos/users/tdpeuter/secrets.nix index b6ad403..e164183 100644 --- a/nixos/users/tdpeuter/secrets.nix +++ b/nixos/users/tdpeuter/secrets.nix @@ -33,6 +33,7 @@ in { "UGent/SubGit/ssh" = UGent; # HomeLab + "HomeLab/Gitea/ssh" = HomeLab; "HomeLab/Hugo/ssh" = HomeLab; "HomeLab/Nextcloud/ssh" = HomeLab; }); diff --git a/stow/ssh/.ssh/config b/stow/ssh/.ssh/config index aec70b1..aacb461 100644 --- a/stow/ssh/.ssh/config +++ b/stow/ssh/.ssh/config @@ -37,6 +37,12 @@ Host subgit.ugent.be CanonicalizeHostname yes # Ignore capitalization # HomeLab +Host Gitea + User admin + HostName 192.168.0.24 + IdentitiesOnly yes + IdentityFile /run/secrets/HomeLab/Gitea/ssh + Host Hugo User admin HostName 192.168.0.11 From b819c45b4cdbc8dd5f26bf70df32fdf7f3a67c0c Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Tue, 16 Sep 2025 21:25:01 +0200 Subject: [PATCH 16/16] chore: Update --- nixos/flake.lock | 165 ++++++++++------------------ nixos/hosts/Tibo-NixFat/default.nix | 7 +- nixos/users/tdpeuter/dotfiles.nix | 2 +- 3 files changed, 63 insertions(+), 111 deletions(-) diff --git a/nixos/flake.lock b/nixos/flake.lock index 91147eb..38320cc 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1,54 +1,15 @@ { "nodes": { - "devshell": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713532798, - "narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=", - "owner": "numtide", - "repo": "devshell", - "rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -64,16 +25,16 @@ ] }, "locked": { - "lastModified": 1716736833, - "narHash": "sha256-rNObca6dm7Qs524O4st8VJH6pZ/Xe1gxl+Rx6mcWYo0=", + "lastModified": 1747688870, + "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=", "owner": "nix-community", "repo": "home-manager", - "rev": "a631666f5ec18271e86a5cde998cba68c33d9ac6", + "rev": "d5f1f641b289553927b3801580598d200a501863", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } @@ -86,11 +47,11 @@ ] }, "locked": { - "lastModified": 1701208414, - "narHash": "sha256-xrQ0FyhwTZK6BwKhahIkUVZhMNk21IEI1nUcWSONtpo=", + "lastModified": 1720066371, + "narHash": "sha256-uPlLYH2S0ACj0IcgaK9Lsf4spmJoGejR9DotXiXSBZQ=", "owner": "nix-community", "repo": "nix-github-actions", - "rev": "93e39cc1a087d65bcf7a132e75a650c44dd2b734", + "rev": "622f829f5fe69310a866c8a6cd07e747c44ef820", "type": "github" }, "original": { @@ -101,42 +62,26 @@ }, "nixpkgs": { "locked": { - "lastModified": 1717144377, - "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", + "lastModified": 1751274312, + "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "805a384895c696f802a9bf5bf4720f37385df547", + "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.05", + "ref": "nixos-24.11", "type": "indirect" } }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1717265169, - "narHash": "sha256-IITcGd6xpNoyq9SZBigCkv4+qMHSqot0RDPR4xsZ2CA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3b1b4895b2c5f9f5544d02132896aeb9ceea77bc", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "release-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-unstable": { "locked": { - "lastModified": 1716948383, - "narHash": "sha256-SzDKxseEcHR5KzPXLwsemyTR/kaM9whxeiJohbL04rs=", + "lastModified": 1757745802, + "narHash": "sha256-hLEO2TPj55KcUFUU1vgtHE9UEIOjRcH/4QbmfHNF820=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ad57eef4ef0659193044870c731987a6df5cf56b", + "rev": "c23193b943c6c689d70ee98ce3128239ed9e32d1", "type": "github" }, "original": { @@ -155,15 +100,15 @@ "nixpkgs" ], "poetry2nix": "poetry2nix", - "systems": "systems_3", + "systems": "systems_2", "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1701455376, - "narHash": "sha256-FMLrMdi6JY7ZfqV5XnNj64jnDcGKznKZLn7O6OMO3u0=", + "lastModified": 1724283233, + "narHash": "sha256-XMPn6YHwFOJCGLE9M5F3AEFKA0u+maf8CpIEWmvaQTQ=", "owner": "ThinkChaos", "repo": "openconnect-sso", - "rev": "20c0015c4264c72cc19ac272de0dc534309bd21b", + "rev": "94f1ddfef1662d56ede0a093bcfc3d23156bc1a1", "type": "github" }, "original": { @@ -197,11 +142,11 @@ ] }, "locked": { - "lastModified": 1701105783, - "narHash": "sha256-5IOI0xXGbhAkUZNNcPId48V78Q+/JlW0hzlif0zxRmM=", + "lastModified": 1721039874, + "narHash": "sha256-XANsG9GYHip8pxZpbqKf/YGv8tIa0xTh289Y+WNBNfw=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "0b2bff39e9bd4e6db3208e09c276ca83a063b370", + "rev": "d11c01e58587e5f21037ed6477465a7f26a32e27", "type": "github" }, "original": { @@ -212,29 +157,28 @@ }, "root": { "inputs": { - "devshell": "devshell", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "home-manager": "home-manager", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable", "openconnect-sso": "openconnect-sso", "sops-nix": "sops-nix", - "utils": "utils" + "utils": "utils", + "zen-browser": "zen-browser" } }, "sops-nix": { "inputs": { "nixpkgs": [ "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" + ] }, "locked": { - "lastModified": 1717297459, - "narHash": "sha256-cZC2f68w5UrJ1f+2NWGV9Gx0dEYmxwomWN2B0lx0QRA=", + "lastModified": 1758007585, + "narHash": "sha256-HYnwlbY6RE5xVd5rh0bYw77pnD8lOgbT4mlrfjgNZ0c=", "owner": "Mic92", "repo": "sops-nix", - "rev": "ab2a43b0d21d1d37d4d5726a892f714eaeb4b075", + "rev": "f77d4cfa075c3de66fc9976b80e0c4fc69e2c139", "type": "github" }, "original": { @@ -273,21 +217,6 @@ "type": "github" } }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "treefmt-nix": { "inputs": { "nixpkgs": [ @@ -296,11 +225,11 @@ ] }, "locked": { - "lastModified": 1699786194, - "narHash": "sha256-3h3EH1FXQkIeAuzaWB+nK0XK54uSD46pp+dMD3gAcB4=", + "lastModified": 1721769617, + "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "e82f32aa7f06bbbd56d7b12186d555223dc399d1", + "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009", "type": "github" }, "original": { @@ -316,11 +245,11 @@ ] }, "locked": { - "lastModified": 1715533576, - "narHash": "sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH+XtK09jQWihk=", + "lastModified": 1738591040, + "narHash": "sha256-4WNeriUToshQ/L5J+dTSWC5OJIwT39SEP7V7oylndi8=", "owner": "gytis-ivaskevicius", "repo": "flake-utils-plus", - "rev": "3542fe9126dc492e53ddd252bb0260fe035f2c0f", + "rev": "afcb15b845e74ac5e998358709b2b5fe42a948d1", "type": "github" }, "original": { @@ -328,6 +257,26 @@ "repo": "flake-utils-plus", "type": "github" } + }, + "zen-browser": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1757304371, + "narHash": "sha256-EZ3Vwgh5xgXuiPUmr9e1a9dEu3hvEWhRurAKpsAwB2A=", + "owner": "youwen5", + "repo": "zen-browser-flake", + "rev": "3968348af022fe88468ef8de4f9683076e2e5e4b", + "type": "github" + }, + "original": { + "owner": "youwen5", + "repo": "zen-browser-flake", + "type": "github" + } } }, "root": "root", diff --git a/nixos/hosts/Tibo-NixFat/default.nix b/nixos/hosts/Tibo-NixFat/default.nix index 0d2fcd6..2e790c3 100644 --- a/nixos/hosts/Tibo-NixFat/default.nix +++ b/nixos/hosts/Tibo-NixFat/default.nix @@ -6,7 +6,10 @@ ]; sisyphus = { - desktop.sway.enable = true; + desktop = { + sway.enable = true; + hyprland.enable = true; + }; hardware = { eid.enable = true; @@ -115,7 +118,7 @@ thermald.enable = true; }; - system.stateVersion = "24.11"; + system.stateVersion = "24.05"; systemd.coredump.enable = false; diff --git a/nixos/users/tdpeuter/dotfiles.nix b/nixos/users/tdpeuter/dotfiles.nix index 8977c45..7c0f06e 100644 --- a/nixos/users/tdpeuter/dotfiles.nix +++ b/nixos/users/tdpeuter/dotfiles.nix @@ -66,7 +66,7 @@ in { source = ../../../stow/vifm/.config/vifm; }; ".config/waybar" = { - inherit (config.sisyphus.desktop.sway) enable; + enable = config.sisyphus.desktop.sway.enable || config.sisyphus.desktop.hyprland.enable; source = ../../../stow/waybar/.config/waybar; }; ".config/zellij" = {