From 9d4effad5bb3d5f799baf8abe54d9a1168d3c7eb Mon Sep 17 00:00:00 2001 From: Jonas Hahn Date: Tue, 30 Sep 2025 20:41:19 +0200 Subject: [PATCH] Some packages --- .sops.yaml | 1 - hosts/minoxy-workstation/configuration.nix | 61 ++++++++++++++-------- modules/essential.nix | 2 +- modules/hardware/nvidia.nix | 14 ++--- modules/services/ai.nix | 7 ++- secrets.yaml | 6 +-- user/packages.nix | 12 +++++ user/users.nix | 1 + 8 files changed, 70 insertions(+), 34 deletions(-) diff --git a/.sops.yaml b/.sops.yaml index 29f8170..d63c95a 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -23,4 +23,3 @@ creation_rules: - *minoxy - *thinix - *nixyos - diff --git a/hosts/minoxy-workstation/configuration.nix b/hosts/minoxy-workstation/configuration.nix index b22b3a3..075312b 100644 --- a/hosts/minoxy-workstation/configuration.nix +++ b/hosts/minoxy-workstation/configuration.nix @@ -1,33 +1,52 @@ -{ ... }: +{ pkgs, lib, ... }: { - imports = [ - ./hardware-configuration.nix + imports = [ + ./hardware-configuration.nix - ./../../user/users.nix + ./../../user/users.nix - ./../../modules/essential.nix - ./../../modules/common/sops.nix + ./../../modules/essential.nix + ./../../modules/common/sops.nix - ./../../modules/services/webdav.nix - ./../../modules/services/ai.nix + ./../../modules/services/webdav.nix + # Not working right now due to nvidia problems + # It worked fine on another machine thats why I am wondering + #./../../modules/services/ai.nix - ./../../modules/graphics/workstation.nix + ./../../modules/graphics/workstation.nix - ./../../modules/hardware/nvidia.nix - ./../../modules/hardware/boot.nix - ./../../modules/hardware/xremap.nix - ]; + ./../../modules/hardware/nvidia.nix + ./../../modules/hardware/boot.nix + ./../../modules/hardware/xremap.nix + ]; - networking.hostName = "minoxy"; - enableCuda = true; + networking.hostName = "minoxy"; + enableCuda = false; - systemd.targets.sleep.enable = true; - systemd.targets.suspend.enable = true; + systemd.targets.sleep.enable = true; + systemd.targets.suspend.enable = true; - virtualisation.docker.enable = true; - virtualisation.docker.storageDriver = "btrfs"; + programs.ydotool.enable = true; + services.input-remapper.enable = true; - # Never change this! - system.stateVersion = "25.05"; + fileSystems."/shared" = { + device = "/dev/disk/by-uuid/8CEA-13E3"; # use lsblk -f + fsType = "exfat"; + options = [ "defaults" "uid=1000" "gid=100" "umask=000" ]; + }; + + + # Testing + #environment.etc."mnt/jousb".source = "/mnt/jousb"; # ensures directory exists + #services.udev.extraRules = '' + # ACTION=="add", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="JOUSB", RUN+="${pkgs.mount}/bin/mount /dev/disk/by-label/JOUSB /mnt/jousb" + # ACTION=="remove", SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="JOUSB", RUN+="${pkgs.umount}/bin/umount /mnt/jousb" + #''; + + virtualisation.docker.enable = true; + virtualisation.docker.storageDriver = "btrfs"; + + # Never change this! + system.stateVersion = "25.05"; } diff --git a/modules/essential.nix b/modules/essential.nix index ce416dd..bf76805 100644 --- a/modules/essential.nix +++ b/modules/essential.nix @@ -16,7 +16,7 @@ services.avahi.enable = true; services.avahi.nssmdns4 = true; - environment = { systemPackages = with pkgs; [ git starship zoxide rsync ]; }; + environment = { systemPackages = with pkgs; [ xorg.xrandr git starship zoxide rsync ]; }; nix.optimise.automatic = true; diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix index aceef4c..323112b 100644 --- a/modules/hardware/nvidia.nix +++ b/modules/hardware/nvidia.nix @@ -31,14 +31,14 @@ in { }; # Apply CUDA-specific settings if enabled - # Dont do all as this has ridiculous high build times - #nixpkgs.config.cudaSupport = config.enableCuda; - hardware.enableAllFirmware = config.enableCuda; + nixpkgs.config.cudaSupport = config.enableCuda; + hardware.enableAllFirmware = true; - environment.systemPackages = (if config.enableCuda then [ - (pkgs.blender.override { cudaSupport = true; }) - (pkgs.ollama.override { acceleration = "cuda"; }) - ] else + environment.systemPackages = (if config.enableCuda then + [ + (pkgs.blender.override { cudaSupport = true; }) + ] + else [ ]); }; } diff --git a/modules/services/ai.nix b/modules/services/ai.nix index fb915fd..07dae7a 100644 --- a/modules/services/ai.nix +++ b/modules/services/ai.nix @@ -1,5 +1,10 @@ { ... }: { - services.ollama.enable = true; + imports = [ ../hardware/nvidia.nix ]; + + services.ollama = { + enable = true; + acceleration = "cuda"; + }; } diff --git a/secrets.yaml b/secrets.yaml index d9f273c..f240041 100644 --- a/secrets.yaml +++ b/secrets.yaml @@ -1,4 +1,4 @@ -webdav_authstring: ENC[AES256_GCM,data:owtYoEX4uXHZFJa1TL2uxkCHatU8MiDT0a+a6NDt7+IVGwB4XsY=,iv:15Ms6v3rPujQxKs0hZULvZGX3K7TgmV1zrLLt3kQGPI=,tag:ULyWmrgoBmVLEdOc/4sMMw==,type:str] +webdav_authstring: ENC[AES256_GCM,data:/g6+3halZCCjysDnon3ArMwKXLnVwFgv1rt+PzY5658ipisBS1qifQUb,iv:DCTCmzbPOthFXC5m5MqaU+QaziYBnoaZJVF7rkyPmRw=,tag:Np9DRpwRkOdNAj6+nYNAew==,type:str] sops: age: - recipient: age1a2kpues0gayampkn9pn2czhk24r0yl4jnw84qg4gh5l72dflx95qkmyqzv @@ -37,7 +37,7 @@ sops: dmdtblVvV1Nxc3lFUXNxMmEvK3N2OFkK7WkuSu37k7T3X/Srsx8Kbf/p1jV46h+S IZQzpSuNP42c6c7IgczdmgB2xxKnFUnPt9MZWDgirJ1lZdCg0tfoSA== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-09-02T17:49:36Z" - mac: ENC[AES256_GCM,data:wK7vtEBXE5/u+xqiiwa52ZnRouyAMG7x+T8xdoqb/NFEGIr6SPZRFxLVuKZN9iCbDyMCxb03GuKibcPbiIDkfvvKTpASP5t5F3yLwr1vS6/x6VM+rBJvppOu5s91rxGotkKjXBlnQM3pSKApLfbGEEu+jwFOA/I0UchD4VSjbq4=,iv:BskOSBnjcqp8hlGxe0RDDZipv0t9cDCLWwI/v7FiadQ=,tag:RiZ7rh45quEpTggx0mZawQ==,type:str] + lastmodified: "2025-09-27T23:09:44Z" + mac: ENC[AES256_GCM,data:O8SeDFvsV/DvpzbIpmpjZxsfMZqbQNdaZNMi4UE2T8SH2zsrTkTQ9pPc7vSctBnhDU+3I6iFzvWAXp/13LKR+Bg+93LMshxxOi4KSOmTOFSECFcP8v6bqCY1bpGr4/N/FhdgSSeNoxkd5MYlvvliBFqKsaOApV+VU74FjaBXrkA=,iv:NK2529Z91pPYZ3SD2hrm0shZk5O0csCy1MOUbnD/5RY=,tag:kgKP6Ixk3FuG8Du9C26dGA==,type:str] unencrypted_suffix: _unencrypted version: 3.10.2 diff --git a/user/packages.nix b/user/packages.nix index 5af5fbc..8a730f6 100644 --- a/user/packages.nix +++ b/user/packages.nix @@ -95,6 +95,18 @@ clang clang-tools # Provides clangd go + bitwarden-desktop + libinput + cudaPackages.cudatoolkit + ydotool + input-remapper + ausweisapp + spotify + pgadmin4 + dig + lazydocker + libtool + love lua zig cargo diff --git a/user/users.nix b/user/users.nix index 7801690..170cd31 100644 --- a/user/users.nix +++ b/user/users.nix @@ -12,6 +12,7 @@ "lp" "davfs2" "wheel" + "ydotool" "audio" "networkmanager" ];