diff --git a/bin/skyg b/bin/skyg index 1957ff1..5d6f90d 100755 --- a/bin/skyg +++ b/bin/skyg @@ -69,7 +69,7 @@ def "main remote" [cmd:string, target:string = ""] { return $valid_cmds } $"($cmd) on ($target_host) with ($profile)" | print - mut runcmd = $"nixos-rebuild --target-host ($target_host) --use-remote-sudo ($cmd) --flake .#($profile)" + mut runcmd = $"nixos-rebuild --target-host ($target_host) --sudo ($cmd) --flake .#($profile)" $runcmd | print bash -c $runcmd } diff --git a/configs/niri/config.kdl b/configs/niri/config.kdl index 7fd6f6f..2f3646b 100644 --- a/configs/niri/config.kdl +++ b/configs/niri/config.kdl @@ -221,7 +221,7 @@ hotkey-overlay { binds { Mod+Shift+H { show-hotkey-overlay; } Mod+T { spawn "ghostty"; } - Mod+Space { spawn "dms ipc call spotlight toggle"; } + Mod+Space { spawn "dms" "ipc" "call" "spotlight" "toggle"; } Mod+Z { spawn "flatpak" "run" "app.zen_browser.zen"; } Mod+B { spawn "chromium"; } Mod+E { spawn "wofi-emoji"; } diff --git a/configs/niri/dms/colors.kdl b/configs/niri/dms/colors.kdl index f61bef2..96e10b9 100644 --- a/configs/niri/dms/colors.kdl +++ b/configs/niri/dms/colors.kdl @@ -2,14 +2,14 @@ layout { background-color "transparent" focus-ring { - active-color "#42a5f5" - inactive-color "#8c9199" + active-color "#f9e2af" + inactive-color "#6c7086" urgent-color "#f2b8b5" } border { - active-color "#42a5f5" - inactive-color "#8c9199" + active-color "#f9e2af" + inactive-color "#6c7086" urgent-color "#f2b8b5" } @@ -18,19 +18,19 @@ layout { } tab-indicator { - active-color "#42a5f5" - inactive-color "#8c9199" + active-color "#f9e2af" + inactive-color "#6c7086" urgent-color "#f2b8b5" } insert-hint { - color "#42a5f580" + color "#f9e2af80" } } recent-windows { highlight { - active-color "#0d47a1" + active-color "#6e5a2f" urgent-color "#f2b8b5" } } \ No newline at end of file diff --git a/flake.lock b/flake.lock index 6416cc7..8d48b20 100644 --- a/flake.lock +++ b/flake.lock @@ -654,11 +654,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1764440730, - "narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=", + "lastModified": 1767185284, + "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3", + "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 76f73ce..9d0a2ef 100644 --- a/flake.nix +++ b/flake.nix @@ -175,7 +175,6 @@ ./hosts/hl-terra1.hardware-configuration.nix ]; }; - } - ; + }; }; } diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 7d2ffc0..7c61932 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -260,7 +260,7 @@ in port = 11434; acceleration = "rocm"; rocmOverrideGfx = "11.0.2"; - package = unstablePkgs.ollama-rocm; + # package = unstablePkgs.ollama-rocm; }; # # Brother Printer hardware.sane.brscan5.enable = true; diff --git a/hosts/hl-fwdesk.hardware-configuration.nix b/hosts/hl-fwdesk.hardware-configuration.nix index f7bf184..5978c9f 100644 --- a/hosts/hl-fwdesk.hardware-configuration.nix +++ b/hosts/hl-fwdesk.hardware-configuration.nix @@ -13,7 +13,6 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { device = "/dev/disk/by-uuid/e903eb56-160d-4b77-ba66-ef54a18207f2"; diff --git a/hosts/hl-fwdesk.nix b/hosts/hl-fwdesk.nix index 4cca9c8..ffaf154 100644 --- a/hosts/hl-fwdesk.nix +++ b/hosts/hl-fwdesk.nix @@ -1,5 +1,6 @@ { pkgs , unstablePkgs +, lib , ... }: let @@ -18,7 +19,7 @@ in user.enable = true; core.qemu.enable = true; nixos = { - common.ssh-server.enable = true; + common.ssh-server.enable = true; common.hardware = { sound.enable = true; pipewire.enable = true; @@ -72,8 +73,7 @@ in environment.systemPackages = (with pkgs; [ # languages - python313 - cargo + # cargo rustc go pipx @@ -85,6 +85,11 @@ in # Steam mangohud + + # LLM Stuff + ollama-rocm + # stable-diffusion-cpp-rocm + lmstudio ]); services.usbmuxd.enable = true; # Steam @@ -106,20 +111,25 @@ in hardware.xone.enable = true; # support for the xbox controller USB dongle # Ollama services.open-webui.enable = true; + users.users.ollama = { + enable = true; + home = "/var/lib/ollama"; + extraGroups = [ + "render" + "video" + ]; + }; services.ollama = { enable = true; host = "0.0.0.0"; port = ports.ollama; - acceleration = "rocm"; - package = unstablePkgs.ollama-rocm; - }; - # Tabby - services.tabby = { - enable = true; - acceleration = "rocm"; - host = "0.0.0.0"; - port = ports.tabby; + acceleration = "vulkan"; + user = "ollama"; + home = "/var/lib/ollama"; + rocmOverrideGfx = "gfx1151"; }; + hardware.graphics.enable = true; + hardware.amdgpu.opencl.enable = true; environment.localBinInPath = true; programs.nh = { enable = true; diff --git a/modules/lib.nix b/modules/lib.nix index 6aa8792..aff9222 100644 --- a/modules/lib.nix +++ b/modules/lib.nix @@ -11,6 +11,42 @@ }: let skygUtils = import ./skyg-utils.nix; + eachSystem = nixpkgs.lib.genAttrs (import systems); + allPkgs = eachSystem ( + system: + import nixpkgs { + system = system; + config = { + allowUnfree = true; + }; + } + ); + # makeHomeManagerUsers = + # { modules ? [ ] + # , homeManagerVersion + # , user + # , system ? "x86_64-linux" + # , + # }: + # let + # hm = ( + # import ./home { + # stateVersion = homeManagerVersion; + # }makeHLServices + # ); + # pkgs = allPkgs."${system}"; + # in + # home-manager.lib.homeManagerConfiguration { + # inherit pkgs; + # modules = [ + # (hm.makeCommonUser user) + # ] + # ++ modules; + # }; +in +{ + eachSystem = eachSystem; + pkgs = allPkgs; makeNixOs = { system ? "x86_64-linux" , hostName @@ -38,77 +74,35 @@ let }) ] ++ configuration; }; - eachSystem = nixpkgs.lib.genAttrs (import systems); - allPkgs = eachSystem ( - system: - import nixpkgs { - system = system; - config = { - allowUnfree = true; + makeDarwinModule = + { system ? "x86_64-darwin" + , user + , homeManagerVersion ? "25.11" + , systemStateVersion ? "25.11" + , hostName + , configuration ? [ ] + }: + nix-darwin.lib.darwinSystem { + inherit system; + specialArgs = specialArgs // { + inherit system skygUtils user; + unstablePkgs = nixpkgs-unstable.legacyPackages.${system}; }; - } - ); - # makeDarwinModule = - # { system ? "x86_64-darwin" - # , user - # , ... - # }@attrs: - # nix-darwin.lib.darwinSystem { - # modules = - # (makeImports { - # attrs = attrs; - # extraConfiguration = [ - # home-manager.darwinModules.home-manager - # stylix.darwinModules.stylix - # ]; - # }) - # ++ [ - # (import ./macos.nix { - # user = user; - # system = system; - # }) - # ]; - # }; - # makeHomeManagerUsers = - # { modules ? [ ] - # , homeManagerVersion - # , user - # , system ? "x86_64-linux" - # , - # }: - # let - # hm = ( - # import ./home { - # stateVersion = homeManagerVersion; - # }makeHLServices - # ); - # pkgs = allPkgs."${system}"; - # in - # home-manager.lib.homeManagerConfiguration { - # inherit pkgs; - # modules = [ - # (hm.makeCommonUser user) - # ] - # ++ modules; - # }; -in -{ - eachSystem = eachSystem; - pkgs = allPkgs; - makeNixOs = makeNixOs; - makeNixosConfigurations = - nodes: - builtins.listToAttrs ( - builtins.map - ({ hostName - , ... - }@attrs: { - name = hostName; - value = makeNixOs - { - inherit hostName; - } // attrs; + modules = [ + determinate.darwinModules.default + home-manager.darwinModules.home-manager + stylix.darwinModules.stylix + (import ./macos.nix { + user = user; + system = system; }) - nodes - ); + (import ./main.nix { + inherit + user + homeManagerVersion + hostName + systemStateVersion; + }) + ] ++ configuration; + }; } diff --git a/modules/macos.nix b/modules/macos.nix index e3481cb..7a8a8b9 100644 --- a/modules/macos.nix +++ b/modules/macos.nix @@ -1,8 +1,12 @@ { user, system }: -{ pkgs, ... }: { +{ ... }: { services.nix-daemon.enable = true; security.pam.enableSudoTouchIdAuth = true; users.users.${user.name}.home = user.homepath; users.users.root.home = "/var/root"; nixpkgs.hostPlatform = system; + nix.enable = false; + determinate-nix.customSettings = { + flake-registry = "/etc/nix/flake-registry.json"; + }; } diff --git a/modules/nixos/common/hardware/amdgpu.nix b/modules/nixos/common/hardware/amdgpu.nix index ac89f89..ef124d8 100644 --- a/modules/nixos/common/hardware/amdgpu.nix +++ b/modules/nixos/common/hardware/amdgpu.nix @@ -20,6 +20,7 @@ in # }; environment.systemPackages = (with pkgs; [ rocmPackages.rocm-smi + rocmPackages.rocminfo rocmPackages.rpp rocmPackages.rocm-core rocmPackages.rocm-runtime