From 81335eecc3f862a8174926ed098cc11b2bb31f64 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 21:13:03 +0200 Subject: [PATCH 01/46] hyprland: dropped dwindle:pseudotile as it didn't exist anymore --- modules/home-manager/hyprland.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index 4e08037..e35b0f2 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -246,7 +246,6 @@ in { # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ dwindle = { - pseudotile = true; preserve_split = true; }; scrolling = { From 565f941aad483bac7a5d1c708f548971404a40a1 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 21:18:54 +0200 Subject: [PATCH 02/46] cliphist: clear at power up --- modules/home-manager/hyprland.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index e35b0f2..a8bccd4 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -206,8 +206,10 @@ in { "blueman-applet" # systray app for Bluetooth "udiskie --no-automount --smart-tray" # front-end that allows to manage removable media "nm-applet --indicator" # systray app for Network/wifi - "wl-paste --type text --watch cliphist store" # clipboard store text data - "wl-paste --type image --watch cliphist store" # clipboard store image data + #setups clipboard + "rm -rf ~/.cache/cliphist/ && wl-paste --type text --watch cliphist store & wl-paste --type image --watch cliphist store" + #"wl-paste --type text --watch cliphist store" # clipboard store text data + #"wl-paste --type image --watch cliphist store" # clipboard store image data "custom-batterynotify" "custom-batterywarning" "birdtray" # thunderbird tray app From fa3e510e3cbc7d26151a2e1b752f1c37fa770cd5 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 21:56:54 +0200 Subject: [PATCH 03/46] kdrive: add warning if it failed --- hosts/laptop/configuration.nix | 1 + hosts/laptop/home.nix | 2 ++ modules/home-manager/rclone.nix | 5 ++--- modules/home-manager/result | 2 +- modules/scripts/checkKdrive.nix | 33 +++++++++++++++++++++++++++++++++ 5 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 modules/scripts/checkKdrive.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index baa3f6b..3d6fdb0 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -105,6 +105,7 @@ source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server"; }; + # Enable the GNOME Desktop Environment. # services.displayManager.gdm.enable = true; # services.desktopManager.gnome.enable = true; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 2b5d28e..7fcc449 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -85,6 +85,8 @@ (pkgs.callPackage ../../modules/scripts/man.nix {}) (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french + (pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) + (pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) #pkgs pkgs.gruvbox-gtk-theme diff --git a/modules/home-manager/rclone.nix b/modules/home-manager/rclone.nix index ddb235c..18ca66b 100644 --- a/modules/home-manager/rclone.nix +++ b/modules/home-manager/rclone.nix @@ -1,10 +1,9 @@ { - config, - pkgs, - agenix, + pkgs-unstable, ... }: { programs.rclone = { enable = true; + package = pkgs-unstable.rclone; }; } diff --git a/modules/home-manager/result b/modules/home-manager/result index 7b4d62c..e4b0b2a 120000 --- a/modules/home-manager/result +++ b/modules/home-manager/result @@ -1 +1 @@ -/nix/store/c0iwr0v7bjfka094wv6hd1hjmrkx9hm9-options.json \ No newline at end of file +/nix/store/54sf8q14ygh45qvr20w46b9qcyvdc5ld-options.json \ No newline at end of file diff --git a/modules/scripts/checkKdrive.nix b/modules/scripts/checkKdrive.nix new file mode 100644 index 0000000..7c42dc6 --- /dev/null +++ b/modules/scripts/checkKdrive.nix @@ -0,0 +1,33 @@ +{ + writeShellApplication, + rclone, + matrix-commander-rs, + libnotify, + ... +}: +writeShellApplication { + name = "custom-checkKdrive"; + runtimeInputs = [ + rclone + matrix-commander-rs + libnotify + ]; + text = '' +set +e + +output=$(rclone ls kdrive: 2>&1) +status=$? + +set -e + +if [ $status -eq 0 ]; then + echo "kdrive OK" +else + echo "kdrive rclone failed with error: $output" + notify-send "rclone kdrive failed" "$output" + matrix-commander-rs --verbose -m "rclone kdrive failed.
Error:
$output

