From dabd791fac02a84187fe3431469d147bd86d340b Mon Sep 17 00:00:00 2001 From: mjallen18 Date: Wed, 7 Jan 2026 09:17:34 -0600 Subject: [PATCH] nix format --- build-all-arm.sh | 8 + build-all.sh | 8 + flake.lock | 297 +++++++++++------- flake.nix | 18 +- homes/x86_64-linux/deck@steamdeck/default.nix | 25 +- .../x86_64-linux/matt@matt-nixos/default.nix | 55 ++-- modules/home/programs/hyprland/default.nix | 2 +- modules/home/programs/waybar/scripts/hass.nix | 8 +- modules/nixos/gaming/default.nix | 22 +- modules/nixos/hardware/raspberry-pi/audio.nix | 35 ++- modules/nixos/headless/default.nix | 4 +- .../services/homeassistant/default.nix | 51 +-- modules/nixos/nix/ccache/overlays.nix | 142 ++++----- modules/nixos/nix/default.nix | 3 +- modules/nixos/user/default.nix | 4 +- overlays/homeassistant/default.nix | 3 +- overlays/proton-cachyos/default.nix | 7 +- packages/homeassistant/ha-gehome/default.nix | 17 +- packages/linux-cachyos/build-all.sh | 4 +- packages/superposition/default.nix | 149 +++++++++ 20 files changed, 546 insertions(+), 316 deletions(-) create mode 100755 build-all-arm.sh create mode 100755 build-all.sh create mode 100644 packages/superposition/default.nix diff --git a/build-all-arm.sh b/build-all-arm.sh new file mode 100755 index 0000000..8f61fd6 --- /dev/null +++ b/build-all-arm.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -eu + +for flavor in {pi4,pi5}; do + nh os build --hostname="${flavor}" --out-link="result-${flavor}" +done + +attic push nas-cache result* diff --git a/build-all.sh b/build-all.sh new file mode 100755 index 0000000..caed172 --- /dev/null +++ b/build-all.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +set -eu + +for flavor in {jallen-nas,matt-nixos,nuc-nixos,steamdeck}; do + nh os build --cores=20 --hostname="${flavor}" --out-link="result-${flavor}" +done + +attic push nas-cache result* diff --git a/flake.lock b/flake.lock index 4ccf848..a4ae6b4 100644 --- a/flake.lock +++ b/flake.lock @@ -168,11 +168,11 @@ }, "crane": { "locked": { - "lastModified": 1754269165, - "narHash": "sha256-0tcS8FHd4QjbCVoxN9jI+PjHgA4vc/IjkUSp+N3zy0U=", + "lastModified": 1765145449, + "narHash": "sha256-aBVHGWWRzSpfL++LubA0CwOOQ64WNLegrYHwsVuVN7A=", "owner": "ipetkov", "repo": "crane", - "rev": "444e81206df3f7d92780680e45858e31d2f07a08", + "rev": "69f538cdce5955fcd47abfed4395dc6d5194c1c5", "type": "github" }, "original": { @@ -186,11 +186,11 @@ "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1767028240, - "narHash": "sha256-0/fLUqwJ4Z774muguUyn5t8AQ6wyxlNbHexpje+5hRo=", + "lastModified": 1767718503, + "narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "c31afa6e76da9bbc7c9295e39c7de9fca1071ea1", + "rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1", "type": "github" }, "original": { @@ -270,11 +270,11 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -348,27 +348,6 @@ } }, "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "lanzaboote", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1754091436, - "narHash": "sha256-XKqDMN1/Qj1DKivQvscI4vmHfDfvYR2pfuFOJiCeewM=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "67df8c627c2c39c41dbec76a1f201929929ab0bd", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { "inputs": { "nixpkgs-lib": [ "stylix", @@ -485,7 +464,7 @@ "inputs": { "nixpkgs": [ "lanzaboote", - "pre-commit-hooks-nix", + "pre-commit", "nixpkgs" ] }, @@ -546,15 +525,57 @@ "home-manager": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgs-stable" ] }, "locked": { - "lastModified": 1767702900, - "narHash": "sha256-xMzHmNytl7JgFRov2jHf2GYsLVp/sAfYO0JvbZt0uDo=", + "lastModified": 1767780135, + "narHash": "sha256-5SbmsLMgxzPd9YMbFR4IHfOXv6bjWs+dfl6IbSq3r7s=", "owner": "nix-community", "repo": "home-manager", - "rev": "38e187fd2f9efac197e03be0c25f3ee215974144", + "rev": "c08430923ed417abc653884328a39e98496cfd0f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager-stable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1767780135, + "narHash": "sha256-5SbmsLMgxzPd9YMbFR4IHfOXv6bjWs+dfl6IbSq3r7s=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c08430923ed417abc653884328a39e98496cfd0f", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager-unstable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1767792169, + "narHash": "sha256-WSAu+ZxF697u/OJDdBLO+YFhtqFsPowrXXOQbjDT/uA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "aea57993a89bfc2a66c0434e0f4383ebf164e2a3", "type": "github" }, "original": { @@ -565,7 +586,28 @@ }, "home-manager_2": { "inputs": { - "nixpkgs": "nixpkgs_6" + "nixpkgs": [ + "impermanence", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1747978958, + "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "7419250703fd5eb50e99bdfb07a86671939103ea", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_3": { + "inputs": { + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1760295538, @@ -583,11 +625,11 @@ "homebrew-cask": { "flake": false, "locked": { - "lastModified": 1767709335, - "narHash": "sha256-ntw1+fsftk9aI6+yxLieAjdIl6duGN39bxR3sqC0x7s=", + "lastModified": 1767794828, + "narHash": "sha256-18wBi6/zZIGzbevQMpMG06X/p/RkM35HoRmj3mrJzKw=", "owner": "homebrew", "repo": "homebrew-cask", - "rev": "0cbe1f6240ac153641db06eb8dc0231d611924b2", + "rev": "b83b4de9153f6576f6d92a483c5f30c6a4c28f92", "type": "github" }, "original": { @@ -599,11 +641,11 @@ "homebrew-core": { "flake": false, "locked": { - "lastModified": 1767712646, - "narHash": "sha256-hsJ5htjYlfSM0WBQ00s2wTgM4UOzdN3LM1z6DLeNq9g=", + "lastModified": 1767796371, + "narHash": "sha256-TUzOiXCQ4g/DT04hYBYDVt6JBET+LaEz6UsknesnP5g=", "owner": "homebrew", "repo": "homebrew-core", - "rev": "ecc81a8fdf92eb39acfe73b2a018b664761e8cca", + "rev": "e3cd58f60114fc964d45cdd7ccbefddccb5efcc7", "type": "github" }, "original": { @@ -613,12 +655,16 @@ } }, "impermanence": { + "inputs": { + "home-manager": "home-manager_2", + "nixpkgs": "nixpkgs_4" + }, "locked": { - "lastModified": 1737831083, - "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "lastModified": 1767548760, + "narHash": "sha256-SSLzVz9l/wDyuXYd7Y4wVe36Lj1qV7u2QqvEYbFvYZ8=", "owner": "nix-community", "repo": "impermanence", - "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "rev": "f868c97f9e7f62879a97b4ad0e00b64782a845db", "type": "github" }, "original": { @@ -630,14 +676,14 @@ "jovian": { "inputs": { "nix-github-actions": "nix-github-actions", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1767082077, - "narHash": "sha256-2tL1mRb9uFJThUNfuDm/ehrnPvImL/QDtCxfn71IEz4=", + "lastModified": 1767777502, + "narHash": "sha256-jXb2kBU6lO6Q6S9zoR/bhVLMjg2hM9EW8gWIwsmkj64=", "owner": "Jovian-Experiments", "repo": "Jovian-NixOS", - "rev": "efd4b22e6fdc6d7fb4e186ae333a4b74e03da440", + "rev": "a81fad3f4a70fdaa779e74b7da2063fa2e358028", "type": "github" }, "original": { @@ -649,23 +695,21 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_3", - "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_5", - "pre-commit-hooks-nix": "pre-commit-hooks-nix", + "nixpkgs": "nixpkgs_6", + "pre-commit": "pre-commit", "rust-overlay": "rust-overlay_2" }, "locked": { - "lastModified": 1762205063, - "narHash": "sha256-If6vQ+KvtKs3ARBO9G3l+4wFSCYtRBrwX1z+I+B61wQ=", + "lastModified": 1765382359, + "narHash": "sha256-RJmgVDzjRI18BWVogG6wpsl1UCuV6ui8qr4DJ1LfWZ8=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "88b8a563ff5704f4e8d8e5118fb911fa2110ca05", + "rev": "e8c096ade12ec9130ff931b0f0e25d2f1bc63607", "type": "github" }, "original": { "owner": "nix-community", - "ref": "v0.4.3", + "ref": "v1.0.0", "repo": "lanzaboote", "type": "github" } @@ -778,8 +822,8 @@ }, "nix-plist-manager": { "inputs": { - "home-manager": "home-manager_2", - "nixpkgs": "nixpkgs_7" + "home-manager": "home-manager_3", + "nixpkgs": "nixpkgs_8" }, "locked": { "lastModified": 1765533928, @@ -818,14 +862,14 @@ }, "nix-vscode-extensions": { "inputs": { - "nixpkgs": "nixpkgs_8" + "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1767665581, - "narHash": "sha256-eGWrFsXOkJMahFhxtPSFQf1VSjafE0ka2T/dTwk+byk=", + "lastModified": 1767751962, + "narHash": "sha256-LXRgP3xp707mK6SVew3p1jG95HU5kRG5bs3/CKhzdAk=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "905f111884f76ab6c1f6cdf1387d663696ccc369", + "rev": "f59e8f12eff2620050d9baebb21749189aeb1177", "type": "github" }, "original": { @@ -837,7 +881,7 @@ "nixai": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_9" + "nixpkgs": "nixpkgs_10" }, "locked": { "lastModified": 1755942173, @@ -886,7 +930,7 @@ "nixos-apple-silicon": { "inputs": { "flake-compat": "flake-compat_4", - "nixpkgs": "nixpkgs_10" + "nixpkgs": "nixpkgs_11" }, "locked": { "lastModified": 1767637567, @@ -1059,11 +1103,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1767480499, - "narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=", + "lastModified": 1767634882, + "narHash": "sha256-2GffSfQxe3sedHzK+sTKlYo/NTIAGzbFCIsNMUPAAnk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92", + "rev": "3c9db02515ef1d9b6b709fc60ba9a540957f661c", "type": "github" }, "original": { @@ -1075,11 +1119,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1767379071, - "narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=", + "lastModified": 1767640445, + "narHash": "sha256-UWYqmD7JFBEDBHWYcqE6s6c77pWdcU/i+bwD6XxMb8A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fb7944c166a3b630f177938e478f0378e64ce108", + "rev": "9f0c42f8bc7151b8e7e5840fb3bd454ad850d8c5", "type": "github" }, "original": { @@ -1090,6 +1134,22 @@ } }, "nixpkgs_10": { + "locked": { + "lastModified": 1751271578, + "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_11": { "locked": { "lastModified": 1762977756, "narHash": "sha256-4PqRErxfe+2toFJFgcRKZ0UI9NSIOJa+7RXVtBhy4KE=", @@ -1105,13 +1165,13 @@ "type": "github" } }, - "nixpkgs_11": { + "nixpkgs_12": { "locked": { - "lastModified": 1767480499, - "narHash": "sha256-8IQQUorUGiSmFaPnLSo2+T+rjHtiNWc+OAzeHck7N48=", + "lastModified": 1767634882, + "narHash": "sha256-2GffSfQxe3sedHzK+sTKlYo/NTIAGzbFCIsNMUPAAnk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "30a3c519afcf3f99e2c6df3b359aec5692054d92", + "rev": "3c9db02515ef1d9b6b709fc60ba9a540957f661c", "type": "github" }, "original": { @@ -1121,7 +1181,7 @@ "type": "github" } }, - "nixpkgs_12": { + "nixpkgs_13": { "locked": { "lastModified": 1767364772, "narHash": "sha256-fFUnEYMla8b7UKjijLnMe+oVFOz6HjijGGNS1l7dYaQ=", @@ -1170,6 +1230,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1748026106, + "narHash": "sha256-6m1Y3/4pVw1RWTsrkAK2VMYSzG4MMIj7sqUy7o8th1o=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "063f43f2dbdef86376cc29ad646c45c46e93234c", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1766070988, "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", @@ -1185,23 +1261,23 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1754243818, - "narHash": "sha256-sEPw2W01UPf0xNGnMGNZIaE1XHkk7O+lLLetYEXVZHk=", + "lastModified": 1764950072, + "narHash": "sha256-BmPWzogsG2GsXZtlT+MTcAWeDK5hkbGRZTeZNW42fwA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c460617dfb709a67d18bb31e15e455390ee4ee1c", + "rev": "f61125a668a320878494449750330ca58b78c557", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1759831965, "narHash": "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=", @@ -1217,7 +1293,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_8": { "locked": { "lastModified": 1757068644, "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", @@ -1233,7 +1309,7 @@ "type": "github" } }, - "nixpkgs_8": { + "nixpkgs_9": { "locked": { "lastModified": 1766025857, "narHash": "sha256-Lav5jJazCW4mdg1iHcROpuXqmM94BWJvabLFWaJVJp0=", @@ -1249,22 +1325,6 @@ "type": "github" } }, - "nixpkgs_9": { - "locked": { - "lastModified": 1751271578, - "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nur": { "inputs": { "flake-parts": [ @@ -1290,12 +1350,9 @@ "type": "github" } }, - "pre-commit-hooks-nix": { + "pre-commit": { "inputs": { - "flake-compat": [ - "lanzaboote", - "flake-compat" - ], + "flake-compat": "flake-compat_3", "gitignore": "gitignore", "nixpkgs": [ "lanzaboote", @@ -1303,11 +1360,11 @@ ] }, "locked": { - "lastModified": 1750779888, - "narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=", + "lastModified": 1765016596, + "narHash": "sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d", + "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", "type": "github" }, "original": { @@ -1316,7 +1373,7 @@ "type": "github" } }, - "pre-commit-hooks-nix_2": { + "pre-commit-hooks-nix": { "inputs": { "flake-compat": "flake-compat_6", "gitignore": "gitignore_2", @@ -1395,6 +1452,8 @@ "darwin": "darwin", "disko": "disko", "home-manager": "home-manager", + "home-manager-stable": "home-manager-stable", + "home-manager-unstable": "home-manager-unstable", "homebrew-cask": "homebrew-cask", "homebrew-core": "homebrew-core", "impermanence": "impermanence", @@ -1411,10 +1470,10 @@ "nixos-generators": "nixos-generators_2", "nixos-hardware": "nixos-hardware", "nixos-raspberrypi": "nixos-raspberrypi", - "nixpkgs": "nixpkgs_11", + "nixpkgs": "nixpkgs_12", "nixpkgs-stable": "nixpkgs-stable_2", "nixpkgs-unstable": "nixpkgs-unstable", - "pre-commit-hooks-nix": "pre-commit-hooks-nix_2", + "pre-commit-hooks-nix": "pre-commit-hooks-nix", "snowfall-lib": "snowfall-lib", "sops-nix": "sops-nix", "steam-rom-manager": "steam-rom-manager", @@ -1451,11 +1510,11 @@ ] }, "locked": { - "lastModified": 1761791894, - "narHash": "sha256-myRIDh+PxaREz+z9LzbqBJF+SnTFJwkthKDX9zMyddY=", + "lastModified": 1765075567, + "narHash": "sha256-KFDCdQcHJ0hE3Nt5Gm5enRIhmtEifAjpxgUQ3mzSJpA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "59c45eb69d9222a4362673141e00ff77842cd219", + "rev": "769156779b41e8787a46ca3d7d76443aaf68be6f", "type": "github" }, "original": { @@ -1487,7 +1546,7 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_12" + "nixpkgs": "nixpkgs_13" }, "locked": { "lastModified": 1767499857, @@ -1533,7 +1592,7 @@ "base16-helix": "base16-helix", "base16-vim": "base16-vim", "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_2", "gnome-shell": "gnome-shell", "nixpkgs": [ "nixpkgs" @@ -1708,11 +1767,11 @@ ] }, "locked": { - "lastModified": 1767468822, - "narHash": "sha256-MpffQxHxmjVKMiQd0Tg2IM/bSjjdQAM+NDcX6yxj7rE=", + "lastModified": 1767738726, + "narHash": "sha256-bHATlMr42JABTJgi4Wc8SJCK8Cv9AnR6HCl3k8eTwEs=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "d56486eb9493ad9c4777c65932618e9c2d0468fc", + "rev": "4db0238d79254c6d14f251808dc5264b8fc81b73", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 8c03822..9418820 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,18 @@ nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11"; + home-manager-stable = { + url = "github:nix-community/home-manager/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs-stable"; + }; + + home-manager-unstable = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + nixpkgs = nixpkgs-stable; + home-manager = home-manager-stable; # The name "snowfall-lib" is required due to how Snowfall Lib processes your # flake's inputs. @@ -12,11 +23,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; @@ -24,7 +30,7 @@ impermanence.url = "github:nix-community/impermanence"; - lanzaboote.url = "github:nix-community/lanzaboote/v0.4.3"; + lanzaboote.url = "github:nix-community/lanzaboote/v1.0.0"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; diff --git a/homes/x86_64-linux/deck@steamdeck/default.nix b/homes/x86_64-linux/deck@steamdeck/default.nix index 4f36fde..2404515 100755 --- a/homes/x86_64-linux/deck@steamdeck/default.nix +++ b/homes/x86_64-linux/deck@steamdeck/default.nix @@ -70,15 +70,18 @@ in }; }; - home.packages = with pkgs; [ - dolphin-emu - heroic - mgba - moonlight-qt - prismlauncher - ryubing - omnissa-horizon-client - ] ++ (with pkgs.${namespace}; [ - discord-krisp - ]); + home.packages = + with pkgs; + [ + dolphin-emu + heroic + mgba + moonlight-qt + prismlauncher + ryubing + omnissa-horizon-client + ] + ++ (with pkgs.${namespace}; [ + discord-krisp + ]); } diff --git a/homes/x86_64-linux/matt@matt-nixos/default.nix b/homes/x86_64-linux/matt@matt-nixos/default.nix index b72ca25..7ad2108 100755 --- a/homes/x86_64-linux/matt@matt-nixos/default.nix +++ b/homes/x86_64-linux/matt@matt-nixos/default.nix @@ -163,32 +163,35 @@ in password-store = enabled; }; - home.packages = with pkgs; [ - compose2nix - distrobox - heroic - omnissa-horizon-client - jq - lzip - morph - orca-slicer - piper - prismlauncher - protontricks - protonvpn-gui - python3 - runelite - smile - unigine-heaven - via - virt-manager - vorta - waydroid-helper - ] ++ (with pkgs.${namespace}; [ - bolt-launcher - discord-krisp - # librepods - ]); + home.packages = + with pkgs; + [ + compose2nix + distrobox + heroic + omnissa-horizon-client + jq + lzip + morph + orca-slicer + piper + prismlauncher + protontricks + protonvpn-gui + python3 + runelite + smile + via + virt-manager + vorta + waydroid-helper + ] + ++ (with pkgs.${namespace}; [ + bolt-launcher + discord-krisp + superposition + # librepods + ]); specialisation = { "cosmic".configuration = { diff --git a/modules/home/programs/hyprland/default.nix b/modules/home/programs/hyprland/default.nix index 678a3bb..db22b50 100644 --- a/modules/home/programs/hyprland/default.nix +++ b/modules/home/programs/hyprland/default.nix @@ -68,7 +68,7 @@ in xwayland ] ++ (if cfg.notificationDaemon == "mako" then [ mako ] else [ dunst ]) - ++ (if cfg.launcher == "wofi" then [ wofi ] else [ rofi ]) + ++ (if cfg.launcher == "wofi" then [ wofi ] else [ rofi ]) ++ (with pkgs.${namespace}; [ pipewire-python ]) ); diff --git a/modules/home/programs/waybar/scripts/hass.nix b/modules/home/programs/waybar/scripts/hass.nix index c388a5b..9150cb7 100755 --- a/modules/home/programs/waybar/scripts/hass.nix +++ b/modules/home/programs/waybar/scripts/hass.nix @@ -8,9 +8,11 @@ let cfg = config.${namespace}.programs.waybar; - pythonEnv = pkgs.python3.withPackages (_ps: with pkgs.${namespace}; [ - homeassistant-api - ]); + pythonEnv = pkgs.python3.withPackages ( + _ps: with pkgs.${namespace}; [ + homeassistant-api + ] + ); waybar-hass = pkgs.writeScriptBin "waybar-hass" '' #!${pythonEnv}/bin/python diff --git a/modules/nixos/gaming/default.nix b/modules/nixos/gaming/default.nix index dd505aa..9f668e3 100755 --- a/modules/nixos/gaming/default.nix +++ b/modules/nixos/gaming/default.nix @@ -37,14 +37,17 @@ in remotePlay.openFirewall = true; # Open ports in the firewall for Source Dedicated Server dedicatedServer.openFirewall = true; - extraCompatPackages = with pkgs; [ - proton-ge-bin - ] ++ (with pkgs.${namespace}; [ - proton-cachyos - proton-cachyos-v3 - proton-cachyos-v2 - proton-cachyos-v1 - ]); + extraCompatPackages = + with pkgs.unstable; + [ + proton-ge-bin + ] + ++ (with pkgs.${namespace}; [ + proton-cachyos + proton-cachyos-v3 + proton-cachyos-v2 + proton-cachyos-v1 + ]); gamescopeSession = { enable = true; args = [ @@ -83,6 +86,9 @@ in }; environment = { + systemPackages = with pkgs.${namespace}; [ + superposition + ]; variables = { STEAM_FORCE_DESKTOPUI_SCALING = "1.0"; }; diff --git a/modules/nixos/hardware/raspberry-pi/audio.nix b/modules/nixos/hardware/raspberry-pi/audio.nix index 8429707..daab7f0 100644 --- a/modules/nixos/hardware/raspberry-pi/audio.nix +++ b/modules/nixos/hardware/raspberry-pi/audio.nix @@ -18,22 +18,25 @@ in hardware.deviceTree = { overlays = [ ] - ++ (with pkgs.${namespace}; ( - if (variant == "5") then - [ - { - name = "pisound-pi5-overlay"; - dtsFile = "${raspberrypi-overlays}/dtbs/raspberrypi-overlays/pisound-pi5-overlay.dts"; - } - ] - else - [ - { - name = "pisound-overlay"; - dtsFile = "${raspberrypi-overlays}/dtbs/raspberrypi-overlays/pisound-overlay.dts"; - } - ] - )); + ++ ( + with pkgs.${namespace}; + ( + if (variant == "5") then + [ + { + name = "pisound-pi5-overlay"; + dtsFile = "${raspberrypi-overlays}/dtbs/raspberrypi-overlays/pisound-pi5-overlay.dts"; + } + ] + else + [ + { + name = "pisound-overlay"; + dtsFile = "${raspberrypi-overlays}/dtbs/raspberrypi-overlays/pisound-overlay.dts"; + } + ] + ) + ); }; }; } diff --git a/modules/nixos/headless/default.nix b/modules/nixos/headless/default.nix index bc7a272..e763d4b 100644 --- a/modules/nixos/headless/default.nix +++ b/modules/nixos/headless/default.nix @@ -1,6 +1,5 @@ { config, - pkgs, system, lib, namespace, @@ -8,9 +7,8 @@ }: with lib; let - inherit (lib.${namespace}) mkOpt mkBoolOpt; + inherit (lib.${namespace}) mkBoolOpt; cfg = config.${namespace}.headless; - isArm = ("aarch64-linux" == system) || ("aarch64-darwin" == system); in { options.${namespace}.headless = { diff --git a/modules/nixos/homeassistant/services/homeassistant/default.nix b/modules/nixos/homeassistant/services/homeassistant/default.nix index 93888b8..03dc4db 100644 --- a/modules/nixos/homeassistant/services/homeassistant/default.nix +++ b/modules/nixos/homeassistant/services/homeassistant/default.nix @@ -233,30 +233,33 @@ in "zone" ]; - customComponents = with pkgs.home-assistant-custom-components; [ - # nixpkgs - auth_oidc - better_thermostat - localtuya - luxer_one - prometheus_sensor - roborock_custom_map - smartir - versatile_thermostat - ] ++ (with pkgs.${namespace}; [ - ha-anycubic - ha-bambulab - ha-bedjet - ha-gehome - ha-icloud3 - ha-local-llm - ha-mail-and-packages - ha-nanokvm - ha-openhasp - ha-overseerr - ha-petlibro - ha-wyzeapi - ]); + customComponents = + with pkgs.home-assistant-custom-components; + [ + # nixpkgs + auth_oidc + better_thermostat + localtuya + luxer_one + prometheus_sensor + roborock_custom_map + smartir + versatile_thermostat + ] + ++ (with pkgs.${namespace}; [ + ha-anycubic + ha-bambulab + ha-bedjet + ha-gehome + ha-icloud3 + ha-local-llm + ha-mail-and-packages + ha-nanokvm + ha-openhasp + ha-overseerr + ha-petlibro + ha-wyzeapi + ]); customLovelaceModules = with pkgs.home-assistant-custom-lovelace-modules; [ atomic-calendar-revive diff --git a/modules/nixos/nix/ccache/overlays.nix b/modules/nixos/nix/ccache/overlays.nix index 9e46c06..23b8139 100644 --- a/modules/nixos/nix/ccache/overlays.nix +++ b/modules/nixos/nix/ccache/overlays.nix @@ -2,85 +2,71 @@ { nixpkgs.overlays = [ (_self: super: { - ${namespace} = - let - # clangCcacheStdenv = super.overrideCC super.llvmPackages.stdenv ( - # super.ccacheWrapper.override { - # cc = super.llvmPackages.stdenv.cc; - # extraConfig = '' - # export CCACHE_SLOPPINESS=include_file_ctime,time_macros - # export CCACHE_DIR=/var/cache/ccache - # ''; - # } - # ); - clangCcacheStdenv = pkgs.llvmPackages.stdenv; # pkgs.overrideCC pkgs.clangStdenv (pkgs.ccacheWrapper.override { cc = pkgs.llvmPackages.clangUseLLVM; }); - in - super.${namespace} - // { - linuxPackages_rpi5 = super.linuxPackagesFor ( - super.${namespace}.linux-rpi.override { stdenv = super.ccacheStdenv; } - ); - linuxPackages_rpi4 = super.linuxPackagesFor ( - super.${namespace}.linux-rpi.override { - stdenv = super.ccacheStdenv; - rpiVersion = 4; - } - ); - libraspberrypi = super.${namespace}.libraspberrypi.override { stdenv = super.ccacheStdenv; }; - raspberrypi-utils = super.${namespace}.raspberrypi-utils.override { stdenv = super.ccacheStdenv; }; + ${namespace} = super.${namespace} // { + linuxPackages_rpi5 = super.linuxPackagesFor ( + super.${namespace}.linux-rpi.override { stdenv = super.ccacheStdenv; } + ); + linuxPackages_rpi4 = super.linuxPackagesFor ( + super.${namespace}.linux-rpi.override { + stdenv = super.ccacheStdenv; + rpiVersion = 4; + } + ); + libraspberrypi = super.${namespace}.libraspberrypi.override { stdenv = super.ccacheStdenv; }; + raspberrypi-utils = super.${namespace}.raspberrypi-utils.override { stdenv = super.ccacheStdenv; }; - linuxPackages_cachyos = super.${namespace}.linuxPackages_cachyos.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-lto = super.${namespace}.linuxPackages_cachyos-lto.override { - # stdenv = clangCcacheStdenv; - # }; - # linuxPackages_cachyos-lto-full = super.${namespace}.linuxPackages_cachyos-lto-full.override { - # stdenv = clangCcacheStdenv; - # }; - linuxPackages_cachyos-lts = super.${namespace}.linuxPackages_cachyos-lts.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-lts-lto = super.${namespace}.linuxPackages_cachyos-lts-lto.override { - # stdenv = clangCcacheStdenv; - # }; - # linuxPackages_cachyos-lto-znver4 = super.${namespace}.linuxPackages_cachyos-lto-znver4.override { - # stdenv = clangCcacheStdenv; - # }; - linuxPackages_cachyos-server = super.${namespace}.linuxPackages_cachyos-server.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-server-lto = super.${namespace}.linuxPackages_cachyos-server-lto.override { - # stdenv = clangCcacheStdenv; - # }; - # linuxPackages_cachyos-server-lto-znver4 = - # super.${namespace}.linuxPackages_cachyos-server-lto-znver4.override - # { stdenv = clangCcacheStdenv; }; - linuxPackages_cachyos-rc = super.${namespace}.linuxPackages_cachyos-rc.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-rc-lto = super.${namespace}.linuxPackages_cachyos-rc-lto.override { - # stdenv = clangCcacheStdenv; - # }; - # linuxPackages_cachyos-rc-lto-znver4 = - # super.${namespace}.linuxPackages_cachyos-rc-lto-znver4.override - # { stdenv = clangCcacheStdenv; }; - linuxPackages_cachyos-hardened = super.${namespace}.linuxPackages_cachyos-hardened.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-hardened-lto = - # super.${namespace}.linuxPackages_cachyos-hardened-lto.override - # { stdenv = clangCcacheStdenv; }; - # linuxPackages_cachyos-hardened-lto-znver4 = - # super.${namespace}.linuxPackages_cachyos-hardened-lto-znver4.override - # { stdenv = clangCcacheStdenv; }; - linuxPackages_cachyos-deckify = super.${namespace}.linuxPackages_cachyos-deckify.override { - stdenv = super.ccacheStdenv; - }; - # linuxPackages_cachyos-deckify-lto = super.${namespace}.linuxPackages_cachyos-deckify-lto.override { - # stdenv = clangCcacheStdenv; - # }; + linuxPackages_cachyos = super.${namespace}.linuxPackages_cachyos.override { + stdenv = super.ccacheStdenv; }; + # linuxPackages_cachyos-lto = super.${namespace}.linuxPackages_cachyos-lto.override { + # stdenv = clangCcacheStdenv; + # }; + # linuxPackages_cachyos-lto-full = super.${namespace}.linuxPackages_cachyos-lto-full.override { + # stdenv = clangCcacheStdenv; + # }; + linuxPackages_cachyos-lts = super.${namespace}.linuxPackages_cachyos-lts.override { + stdenv = super.ccacheStdenv; + }; + # linuxPackages_cachyos-lts-lto = super.${namespace}.linuxPackages_cachyos-lts-lto.override { + # stdenv = clangCcacheStdenv; + # }; + # linuxPackages_cachyos-lto-znver4 = super.${namespace}.linuxPackages_cachyos-lto-znver4.override { + # stdenv = clangCcacheStdenv; + # }; + linuxPackages_cachyos-server = super.${namespace}.linuxPackages_cachyos-server.override { + stdenv = super.ccacheStdenv; + }; + # linuxPackages_cachyos-server-lto = super.${namespace}.linuxPackages_cachyos-server-lto.override { + # stdenv = clangCcacheStdenv; + # }; + # linuxPackages_cachyos-server-lto-znver4 = + # super.${namespace}.linuxPackages_cachyos-server-lto-znver4.override + # { stdenv = clangCcacheStdenv; }; + linuxPackages_cachyos-rc = super.${namespace}.linuxPackages_cachyos-rc.override { + stdenv = super.ccacheStdenv; + }; + # linuxPackages_cachyos-rc-lto = super.${namespace}.linuxPackages_cachyos-rc-lto.override { + # stdenv = clangCcacheStdenv; + # }; + # linuxPackages_cachyos-rc-lto-znver4 = + # super.${namespace}.linuxPackages_cachyos-rc-lto-znver4.override + # { stdenv = clangCcacheStdenv; }; + linuxPackages_cachyos-hardened = super.${namespace}.linuxPackages_cachyos-hardened.override { + stdenv = super.ccacheStdenv; + }; + # linuxPackages_cachyos-hardened-lto = + # super.${namespace}.linuxPackages_cachyos-hardened-lto.override + # { stdenv = clangCcacheStdenv; }; + # linuxPackages_cachyos-hardened-lto-znver4 = + # super.${namespace}.linuxPackages_cachyos-hardened-lto-znver4.override + # { stdenv = clangCcacheStdenv; }; + linuxPackages_cachyos-deckify = super.${namespace}.linuxPackages_cachyos-deckify.override { + stdenv = super.ccacheStdenv; + }; + # linuxPackages_cachyos-deckify-lto = super.${namespace}.linuxPackages_cachyos-deckify-lto.override { + # stdenv = clangCcacheStdenv; + # }; + }; }) (_self: super: { @@ -159,4 +145,4 @@ # }); # }) ]; -} \ No newline at end of file +} diff --git a/modules/nixos/nix/default.nix b/modules/nixos/nix/default.nix index 913d219..8d2b5a2 100644 --- a/modules/nixos/nix/default.nix +++ b/modules/nixos/nix/default.nix @@ -2,7 +2,6 @@ config, lib, namespace, - pkgs, ... }: { @@ -31,7 +30,7 @@ connect-timeout = lib.mkDefault 5; fallback = true; log-lines = lib.mkDefault 25; - + max-free = lib.mkDefault (3000 * 1024 * 1024); min-free = lib.mkDefault (512 * 1024 * 1024); }; diff --git a/modules/nixos/user/default.nix b/modules/nixos/user/default.nix index 37347a2..f0a90d0 100644 --- a/modules/nixos/user/default.nix +++ b/modules/nixos/user/default.nix @@ -71,9 +71,7 @@ in hashedPassword = mkOpt (nullOr str) null "Hashed password for the user."; - hashedPasswordFile = - mkOpt (nullOr path) null - "Path to the password file for this user account"; + hashedPasswordFile = mkOpt (nullOr path) null "Path to the password file for this user account"; mutableUsers = mkBoolOpt false "Whether users are mutable (can be modified after creation)."; }; diff --git a/overlays/homeassistant/default.nix b/overlays/homeassistant/default.nix index 1c8ddf7..5b9e6fe 100644 --- a/overlays/homeassistant/default.nix +++ b/overlays/homeassistant/default.nix @@ -1,6 +1,5 @@ { inputs, ... }: -final: _prev: { - inherit (inputs.nixpkgs-unstable.home-assistant); +_final: _prev: { # home-assistant = final.unstable.home-assistant; # home-assistant-custom-components = final.unstable.home-assistant-custom-components; } diff --git a/overlays/proton-cachyos/default.nix b/overlays/proton-cachyos/default.nix index 10513fc..485ff05 100644 --- a/overlays/proton-cachyos/default.nix +++ b/overlays/proton-cachyos/default.nix @@ -1,13 +1,8 @@ { - inputs, - self, namespace, ... }: -final: prev: -let -in -{ +_final: prev: { ${namespace} = prev.${namespace} // { proton-cachyos-v3 = prev.${namespace}.proton-cachyos.override { versionFilename = "cachyos-v3-version.json"; diff --git a/packages/homeassistant/ha-gehome/default.nix b/packages/homeassistant/ha-gehome/default.nix index 476c6a4..6e69ff1 100644 --- a/packages/homeassistant/ha-gehome/default.nix +++ b/packages/homeassistant/ha-gehome/default.nix @@ -18,13 +18,16 @@ buildHomeAssistantComponent rec { hash = "sha256-hxgQsHb0E/XQEZoVFtKOgdHEVsU5UgqhOjjkgKqlI1I="; }; - nativeBuildInputs = with python3Packages; [ - # gehomesdk - slixmpp - ] ++ (with pkgs.${namespace}; [ - gehomesdk - magicattr - ]); + nativeBuildInputs = + with python3Packages; + [ + # gehomesdk + slixmpp + ] + ++ (with pkgs.${namespace}; [ + gehomesdk + magicattr + ]); meta = { changelog = "https://github.com/simbaja/ha_gehome/releases/tag/${version}"; diff --git a/packages/linux-cachyos/build-all.sh b/packages/linux-cachyos/build-all.sh index b99ee36..d26d1a8 100755 --- a/packages/linux-cachyos/build-all.sh +++ b/packages/linux-cachyos/build-all.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -eu -for flavor in cachyos{-gcc,-server,-lts,-rc,-hardened,-lto,-server-lto,-lts-lto,-rc-lto,-hardened-lto}; do +# -gcc,-server,-lts,-rc,-hardened, + +for flavor in cachyos{-lto,-server-lto,-lts-lto,-rc-lto,-hardened-lto}; do nom build ".#nixosConfigurations.jallen-nas.pkgs.mjallen.linuxPackages_${flavor}.kernel" attic push nas-cache result* done diff --git a/packages/superposition/default.nix b/packages/superposition/default.nix new file mode 100644 index 0000000..87107f5 --- /dev/null +++ b/packages/superposition/default.nix @@ -0,0 +1,149 @@ +{ + lib, + glib, + stdenv, + dbus, + freetype, + fontconfig, + zlib, + libsForQt5, + libxinerama, + libxcb, + libsm, + libxi, + libglvnd, + libxext, + libxrandr, + mailspring, + libx11, + libice, + libxrender, + autoPatchelfHook, + makeWrapper, + xkeyboard_config, + fetchurl, + buildFHSEnv, + openal, + makeDesktopItem, +}: + +let + pname = "unigine-superposition"; + version = "1.1"; + + superposition = stdenv.mkDerivation rec { + inherit pname version; + + src = fetchurl { + url = "https://assets.unigine.com/d/Unigine_Superposition-${version}.run"; + sha256 = "sha256-dJThxzv1nvIWFRPV1cudm/+9hHmSnUl2rFO2lV3lgPg="; + }; + + nativeBuildInputs = [ + autoPatchelfHook + makeWrapper + ]; + + buildInputs = [ + glib + stdenv.cc.cc + dbus + freetype + fontconfig + zlib + libsForQt5.qt5.qtquickcontrols2 + libxinerama + libxcb + libsm + libxi + libglvnd + libxext + libxrandr + mailspring + libx11 + libice + libxrender + ]; + + installPhase = '' + bash $src --target $name --noexec + mkdir -p $out/bin $out/lib/unigine/superposition/ + cp -r $name/* $out/lib/unigine/superposition/ + echo "exec $out/lib/unigine/superposition/Superposition" >> $out/bin/superposition + chmod +x $out/bin/superposition + wrapProgram $out/lib/unigine/superposition/Superposition \ + --set QT_XKB_CONFIG_ROOT ${xkeyboard_config} \ + --run "cd $out/lib/unigine/superposition/" + ''; + + dontUnpack = true; + dontWrapQtApps = true; + + postPatchMkspecs = '' + cp -f $name/bin/superposition $out/lib/unigine/superposition/bin/superposition + ''; + }; + + desktopItem = makeDesktopItem { + name = "Superposition"; + exec = "unigine-superposition"; + genericName = "A GPU Stress test tool from the UNIGINE"; + icon = "Superposition"; + desktopName = "Superposition Benchmark"; + }; + +in + +# We can patch the "/bin/superposition", but "/bin/launcher" checks it for changes. +# For that we need use a buildFHSEnv. + +buildFHSEnv { + inherit pname version; + + targetPkgs = _pkgs: [ + superposition + glib + stdenv.cc.cc + dbus + freetype + fontconfig + zlib + libsForQt5.qt5.qtquickcontrols2 + libxinerama + libxcb + libsm + libxi + libglvnd + libxext + libxrandr + mailspring + libx11 + libice + libxrender + openal + ]; + runScript = "superposition"; + + extraInstallCommands = '' + # create directories + mkdir -p $out/share/icons/hicolor $out/share/applications + # create .desktop file + ln -s ${desktopItem}/share/applications/* $out/share/applications + # install Superposition.desktop and icon + cp ${superposition}/lib/unigine/superposition/Superposition.png $out/share/icons/ + for RES in 16 24 32 48 64 128 256; do + mkdir -p $out/share/icons/hicolor/"$RES"x"$RES"/apps + cp ${superposition}/lib/unigine/superposition/icons/superposition_icon_$RES.png $out/share/icons/hicolor/"$RES"x"$RES"/apps/Superposition.png + done + ''; + + meta = { + description = "Unigine Superposition GPU benchmarking tool"; + homepage = "https://benchmark.unigine.com/superposition"; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + license = lib.licenses.unfree; + maintainers = [ ]; + platforms = [ "x86_64-linux" ]; + mainProgram = "unigine-superposition"; + }; +}