From 5be623fd12387de539f57957d88638f0272a71cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 11:53:55 +0200 Subject: [PATCH 1/6] first commit from desktop --- flake.lock | 13 ------ modules/applications/git.nix | 4 +- modules/hardware/hardware-configuration.nix | 45 +++++++++++++++++++++ modules/hosts/desktop.nix | 3 +- modules/utilities/development.nix | 1 + 5 files changed, 49 insertions(+), 17 deletions(-) diff --git a/flake.lock b/flake.lock index 98d1feb..586697c 100755 --- a/flake.lock +++ b/flake.lock @@ -203,18 +203,6 @@ "type": "github" } }, - "nixpkgs-local": { - "locked": { - "lastModified": 1780728942, - "narHash": "sha256-NjXPlIssFzJ8vazKaihsW773r/Kq2TTby7FKBlbWIg4=", - "path": "/home/tomasr/devel/fugit2-gpgme", - "type": "path" - }, - "original": { - "path": "/home/tomasr/devel/fugit2-gpgme", - "type": "path" - } - }, "nixpkgs-notifier": { "inputs": { "flake-utils": [ @@ -325,7 +313,6 @@ "microPlugins-vivify": "microPlugins-vivify", "nixos-grub-themes": "nixos-grub-themes", "nixpkgs": "nixpkgs_2", - "nixpkgs-local": "nixpkgs-local", "nixpkgs-notifier": "nixpkgs-notifier", "nixpkgs-unstable": "nixpkgs-unstable", "notewrapper": "notewrapper" diff --git a/modules/applications/git.nix b/modules/applications/git.nix index 474a9cb..02a2c6e 100644 --- a/modules/applications/git.nix +++ b/modules/applications/git.nix @@ -2,9 +2,9 @@ _: { flake.homeModules.git = _: { programs.git = { enable = true; - settings = { + /*settings = { init.defaultBranch = "main"; - }; + };*/ }; programs.gh = { enable = true; diff --git a/modules/hardware/hardware-configuration.nix b/modules/hardware/hardware-configuration.nix index d6da02c..1cbe592 100644 --- a/modules/hardware/hardware-configuration.nix +++ b/modules/hardware/hardware-configuration.nix @@ -33,4 +33,49 @@ _: { nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }; +flake.nixosModules.hardware-configuration-desktop = # Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2"; + fsType = "btrfs"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/14bcd132-b4a3-46f2-ac35-3497340de4b2"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/BAB4-34F6"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/ce6f9a68-0517-4f8a-b375-66f2173efe59"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}; } diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index e973963..cd83d20 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -27,7 +27,7 @@ documentation disk # this only installs some disk utilities. disko will format the drives fonts - #hardware-configuration-desktop + hardware-configuration-desktop hyprland IO #kdrive-desktop # we will setup this later @@ -54,7 +54,6 @@ development eza fastfetch - git gtk hyprland hyprland-desktop diff --git a/modules/utilities/development.nix b/modules/utilities/development.nix index b02c10e..8ed33c9 100644 --- a/modules/utilities/development.nix +++ b/modules/utilities/development.nix @@ -24,6 +24,7 @@ gnumake go direnv + git gh cling # c interpreter used for coding # lsp clang-tools From 8efd8a30bf74d85465163daeddea313bfb0ad263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 12:01:14 +0200 Subject: [PATCH 2/6] desktop: add nvidia drivers --- flake.nix | 3 ++- modules/hardware/nvidia.nix | 7 +++++++ modules/hosts/desktop.nix | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 modules/hardware/nvidia.nix diff --git a/flake.nix b/flake.nix index 0a74596..735da26 100644 --- a/flake.nix +++ b/flake.nix @@ -50,7 +50,8 @@ system = "x86_64-linux"; unfreePkgs = [ "hplip" - "vivify.vim" + "nvidia-x11" + "nvidia-settings" "cheatsheet.nvim" ]; mkUnfreePredicate = pkg: diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix new file mode 100644 index 0000000..911c8d5 --- /dev/null +++ b/modules/hardware/nvidia.nix @@ -0,0 +1,7 @@ +_: { + flake.nixosModules.nvidia = _: { + hardware.graphics.enable = true; + services.xserver.videoDrivers = [ "nvidia" ]; + hardware.nvidia.open = true; + }; +} diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index cd83d20..f5066d9 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -36,6 +36,7 @@ mullvad networking notifications + nvidia office #ollama otherUtils From a5d93f6ce1de584269e891adbb3b2e3e17eb6532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 12:11:24 +0200 Subject: [PATCH 3/6] desktop: auto mount hdd --- modules/hardware/hdd.nix | 8 ++++++++ modules/hosts/desktop.nix | 1 + 2 files changed, 9 insertions(+) create mode 100644 modules/hardware/hdd.nix diff --git a/modules/hardware/hdd.nix b/modules/hardware/hdd.nix new file mode 100644 index 0000000..275e95e --- /dev/null +++ b/modules/hardware/hdd.nix @@ -0,0 +1,8 @@ +_: { + flake.nixosModules.hdd = { + fileSystems."/home/tomasr/hdd" = { + device = "/dev/disk/by-uuid/cbe24588-e04f-4ffc-ba44-6fe6ec6d6850"; + fsType = "ext4"; + }; + }; +} diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index f5066d9..797c513 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -28,6 +28,7 @@ disk # this only installs some disk utilities. disko will format the drives fonts hardware-configuration-desktop + hdd hyprland IO #kdrive-desktop # we will setup this later From 02b5924d3160733b1189db9c7eb3c25cdf746c77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 12:24:16 +0200 Subject: [PATCH 4/6] desktop: init kdrive --- modules/applications/kdrive.nix | 21 ++++++++++++++++----- modules/hosts/desktop.nix | 2 +- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/modules/applications/kdrive.nix b/modules/applications/kdrive.nix index 2682b89..356e006 100644 --- a/modules/applications/kdrive.nix +++ b/modules/applications/kdrive.nix @@ -24,7 +24,7 @@ }; systemd.user.services.kdrive-sync = { serviceConfig = { - ExecStart = "${pkgs.rclone}/bin/rclone bisync ..."; + ExecStart = "${self.packages.${pkgs.system}.custom-synckdrive-desktop}/bin/custom-synckdrive"; Nice = 19; # lowest CPU scheduling priority IOSchedulingClass = "idle"; @@ -97,6 +97,17 @@ fi ''; }; + /* + Before setting up we must: + * setup the rclone remote + `rclone config` choose Webdaw and see login information in bitwarden. + * give the good permissions for the hdd + `sudo chown -R tomasr:users /home/tomasr/hdd` + * Run the bisync once completly + `rclone bisync ~/hdd/kdrive/ kdrive: --resync` + + Note : only use the --resync flag once + */ packages.custom-synckdrive-desktop = pkgs.writeShellApplication { name = "custom-synckdrive"; runtimeInputs = with pkgs; [ @@ -105,11 +116,11 @@ ]; text = '' REMOTE_NAME="kdrive" - MOUNT_POINT="/data/kdrive" + MOUNT_POINT="/home/tomasr/hdd/kdrive" - if rclone listremotes | rg "^''${REMOVE_NAME}:"; then - echo "Syncing ''${Syncing} ''${REMOVE_NAME}..." - rclone sync "''${REMOVE_NAME}:" "$MOUNT_POINT" --allow-non-empty & + if rclone listremotes | rg "^''${REMOTE_NAME}:"; then + echo "Syncing ''${REMOTE_NAME}..." + rclone bisync "''${REMOTE_NAME}:" "$MOUNT_POINT" & else notify-send "rclone sync failed" \ "Remote ''${REMOTE_NAME} not found.\nConfigure rclone and create the dir ~/kdrive/ or comment out the exec line in hyprland.nix." diff --git a/modules/hosts/desktop.nix b/modules/hosts/desktop.nix index 797c513..29be295 100644 --- a/modules/hosts/desktop.nix +++ b/modules/hosts/desktop.nix @@ -31,7 +31,7 @@ hdd hyprland IO - #kdrive-desktop # we will setup this later + kdrive-desktop # we will setup this later latex ly mullvad From 7072f2a39e3d705c7c0a19b49b6ceb2669690ec6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 12:51:30 +0200 Subject: [PATCH 5/6] desktop: steam --- modules/applications/games.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/applications/games.nix b/modules/applications/games.nix index 8911af4..185a892 100644 --- a/modules/applications/games.nix +++ b/modules/applications/games.nix @@ -5,5 +5,9 @@ _: { supertuxkart # fuck mariokart # my favorite italian plumber is free software ]; + programs.steam = { + enable = true; + protontricks.enable = true; + }; }; } From 5a8f8f5c081202aa41a6cb6c37b65e6919e3f118 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Rivera?= Date: Sun, 7 Jun 2026 14:00:02 +0200 Subject: [PATCH 6/6] librewolf: add protondb search engine --- modules/applications/browser.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/applications/browser.nix b/modules/applications/browser.nix index fe79cf6..6841165 100644 --- a/modules/applications/browser.nix +++ b/modules/applications/browser.nix @@ -683,6 +683,14 @@ ]; definedAliases = ["on"]; }; + "ProtonDB" = { + urls = [ + { + template = "https://www.protondb.com/search?q={searchTerms}"; + } + ]; + definedAliases = ["pr"]; + }; }; }; };