@notificationbot_0000" \ + --html \ + -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" +fi + ''; +} From a0c6f62d34d55dd89f8485908777fd22cb73df24 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 22:00:52 +0200 Subject: [PATCH 04/46] gitnotify: add matrix message notification --- modules/home-manager/hyprland.nix | 2 +- modules/scripts/gitnotify.nix | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index a8bccd4..e6a586d 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -217,7 +217,7 @@ in { "swww img ${wallpaper}" "swww-daemon" "sleep 1 && custom-wallpaper" - "custom-mountkdrive" + "custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it #"waybar" "custom-gitnotify" "custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff diff --git a/modules/scripts/gitnotify.nix b/modules/scripts/gitnotify.nix index e54ef5b..5decd7a 100644 --- a/modules/scripts/gitnotify.nix +++ b/modules/scripts/gitnotify.nix @@ -23,6 +23,9 @@ writeShellApplication { notify-send \ "Git not configured" \ "Set your identity\n or remove this warning by removing the custom-gitnotify line in\n ~/nixos/modules/home-manager/hyprland.nix" + matrix-commander-rs --verbose -m "Git not configured.
Set your identify or remove this warning by removing the custom-gitnotify in ~/nixos/modules/home-manager/hyprland.nix
@notificationbot_0000" \ + --html \ + -r "\!7j-78_02dHROeLj4Ns8F12eo4IiZGv4zNsQ_1-WlyIU" fi ''; } From 5a150349e09f511d69e6ba09ae62244078f5d370 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 22:30:36 +0200 Subject: [PATCH 05/46] used rclone lsd instead of rclone ls -> performance --- modules/scripts/checkKdrive.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/scripts/checkKdrive.nix b/modules/scripts/checkKdrive.nix index 7c42dc6..a7160a0 100644 --- a/modules/scripts/checkKdrive.nix +++ b/modules/scripts/checkKdrive.nix @@ -15,7 +15,7 @@ writeShellApplication { text = '' set +e -output=$(rclone ls kdrive: 2>&1) +output=$(rclone lsd kdrive: 2>&1) status=$? set -e From 142bfa8ff9c1845eb5044eb7dd755e5918f70de2 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Fri, 15 May 2026 23:21:00 +0200 Subject: [PATCH 06/46] rclone: fixed bug. How? I don't know. It might be the sleep 5 --- hosts/laptop/configuration.nix | 7 ++++++- modules/home-manager/hyprland.nix | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 3d6fdb0..139a5d6 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -97,6 +97,11 @@ # zsh dont want to work if it is not initialzed here. programs.zsh.enable = true; + # removes rclone error + programs.fuse.userAllowOther = true; + programs.fuse.enable = true; + + security.wrappers.gsr-kms-server = { # to remove the password prompt when using gpu-screen-recorder owner = "root"; @@ -160,7 +165,7 @@ users.users.tomasr = { isNormalUser = true; description = "Tomas Rivera"; - extraGroups = ["networkmanager" "wheel"]; #wheel allow to use sudo + extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone shell = pkgs.zsh; }; diff --git a/modules/home-manager/hyprland.nix b/modules/home-manager/hyprland.nix index e6a586d..9a92b51 100644 --- a/modules/home-manager/hyprland.nix +++ b/modules/home-manager/hyprland.nix @@ -217,7 +217,7 @@ in { "swww img ${wallpaper}" "swww-daemon" "sleep 1 && custom-wallpaper" - "custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it + "sleep 5 && custom-checkKdrive && custom-mountkdrive" # checks if the remote works and mount it #"waybar" "custom-gitnotify" "custom-checkMatrix" # checks if matrix-commander-rs is connected which is important for other stuff From 5657738583b367f33bf78404866c263c502fdb46 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 08:47:05 +0200 Subject: [PATCH 07/46] zsh: reworked alias snrt and snrs --- hostsModules/laptop/home-manager/zsh.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hostsModules/laptop/home-manager/zsh.nix b/hostsModules/laptop/home-manager/zsh.nix index 7ff0679..cc383e7 100644 --- a/hostsModules/laptop/home-manager/zsh.nix +++ b/hostsModules/laptop/home-manager/zsh.nix @@ -5,8 +5,8 @@ }: { programs.zsh = { shellAliases = { - snrt = "git add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop"; - snrs = "git add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop"; + snrt = "git -C ~/nixos add -A && time sudo nixos-rebuild test --flake ~/nixos/#laptop"; + snrs = "git -C ~/nixos add -A && time sudo nixos-rebuild switch --flake ~/nixos/#laptop"; }; }; } From 2225c3ec2bd6216cf8a195353c43f5e3e3a03b84 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 08:53:19 +0200 Subject: [PATCH 08/46] removed unused file --- modules/nixos/autoUpdate.nix | 62 ------------------------------------ 1 file changed, 62 deletions(-) delete mode 100644 modules/nixos/autoUpdate.nix diff --git a/modules/nixos/autoUpdate.nix b/modules/nixos/autoUpdate.nix deleted file mode 100644 index 30f743f..0000000 --- a/modules/nixos/autoUpdate.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ pkgs, ... }: - -{ - # Ensure your script is available system-wide - environment.systemPackages = [ - (pkgs.callPackage ./custom-autoupdate.nix {}) - ]; - - # ---------------------------- - # 🔥 Enable lingering for user services (IMPORTANT) - # ---------------------------- - users.users.tomasr = { - isNormalUser = true; - - # other config... - - linger = true; # <-- declarative equivalent of `loginctl enable-linger` - }; - - # ---------------------------- - # ✅ 2. Systemd USER service - # ---------------------------- - systemd.user.services.custom-autoupdate = { - description = "NixOS flake auto update"; - - serviceConfig = { - Type = "oneshot"; - - ExecStart = "/run/current-system/sw/bin/custom-autoupdate"; - - # safety for long rebuilds - TimeoutStartSec = "45min"; - TimeoutStopSec = "10min"; - - # avoid overlap - RemainAfterExit = true; - - # 🔥 recommended reliability tweaks - Nice = 10; - IOSchedulingClass = "best-effort"; - IOSchedulingPriority = 7; - }; - }; - - # ---------------------------- - # ⏱️ 3. Systemd USER timer - # ---------------------------- - systemd.user.timers.custom-autoupdate = { - wantedBy = [ "timers.target" ]; - - timerConfig = { - OnBootSec = "10min"; # run after boot - OnUnitActiveSec = "6h"; # every 6 hours - - # 🔥 ensures missed runs after shutdown happen - Persistent = true; - - # avoids thundering herd on boot - RandomizedDelaySec = "30min"; - }; - }; -} From ab9714a2f7d4e9fc26319bedeb17c263c2106dc5 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 08:57:11 +0200 Subject: [PATCH 09/46] bootloader: separated into new file --- hosts/laptop/configuration.nix | 10 ++-------- hostsModules/laptop/nixos/bootloader.nix | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 hostsModules/laptop/nixos/bootloader.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 139a5d6..987b27b 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -24,6 +24,7 @@ ../../hostsModules/laptop/nixos/ollama.nix # llm config ../../modules/nixos/mullvad.nix # vpn config ../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs + ../../hostsModules/laptop/nixos/bootloader.nix ]; @@ -35,11 +36,6 @@ qt.enable = true; - # grub theme - boot.loader.grub = { - theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme - }; - nix.nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" "home-manager=${inputs.home-manager.outPath}" @@ -71,9 +67,7 @@ }; # removes uxterm services.xserver.excludePackages = [pkgs.xterm]; - # Bootloader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + #networking.Name = "nixos"; # Define your hostname. #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. diff --git a/hostsModules/laptop/nixos/bootloader.nix b/hostsModules/laptop/nixos/bootloader.nix new file mode 100644 index 0000000..f58aaf2 --- /dev/null +++ b/hostsModules/laptop/nixos/bootloader.nix @@ -0,0 +1,15 @@ +{ + inputs, + pkgs, + ... +}: +{ + # grub theme + boot.loader.grub = { + theme = inputs.nixos-grub-themes.packages.${pkgs.system}.nixos; # if you want to use nixos grub theme + }; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; +} From a6f2973194be5551eb957665ff6aa89d5cb726ae Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:03:40 +0200 Subject: [PATCH 10/46] networking: separated into new file --- hosts/laptop/configuration.nix | 26 +------------------- hostsModules/laptop/nixos/networking.nix | 30 ++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 25 deletions(-) create mode 100644 hostsModules/laptop/nixos/networking.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 987b27b..e7d5c08 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -25,6 +25,7 @@ ../../modules/nixos/mullvad.nix # vpn config ../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs ../../hostsModules/laptop/nixos/bootloader.nix + ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. ]; @@ -68,17 +69,6 @@ # removes uxterm services.xserver.excludePackages = [pkgs.xterm]; - - #networking.Name = "nixos"; # Define your hostname. - #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # Configure network proxy if necessary - #networking.proxy.default = "http://user:password@proxy:port/"; - #networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Enable networking - networking.networkmanager.enable = true; - # Set your time zone. time.timeZone = "Europe/Zurich"; @@ -197,7 +187,6 @@ kdePackages.okular kdePackages.dolphin gnome-font-viewer - wget #tree # shows dir in tree # we use eza now zsh # better bash brightnessctl # control brightness @@ -205,7 +194,6 @@ playerctl # controls media player blueman # GTK-based Bluetooth Manager udiskie # removable disk automounter for udisks - networkmanagerapplet # NetworkManager control applet cliphist # Wayland clipboard manager wl-clipboard # cli copy/past utilities for Wayland jp # lightweight and flexible cli JSON parser @@ -220,7 +208,6 @@ gruvbox-gtk-theme hyprpicker powertop - inetutils # collections of network programs such as telnet python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) fzf jq # json parser used in some scripts @@ -311,17 +298,6 @@ # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager programs.dconf.enable = true; - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - networking.firewall.enable = false; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hostsModules/laptop/nixos/networking.nix b/hostsModules/laptop/nixos/networking.nix new file mode 100644 index 0000000..427c276 --- /dev/null +++ b/hostsModules/laptop/nixos/networking.nix @@ -0,0 +1,30 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + wget + networkmanagerapplet # NetworkManager control applet + inetutils # collections of network programs such as telnet + +]; + #networking.Name = "nixos"; # Define your hostname. + #networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + #networking.proxy.default = "http://user:password@proxy:port/"; + #networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = false; +} From 1ceed7d7d2c572450a697e830d5b538177143f79 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:06:34 +0200 Subject: [PATCH 11/46] bluetooth: separated into new file --- hosts/laptop/configuration.nix | 4 +--- modules/nixos/bluetooth.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 modules/nixos/bluetooth.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index e7d5c08..521c8a7 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -26,6 +26,7 @@ ../../hostsModules/laptop/nixos/autoUpdate.nix # auto update the flakes. Handles notification via libnotify and matrix-commander-rs ../../hostsModules/laptop/nixos/bootloader.nix ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. + ../../modules/nixos/bluetooth.nix ]; @@ -33,8 +34,6 @@ documentation.man.generateCaches = true; # used for the man script - hardware.bluetooth.enable = true; - qt.enable = true; nix.nixPath = [ @@ -192,7 +191,6 @@ brightnessctl # control brightness pulseaudio # sound server playerctl # controls media player - blueman # GTK-based Bluetooth Manager udiskie # removable disk automounter for udisks cliphist # Wayland clipboard manager wl-clipboard # cli copy/past utilities for Wayland diff --git a/modules/nixos/bluetooth.nix b/modules/nixos/bluetooth.nix new file mode 100644 index 0000000..9892a08 --- /dev/null +++ b/modules/nixos/bluetooth.nix @@ -0,0 +1,10 @@ +{ + pkgs, + ... +}: +{ + hardware.bluetooth.enable = true; + environment.systemPackages = with pkgs; [ + blueman # GTK-based Bluetooth Manager + ]; +} From 30a42af639af75f1075ca576efa8bb33e11e30b7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:12:47 +0200 Subject: [PATCH 12/46] nixUtils: migrated multiple packages to separate file --- hosts/laptop/configuration.nix | 15 --------------- modules/nixos/nixUtils.nix | 24 ++++++++++++++++++++---- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 521c8a7..1d4e95e 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -36,11 +36,6 @@ qt.enable = true; - nix.nixPath = [ - "nixpkgs=${inputs.nixpkgs.outPath}" - "home-manager=${inputs.home-manager.outPath}" - ]; #manix is unhappy without this - home-manager = { useGlobalPkgs = true; useUserPackages = true; @@ -166,8 +161,6 @@ ]; - #adds nixos experimental features: - nix.settings.experimental-features = ["nix-command" "flakes"]; @@ -243,10 +236,6 @@ raylib glfw # raylib and some dependecies rembg # background remover - #some nix tools - manix - deadnix - alejandra cling # c interpreter used for coding mprisence gif-for-cli @@ -258,7 +247,6 @@ ltex-ls-plus pylint black - nixd # for caelestia kdePackages.qtdeclarative # provides qmlls and other things quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" @@ -271,9 +259,6 @@ # this is more up to date #(callPackage ../../modules/packages/vivify.nix {}) #(callPackage ../../modules/packages/sbb-tui.nix {}) - pkgs-unstable.nixpkgs-review - pkgs-unstable.nixfmt-tree - pkgs-unstable.treefmt pkgs-unstable.tor-browser pkgs-unstable.bitwarden-desktop ]; diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index a6e263d..38a4b3f 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -1,12 +1,9 @@ { - config, - pkgs, pkgs-unstable, - libs, inputs, ... }: { -# Garbage collector of generations + # Garbage collector of generations nix.gc = { automatic = true; dates = "weekly"; @@ -15,4 +12,23 @@ # nixpkgs-review crashed my laptop multiple times. nix.settings.max-jobs = 2; nix.settings.cores = 2; + + #manix is unhappy without this + nix.nixPath = [ + "nixpkgs=${inputs.nixpkgs.outPath}" + "home-manager=${inputs.home-manager.outPath}" + ]; + + #adds nixos experimental features: + nix.settings.experimental-features = ["nix-command" "flakes"]; + + environment.systemPackages = with pkgs-unstable; [ + nixpkgs-review + nixfmt-tree + treefmt + nixd + manix + deadnix + alejandra + ]; } From 5aab8307d04c6d8b083d7eab04fbf2210c6f0a10 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:20:06 +0200 Subject: [PATCH 13/46] audio/media: separated into new file --- hosts/laptop/configuration.nix | 32 +-------------------------- modules/nixos/audioAndMedia.nix | 38 +++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 31 deletions(-) create mode 100644 modules/nixos/audioAndMedia.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 1d4e95e..89f1782 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -27,6 +27,7 @@ ../../hostsModules/laptop/nixos/bootloader.nix ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. ../../modules/nixos/bluetooth.nix + ../../modules/nixos/audioAndMedia.nix ]; @@ -119,23 +120,6 @@ # Configure console keymap console.keyMap = "fr_CH"; - - # Enable sound with pipewire. - services.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - # If you want to use JACK applications, uncomment this - #jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -176,14 +160,10 @@ snapshot gnome-characters gnome-disk-utility - kdePackages.okular - kdePackages.dolphin gnome-font-viewer #tree # shows dir in tree # we use eza now zsh # better bash brightnessctl # control brightness - pulseaudio # sound server - playerctl # controls media player udiskie # removable disk automounter for udisks cliphist # Wayland clipboard manager wl-clipboard # cli copy/past utilities for Wayland @@ -205,23 +185,18 @@ bottom # Cross-platform graphical process/system monitor with a customizable interface cmatrix tomato-c # pomodoro timer - pavucontrol # PulseAudio Volume Control #hyprshot xdg-utils mailcap pkgs-unstable.vimPluginsUpdater # used for building plugins hyprcursor vial # Open-source GUI and QMK fork for configuring your keyboard in real time - mplayer # Movie player that supports many video formats chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID. capitaine-cursors-themed # cursor theme usbutils # used for lsusb # used for the framework 16 laptop framework-tool framework-tool-tui - krita # image edition - yt-dlp # some youtube downloader - vlc (pkgs-unstable.python314.withPackages (ps: with ps; [ matplotlib @@ -235,10 +210,7 @@ gdb raylib glfw # raylib and some dependecies - rembg # background remover cling # c interpreter used for coding - mprisence - gif-for-cli # lsp texlab clang-tools @@ -250,11 +222,9 @@ # for caelestia kdePackages.qtdeclarative # provides qmlls and other things quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" - gpu-screen-recorder fuzzel papirus-icon-theme papirus-folders - inkscape birdtray # thunderbird tray app # this is more up to date #(callPackage ../../modules/packages/vivify.nix {}) diff --git a/modules/nixos/audioAndMedia.nix b/modules/nixos/audioAndMedia.nix new file mode 100644 index 0000000..f363e8b --- /dev/null +++ b/modules/nixos/audioAndMedia.nix @@ -0,0 +1,38 @@ +{ + pkgs, + pkgs-unstable, + ... +}: +{ + # Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + # If you want to use JACK applications, uncomment this + #jack.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + #media-session.enable = true; + }; + environment.systemPackages = with pkgs; [ + kdePackages.okular + kdePackages.dolphin + pulseaudio # sound server + playerctl # controls media player + pavucontrol # PulseAudio Volume Control + mplayer # Movie player that supports many video formats + krita # image edition + yt-dlp # some youtube downloader + vlc + #mprisence # Highly customizable Discord Rich Presence for MPRIS media players on Linux + #gif-for-cli # Render gifs as ASCII art in your cli + #rembg # background remover + gpu-screen-recorder + inkscape + ]; +} From fb53edd9e30e480760a692d4d9de4601c41c6977 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:26:58 +0200 Subject: [PATCH 14/46] windowManager: separated into new file --- hosts/laptop/configuration.nix | 36 +-------------------------- modules/nixos/windowManager.nix | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 35 deletions(-) create mode 100644 modules/nixos/windowManager.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 89f1782..2880c62 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -28,6 +28,7 @@ ../../hostsModules/laptop/nixos/networking.nix # firewall, ssh, networkmanager, etc. ../../modules/nixos/bluetooth.nix ../../modules/nixos/audioAndMedia.nix + ../../modules/nixos/windowManager.nix ]; @@ -53,16 +54,6 @@ "/share/applications" "/share/xdg-desktop-portal" ]; - xdg.portal = { - enable = true; - - extraPortals = [ - pkgs.xdg-desktop-portal-wlr - pkgs.xdg-desktop-portal-gtk - ]; - }; - # removes uxterm - services.xserver.excludePackages = [pkgs.xterm]; # Set your time zone. time.timeZone = "Europe/Zurich"; @@ -70,9 +61,6 @@ # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; - # Enable the X11 windowing system. - services.xserver.enable = true; - # zsh dont want to work if it is not initialzed here. programs.zsh.enable = true; @@ -80,7 +68,6 @@ programs.fuse.userAllowOther = true; programs.fuse.enable = true; - security.wrappers.gsr-kms-server = { # to remove the password prompt when using gpu-screen-recorder owner = "root"; @@ -89,26 +76,6 @@ source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server"; }; - - # Enable the GNOME Desktop Environment. - # services.displayManager.gdm.enable = true; - # services.desktopManager.gnome.enable = true; - # we dont use gnome but some utils yes -> see pckgs - #enable sddm - #services.displayManager.sddm = { - # enable = true; - # wayland.enable = true; - #}; - # we use ly as the displayManager. see ../../modules/nixos/ly.nix - - # enable hyprland WM - programs.hyprland = { - enable = true; - package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features - withUWSM = true; - xwayland.enable = true; - }; - services.upower.enable = true; # Configure keymap in X11 @@ -186,7 +153,6 @@ cmatrix tomato-c # pomodoro timer #hyprshot - xdg-utils mailcap pkgs-unstable.vimPluginsUpdater # used for building plugins hyprcursor diff --git a/modules/nixos/windowManager.nix b/modules/nixos/windowManager.nix new file mode 100644 index 0000000..3dde05a --- /dev/null +++ b/modules/nixos/windowManager.nix @@ -0,0 +1,43 @@ +# customization is in ../home-manager/hyprland.nix +{ + pkgs-unstable, + pkgs, + ... +}: +{ + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Enable the GNOME Desktop Environment. + # services.displayManager.gdm.enable = true; + # services.desktopManager.gnome.enable = true; + # we dont use gnome but some utils yes -> see pckgs + #enable sddm + #services.displayManager.sddm = { + # enable = true; + # wayland.enable = true; + #}; + # we use ly as the displayManager. see ../../modules/nixos/ly.nix + + # enable hyprland WM + programs.hyprland = { + enable = true; + package = pkgs-unstable.hyprland; # we use the unstable branch to get the latest features + withUWSM = true; + xwayland.enable = true; + }; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal-wlr + pkgs.xdg-desktop-portal-gtk + ]; + }; + # removes uxterm + services.xserver.excludePackages = [pkgs.xterm]; + + environment.systemPackages = with pkgs; [ + xdg-utils + ]; +} From 3d636881279353bfa8337d60d9c06480e17eea1a Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:31:06 +0200 Subject: [PATCH 15/46] documentation: separated into new file --- hosts/laptop/configuration.nix | 8 +------- hosts/laptop/home.nix | 2 -- modules/nixos/documentation.nix | 17 +++++++++++++++++ modules/nixos/nixUtils.nix | 1 - 4 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 modules/nixos/documentation.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 2880c62..ce9c7d7 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -29,13 +29,12 @@ ../../modules/nixos/bluetooth.nix ../../modules/nixos/audioAndMedia.nix ../../modules/nixos/windowManager.nix + ../../modules/nixos/documentation.nix ]; programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc - documentation.man.generateCaches = true; # used for the man script - qt.enable = true; home-manager = { @@ -50,11 +49,6 @@ services.dbus.enable = true; security.polkit.enable = true; - environment.pathsToLink = [ - "/share/applications" - "/share/xdg-desktop-portal" - ]; - # Set your time zone. time.timeZone = "Europe/Zurich"; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 7fcc449..776a62a 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -81,8 +81,6 @@ (pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) (pkgs.callPackage ../../modules/scripts/btm.nix {}) - (pkgs.callPackage ../../modules/scripts/manix.nix {}) - (pkgs.callPackage ../../modules/scripts/man.nix {}) (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french (pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) diff --git a/modules/nixos/documentation.nix b/modules/nixos/documentation.nix new file mode 100644 index 0000000..756d132 --- /dev/null +++ b/modules/nixos/documentation.nix @@ -0,0 +1,17 @@ +{ + pkgs, + ... +}: +{ + documentation.man.generateCaches = true; # used for the man script + + environment.pathsToLink = [ # see https://wiki.nixos.org/wiki/Documentation_Gaps#How_do_manpages_work?_Or:_environment.pathsToLink_and_buildEnv + "/share/applications" + "/share/xdg-desktop-portal" + ]; + environment.systemPackages = [ + pkgs.manix + (pkgs.callPackage ../../modules/scripts/manix.nix {}) # fzf manix searcher + (pkgs.callPackage ../../modules/scripts/man.nix {}) # fzf man searcher + ]; +} diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index 38a4b3f..fd8bc4b 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -27,7 +27,6 @@ nixfmt-tree treefmt nixd - manix deadnix alejandra ]; From e58ff4fed1043d8e527e874f9ab4913a3611605e Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:32:53 +0200 Subject: [PATCH 16/46] ssh: addressed evaluation warning --- modules/home-manager/ssh.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/home-manager/ssh.nix b/modules/home-manager/ssh.nix index 22f3666..2c48548 100644 --- a/modules/home-manager/ssh.nix +++ b/modules/home-manager/ssh.nix @@ -5,6 +5,7 @@ }: { programs.ssh = { enable = true; + enableDefaultConfig = false; # will be removed in the futur. Removes evaluation warning matchBlocks."*" = { # equivalent to the default config forwardAgent = false; From af88bd7bb795362d835a6598c949f05506386adf Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:36:37 +0200 Subject: [PATCH 17/46] IO: separated into new file --- hosts/laptop/configuration.nix | 17 +---------------- modules/nixos/IO.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 modules/nixos/IO.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index ce9c7d7..8773b3a 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -30,6 +30,7 @@ ../../modules/nixos/audioAndMedia.nix ../../modules/nixos/windowManager.nix ../../modules/nixos/documentation.nix + ../../modules/nixos/IO.nix ]; @@ -72,18 +73,6 @@ services.upower.enable = true; - # Configure keymap in X11 - services.xserver.xkb = { - layout = "ch"; - variant = "fr"; - }; - - # Configure console keymap - console.keyMap = "fr_CH"; - - # Enable touchpad support (enabled default in most desktopManager). - # services.xserver.libinput.enable = true; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.tomasr = { isNormalUser = true; @@ -126,11 +115,8 @@ zsh # better bash brightnessctl # control brightness udiskie # removable disk automounter for udisks - cliphist # Wayland clipboard manager - wl-clipboard # cli copy/past utilities for Wayland jp # lightweight and flexible cli JSON parser libnotify # Library that sends desktop notifications to a notification daemon - hyprkeys # keybind helper cowsay cmatrix swww #wallpaper daemon @@ -138,7 +124,6 @@ gcc # GNU C compiler libreoffice gruvbox-gtk-theme - hyprpicker powertop python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) fzf diff --git a/modules/nixos/IO.nix b/modules/nixos/IO.nix new file mode 100644 index 0000000..a820e9e --- /dev/null +++ b/modules/nixos/IO.nix @@ -0,0 +1,24 @@ +{ + pkgs, + ... +}: +{ + # Configure keymap in X11 + services.xserver.xkb = { + layout = "ch"; + variant = "fr"; + }; + + # Configure console keymap + console.keyMap = "fr_CH"; + + # Enable touchpad support (enabled default in most desktopManager). + # services.xserver.libinput.enable = true; + + environment.systemPackages = with pkgs; [ + wl-clipboard + cliphist + hyprkeys # keybind helper + hyprpicker + ]; +} From 9a589e2f188143e94d36dd57ef9f57f4c5f9f8a8 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:39:19 +0200 Subject: [PATCH 18/46] nixUtils: migrated some options into a hostsModulle --- hosts/laptop/configuration.nix | 2 +- hostsModules/laptop/nixos/nixUtils.nix | 8 ++++++++ modules/nixos/nixUtils.nix | 4 +--- 3 files changed, 10 insertions(+), 4 deletions(-) create mode 100644 hostsModules/laptop/nixos/nixUtils.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 8773b3a..693f360 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -17,7 +17,7 @@ #../../modules/nixos/ly.nix ../../modules/nixos/ly.nix ../../modules/nixos/anki.nix - ../../modules/nixos/nixUtils.nix + ../../modules/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/udev.nix ../../hostsModules/laptop/nixos/disk.nix ../../modules/nixos/printer.nix diff --git a/hostsModules/laptop/nixos/nixUtils.nix b/hostsModules/laptop/nixos/nixUtils.nix new file mode 100644 index 0000000..838e561 --- /dev/null +++ b/hostsModules/laptop/nixos/nixUtils.nix @@ -0,0 +1,8 @@ +{ + ... +}: +{ + # nixpkgs-review crashed my laptop multiple times. + nix.settings.max-jobs = 2; + nix.settings.cores = 2; +} diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index fd8bc4b..7871916 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -1,3 +1,4 @@ +# some options are in ../../hostsModules/laptop/nixos/nixUtils.nix { pkgs-unstable, inputs, @@ -9,9 +10,6 @@ dates = "weekly"; options = "--delete-older-than 7d"; # every week delete generations older than a month }; - # nixpkgs-review crashed my laptop multiple times. - nix.settings.max-jobs = 2; - nix.settings.cores = 2; #manix is unhappy without this nix.nixPath = [ From 1982e2a58d711a5216e5c463eec31322ce37705a Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:41:44 +0200 Subject: [PATCH 19/46] fonts: separated into new file --- hosts/laptop/configuration.nix | 9 +-------- modules/nixos/fonts.nix | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 8 deletions(-) create mode 100644 modules/nixos/fonts.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 693f360..c827644 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -31,6 +31,7 @@ ../../modules/nixos/windowManager.nix ../../modules/nixos/documentation.nix ../../modules/nixos/IO.nix + ../../modules/fonts.nix ]; @@ -110,7 +111,6 @@ snapshot gnome-characters gnome-disk-utility - gnome-font-viewer #tree # shows dir in tree # we use eza now zsh # better bash brightnessctl # control brightness @@ -178,13 +178,6 @@ pkgs-unstable.bitwarden-desktop ]; - # fonts - fonts.packages = with pkgs; [ - nerd-fonts._0xproto - cinzel - times-newer-roman - ]; - # Some programs need SUID wrappers, can be configured further or are # started in user sessions. # programs.mtr.enable = true; diff --git a/modules/nixos/fonts.nix b/modules/nixos/fonts.nix new file mode 100644 index 0000000..1f7e00c --- /dev/null +++ b/modules/nixos/fonts.nix @@ -0,0 +1,16 @@ +{ + pkgs, + ... +}: +{ + # fonts + fonts.packages = with pkgs; [ + nerd-fonts._0xproto + cinzel + times-newer-roman + ]; + + environment.systemPackages = with pkgs; [ + gnome-font-viewer + ]; +} From 325f982032ceb7716683bea488164ee89eae6bdf Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:46:27 +0200 Subject: [PATCH 20/46] latex: separated into new file --- hosts/laptop/configuration.nix | 3 +-- hosts/laptop/home.nix | 38 --------------------------- modules/nixos/latex.nix | 48 ++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 40 deletions(-) create mode 100644 modules/nixos/latex.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index c827644..6d4c295 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -32,6 +32,7 @@ ../../modules/nixos/documentation.nix ../../modules/nixos/IO.nix ../../modules/fonts.nix + ../../modules/latex.nix ]; @@ -157,10 +158,8 @@ glfw # raylib and some dependecies cling # c interpreter used for coding # lsp - texlab clang-tools python311Packages.python-lsp-server - lua-language-server ltex-ls-plus pylint black diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 776a62a..8e0471b 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -88,44 +88,6 @@ (pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) #pkgs pkgs.gruvbox-gtk-theme - pkgs.biber - (pkgs.texliveMedium.withPackages ( - ps: - with ps; [ - # these few pkgs are used in the CV template - titlesec # allows creating custom \section - marvosym # some symboles - ebgaramond # Use the EB Garamond font - microtype # To enable letterspacing - fontaxes - # these few pkgs were used for my TM - svg - catchfile - caption - transparent - cfr-lm - svn-prov - nfssext-cfr - hyphenat - csquotes - enumitem - chngcntr - tcolorbox - pdfcol - wrapfig - tocloft - lastpage - biblatex - biblatex-iso690 - libertine - minted - upquote - lipsum - footmisc - #(setq org-latex-compiler "lualatex") - #(setq org-preview-latex-default-process 'dvisvgm) - ] - )) ]; diff --git a/modules/nixos/latex.nix b/modules/nixos/latex.nix new file mode 100644 index 0000000..f69b66d --- /dev/null +++ b/modules/nixos/latex.nix @@ -0,0 +1,48 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + texlab + ltex-ls-plus + biber + (pkgs.texliveMedium.withPackages ( + ps: + with ps; [ + # these few pkgs are used in the CV template + titlesec # allows creating custom \section + marvosym # some symboles + ebgaramond # Use the EB Garamond font + microtype # To enable letterspacing + fontaxes + # these few pkgs were used for my TM + svg + catchfile + caption + transparent + cfr-lm + svn-prov + nfssext-cfr + hyphenat + csquotes + enumitem + chngcntr + tcolorbox + pdfcol + wrapfig + tocloft + lastpage + biblatex + biblatex-iso690 + libertine + minted + upquote + lipsum + footmisc + #(setq org-latex-compiler "lualatex") + #(setq org-preview-latex-default-process 'dvisvgm) + ] + )) + ]; +} From 83e91cbdebe6575e1444220b635fac3609b87235 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:47:13 +0200 Subject: [PATCH 21/46] correct modules path --- hosts/laptop/configuration.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 6d4c295..dac3850 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -31,8 +31,8 @@ ../../modules/nixos/windowManager.nix ../../modules/nixos/documentation.nix ../../modules/nixos/IO.nix - ../../modules/fonts.nix - ../../modules/latex.nix + ../../modules/nixos/fonts.nix + ../../modules/nixos/latex.nix ]; From a3edee2d4424f2e6d70b68f1339559c5c55fa1fe Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:51:39 +0200 Subject: [PATCH 22/46] development: separated into new file --- hosts/laptop/configuration.nix | 20 +------------------- modules/nixos/development.nix | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 19 deletions(-) create mode 100644 modules/nixos/development.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index dac3850..fa92ddf 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -33,11 +33,9 @@ ../../modules/nixos/IO.nix ../../modules/nixos/fonts.nix ../../modules/nixos/latex.nix + ../../modules/nixos/development.nix ]; - - programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc - qt.enable = true; home-manager = { @@ -122,13 +120,11 @@ cmatrix swww #wallpaper daemon socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically) - gcc # GNU C compiler libreoffice gruvbox-gtk-theme powertop python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) fzf - jq # json parser used in some scripts bottom # Cross-platform graphical process/system monitor with a customizable interface cmatrix tomato-c # pomodoro timer @@ -143,26 +139,12 @@ # used for the framework 16 laptop framework-tool framework-tool-tui - (pkgs-unstable.python314.withPackages (ps: - with ps; [ - matplotlib - networkx - scipy - ])) fluffychat matrix-commander-rs # matrix client - direnv # utils for dev pkg-config gdb raylib glfw # raylib and some dependecies - cling # c interpreter used for coding - # lsp - clang-tools - python311Packages.python-lsp-server - ltex-ls-plus - pylint - black # for caelestia kdePackages.qtdeclarative # provides qmlls and other things quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" diff --git a/modules/nixos/development.nix b/modules/nixos/development.nix new file mode 100644 index 0000000..6858ee7 --- /dev/null +++ b/modules/nixos/development.nix @@ -0,0 +1,25 @@ +{ + pkgs, + ... +}: +{ + programs.nix-ld.enable = true; #Run unpatched dynamic binaries on NixOS. For example lets run ./a.out from gcc + environment.systemPackages = with pkgs; [ + gcc + jq # json parser used in some scripts + (pkgs-unstable.python314.withPackages (ps: + with ps; [ + matplotlib + networkx + scipy + ])) + direnv + cling # c interpreter used for coding + # lsp + clang-tools + python311Packages.python-lsp-server + ltex-ls-plus + pylint + black + ]; +} From 1389dc30862598f38abca7b54346dcadba2a47b7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:58:28 +0200 Subject: [PATCH 23/46] user: separated into new file --- hosts/laptop/configuration.nix | 58 +----------------------------- hostsModules/laptop/nixos/user.nix | 7 ++++ modules/nixos/user.nix | 56 +++++++++++++++++++++++++++++ 3 files changed, 64 insertions(+), 57 deletions(-) create mode 100644 hostsModules/laptop/nixos/user.nix create mode 100644 modules/nixos/user.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index fa92ddf..70d3b68 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -34,70 +34,15 @@ ../../modules/nixos/fonts.nix ../../modules/nixos/latex.nix ../../modules/nixos/development.nix + ../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix ]; qt.enable = true; - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - users = { - tomasr = ./home.nix; - }; - extraSpecialArgs = {inherit inputs pkgs-unstable;}; - }; - - services.dbus.enable = true; - security.polkit.enable = true; - - # Set your time zone. - time.timeZone = "Europe/Zurich"; - - # Select internationalisation properties. - i18n.defaultLocale = "en_US.UTF-8"; - - # zsh dont want to work if it is not initialzed here. - programs.zsh.enable = true; - # removes rclone error programs.fuse.userAllowOther = true; programs.fuse.enable = true; - security.wrappers.gsr-kms-server = { - # to remove the password prompt when using gpu-screen-recorder - owner = "root"; - group = "root"; - capabilities = "cap_sys_admin+ep"; - source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server"; - }; - - services.upower.enable = true; - - # Define a user account. Don't forget to set a password with ‘passwd’. - users.users.tomasr = { - isNormalUser = true; - description = "Tomas Rivera"; - extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone - shell = pkgs.zsh; - }; - - # removes need for password for nixos-rebuild - security.sudo.extraRules = [ - { - users = [ "tomasr" ]; - commands = [ - { - command = "/run/current-system/sw/bin/nixos-rebuild"; - options = [ "NOPASSWD" ]; - } - ]; - } - ]; - - - - - # Allow unfree packages nixpkgs.config.allowUnfree = true; # Nonfree packages: hplipWithPlugin @@ -111,7 +56,6 @@ gnome-characters gnome-disk-utility #tree # shows dir in tree # we use eza now - zsh # better bash brightnessctl # control brightness udiskie # removable disk automounter for udisks jp # lightweight and flexible cli JSON parser diff --git a/hostsModules/laptop/nixos/user.nix b/hostsModules/laptop/nixos/user.nix new file mode 100644 index 0000000..be1f3a4 --- /dev/null +++ b/hostsModules/laptop/nixos/user.nix @@ -0,0 +1,7 @@ +# configuration is in ../../../modules/nixos/user.nix +{ + ... +}: +{ + home-manager.users.tomasr = ../../../hosts/laptop/home.nix; +} diff --git a/modules/nixos/user.nix b/modules/nixos/user.nix new file mode 100644 index 0000000..35cec27 --- /dev/null +++ b/modules/nixos/user.nix @@ -0,0 +1,56 @@ +{ + pkgs, + pkgs-unstable, + inputs, + ... +}: +{ + services.dbus.enable = true; + security.polkit.enable = true; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + # the home manager config is set in ../../hostsModules/*/nixos/user.nix + extraSpecialArgs = {inherit inputs pkgs-unstable;}; + }; + + # Set your time zone. + time.timeZone = "Europe/Zurich"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + # zsh dont want to work if it is not initialzed here. + programs.zsh.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.tomasr = { + isNormalUser = true; + description = "Tomas Rivera"; + extraGroups = ["networkmanager" "wheel" "fuse"]; #wheel allow to use sudo / fuse -> rclone + shell = pkgs.zsh; + }; + + security.wrappers.gsr-kms-server = { + # to remove the password prompt when using gpu-screen-recorder + owner = "root"; + group = "root"; + capabilities = "cap_sys_admin+ep"; + source = "${pkgs.gpu-screen-recorder}/bin/gsr-kms-server"; + }; + + services.upower.enable = true; + + # removes need for password for nixos-rebuild + security.sudo.extraRules = [ + { + users = [ "tomasr" ]; + commands = [ + { + command = "/run/current-system/sw/bin/nixos-rebuild"; + options = [ "NOPASSWD" ]; + } + ]; + } + ]; +} From fe48059d4d34291692c7d7505b6181980a712eea Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 09:58:57 +0200 Subject: [PATCH 24/46] development: add pkgs-unstable as input --- modules/nixos/development.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nixos/development.nix b/modules/nixos/development.nix index 6858ee7..88c6164 100644 --- a/modules/nixos/development.nix +++ b/modules/nixos/development.nix @@ -1,5 +1,6 @@ { pkgs, + pkgs-unstable, ... }: { From 2b72d4286d5eadc7252f8a718e328190c907d0ab Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:05:26 +0200 Subject: [PATCH 25/46] notification: separated into new file --- hosts/laptop/configuration.nix | 5 ++--- hosts/laptop/home.nix | 9 --------- modules/nixos/notifications.nix | 20 ++++++++++++++++++++ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 modules/nixos/notifications.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 70d3b68..ce1893a 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -35,6 +35,7 @@ ../../modules/nixos/latex.nix ../../modules/nixos/development.nix ../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix + ../../modules/nixos/notifications.nix ]; qt.enable = true; @@ -59,11 +60,9 @@ brightnessctl # control brightness udiskie # removable disk automounter for udisks jp # lightweight and flexible cli JSON parser - libnotify # Library that sends desktop notifications to a notification daemon cowsay cmatrix swww #wallpaper daemon - socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically) libreoffice gruvbox-gtk-theme powertop @@ -83,7 +82,7 @@ # used for the framework 16 laptop framework-tool framework-tool-tui - fluffychat matrix-commander-rs # matrix client + fluffychat # matrix client # utils for dev pkg-config gdb diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 8e0471b..f4f78ca 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -66,25 +66,16 @@ home.packages = [ #scritps (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background - (pkgs.callPackage ../../hostsModules/laptop/scripts/batterynotify.nix {}) - (pkgs.callPackage ../../hostsModules/laptop/scripts/batterywarning.nix {}) - - # checks if matrix-commander-rs is installed and logged in - (pkgs.callPackage ../../hostsModules/laptop/scripts/checkMatrix.nix {}) - (pkgs.callPackage ../../modules/scripts/weather.nix {}) (pkgs.callPackage ../../modules/scripts/wallpaper.nix {}) (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) (pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window - (pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) (pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) (pkgs.callPackage ../../modules/scripts/btm.nix {}) (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french - (pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) - (pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) #pkgs pkgs.gruvbox-gtk-theme diff --git a/modules/nixos/notifications.nix b/modules/nixos/notifications.nix new file mode 100644 index 0000000..cdbcf74 --- /dev/null +++ b/modules/nixos/notifications.nix @@ -0,0 +1,20 @@ +# notifications server is set by caelestia-shell. See ../home-manager/caelestia.nix +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + libnotify # Library that sends desktop notifications to a notification daemon + socat # Utility for bidirectional data transfer between two independent data channels (used to communicate between hyprland and swww to change wallpapers dinamically) + matrix-commander-rs # matrix client used to send notifications from scripts to my phone + # battery notifications + (pkgs.callPackage ../../hostsModules/laptop/scripts/batterynotify.nix {}) + (pkgs.callPackage ../../hostsModules/laptop/scripts/batterywarning.nix {}) + # checks if matrix-commander-rs is installed and logged in + (pkgs.callPackage ../../hostsModules/laptop/scripts/checkMatrix.nix {}) + (pkgs.callPackage ../../modules/scripts/gitnotify.nix {}) # check if git is set up + (pkgs.callPackage ../../modules/scripts/checkKdrive.nix {}) # check if kdrive is set up with rclone + + ]; +} From 52346aa1e82f27baec47549aa4aaeca88e65dd8d Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:07:39 +0200 Subject: [PATCH 26/46] development: migrated multiple packages to separate file --- hosts/laptop/configuration.nix | 6 ------ modules/nixos/development.nix | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index ce1893a..22b1de7 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -59,14 +59,12 @@ #tree # shows dir in tree # we use eza now brightnessctl # control brightness udiskie # removable disk automounter for udisks - jp # lightweight and flexible cli JSON parser cowsay cmatrix swww #wallpaper daemon libreoffice gruvbox-gtk-theme powertop - python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) fzf bottom # Cross-platform graphical process/system monitor with a customizable interface cmatrix @@ -84,10 +82,6 @@ framework-tool-tui fluffychat # matrix client # utils for dev - pkg-config - gdb - raylib - glfw # raylib and some dependecies # for caelestia kdePackages.qtdeclarative # provides qmlls and other things quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" diff --git a/modules/nixos/development.nix b/modules/nixos/development.nix index 88c6164..5e1f9d4 100644 --- a/modules/nixos/development.nix +++ b/modules/nixos/development.nix @@ -8,12 +8,19 @@ environment.systemPackages = with pkgs; [ gcc jq # json parser used in some scripts + jp # lightweight and flexible cli JSON parser (pkgs-unstable.python314.withPackages (ps: with ps; [ matplotlib networkx scipy ])) + python313Packages.pygments # used for ccat (comment of colorize plugin from oh-my-zsh) + pkg-config + gdb + raylib + glfw # raylib and some dependecies + direnv cling # c interpreter used for coding # lsp From 8ad5082fd0ac861fdb1adf2f736b6ddc366a54e6 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:11:52 +0200 Subject: [PATCH 27/46] browser: separated into new file --- hosts/laptop/configuration.nix | 3 +-- hosts/laptop/home.nix | 1 - modules/nixos/browser.nix | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 modules/nixos/browser.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 22b1de7..f83ef00 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -36,6 +36,7 @@ ../../modules/nixos/development.nix ../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix ../../modules/nixos/notifications.nix + ../../modules/nixos/browser.nix ]; qt.enable = true; @@ -74,7 +75,6 @@ pkgs-unstable.vimPluginsUpdater # used for building plugins hyprcursor vial # Open-source GUI and QMK fork for configuring your keyboard in real time - chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID. capitaine-cursors-themed # cursor theme usbutils # used for lsusb # used for the framework 16 laptop @@ -92,7 +92,6 @@ # this is more up to date #(callPackage ../../modules/packages/vivify.nix {}) #(callPackage ../../modules/packages/sbb-tui.nix {}) - pkgs-unstable.tor-browser pkgs-unstable.bitwarden-desktop ]; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index f4f78ca..dbd685f 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -72,7 +72,6 @@ (pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window (pkgs.callPackage ../../modules/scripts/tomato.nix {}) - (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) (pkgs.callPackage ../../modules/scripts/btm.nix {}) (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french diff --git a/modules/nixos/browser.nix b/modules/nixos/browser.nix new file mode 100644 index 0000000..63ad142 --- /dev/null +++ b/modules/nixos/browser.nix @@ -0,0 +1,14 @@ +# configuration for main browser is in ../home-manager/librewolf.nix +# configuration for qutebrowser is in ../home-manager/vivify.nix +{ + pkgs, + pkgs-unstable, + ... +}: +{ + environment.systemPackages = with pkgs; [ + chromium # used only to flash the firmware on my framework laptop 16 (keyboard.frame.work) as only chromium based browser support webHID. + pkgs-unstable.tor-browser + (pkgs.callPackage ../../modules/scripts/librewolfprofiles.nix {}) # fzf librewolf profile selector + ]; +} From 33e2ba012d9850059626d5ee52a6c4dbe8e2ce39 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:17:28 +0200 Subject: [PATCH 28/46] theme: separated into new file --- hosts/laptop/configuration.nix | 13 +------------ hosts/laptop/home.nix | 6 ------ modules/nixos/theme.nix | 24 ++++++++++++++++++++++++ 3 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 modules/nixos/theme.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index f83ef00..032dc08 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -37,10 +37,9 @@ ../../modules/nixos/user.nix ../../hostsModules/laptop/nixos/user.nix ../../modules/nixos/notifications.nix ../../modules/nixos/browser.nix + ../../modules/nixos/theme.nix # install theming packages and some quickshell stuff ]; - qt.enable = true; - # removes rclone error programs.fuse.userAllowOther = true; programs.fuse.enable = true; @@ -62,9 +61,7 @@ udiskie # removable disk automounter for udisks cowsay cmatrix - swww #wallpaper daemon libreoffice - gruvbox-gtk-theme powertop fzf bottom # Cross-platform graphical process/system monitor with a customizable interface @@ -73,21 +70,13 @@ #hyprshot mailcap pkgs-unstable.vimPluginsUpdater # used for building plugins - hyprcursor vial # Open-source GUI and QMK fork for configuring your keyboard in real time - capitaine-cursors-themed # cursor theme usbutils # used for lsusb # used for the framework 16 laptop framework-tool framework-tool-tui fluffychat # matrix client - # utils for dev - # for caelestia - kdePackages.qtdeclarative # provides qmlls and other things - quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" fuzzel - papirus-icon-theme - papirus-folders birdtray # thunderbird tray app # this is more up to date #(callPackage ../../modules/packages/vivify.nix {}) diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index dbd685f..f12e40e 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -66,18 +66,12 @@ home.packages = [ #scritps (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background - (pkgs.callPackage ../../modules/scripts/weather.nix {}) - (pkgs.callPackage ../../modules/scripts/wallpaper.nix {}) (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) - (pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window (pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/btm.nix {}) (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french - (pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) - #pkgs - pkgs.gruvbox-gtk-theme ]; diff --git a/modules/nixos/theme.nix b/modules/nixos/theme.nix new file mode 100644 index 0000000..00c29b7 --- /dev/null +++ b/modules/nixos/theme.nix @@ -0,0 +1,24 @@ +# most of the themeing are in the home-manager modules. This just installs some packages needed +{ + pkgs, + ... +}: +{ + qt.enable = true; + + + environment.systemPackages = with pkgs; [ + swww #wallpaper daemon + gruvbox-gtk-theme + hyprcursor + capitaine-cursors-themed # cursor theme + kdePackages.qtdeclarative # provides qmlls and other things + quickshell # we have it but adding it there solves "WARN qt.qpa.services: Failed to register with host portal QDBusError("org.freedesktop.portal.Error.Failed", "Could not register app ID: App info not found for 'org.quickshell'")" + papirus-icon-theme + papirus-folders + (pkgs.callPackage ../../modules/scripts/wallpaper.nix {}) + #(pkgs.callPackage ../../modules/scripts/colorpicker.nix {}) # old color picker + #(pkgs.callPackage ../../modules/scripts/weather.nix {}) # old cli weather + (pkgs.callPackage ../../hostsModules/laptop/qt/qtbatticon.nix {}) # custom qt tray icon for battery + ]; +} From 523b80f9d55a09042186ff45254038fe71fe3ad7 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:18:52 +0200 Subject: [PATCH 29/46] packages: removed redundant allowUnfree --- hosts/laptop/configuration.nix | 3 --- 1 file changed, 3 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 032dc08..a777942 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -44,9 +44,6 @@ programs.fuse.userAllowOther = true; programs.fuse.enable = true; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; # Nonfree packages: hplipWithPlugin - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ From 010d55fdabbd64ea5a5f359bf97dfbf20f0b392a Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:21:09 +0200 Subject: [PATCH 30/46] disk: separated into new file --- hosts/laptop/configuration.nix | 2 +- modules/nixos/disk.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 modules/nixos/disk.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index a777942..0030136 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -19,7 +19,7 @@ ../../modules/nixos/anki.nix ../../modules/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/nixUtils.nix ../../hostsModules/laptop/nixos/udev.nix - ../../hostsModules/laptop/nixos/disk.nix + ../../modules/nixos/disk.nix ../../hostsModules/laptop/nixos/disk.nix ../../modules/nixos/printer.nix ../../hostsModules/laptop/nixos/ollama.nix # llm config ../../modules/nixos/mullvad.nix # vpn config diff --git a/modules/nixos/disk.nix b/modules/nixos/disk.nix new file mode 100644 index 0000000..258f9d5 --- /dev/null +++ b/modules/nixos/disk.nix @@ -0,0 +1,10 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + gnome-disk-utility + udiskie # removable disk automounter for udisks + ]; +} From 9126e85b37c5b82127d747ea463a0f9b1febe773 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:22:43 +0200 Subject: [PATCH 31/46] hardwareUtils: separated into new file --- hosts/laptop/configuration.nix | 5 ----- hostsModules/laptop/nixos/hardwareUtils.nix | 11 +++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 hostsModules/laptop/nixos/hardwareUtils.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 0030136..9f9cd95 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -52,10 +52,8 @@ gnome-calculator snapshot gnome-characters - gnome-disk-utility #tree # shows dir in tree # we use eza now brightnessctl # control brightness - udiskie # removable disk automounter for udisks cowsay cmatrix libreoffice @@ -69,9 +67,6 @@ pkgs-unstable.vimPluginsUpdater # used for building plugins vial # Open-source GUI and QMK fork for configuring your keyboard in real time usbutils # used for lsusb - # used for the framework 16 laptop - framework-tool - framework-tool-tui fluffychat # matrix client fuzzel birdtray # thunderbird tray app diff --git a/hostsModules/laptop/nixos/hardwareUtils.nix b/hostsModules/laptop/nixos/hardwareUtils.nix new file mode 100644 index 0000000..2021b60 --- /dev/null +++ b/hostsModules/laptop/nixos/hardwareUtils.nix @@ -0,0 +1,11 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + # used for the framework 16 laptop + framework-tool + framework-tool-tui + ]; +} From bf8a136b2f037a4933fc4926e49e7407e07f353c Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:24:21 +0200 Subject: [PATCH 32/46] removed unused packages --- hosts/laptop/configuration.nix | 5 ----- hosts/laptop/home.nix | 2 -- 2 files changed, 7 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 9f9cd95..1d3877c 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -47,20 +47,15 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - # use pkgs-unstable if you want the package from the unstable channel - #we need to install gnome and kde utils individually as we dont use gnome gnome-calculator snapshot gnome-characters #tree # shows dir in tree # we use eza now brightnessctl # control brightness - cowsay - cmatrix libreoffice powertop fzf bottom # Cross-platform graphical process/system monitor with a customizable interface - cmatrix tomato-c # pomodoro timer #hyprshot mailcap diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index f12e40e..0a3b6dc 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -69,8 +69,6 @@ (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window (pkgs.callPackage ../../modules/scripts/tomato.nix {}) - (pkgs.callPackage ../../modules/scripts/btm.nix {}) - (pkgs.callPackage ../../modules/scripts/trimmer.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french ]; From a4876b11747bb2922ac2a13744c48b89211bc347 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:25:06 +0200 Subject: [PATCH 33/46] disk: moved script mountkdrive --- hosts/laptop/home.nix | 1 - modules/nixos/disk.nix | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 0a3b6dc..e5e686f 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -66,7 +66,6 @@ home.packages = [ #scritps (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background - (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window (pkgs.callPackage ../../modules/scripts/tomato.nix {}) (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french diff --git a/modules/nixos/disk.nix b/modules/nixos/disk.nix index 258f9d5..30aaabb 100644 --- a/modules/nixos/disk.nix +++ b/modules/nixos/disk.nix @@ -6,5 +6,6 @@ environment.systemPackages = with pkgs; [ gnome-disk-utility udiskie # removable disk automounter for udisks + (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) ]; } From 31bff51be305b476a9b52ec813cbf0826cdd46f6 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:26:25 +0200 Subject: [PATCH 34/46] disk: moved rclone fuse patch --- hosts/laptop/configuration.nix | 4 ---- modules/nixos/disk.nix | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 1d3877c..32c32d4 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -40,10 +40,6 @@ ../../modules/nixos/theme.nix # install theming packages and some quickshell stuff ]; - # removes rclone error - programs.fuse.userAllowOther = true; - programs.fuse.enable = true; - # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ diff --git a/modules/nixos/disk.nix b/modules/nixos/disk.nix index 30aaabb..0b9dbff 100644 --- a/modules/nixos/disk.nix +++ b/modules/nixos/disk.nix @@ -8,4 +8,8 @@ udiskie # removable disk automounter for udisks (pkgs.callPackage ../../modules/scripts/mountkdrive.nix {}) ]; + + # removes rclone error + programs.fuse.userAllowOther = true; + programs.fuse.enable = true; } From 6946122e8552e939d1125b62699e4be85159ef0b Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 10:32:07 +0200 Subject: [PATCH 35/46] otherUtils: separated into new file --- hosts/laptop/configuration.nix | 20 ++------------------ hosts/laptop/home.nix | 11 ----------- modules/nixos/otherUtils.nix | 29 +++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 29 deletions(-) create mode 100644 modules/nixos/otherUtils.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 32c32d4..10f26ab 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -38,33 +38,17 @@ ../../modules/nixos/notifications.nix ../../modules/nixos/browser.nix ../../modules/nixos/theme.nix # install theming packages and some quickshell stuff + ../../hostsModules/laptop/nixos/hardwareUtils.nix + ../../modules/nixos/otherUtils.nix ]; # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ - gnome-calculator - snapshot - gnome-characters - #tree # shows dir in tree # we use eza now - brightnessctl # control brightness libreoffice - powertop - fzf - bottom # Cross-platform graphical process/system monitor with a customizable interface - tomato-c # pomodoro timer - #hyprshot - mailcap pkgs-unstable.vimPluginsUpdater # used for building plugins vial # Open-source GUI and QMK fork for configuring your keyboard in real time - usbutils # used for lsusb - fluffychat # matrix client - fuzzel birdtray # thunderbird tray app - # this is more up to date - #(callPackage ../../modules/packages/vivify.nix {}) - #(callPackage ../../modules/packages/sbb-tui.nix {}) - pkgs-unstable.bitwarden-desktop ]; # Some programs need SUID wrappers, can be configured further or are diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index e5e686f..867d100 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -61,17 +61,6 @@ # want to update the value, then make sure to first check the Home Manager # release notes. - # The home.packages option allows you to install Nix packages into your - # environment. - home.packages = [ - #scritps - (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background - (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window - (pkgs.callPackage ../../modules/scripts/tomato.nix {}) - (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french - ]; - - home.sessionVariables = { EDITOR = "neovim"; # Git update function diff --git a/modules/nixos/otherUtils.nix b/modules/nixos/otherUtils.nix new file mode 100644 index 0000000..48945c4 --- /dev/null +++ b/modules/nixos/otherUtils.nix @@ -0,0 +1,29 @@ +# try to keep packages here at a minium. Preferably use a dedicated file +{ + pkgs, + pkgs-unstable, + ... +}: +{ + environment.systemPackages = with pkgs; [ + gnome-calculator + snapshot + gnome-characters + #tree # shows dir in tree # we use eza now + brightnessctl # control brightness + powertop + fzf + bottom # Cross-platform graphical process/system monitor with a customizable interface + tomato-c # pomodoro timer + #hyprshot + mailcap + fuzzel + usbutils # used for lsusb + (pkgs.callPackage ../../modules/scripts/dontkillsteam.nix {}) # kill app (if it is steam put it in some background + (pkgs.callPackage ../../modules/scripts/killall.nix {}) # kill all windows except focused window + (pkgs.callPackage ../../modules/scripts/tomato.nix {}) + (pkgs.callPackage ../../modules/scripts/syllabes.nix {}) # python script to get number of syllabes in french + pkgs-unstable.bitwarden-desktop + fluffychat # matrix client + ]; +} From f19d19808ffb9617b243a241754b76781ba354e4 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 11:00:44 +0200 Subject: [PATCH 36/46] reworked Unfree stuff --- flake.nix | 24 +++++++++++++++++++++--- hosts/laptop/configuration.nix | 2 +- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/flake.nix b/flake.nix index 0554d6b..f02e272 100644 --- a/flake.nix +++ b/flake.nix @@ -35,15 +35,33 @@ ... } @ inputs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + + pkgs = import nixpkgs { + inherit system; + + config.allowUnfreePredicate = pkg: + builtins.elem (nixpkgs.lib.getName pkg) [ + "hplip" + "vivify.vim" + "cheatsheet.nvim" + ]; + }; + pkgs-unstable = import nixpkgs-unstable { inherit system; - config.allowUnfree = true; #hplipWithPlugins is unfree... + + config.allowUnfreePredicate = pkg: + builtins.elem (nixpkgs.lib.getName pkg) [ + "hplip" + "vivify.vim" + "cheatsheet.nvim" + ]; }; + in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs pkgs-unstable;}; + specialArgs = {inherit inputs pkgs pkgs-unstable;}; modules = [ ./hosts/laptop/configuration.nix ]; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 10f26ab..c7226fd 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -41,7 +41,7 @@ ../../hostsModules/laptop/nixos/hardwareUtils.nix ../../modules/nixos/otherUtils.nix ]; - + # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ From 25ce79b4588b7f827ec85f3b1e8dd6c428a7b907 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:03:06 +0200 Subject: [PATCH 37/46] zsh: add alias for nvim --- modules/home-manager/zsh.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix index 4d0428d..27fbd99 100644 --- a/modules/home-manager/zsh.nix +++ b/modules/home-manager/zsh.nix @@ -43,6 +43,12 @@ mplayer = "mplayer -volume 5"; # these are to create the developpement shell cenv = "nix-shell -p zsh gcc raylib libx11 libGL"; + # i always write nvim wrong :( + nbim = "nvim"; + nivm = "nvim"; + bivm = "nvim"; + nibm = "nvim"; + vikm = "nvim"; }; }; } From 63863a476d324d7406338ad23c6a3860fd523288 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:06:17 +0200 Subject: [PATCH 38/46] removed useless comment --- hosts/laptop/configuration.nix | 10 ---------- hosts/laptop/home.nix | 2 -- 2 files changed, 12 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index c7226fd..938598c 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -42,8 +42,6 @@ ../../modules/nixos/otherUtils.nix ]; - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ libreoffice pkgs-unstable.vimPluginsUpdater # used for building plugins @@ -51,14 +49,6 @@ birdtray # thunderbird tray app ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager programs.dconf.enable = true; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 867d100..e111d8a 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -63,8 +63,6 @@ home.sessionVariables = { EDITOR = "neovim"; - # Git update function - # Prompts for commit message; defaults if empty TERMINAL = "kitty"; }; From 1396e3df75c7005c44bca0035b7cae2a9edc3cfe Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:07:33 +0200 Subject: [PATCH 39/46] nixUtils: migrated some options --- modules/nixos/nixUtils.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/nixos/nixUtils.nix b/modules/nixos/nixUtils.nix index 7871916..fdf6108 100644 --- a/modules/nixos/nixUtils.nix +++ b/modules/nixos/nixUtils.nix @@ -27,5 +27,6 @@ nixd deadnix alejandra + vimPluginsUpdater # used for building plugins ]; } From 63287b1c43e778caa554bd626cab236b05eb32b5 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:08:50 +0200 Subject: [PATCH 40/46] office: separated into new file --- hosts/laptop/configuration.nix | 4 +--- modules/nixos/office.nix | 10 ++++++++++ 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 modules/nixos/office.nix diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 938598c..2019bee 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -40,13 +40,11 @@ ../../modules/nixos/theme.nix # install theming packages and some quickshell stuff ../../hostsModules/laptop/nixos/hardwareUtils.nix ../../modules/nixos/otherUtils.nix + ../../modules/nixos/office.nix ]; environment.systemPackages = with pkgs; [ - libreoffice - pkgs-unstable.vimPluginsUpdater # used for building plugins vial # Open-source GUI and QMK fork for configuring your keyboard in real time - birdtray # thunderbird tray app ]; # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager diff --git a/modules/nixos/office.nix b/modules/nixos/office.nix new file mode 100644 index 0000000..674f9a2 --- /dev/null +++ b/modules/nixos/office.nix @@ -0,0 +1,10 @@ +{ + pkgs, + ... +}: +{ + environment.systemPackages = with pkgs; [ + libreoffice + birdtray + ]; +} From f98b72504d4283b7cb79ee0cacef7bf3b69e9ee4 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:44:17 +0200 Subject: [PATCH 41/46] hardwareUtils: migrated package to separate file --- hosts/laptop/configuration.nix | 4 ---- hostsModules/laptop/nixos/hardwareUtils.nix | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 2019bee..f3bafd1 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -43,10 +43,6 @@ ../../modules/nixos/office.nix ]; - environment.systemPackages = with pkgs; [ - vial # Open-source GUI and QMK fork for configuring your keyboard in real time - ]; - # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager programs.dconf.enable = true; diff --git a/hostsModules/laptop/nixos/hardwareUtils.nix b/hostsModules/laptop/nixos/hardwareUtils.nix index 2021b60..7b3a1ee 100644 --- a/hostsModules/laptop/nixos/hardwareUtils.nix +++ b/hostsModules/laptop/nixos/hardwareUtils.nix @@ -7,5 +7,6 @@ # used for the framework 16 laptop framework-tool framework-tool-tui + vial # Open-source GUI and QMK fork for configuring your keyboard in real time ]; } From d940c40fa8d52e3c5b5ab116690dcc205f4f2a69 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:47:54 +0200 Subject: [PATCH 42/46] configuration.nix: last cleanup --- hosts/laptop/configuration.nix | 4 +--- modules/nixos/theme.nix | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index f3bafd1..ecd1f49 100755 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -2,6 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { + # nixd says that those attributes are not used. The are used in the imported file. Do not remove. config, pkgs, pkgs-unstable, @@ -43,9 +44,6 @@ ../../modules/nixos/office.nix ]; - # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager - programs.dconf.enable = true; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/modules/nixos/theme.nix b/modules/nixos/theme.nix index 00c29b7..25e98f2 100644 --- a/modules/nixos/theme.nix +++ b/modules/nixos/theme.nix @@ -6,7 +6,9 @@ { qt.enable = true; - + # to resolve this https://wiki.nixos.org/wiki/Home_Manager#I_cannot_set_GNOME_or_Gtk_themes_via_Home_Manager + programs.dconf.enable = true; + environment.systemPackages = with pkgs; [ swww #wallpaper daemon gruvbox-gtk-theme From a724d9e98b21807819a0eb864e61965a2987d34e Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:48:41 +0200 Subject: [PATCH 43/46] removed useless file --- modules/home-manager/result | 1 - 1 file changed, 1 deletion(-) delete mode 120000 modules/home-manager/result diff --git a/modules/home-manager/result b/modules/home-manager/result deleted file mode 120000 index e4b0b2a..0000000 --- a/modules/home-manager/result +++ /dev/null @@ -1 +0,0 @@ -/nix/store/54sf8q14ygh45qvr20w46b9qcyvdc5ld-options.json \ No newline at end of file From 07dce06cebc8e00362e59b377dcdd1388a16844b Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:51:59 +0200 Subject: [PATCH 44/46] home.nix: last cleanup --- hosts/laptop/home.nix | 12 ++---------- modules/{ => home-manager}/other/desktopEntries.nix | 0 modules/home-manager/other/user.nix | 12 ++++++++++++ 3 files changed, 14 insertions(+), 10 deletions(-) rename modules/{ => home-manager}/other/desktopEntries.nix (100%) create mode 100644 modules/home-manager/other/user.nix diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index e111d8a..0a9184f 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -44,15 +44,12 @@ ../../modules/home-manager/sbb-tui.nix # cff TUI app ../../modules/home-manager/mullvad.nix # mullvad vpn - ../../modules/other/desktopEntries.nix # creates .desktop files + ../../modules/home-manager/other/desktopEntries.nix # creates .desktop files + ../../modules/homer-manager/other/user.nix ]; - # Required for Home Manager - home.username = "tomasr"; - home.homeDirectory = "/home/tomasr"; home.stateVersion = "25.11"; # match your Home Manager release - # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release # introduces backwards incompatible changes. @@ -61,11 +58,6 @@ # want to update the value, then make sure to first check the Home Manager # release notes. - home.sessionVariables = { - EDITOR = "neovim"; - TERMINAL = "kitty"; - }; - # Let Home Manager install and manage itself. programs.home-manager.enable = true; } diff --git a/modules/other/desktopEntries.nix b/modules/home-manager/other/desktopEntries.nix similarity index 100% rename from modules/other/desktopEntries.nix rename to modules/home-manager/other/desktopEntries.nix diff --git a/modules/home-manager/other/user.nix b/modules/home-manager/other/user.nix new file mode 100644 index 0000000..5e66367 --- /dev/null +++ b/modules/home-manager/other/user.nix @@ -0,0 +1,12 @@ +{ + ... +}: +{ + home.username = "tomasr"; + home.homeDirectory = "/home/tomasr"; + + home.sessionVariables = { + EDITOR = "neovim"; + TERMINAL = "kitty"; + }; +} From 11081cf3e4c8eaa1d8e4da65eb343a4a1d3742c1 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 12:54:33 +0200 Subject: [PATCH 45/46] flake: cleanup comments --- flake.nix | 24 ------------------------ hosts/laptop/home.nix | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index f02e272..a35aba1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,3 @@ -# ~/nixos/flake.nix { description = "Nixos config flake"; @@ -20,11 +19,6 @@ flake = false; }; }; - # never got nixvim to wokrs. ): - # nixvim = { - # url = "github:nix-community/nixvim/nixos-25.11"; - # }; - outputs = { self, nixpkgs, @@ -68,23 +62,5 @@ }; }; # we use home-manager directly inside of configuration.nix - # last time i tried to use flake i broke everything ): - # homeManagerConfigurations = { - # tomasr = home-manager.lib.homeManagerConfiguration { - # pkgs = pkgs; - # system = "x86_64-linux"; - # username = "tomasr"; - # homeDirectory = "/home/tomasr"; - # modules = [ - # ./hosts/laptop/home.nix - # #nixvim.homeModules.default - #]; - # Import your Home Manager module - # configuration = ./hosts/laptop/home.nix; - - # extraSpecialArgs = { inherit inputs; }; - # }; - #}; - #}; }; } diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 0a9184f..b903d09 100755 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -45,7 +45,7 @@ ../../modules/home-manager/mullvad.nix # mullvad vpn ../../modules/home-manager/other/desktopEntries.nix # creates .desktop files - ../../modules/homer-manager/other/user.nix + ../../modules/home-manager/other/user.nix ]; # Required for Home Manager From 42423f1959b8be6dc1ec7f5c42f7c372f8180db8 Mon Sep 17 00:00:00 2001 From: Tomas Rivera Date: Sun, 17 May 2026 13:03:33 +0200 Subject: [PATCH 46/46] flake: cleaned unfree packages --- flake.nix | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/flake.nix b/flake.nix index a35aba1..5e98fe8 100644 --- a/flake.nix +++ b/flake.nix @@ -29,35 +29,40 @@ ... } @ inputs: let system = "x86_64-linux"; - - pkgs = import nixpkgs { - inherit system; - config.allowUnfreePredicate = pkg: - builtins.elem (nixpkgs.lib.getName pkg) [ - "hplip" - "vivify.vim" - "cheatsheet.nvim" - ]; - }; + unfreePkgs = [ + "hplip" + "vivify.vim" + "cheatsheet.nvim" + ]; + + mkUnfreePredicate = pkg: + builtins.elem (nixpkgs.lib.getName pkg) unfreePkgs; pkgs-unstable = import nixpkgs-unstable { inherit system; - config.allowUnfreePredicate = pkg: - builtins.elem (nixpkgs.lib.getName pkg) [ - "hplip" - "vivify.vim" - "cheatsheet.nvim" - ]; + config.allowUnfreePredicate = mkUnfreePredicate; }; in { nixosConfigurations = { laptop = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs pkgs pkgs-unstable;}; + specialArgs = {inherit inputs pkgs-unstable;}; modules = [ ./hosts/laptop/configuration.nix + # solves evaluation warning + /* + You have set specialArgs.pkgs, which means that options like nixpkgs.config + and nixpkgs.overlays will be ignored. If you wish to reuse an already created + pkgs, which you know is configured correctly for this NixOS configuration, + please import the `nixosModules.readOnlyPkgs` module from the nixpkgs flake or + `(modulesPath + "/misc/nixpkgs/read-only.nix"), and set `{ nixpkgs.pkgs = ; }`. + This properly disables the ignored options to prevent future surprises. + */ + { + nixpkgs.config.allowUnfreePredicate = mkUnfreePredicate; + } ]; }; };