diff --git a/.sops.yaml b/.sops.yaml index 4e94eda..24c0639 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -3,15 +3,19 @@ keys: - &admin_alpheratz age1gdtjn3jgvvvspa86q3lnklflnvyf3s75y2rw23l7nk7hwcsfpg7qkq7msr - &server_diphda age1rxqyz6watg05r3rzlme7grpgfgezhlt535gdl7psqys2ec8eegmqchfk4d creation_rules: - - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ + - path_regex: secrets/[^/]+\.yaml$ key_groups: - age: - *admin_ankaa - - path_regex: secrets/alpheratz/[^/]+\.(yaml|json|env|ini)$ + - *admin_alpheratz + - path_regex: secrets/ankaa/[^/]+\.yaml$ + - age: + - *admin_ankaa + - path_regex: secrets/alpheratz/[^/]+\.yaml$ key_groups: - age: - *admin_alpheratz - - path_regex: secrets/diphda/[^/]+\.(yaml|json|env|ini)$ + - path_regex: secrets/diphda/[^/]+\.yaml$ key_groups: - age: - *admin_ankaa diff --git a/flake.lock b/flake.lock index 6d9b145..15c7d79 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -46,11 +64,11 @@ ] }, "locked": { - "lastModified": 1720045378, - "narHash": "sha256-lmE7B+QXw7lWdBu5GQlUABSpzPk3YBb9VbV+IYK5djk=", + "lastModified": 1720289319, + "narHash": "sha256-E3CjSsXNDWYqoNjrKQLPdEZDLR+mVI9HMa+jY//FjBY=", "owner": "nix-community", "repo": "home-manager", - "rev": "0a30138c694ab3b048ac300794c2eb599dc40266", + "rev": "10486e6b311b3c5ae1c3477fee058704cea7cb4a", "type": "github" }, "original": { @@ -59,29 +77,60 @@ "type": "github" } }, + "llama-cpp": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1720379079, + "narHash": "sha256-6ljyeuGY/FHt6GtLynB0J/0cugz9n8qW76lglrOtp0o=", + "owner": "ggerganov", + "repo": "llama.cpp", + "rev": "3fd62a6b1c9ca7b7c0093e984cc9c133c6f2726d", + "type": "github" + }, + "original": { + "owner": "ggerganov", + "repo": "llama.cpp", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1719468428, - "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1717284937, + "narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz" + } + }, "nixpkgs-stable": { "locked": { - "lastModified": 1719956923, - "narHash": "sha256-nNJHJ9kfPdzYsCOlHOnbiiyKjZUW5sWbwx3cakg3/C4=", + "lastModified": 1720110830, + "narHash": "sha256-E5dN9GDV4LwMEduhBLSkyEz51zM17XkWZ3/9luvNOPs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "706eef542dec88cc0ed25b9075d3037564b2d164", + "rev": "c0d0be00d4ecc4b51d2d6948e37466194c1e6c51", "type": "github" }, "original": { @@ -93,27 +142,27 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1719663039, - "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", + "lastModified": 1720282526, + "narHash": "sha256-dudRkHPRivMNOhd04YI+v4sWvn2SnN5ODSPIu5IVbco=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", + "rev": "550ac3e955c30fe96dd8b2223e37e0f5d225c927", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.11", + "ref": "release-24.05", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-unstable": { "locked": { - "lastModified": 1719848872, - "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -123,11 +172,28 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1720181791, + "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-utils": "flake-utils", "home-manager-stable": "home-manager-stable", "home-manager-unstable": "home-manager-unstable", + "llama-cpp": "llama-cpp", "nixpkgs-stable": "nixpkgs-stable", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix" @@ -135,15 +201,15 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1719873517, - "narHash": "sha256-D1dxZmXf6M2h5lNE1m6orojuUawVPjogbGRsqSBX+1g=", + "lastModified": 1720321395, + "narHash": "sha256-kcI8q9Nh8/CSj0ygfWq1DLckHl8IHhFarL8ie6g7OEk=", "owner": "Mic92", "repo": "sops-nix", - "rev": "a11224af8d824935f363928074b4717ca2e280db", + "rev": "c184aca4db5d71c3db0c8cbfcaaec337a5d065ea", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 15dc2f5..204ec19 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,8 @@ sops-nix.url = "github:Mic92/sops-nix"; + llama-cpp.url = "github:ggerganov/llama.cpp"; + }; outputs = inputs@{ self @@ -179,6 +181,7 @@ pkgs = import nixpkgs { inherit system; overlays = with overlays; [ gamescope ]; + config.allowUnfree = true; }; localPackages = pkgs.lib.genAttrs flake-utils.lib.defaultSystems (system: { diff --git a/hosts/ankaa/system.nix b/hosts/ankaa/system.nix index f25967d..a49ae2a 100644 --- a/hosts/ankaa/system.nix +++ b/hosts/ankaa/system.nix @@ -16,10 +16,18 @@ }; }; + environment.systemPackages = with pkgs; [ + localPackages.x86_64-linux.jhelioviewer + ]; + hardware.graphics.extraPackages = with pkgs; [ rocmPackages.clr.icd ]; + systemd.tmpfiles.rules = [ + "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + ]; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -30,6 +38,11 @@ "/nix".options = [ "compress=zstd" "noatime" ]; }; + virtualisation.docker = { + enable = true; + storageDriver = "btrfs"; + }; + # Set your time zone. time.timeZone = "America/Chicago"; diff --git a/overlays/default.nix b/overlays/default.nix index 34dab82..a5624cc 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,7 +1,5 @@ -{ inputs -, ... -}: - +{ inputs, ...}: { gamescope = import ./gamescope-last-working.nix; + llama-cpp = import ./llama-cpp.nix { inherit inputs; }; } diff --git a/overlays/llama-cpp.nix b/overlays/llama-cpp.nix new file mode 100644 index 0000000..69f5eaa --- /dev/null +++ b/overlays/llama-cpp.nix @@ -0,0 +1,4 @@ +{ inputs, ... }: +final: prev: { + llama-cpp = inputs.llama-cpp.packages.rocm; +} diff --git a/pkgs/jhelioviewer.nix b/pkgs/jhelioviewer.nix index 0164740..99c5cd9 100644 --- a/pkgs/jhelioviewer.nix +++ b/pkgs/jhelioviewer.nix @@ -4,6 +4,7 @@ , jre , ant , jogl +, libGL , fetchFromGitHub , makeDesktopItem , copyDesktopItems @@ -60,6 +61,7 @@ stdenv.mkDerivation { mkdir $out/bin makeWrapper ${jre}/bin/java $out/bin/jhelioviewer \ + --prefix LD_LIBRARY_PATH : ${libGL}/lib/ \ --add-flags "-cp $out/share/java/JHelioviewer.jar" \ --add-flags "--add-exports java.desktop/sun.awt=ALL-UNNAMED" \ --add-flags "--add-exports java.desktop/sun.swing=ALL-UNNAMED" \