diff --git a/flake.lock b/flake.lock index 8764f47..7b32639 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "cachyos-kernel": { "flake": false, "locked": { - "lastModified": 1775145950, - "narHash": "sha256-AfVja9nvYHm0BHbuTvn+K8rKfLmPl5QjoiNecp9HOJU=", + "lastModified": 1776608760, + "narHash": "sha256-ehDv8bF7k/2Kf4b8CCoSm51U/MOoFuLsRXqe5wZ57sE=", "owner": "CachyOS", "repo": "linux-cachyos", - "rev": "b91624f68ceaf5394ef1571f60290dca6ba22b45", + "rev": "7e06e29005853bbaaa3b1c1067f915d6e0db728a", "type": "github" }, "original": { @@ -19,11 +19,11 @@ "cachyos-kernel-patches": { "flake": false, "locked": { - "lastModified": 1775157685, - "narHash": "sha256-g8HgH7gADoEnrBN30BK3pz7+M2pT/p3xtfRFEuEov5w=", + "lastModified": 1776792814, + "narHash": "sha256-39dlIhz9KxUNQFxGpE9SvCviaOWAivdW0XJM8RnPNmg=", "owner": "CachyOS", "repo": "kernel-patches", - "rev": "c1ba300617a12d257b5721572b9bbe28efae182f", + "rev": "d7d558d0b2e239e27b40bcf1af6fe12e323aa391", "type": "github" }, "original": { @@ -129,11 +129,11 @@ ] }, "locked": { - "lastModified": 1775569958, - "narHash": "sha256-W+kpLQ5J/DDaY1nUmvN9aIAfh5ixdyqYM76ZUdcvMBU=", + "lastModified": 1776684358, + "narHash": "sha256-Nn42mX8ikB1hpLwceqe65yJx7/T87j1Cpyik2KL6/YY=", "owner": "feel-co", "repo": "hjem", - "rev": "32bd6d54d805a3eb41efa62a940eeceaf263c4a8", + "rev": "fb7ee87a1e72b3b21723d5ec76c8ca395c02fbc6", "type": "github" }, "original": { @@ -150,11 +150,11 @@ "spectrum": "spectrum" }, "locked": { - "lastModified": 1775996588, - "narHash": "sha256-klBp+NIkJJtFHKFEHaMqwDHSK09UufDL6RJoxUZOL5Q=", + "lastModified": 1776340739, + "narHash": "sha256-s4FDictJlPtY6Shd6scG5hgrDMiHth09+svtvTA5NLA=", "owner": "microvm-nix", "repo": "microvm.nix", - "rev": "c0a53823dbf7eb166c2fa7dc2d1e0d6cb2be7562", + "rev": "2f2f62fdfdca2750e3399f66bd03986ab967e5ca", "type": "github" }, "original": { @@ -172,11 +172,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1775239578, - "narHash": "sha256-MKJmDHlaxwBcnfCUEA89AwKOOONjOjbjHNNWdSdg5RA=", + "lastModified": 1776796985, + "narHash": "sha256-cNFg3H09sBZl1v9ds6PDHfLCUTDJbefGMSv+WxFs+9c=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "beaf7a533ae106c2681de2624da94707f9857f1f", + "rev": "ac5956bbceb022998fc1dd0001322f10ef1e6dda", "type": "github" }, "original": { @@ -214,11 +214,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1776051551, - "narHash": "sha256-zqDhVyUtctq7HlpMC9cdR277ner0L/f7SkC3oKbZwy0=", + "lastModified": 1776828595, + "narHash": "sha256-LkFpFnPTK6H0gwyfYezN3kEKHVxjSdPp/tBnrQRFP3E=", "owner": "Infinidoge", "repo": "nix-minecraft", - "rev": "c5eb01b60873e331265779028a839cd2b5237874", + "rev": "28f0f2369655a5910e810c35c698dfaa9ccec692", "type": "github" }, "original": { @@ -229,11 +229,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1775490113, - "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=", + "lastModified": 1776830795, + "narHash": "sha256-PAfvLwuHc1VOvsLcpk6+HDKgMEibvZjCNvbM1BJOA7o=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7", + "rev": "72674a6b5599e844c045ae7449ba91f803d44ebc", "type": "github" }, "original": { @@ -245,11 +245,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1775231746, - "narHash": "sha256-EFaDQ0rnuSjKfC/DUKHS4toV4rEBuWhSgyX2Yy0kp00=", + "lastModified": 1776750258, + "narHash": "sha256-jab3OFEK7MpiAolaLBjvIxdf258UWvvusWxPJPE5ito=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "0eac666efaa8a9afea2821f9efc7921b4ef39b4e", + "rev": "8d73c2809cb39eecce6284c38100e69a6064e5d9", "type": "github" }, "original": { @@ -261,11 +261,11 @@ }, "nixpkgs-darwin": { "locked": { - "lastModified": 1775994940, - "narHash": "sha256-z5tkSIdPUs6IG3I9HD2e2stdzOKKh0qDeKkOURYQw6o=", + "lastModified": 1776784345, + "narHash": "sha256-IwBAqEljQ0WNVRRQf/ItWIHqIgi5ap+noM2unsLCa8Y=", "owner": "nixos", "repo": "nixpkgs", - "rev": "9d600cdba342cea3b59aef50e093a547a0f4012f", + "rev": "377ba9abb3f416ee2786cb7eb6219bb1d29ce63f", "type": "github" }, "original": { @@ -307,11 +307,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1775888245, - "narHash": "sha256-nwASzrRDD1JBEu/o8ekKYEXm/oJW6EMCzCRdrwcLe90=", + "lastModified": 1776329215, + "narHash": "sha256-a8BYi3mzoJ/AcJP8UldOx8emoPRLeWqALZWu4ZvjPXw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "13043924aaa7375ce482ebe2494338e058282925", + "rev": "b86751bc4085f48661017fa226dee99fab6c651b", "type": "github" }, "original": { @@ -339,11 +339,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1776067740, - "narHash": "sha256-B35lpsqnSZwn1Lmz06BpwF7atPgFmUgw1l8KAV3zpVQ=", + "lastModified": 1776560675, + "narHash": "sha256-p68udKWWh7+V4ZPpcMDq0gTHWNZJnr4JPI+kHPPE40o=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7e495b747b51f95ae15e74377c5ce1fe69c1765f", + "rev": "e07580dae39738e46609eaab8b154de2488133ce", "type": "github" }, "original": { diff --git a/modules/features/desktops/gnome.nix b/modules/features/desktops/gnome.nix deleted file mode 100644 index cfd1505..0000000 --- a/modules/features/desktops/gnome.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - # Minimal gnome desktop - flake.nixosModules.gnome-desktop = { inputs, pkgs, ... }: { - imports = with inputs.self.nixosModules; [ - audio - ]; - - services.displayManager.gdm.enable = true; - services.desktopManager.gnome.enable = true; - programs.xwayland.enable = true; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - qt.platformTheme = "gnome"; - - # We don't want extra packages, just the bare minimum - services.gnome.games.enable = false; - services.gnome.core-developer-tools.enable = false; - services.gnome.core-apps.enable = true; - environment.gnome.excludePackages = with pkgs; [ gnome-tour gnome-user-docs ]; - }; -} diff --git a/modules/features/desktops/kde.nix b/modules/features/desktops/kde.nix index 4f0cf1f..a3b09d1 100644 --- a/modules/features/desktops/kde.nix +++ b/modules/features/desktops/kde.nix @@ -8,6 +8,10 @@ services.displayManager.sddm.wayland.enable = true; services.desktopManager.plasma6.enable = true; + environment.systemPackages = with pkgs; [ + ghostty + ]; + # Try to make plasma the most barebone possible environment.plasma6.excludePackages = with pkgs; [ kdePackages.konsole diff --git a/modules/features/development.nix b/modules/features/development.nix index 28fa16c..2e8ba15 100644 --- a/modules/features/development.nix +++ b/modules/features/development.nix @@ -1,13 +1,47 @@ +let + sharedPackages = pkgs: with pkgs; [ + dbeaver-bin # Database client + bruno # IDE for testing apis + helix # TUI code editor + jujutsu # VCS + lazygit # TUI git + podman # container tool -> replacement of docker + podman-compose # compose provider for podman + ]; +in { + allowedUnfreePackages = [ "cuda_cudart" "cuda_nvcc" "cuda_cccl" "libcublas" ]; + flake.nixosModules.development = { pkgs, ... }: { environment.systemPackages = with pkgs; [ - dbeaver-bin # Database client - bruno # IDE for testing apis - helix # TUI code editor - lazygit # TUI git - podman # container tool -> replacement of docker - podman-compose # compose provider for podman - (zed-editor.fhsWithPackages (pkg: [ zlib ])) # GUI code editor + zed-editor # GUI code editor + ] ++ (sharedPackages pkgs); + + # Setup local LLM + services.ollama = { + enable = true; + acceleration = "cuda"; + }; + }; + + flake.darwinModules.development = { pkgs, ... }: { + systemPackages = [ pkgs.ollama ] ++ (sharedPackages pkgs); + + # Ensure homebrew is enabled + homebrew.enable = true; + homebrew.cask = [ + "zed" # GUI code editor ]; + + # Setup local LLM + launchd.user.agents.ollama = { + serviceConfig = { + ProgramArguments = [ "${pkgs.ollama}/bin/ollama" "serve" ]; + RunAtLoad = true; + KeepAlive = true; + StandardOutPath = "/tmp/ollama.log"; + StandardErrorPath = "/tmp/ollama.log"; + }; + }; }; } diff --git a/modules/features/gaming.nix b/modules/features/gaming.nix index 0f2a45a..f103dc9 100644 --- a/modules/features/gaming.nix +++ b/modules/features/gaming.nix @@ -1,5 +1,7 @@ { inputs, ... }: { + allowedUnfreePackages = [ "steam" "steam-unwrapped" ]; + flake.nixosModules.gaming = { pkgs, ... }: { # User CachyOS kernel patches specically mades for gaming nix.settings.substituters = [ "https://attic.xuyh0120.win/lantian" ]; @@ -22,9 +24,12 @@ # Additionnal packages environment.systemPackages = with pkgs; [ faugus-launcher # Alternative launcher for multiple games platform + heroic mangohud prismlauncher # Minecraft launcher jdk25_headless # Needed for minecraft 26.1 since it's not included inside prismlauncher for the moment + + unstable.gale # Modding platform ]; }; } diff --git a/modules/features/hardware.nix b/modules/features/hardware.nix new file mode 100644 index 0000000..2b928d2 --- /dev/null +++ b/modules/features/hardware.nix @@ -0,0 +1,5 @@ +{ + flake.nixosModules.hardware = { ... }: { + # TODO: unified system to check hardware and had correct drivers + facter automatisations + }; +} diff --git a/modules/features/workstation-base.nix b/modules/features/workstation-base.nix new file mode 100644 index 0000000..40d3d51 --- /dev/null +++ b/modules/features/workstation-base.nix @@ -0,0 +1,15 @@ +{ inputs, ... }: +{ + flake.nixosModules.workstation-base = { pkgs, ... }: { + imports = with inputs.self.nixosModules; [ + bootloader + audio + kde-desktop + ]; + + environment.systemPackages = with pkgs; [ + git + just + ]; + }; +} diff --git a/modules/hosts/loki/configuration.nix b/modules/hosts/loki/configuration.nix index e22b3cb..b77fe3e 100644 --- a/modules/hosts/loki/configuration.nix +++ b/modules/hosts/loki/configuration.nix @@ -1,32 +1,22 @@ { inputs, ... }: { - allowedUnfreePackages = [ "steam" "steam-unwrapped" ]; - - flake.nixosModules.loki = { pkgs, ... }: { + flake.nixosModules.loki = { ... }: { imports = with inputs.self.nixosModules; with inputs.self.factory; [ - bootloader - audio + workstation-base nvidia-gpu - gnome-desktop cosmeak - screen-recording (autoLogin "cosmeak") + screen-recording gaming flatpak + development ]; nixpkgs.overlays = [ inputs.self.overlays.unstable ]; - environment.systemPackages = with pkgs; [ - git - just - nixd - heroic - ]; - hardware.facter.reportPath = ./facter.json; fileSystems."/" = { device = "/dev/disk/by-uuid/1cbaa92a-7c91-496f-b1b4-32a1249ba9af"; diff --git a/modules/hosts/njord/configuration.nix b/modules/hosts/njord/configuration.nix index b27e773..2e08f04 100644 --- a/modules/hosts/njord/configuration.nix +++ b/modules/hosts/njord/configuration.nix @@ -3,6 +3,7 @@ flake.darwinModules.njord = { ... }: { imports = with inputs.self.darwinModules; [ cosmeak + development ]; nixpkgs.overlays = [ inputs.self.overlays.unstable ]; diff --git a/modules/users/cosmeak.nix b/modules/users/cosmeak.nix index efc615e..a60922d 100644 --- a/modules/users/cosmeak.nix +++ b/modules/users/cosmeak.nix @@ -7,7 +7,6 @@ let sharedPackages = pkgs: with pkgs; [ _1password-gui # Password manager bat # Replacement for the `cat` cmd - helix # Code Editor just # Cmd helper lazygit # Git TUI obsidian # Note editor @@ -34,15 +33,9 @@ in users.users.${username} = { packages = with pkgs; [ btop - ghostty # Terminal emulator - heroic # Game Launcher (Epic Games, GOG) librewolf # Web browser - prismlauncher # Minecraft launcher vesktop # Discord client - (zed-editor.fhsWithPackages (pkg: [ zlib ])) # Code editor protonvpn-gui - - unstable.gale ] ++ (sharedPackages pkgs); }; }) @@ -53,14 +46,9 @@ in ({ pkgs, ... }: { environment.systemPackages = with pkgs; [ alt-tab-macos # alt tab like windows on macos - bruno # IDE for testing apis chirp # Radio programming tool - dbeaver-bin # Database client ghostty-bin # Terminal emulator - jujutsu # VCS stats # System monitoring displayed in macos top bar - podman # container tool -> replacement of docker - podman-compose # compose provider for podman unstable.brioche # Another package manager unstable.librewolf # build failed on stable for darwin