diff --git a/ci/default.nix b/ci/default.nix new file mode 100644 index 0000000..48a1ad1 --- /dev/null +++ b/ci/default.nix @@ -0,0 +1,24 @@ +{inputs, ...}: { + imports = [ + inputs.hercules-ci-effects.flakeModule + ]; + herculesCI.ciSystems = [ + "x86_64-linux" + "aarch64-linux" + ]; + hercules-ci.flake-update = { + enable = true; + updateBranch = "updated-flake-lock"; + createPullRequest = true; + autoMergeMethod = "rebase"; + baseMerge = { + enable = true; + method = "rebase"; + }; + when = { + minute = 45; + hour = 13; + dayOfWeek = ["Mon" "Tue" "Wed" "Thu" "Fri" "Sat" "Sun"]; + }; + }; +} diff --git a/flake.lock b/flake.lock index 96c7b05..b11b51d 100644 --- a/flake.lock +++ b/flake.lock @@ -21,6 +21,57 @@ "type": "github" } }, + "arion": { + "inputs": { + "flake-parts": "flake-parts", + "haskell-flake": "haskell-flake", + "hercules-ci-effects": "hercules-ci-effects", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1722825873, + "narHash": "sha256-bFNXkD+s9NuidZePiJAjjFUnsMOwXb7hEZ4JEDdSALw=", + "owner": "hercules-ci", + "repo": "arion", + "rev": "90bc85532767c785245f5c1e29ebfecb941cf8c9", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "arion", + "type": "github" + } + }, + "ccrEmacs": { + "inputs": { + "emacs-overlay": "emacs-overlay", + "extra-package-copilot": "extra-package-copilot", + "extra-package-haskell-ts-mode": "extra-package-haskell-ts-mode", + "extra-package-indent-bars": "extra-package-indent-bars", + "extra-package-notmuch-notify": "extra-package-notmuch-notify", + "extra-package-typst-ts-mode": "extra-package-typst-ts-mode", + "flake-parts": "flake-parts_3", + "hercules-ci-effects": "hercules-ci-effects_2", + "nixpkgs": [ + "ccrEmacs", + "emacs-overlay", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1726472869, + "narHash": "sha256-oEzFzuPOuoPUgJ38E7GpUU7fR5Lf9y/CdYuk7KEhBGA=", + "ref": "refs/heads/master", + "rev": "6cc0c0f094451905fc57c0e1d454271ca679ad1a", + "revCount": 195, + "type": "git", + "url": "https://git.aciceri.dev/aciceri/emacs.git" + }, + "original": { + "type": "git", + "url": "https://git.aciceri.dev/aciceri/emacs.git" + } + }, "darwin": { "inputs": { "nixpkgs": [ @@ -46,7 +97,7 @@ "disko": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -65,7 +116,7 @@ }, "dream2nix": { "inputs": { - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_5", "purescript-overlay": "purescript-overlay", "pyproject-nix": "pyproject-nix" }, @@ -83,6 +134,106 @@ "type": "github" } }, + "emacs-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_3", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1724231640, + "narHash": "sha256-1FnV0jk8GAItH71zVTzrhULylMKyXsb4FNmtn9b46Ug=", + "owner": "nix-community", + "repo": "emacs-overlay", + "rev": "758aa1deb09d8d2dce7bd3a016434e8fcedfab89", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "emacs-overlay", + "type": "github" + } + }, + "extra-package-copilot": { + "flake": false, + "locked": { + "lastModified": 1723778577, + "narHash": "sha256-/ZDnEZWUFcKnUtFrd/4C7LX16GAdUQncU8ZnYzntKS0=", + "owner": "zerolfx", + "repo": "copilot.el", + "rev": "535ef61e82f09d744cd5b097b1fc99f08cce175c", + "type": "github" + }, + "original": { + "owner": "zerolfx", + "repo": "copilot.el", + "type": "github" + } + }, + "extra-package-haskell-ts-mode": { + "flake": false, + "locked": { + "lastModified": 1724558409, + "narHash": "sha256-dmY9tE5xKB+8od/EJkcUsAZGFBsRiGmz26StbWxfXxo=", + "ref": "refs/heads/main", + "rev": "5d3bd04e43066164feaa864953d30e53e0e137e3", + "revCount": 46, + "type": "git", + "url": "https://codeberg.org/pranshu/haskell-ts-mode.git" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/pranshu/haskell-ts-mode.git" + } + }, + "extra-package-indent-bars": { + "flake": false, + "locked": { + "lastModified": 1724025552, + "narHash": "sha256-xBwtj991wy2O764ATBEILsGk597f7pkCmDfbF+tbjns=", + "owner": "jdtsmith", + "repo": "indent-bars", + "rev": "b72fa098d7c48d61fb4b508071bd77d054268f4e", + "type": "github" + }, + "original": { + "owner": "jdtsmith", + "repo": "indent-bars", + "type": "github" + } + }, + "extra-package-notmuch-notify": { + "flake": false, + "locked": { + "lastModified": 1615303739, + "narHash": "sha256-7REFHQ5+cCK7EGIvs2CnoWu9a7WPxX4W6eFql2nNYP8=", + "owner": "firmart", + "repo": "notmuch-notify", + "rev": "c10012e38b0093bc3a304b90a30dd09c81b3eb75", + "type": "github" + }, + "original": { + "owner": "firmart", + "repo": "notmuch-notify", + "type": "github" + } + }, + "extra-package-typst-ts-mode": { + "flake": false, + "locked": { + "lastModified": 1726618039, + "narHash": "sha256-hlP9B+K1duSgKyy984BJ3+ZPThoci2pZ5YMg9pnMWIk=", + "ref": "refs/heads/main", + "rev": "272ecc1db7acad9bd9de15e01bdd14cd2c4d6119", + "revCount": 212, + "type": "git", + "url": "https://codeberg.org/meow_king/typst-ts-mode.git" + }, + "original": { + "type": "git", + "url": "https://codeberg.org/meow_king/typst-ts-mode.git" + } + }, "fan-control": { "flake": false, "locked": { @@ -117,7 +268,183 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": [ + "arion", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_10": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_5" + }, + "locked": { + "lastModified": 1714606777, + "narHash": "sha256-bMkNmAXLj8iyTvxaaD/StcLSadbj1chPcJOjtuVnLmA=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4d34ce6412bc450b1d4208c953dc97c7fc764f1a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_11": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_6" + }, + "locked": { + "lastModified": 1678379998, + "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": [ + "arion", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1722555600, + "narHash": "sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC+x4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "8471fe90ad337a8074e957b69ca4d0089218391d", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": [ + "ccrEmacs", + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_5": { + "inputs": { + "nixpkgs-lib": [ + "hercules-ci-agent", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719877454, + "narHash": "sha256-g5N1yyOSsPNiOlFfkuI/wcUjmtah+nxdImJqrSATjOU=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "4e3583423212f9303aa1a6337f8dffb415920e4f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_6": { + "inputs": { + "nixpkgs-lib": [ + "hercules-ci-effects", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712014858, + "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_7": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1714641030, + "narHash": "sha256-yzcRNDoyVP7+SCNX0wmuDju1NUCt8Dz9+lyUXEI0dbI=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "e5d10a24b66c3ea8f150e47dfdb0416ab7c3390e", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_8": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_4" }, "locked": { "lastModified": 1701473968, @@ -133,7 +460,7 @@ "type": "github" } }, - "flake-parts_2": { + "flake-parts_9": { "inputs": { "nixpkgs-lib": [ "nixThePlanet", @@ -154,21 +481,18 @@ "type": "indirect" } }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_3" - }, + "flake-root": { "locked": { - "lastModified": 1678379998, - "narHash": "sha256-TZdfNqftHhDuIFwBcN9MUThx5sQXCTeZk9je5byPKRw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c13d60b89adea3dc20704c045ec4d50dd964d447", + "lastModified": 1713493429, + "narHash": "sha256-ztz8JQkI08tjKnsTpfLqzWoKFQF4JGu2LRz8bkdnYUk=", + "owner": "srid", + "repo": "flake-root", + "rev": "bc748b93b86ee76e2032eecda33440ceb2532fcd", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "srid", + "repo": "flake-root", "type": "github" } }, @@ -176,6 +500,24 @@ "inputs": { "systems": "systems_2" }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -190,27 +532,9 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1681202837, - "narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "cfacdce06f30d2b68473a46042957675eebb3401", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flakeParts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { "lastModified": 1726153070, @@ -262,11 +586,123 @@ "type": "github" } }, + "haskell-flake": { + "locked": { + "lastModified": 1675296942, + "narHash": "sha256-u1X1sblozi5qYEcLp1hxcyo8FfDHnRUVX3dJ/tW19jY=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "c2cafce9d57bfca41794dc3b99c593155006c71e", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.1.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "haskell-flake_2": { + "locked": { + "lastModified": 1684780604, + "narHash": "sha256-2uMZsewmRn7rRtAnnQNw1lj0uZBMh4m6Cs/7dV5YF08=", + "owner": "srid", + "repo": "haskell-flake", + "rev": "74210fa80a49f1b6f67223debdbf1494596ff9f2", + "type": "github" + }, + "original": { + "owner": "srid", + "ref": "0.3.0", + "repo": "haskell-flake", + "type": "github" + } + }, + "hercules-ci-agent": { + "inputs": { + "flake-parts": "flake-parts_5", + "haskell-flake": "haskell-flake_2", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1723736589, + "narHash": "sha256-/Vdg5ZKtP71ZEKVV6JXlrOEu0CM2Flcs+nwDmWRzgjQ=", + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "rev": "c303cc8e437c0fd26b9452472e7df5aa374e9177", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-agent", + "type": "github" + } + }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_2", + "nixpkgs": [ + "arion", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1719226092, + "narHash": "sha256-YNkUMcCUCpnULp40g+svYsaH1RbSEj6s4WdZY/SHe38=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "11e4b8dc112e2f485d7c97e1cee77f9958f498f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "hercules-ci-effects_2": { + "inputs": { + "flake-parts": "flake-parts_4", "nixpkgs": "nixpkgs_4" }, + "locked": { + "lastModified": 1719226092, + "narHash": "sha256-YNkUMcCUCpnULp40g+svYsaH1RbSEj6s4WdZY/SHe38=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "11e4b8dc112e2f485d7c97e1cee77f9958f498f5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "hercules-ci-effects_3": { + "inputs": { + "flake-parts": "flake-parts_6", + "nixpkgs": "nixpkgs_7" + }, + "locked": { + "lastModified": 1724947644, + "narHash": "sha256-MHHrHasTngp7EYQOObHJ1a/IsRF+wodHqOckhH6uZbk=", + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "rev": "dba4367b9a9d9615456c430a6d6af716f6e84cef", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "hercules-ci-effects", + "type": "github" + } + }, + "hercules-ci-effects_4": { + "inputs": { + "flake-parts": "flake-parts_9", + "nixpkgs": "nixpkgs_9" + }, "locked": { "lastModified": 1701009247, "narHash": "sha256-GuX16rzRze2y7CsewJLTV6qXkXWyEwp6VCZXi8HLruU=", @@ -326,7 +762,7 @@ "homeManager": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -346,7 +782,7 @@ "homeManagerGitWorkspace": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -414,13 +850,13 @@ }, "lix-module": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "flakey-profile": "flakey-profile", "lix": [ "lix" ], "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -453,6 +889,28 @@ "type": "github" } }, + "nix-fast-build": { + "inputs": { + "flake-parts": "flake-parts_7", + "nixpkgs": [ + "nixpkgsUnstable" + ], + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1719475157, + "narHash": "sha256-8zW6eWvE9T03cMpo/hY8RRZIsSCfs1zmsJOkEZzuYwM=", + "owner": "Mic92", + "repo": "nix-fast-build", + "rev": "030e586195c97424844965d2ce680140f6565c02", + "type": "github" + }, + "original": { + "owner": "Mic92", + "repo": "nix-fast-build", + "type": "github" + } + }, "nix-formatter-pack": { "inputs": { "nixpkgs": [ @@ -483,7 +941,7 @@ "inputs": { "home-manager": "home-manager_2", "nix-formatter-pack": "nix-formatter-pack", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_8", "nixpkgs-docs": "nixpkgs-docs", "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", "nmd": "nmd" @@ -505,7 +963,7 @@ "nixDarwin": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -524,10 +982,10 @@ }, "nixThePlanet": { "inputs": { - "flake-parts": "flake-parts", - "hercules-ci-effects": "hercules-ci-effects", + "flake-parts": "flake-parts_8", + "hercules-ci-effects": "hercules-ci-effects_4", "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ], "osx-kvm": "osx-kvm" }, @@ -546,6 +1004,27 @@ "type": "github" } }, + "nixd": { + "inputs": { + "flake-parts": "flake-parts_10", + "flake-root": "flake-root", + "nixpkgs": "nixpkgs_10", + "treefmt-nix": "treefmt-nix_2" + }, + "locked": { + "lastModified": 1726707834, + "narHash": "sha256-1ZOtza9NBU/2t80IQc3TJFC+cEZhDUnvmg7f4pNeOi4=", + "owner": "nix-community", + "repo": "nixd", + "rev": "a47ac2c1ea2349bdf31a41a9df2522af60a5b6e5", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixd", + "type": "github" + } + }, "nixosHardware": { "locked": { "lastModified": 1726724509, @@ -626,6 +1105,18 @@ } }, "nixpkgs-lib": { + "locked": { + "lastModified": 1722555339, + "narHash": "sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz" + } + }, + "nixpkgs-lib_2": { "locked": { "lastModified": 1725233747, "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", @@ -637,7 +1128,19 @@ "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" } }, - "nixpkgs-lib_2": { + "nixpkgs-lib_3": { + "locked": { + "lastModified": 1714640452, + "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" + } + }, + "nixpkgs-lib_4": { "locked": { "dir": "lib", "lastModified": 1701253981, @@ -655,7 +1158,25 @@ "type": "github" } }, - "nixpkgs-lib_3": { + "nixpkgs-lib_5": { + "locked": { + "dir": "lib", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_6": { "locked": { "dir": "lib", "lastModified": 1678375444, @@ -675,11 +1196,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "lastModified": 1724098845, + "narHash": "sha256-D5HwjQw/02fuXbR4LCTo64koglP2j99hkDR79/3yLOE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "rev": "f1bad50880bae73ff2d82fafc22010b4fc097a9c", "type": "github" }, "original": { @@ -689,13 +1210,61 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgsStable": { "locked": { - "lastModified": 1720181791, - "narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", + "lastModified": 1720535198, + "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", + "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgsUnstable": { + "locked": { + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", + "type": "github" + } + }, + "nixpkgsUnstableForSisko": { + "locked": { + "lastModified": 1708475490, + "narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "0e74ca98a74bc7270d28838369593635a5db3260", + "type": "github" + } + }, + "nixpkgs_10": { + "locked": { + "lastModified": 1714562304, + "narHash": "sha256-Mr3U37Rh6tH0FbaDFu0aZDwk9mPAe7ASaqDOGgLqqLU=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "bcd44e224fd68ce7d269b4f44d24c2220fd821e7", "type": "github" }, "original": { @@ -705,53 +1274,7 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1708172716, - "narHash": "sha256-3M94oln0b61m3dUmLyECCA9hYAHXZEszM4saE3CmQO4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5d874ac46894c896119bce68e758e9e80bdb28f1", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1697723726, - "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1726757509, - "narHash": "sha256-3/2rV78QyC/OPu+WzimbElmSdD3HsQq/P/TLcFQHjZQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "78fdf431cdf6bc4ba4af9c100aaeda65da7e4ed3", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_6": { + "nixpkgs_11": { "locked": { "lastModified": 1678470307, "narHash": "sha256-OEeMUr3ueLIXyW/OaFUX5jUdimyQwMg/7e+/Q0gC/QE=", @@ -767,18 +1290,131 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_2": { "locked": { - "lastModified": 1682134069, - "narHash": "sha256-TnI/ZXSmRxQDt2sjRYK/8j8iha4B4zP2cnQCZZ3vp7k=", + "lastModified": 1722630782, + "narHash": "sha256-hMyG9/WlUi0Ho9VkRrrez7SeNlDzLxalm9FwY7n/Noo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "fd901ef4bf93499374c5af385b2943f5801c0833", + "rev": "d04953086551086b44b6f3c6b7eeb26294f207da", "type": "github" }, "original": { - "id": "nixpkgs", - "type": "indirect" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1723991338, + "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8a3354191c0d7144db9756a74755672387b702ba", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1713714899, + "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "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" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1719848872, + "narHash": "sha256-H3+EC5cYuq+gQW8y0lSrrDZfH71LB4DAf+TDFyvwCNA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "00d80d13810dbfea8ab4ed1009b09100cca86ba8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1713714899, + "narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "6143fc5eeb9c4f00163267708e26191d1e918932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1708172716, + "narHash": "sha256-3M94oln0b61m3dUmLyECCA9hYAHXZEszM4saE3CmQO4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5d874ac46894c896119bce68e758e9e80bdb28f1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1697723726, + "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "nmd": { @@ -819,6 +1455,22 @@ "type": "gitlab" } }, + "nur": { + "locked": { + "lastModified": 1715146663, + "narHash": "sha256-SiCdZF3dwRBgTlHOSB5GCKBcTmkGmyDmVRwr6cHCdgE=", + "owner": "nix-community", + "repo": "NUR", + "rev": "324a5f3b9fbfdb77336dc9fa1c0a02f33a6acf6d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "rev": "324a5f3b9fbfdb77336dc9fa1c0a02f33a6acf6d", + "type": "github" + } + }, "osx-kvm": { "flake": false, "locked": { @@ -856,9 +1508,11 @@ "flake-compat": "flake-compat", "gitignore": "gitignore", "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ], - "nixpkgs-stable": "nixpkgs-stable" + "nixpkgs-stable": [ + "nixpkgsStable" + ] }, "locked": { "lastModified": 1726745158, @@ -916,13 +1570,13 @@ "rock5b": { "inputs": { "fan-control": "fan-control", - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_11", "kernel-src": "kernel-src", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_11", "nixpkgs-kernel": "nixpkgs-kernel", "panfork": "panfork", "tow-boot": "tow-boot", - "treefmt-nix": "treefmt-nix" + "treefmt-nix": "treefmt-nix_3" }, "locked": { "lastModified": 1685695782, @@ -941,24 +1595,32 @@ "root": { "inputs": { "agenix": "agenix", + "arion": "arion", + "ccrEmacs": "ccrEmacs", "disko": "disko", "dream2nix": "dream2nix", "flakeParts": "flakeParts", + "hercules-ci-agent": "hercules-ci-agent", + "hercules-ci-effects": "hercules-ci-effects_3", "homeManager": "homeManager", "homeManagerGitWorkspace": "homeManagerGitWorkspace", "impermanence": "impermanence", "lix": "lix", "lix-module": "lix-module", "mobile-nixos": "mobile-nixos", + "nix-fast-build": "nix-fast-build", "nix-on-droid": "nix-on-droid", "nixDarwin": "nixDarwin", "nixThePlanet": "nixThePlanet", + "nixd": "nixd", "nixosHardware": "nixosHardware", - "nixpkgs": "nixpkgs_5", + "nixpkgsStable": "nixpkgsStable", + "nixpkgsUnstable": "nixpkgsUnstable", + "nixpkgsUnstableForSisko": "nixpkgsUnstableForSisko", + "nur": "nur", "pre-commit-hooks": "pre-commit-hooks", "rock5b": "rock5b", - "treefmt-nix": "treefmt-nix_2", - "vscode-server": "vscode-server" + "treefmt-nix": "treefmt-nix_4" } }, "scss-reset": { @@ -1062,6 +1724,48 @@ } }, "treefmt-nix": { + "inputs": { + "nixpkgs": [ + "nix-fast-build", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714058656, + "narHash": "sha256-Qv4RBm4LKuO4fNOfx9wl40W2rBbv5u5m+whxRYUMiaA=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "c6aaf729f34a36c445618580a9f95a48f5e4e03f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nixd", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1722330636, + "narHash": "sha256-uru7JzOa33YlSRwf9sfXpJG+UAV+bnBEYMjrzKrQZFw=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "768acdb06968e53aa1ee8de207fd955335c754b7", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_3": { "inputs": { "nixpkgs": [ "rock5b", @@ -1082,10 +1786,10 @@ "type": "github" } }, - "treefmt-nix_2": { + "treefmt-nix_4": { "inputs": { "nixpkgs": [ - "nixpkgs" + "nixpkgsUnstable" ] }, "locked": { @@ -1101,25 +1805,6 @@ "repo": "treefmt-nix", "type": "github" } - }, - "vscode-server": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_7" - }, - "locked": { - "lastModified": 1713958148, - "narHash": "sha256-8PDNi/dgoI2kyM7uSiU4eoLBqUKoA+3TXuz+VWmuCOc=", - "owner": "nix-community", - "repo": "nixos-vscode-server", - "rev": "fc900c16efc6a5ed972fb6be87df018bcf3035bc", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixos-vscode-server", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 638d2af..7b754e0 100644 --- a/flake.nix +++ b/flake.nix @@ -4,42 +4,56 @@ inputs = { flakeParts.url = "github:hercules-ci/flake-parts"; # FIXME remove constraint - nixpkgs.url = "github:NixOS/nixpkgs"; - # nixpkgsForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260"; + nixpkgsUnstable.url = "github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60"; + nixpkgsUnstableForSisko.url = "github:NixOS/nixpkgs/0e74ca98a74bc7270d28838369593635a5db3260"; + nixpkgsStable.url = "github:NixOS/nixpkgs/nixos-23.11"; nixosHardware.url = "github:NixOS/nixos-hardware"; homeManager = { url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; # TODO: remove after https://github.com/nix-community/home-manager/pull/3811 homeManagerGitWorkspace = { url = "github:aciceri/home-manager/git-workspace"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; disko = { url = "github:nix-community/disko"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs = { + nixpkgs.follows = "nixpkgsUnstable"; + nixpkgs-stable.follows = "nixpkgsStable"; + }; }; + # FIXME go back to master after nltch's repository is re-added + nur.url = "github:nix-community/NUR/324a5f3b9fbfdb77336dc9fa1c0a02f33a6acf6d"; agenix.url = "github:ryantm/agenix"; rock5b.url = "github:aciceri/rock5b-nixos"; + ccrEmacs.url = "git+https://git.aciceri.dev/aciceri/emacs.git"; treefmt-nix = { url = "github:numtide/treefmt-nix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; + hercules-ci-effects.url = "github:hercules-ci/hercules-ci-effects"; dream2nix.url = "github:nix-community/dream2nix"; + hercules-ci-agent.url = "github:hercules-ci/hercules-ci-agent"; + nix-fast-build = { + url = "github:Mic92/nix-fast-build"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; + }; nixThePlanet = { url = "github:aciceri/NixThePlanet/nix-in-darwin"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; nixDarwin = { url = "github:LnL7/nix-darwin"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; nix-on-droid.url = "github:nix-community/nix-on-droid"; + nixd.url = "github:nix-community/nixd"; lix = { url = "git+https://git@git.lix.systems/lix-project/lix"; flake = false; @@ -47,14 +61,14 @@ lix-module = { url = "git+https://git.lix.systems/lix-project/nixos-module"; inputs.lix.follows = "lix"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgsUnstable"; }; mobile-nixos = { url = "github:NixOS/mobile-nixos"; flake = false; }; + arion.url = "github:hercules-ci/arion"; impermanence.url = "github:nix-community/impermanence"; - vscode-server.url = "github:nix-community/nixos-vscode-server"; }; outputs = inputs @ {flakeParts, ...}: @@ -67,6 +81,7 @@ ./packages ./shell ./checks + ./ci ]; systems = ["x86_64-linux" "aarch64-linux"]; }; diff --git a/hmModules/cura/default.nix b/hmModules/cura/default.nix index 32a1c64..2dcb042 100644 --- a/hmModules/cura/default.nix +++ b/hmModules/cura/default.nix @@ -1,28 +1,3 @@ {pkgs, ...}: { - home.packages = [ - (let - cura5 = pkgs.appimageTools.wrapType2 rec { - name = "cura5"; - version = "5.8.0"; - src = pkgs.fetchurl { - url = "https://github.com/Ultimaker/Cura/releases/download/${version}/UltiMaker-Cura-${version}-linux-X64.AppImage"; - hash = "sha256-EojVAe+o43W80ES5BY3QgGRTxztwS+B6kIOfJOtULOg="; - }; - }; - in - pkgs.writeScriptBin "cura" '' - #! ${pkgs.bash}/bin/bash - # AppImage version of Cura loses current working directory and treats all paths relateive to $HOME. - # So we convert each of the files passed as argument to an absolute path. - # This fixes use cases like `cd /path/to/my/files; cura mymodel.stl anothermodel.stl`. - args=() - for a in "$@"; do - if [ -e "$a" ]; then - a="$(realpath "$a")" - fi - args+=("$a") - done - QT_QPA_PLATFORM=xcb exec "${cura5}/bin/cura5" "''${args[@]}" - '') - ]; + home.packages = [pkgs.cura]; } diff --git a/hmModules/email/default.nix b/hmModules/email/default.nix index dd02c0c..d3b9d2a 100644 --- a/hmModules/email/default.nix +++ b/hmModules/email/default.nix @@ -5,183 +5,13 @@ }: { programs.mbsync.enable = true; programs.msmtp.enable = true; - services.mbsync.enable = true; - - home.file.".config/aerc/stylesets" = let - catppuccin-aerc = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "aerc"; - rev = "ca404a9f2d125ef12db40db663d43c9d94116a05"; - hash = "sha256-OWIkHsKFts/zkrDUtbBPXHVSrHL/F0v3LB1rnlFAKmE="; - }; - in { - source = "${catppuccin-aerc}/dist"; - recursive = true; - }; - - programs.aerc = { + programs.notmuch = { enable = true; - extraBinds = { - global = { - "" = ":prev-tab"; - "" = ":next-tab"; - "?" = ":help keys"; - }; - - messages = { - "h" = ":prev-tab"; - "l" = ":next-tab"; - - "j" = ":next"; - "" = ":next"; - "" = ":next 50%"; - "" = ":next 100%"; - "" = ":next 100%"; - - "k" = ":prev"; - "" = ":prev"; - "" = ":prev 50%"; - "" = ":prev 100%"; - "" = ":prev 100%"; - "g" = ":select 0"; - "G" = ":select -1"; - - "J" = ":next-folder"; - "K" = ":prev-folder"; - "H" = ":collapse-folder"; - "L" = ":expand-folder"; - - "v" = ":mark -t"; - "x" = ":mark -t:next"; - "V" = ":mark -v"; - - "T" = ":toggle-threads"; - - "" = ":view"; - "d" = ":prompt 'Really delete this message?' 'delete-message'"; - "D" = ":delete"; - "A" = ":archive flat"; - - "C" = ":compose"; - - "rr" = ":reply -a"; - "rq" = ":reply -aq"; - "Rr" = ":reply"; - "Rq" = ":reply -q"; - - "c" = ":cf"; - "$" = ":term"; - "!" = ":term"; - "|" = ":pipe"; - - "/" = ":search"; - "\\" = ":filter"; - "n" = ":next-result"; - "N" = ":prev-result"; - "" = ":clear"; - }; - - "messages:folder=Drafts" = {"" = ":recall";}; - - view = { - "/" = ":toggle-key-passthrough/"; - "q" = ":close"; - "O" = ":open"; - "S" = ":save"; - "|" = ":pipe"; - "D" = ":delete"; - "A" = ":archive flat"; - - "" = ":open-link "; - - "f" = ":forward"; - "rr" = ":reply -a"; - "rq" = ":reply -aq"; - "Rr" = ":reply"; - "Rq" = ":reply -q"; - - "H" = ":toggle-headers"; - "" = ":prev-part"; - "" = ":next-part"; - "J" = ":next"; - "K" = ":prev"; - }; - - "view::passthrough" = { - "$noinherit" = true; - "$ex" = ""; - "" = ":toggle-key-passthrough"; - }; - - compose = { - "$noinherit" = "true"; - "$ex" = ""; - "" = ":prev-field"; - "" = ":next-field"; - "" = ":switch-account -p"; - "" = ":switch-account -n"; - "" = ":next-field"; - "" = ":prev-tab"; - "" = ":next-tab"; - }; - - "compose::editor" = { - "$noinherit" = "true"; - "$ex" = ""; - "" = ":prev-field"; - "" = ":next-field"; - "" = ":prev-tab"; - "" = ":next-tab"; - }; - - "compose::review" = { - "y" = ":send"; - "n" = ":abort"; - "p" = ":postpone"; - "q" = ":choose -o d discard abort -o p postpone postpone"; - "e" = ":edit"; - "a" = ":attach"; - "d" = ":detach"; - }; - - terminal = { - "$noinherit" = "true"; - "$ex" = ""; - - "" = ":prev-tab"; - "" = ":next-tab"; - }; - }; - extraConfig = { - general.unsafe-accounts-conf = true; - ui = { - styleset-name = "catppuccin-mocha"; - this-day-time-format = ''" 15:04"''; - this-year-time-format = "Mon Jan 02 15:04"; - timestamp-format = "2006-01-02 15:04"; - - spinner = "[ ⡿ ],[ ⣟ ],[ ⣯ ],[ ⣷ ],[ ⣾ ],[ ⣽ ],[ ⣻ ],[ ⢿ ]"; - border-char-vertical = "┃"; - border-char-horizontal = "━"; - }; - viewer = {always-show-mime = true;}; - compose = {no-attachment-warning = "^[^>]*attach(ed|ment)";}; - triggers = { - email-received = ''exec notify-send "New email from %n" "%s"''; - }; - filters = { - "text/plain" = "colorize"; - "text/html" = "html"; - "text/calendar" = "calendar"; - "message/delivery-status" = "colorize"; - "message/rfc822" = "colorize"; - "image/*" = "${pkgs.catimg}/bin/catimg -"; - }; - }; + hooks.preNew = "mbsync --all"; }; + services.mbsync.enable = true; accounts.email = { accounts.autistici = { - aerc.enable = true; address = "andrea.ciceri@autistici.org"; gpg = { key = "7A66EEA1E6C598D07D361287A1FC89532D1C565"; diff --git a/hmModules/firefox/default.nix b/hmModules/firefox/default.nix index 954dbc3..9732957 100644 --- a/hmModules/firefox/default.nix +++ b/hmModules/firefox/default.nix @@ -12,6 +12,11 @@ nativeMessagingHosts = [pkgs.tridactyl-native]; }; profiles.${username} = { + extensions = with pkgs.nur.repos.rycee.firefox-addons; [ + privacy-badger + ublock-origin + tridactyl + ]; settings = { "browser.startup.homepage" = "https://google.it"; "browser.search.region" = "IT"; diff --git a/hmModules/foot/default.nix b/hmModules/foot/default.nix index a40f2a5..d5cc61b 100644 --- a/hmModules/foot/default.nix +++ b/hmModules/foot/default.nix @@ -1,71 +1,40 @@ { lib, pkgs, - config, ... -}: -lib.mkMerge [ - { - programs.foot = let - catppuccin = pkgs.fetchFromGitHub { - owner = "catppuccin"; - repo = "foot"; - rev = "307611230661b7b1787feb7f9d122e851bae97e9"; - hash = "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4="; +}: { + programs.foot = let + catppuccin = pkgs.fetchFromGitHub { + owner = "catppuccin"; + repo = "foot"; + rev = "307611230661b7b1787feb7f9d122e851bae97e9"; + hash = "sha256-mkPYHDJtfdfDnqLr1YOjaBpn4lCceok36LrnkUkNIE4="; + }; + in { + enable = true; + server.enable = true; + settings = { + main = { + term = "xterm-256color"; + login-shell = "yes"; + # Using dpi-aware = "yes" font size is too small on my external monitor + # Scaling that output in sway is inefficient and make XWayland apps blurred + dpi-aware = "no"; + horizontal-letter-offset = "1"; + include = "${catppuccin}/themes/catppuccin-mocha.ini"; + font = let + size = "13"; + in + lib.concatStringsSep ", " [ + "Iosevka Comfy:size=${size}" + "Symbols Nerd Font:size=${size}" + "JoyPixels:size=${size}" + ]; }; - in { - enable = true; - server.enable = true; - settings = { - main = { - term = "xterm-256color"; - login-shell = "yes"; - dpi-aware = "no"; - horizontal-letter-offset = "1"; - include = "${catppuccin}/themes/catppuccin-mocha.ini"; - font = let - size = "13"; - in - lib.concatStringsSep ", " [ - "Iosevka Comfy:size=${size}" - "Symbols Nerd Font:size=${size}" - "JoyPixels:size=${size}" - ]; - }; - cursor = { - blink = true; - }; - tweak = { - overflowing-glyphs = true; - }; - key-bindings = { - scrollback-up-page = "Control+Shift+k"; - scrollback-down-page = "Control+Shift+j"; - search-start = "Control+Shift+s"; - pipe-command-output = ''[sh -c "f=$(mktemp); cat - > $f; footclient hx $f; rm $f"] Control+Shift+g''; - }; - - mouse = { - hide-when-typing = "yes"; - }; + mouse = { + hide-when-typing = "yes"; }; }; - } - (lib.mkIf config.programs.fish.enable { - programs.fish.functions = { - mark_prompt_start = { - body = ''echo -en "\e]133;A\e\\"''; - onEvent = "fish_prompt"; - }; - foot_cmd_start = { - body = ''echo -en "\e]133;C\e\\"''; - onEvent = "fish_preexec"; - }; - foot_cmd_end = { - body = ''echo -en "\e]133;D\e\\''; - onEvent = "fish_postexec"; - }; - }; - }) -] + }; +} diff --git a/hmModules/helix/default.nix b/hmModules/helix/default.nix index 9a5010f..a593e7d 100644 --- a/hmModules/helix/default.nix +++ b/hmModules/helix/default.nix @@ -1,7 +1,6 @@ { programs.helix = { enable = true; - defaultEditor = true; settings = { theme = "catppuccin_mocha"; editor = { @@ -12,10 +11,6 @@ select = "underline"; }; true-color = true; # to make colors coherent when in ssh - # inline-diagnostic = { - # cursor-line = "hint"; - # other-lines = "error"; - # }; }; }; languages = { @@ -24,26 +19,13 @@ name = "nix"; language-servers = ["nixd"]; } + ]; + language-servers = [ { - name = "markdown"; - language-servers = ["zk"]; - } - { - name = "typescript"; - language-servers = ["vtsls"]; + name = "nixd"; + command = "nixd"; } ]; - language-server = { - nixd.command = "nixd"; - vtsls = { - command = "vtsls"; - args = ["--stdio"]; - }; - zk = { - command = "zk"; - args = ["lsp"]; - }; - }; }; }; } diff --git a/hmModules/hyprland/default.nix b/hmModules/hyprland/default.nix index 6ea8431..c973adf 100644 --- a/hmModules/hyprland/default.nix +++ b/hmModules/hyprland/default.nix @@ -50,18 +50,8 @@ in { font.name = "Sans,Symbols Nerd Font"; iconTheme = { name = "Adwaita"; - package = pkgs.adwaita-icon-theme; + package = pkgs.gnome.adwaita-icon-theme; }; - cursorTheme = { - name = "catppuccin-mocha-sapphire"; - package = pkgs.catppuccin-cursors; - size = 48; - }; - }; - - qt = { - enable = true; - platformTheme.name = "gtk3"; }; # services.kanshi = { @@ -91,140 +81,126 @@ in { # }; # }; - home.file.".icons/catppuccin-mocha-sapphire" = { - source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors"; - recursive = true; - }; - wayland.windowManager.hyprland = { enable = true; extraConfig = '' - cursor { - hide_on_key_press = true - enable_hyprcursor = true - zoom_rigid = true - } + $mod = SUPER - env = HYPRCURSOR_THEME,catppuccin-mocha-sapphire - env = HYPRCURSOR_SIZE,48 - env = XCURSOR_THEME,catppuccin-mocha-sapphire - env = XCURSOR_SIZE,48 + input { + touchpad { + disable_while_typing = true # set to true while playing + } + } - $mod = SUPER + monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard + monitor = eDP-1, 1920x1080, 0x0, 1 # kirk - input { - touchpad { - disable_while_typing = true # set to true while playing - } - } + bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open + bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close - monitor = HDMI-A-1, 2560x1440, 0x0, 1 # picard - monitor = eDP-1, 1920x1080, 0x0, 1 # kirk + exec-once = ${pkgs.hyprpaper}/bin/hyprpaper - bindl=,switch:off:Lid Switch,exec,${switchMonitorScript} open - bindl=,switch:on:Lid Switch,exec,${switchMonitorScript} close + windowrulev2 = tile, class:^(Spotify)$ + windowrulev2 = workspace 9, class:^(Spotify)$ + windowrulev2 = tile, class:^(fluffychat)$ + windowrulev2 = workspace 8, class:^(fluffychat)$ + windowrulev2 = tile, class:^(WhatsApp for Linux)$ + windowrulev2 = workspace 7, class:^(WhatsApp for Linux)$ + windowrulev2 = float, title:^(floating)$ - exec-once = ${pkgs.hyprpaper}/bin/hyprpaper + bind = $mod, b, exec, firefox + bind = $mod, t, exec, foot + bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)" + bind = $mod, x, exec, emacsclient -c + bind = $mod SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))' + bind = $mod SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))' + bind = $mod, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c + bind = $mod, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 + bind = $mod, s, exec, ${screenshotScript} + bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5% + bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%- + bind = $mod, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5% + bind = $mod, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%- - windowrulev2 = tile, class:^(Spotify)$ - windowrulev2 = workspace 9, class:^(Spotify)$ - windowrulev2 = float, title:^(floating)$ - bind = $mod, b, exec, firefox - bind = $mod, t, exec, footclient - bind = $mod, RETURN, exec, emacsclient -c --eval "(ccr/start-eshell)" - bind = $mod SHIFT, g, exec, emacsclient -c --eval "(ccr/start-chatgpt)" - bind = $mod, x, exec, emacsclient -c - bind = $mod SHIFT, n, exec, emacsclient --eval '(ccr/org-capture "n")' -c -F '((name . "floating"))' - bind = $mod SHIFT, w, exec, emacsclient --eval '(ccr/org-capture "j")' -c -F '((name . "floating"))' - bind = $mod, y, exec, ${pkgs.waypipe}/bin/waypipe --compress lz4=10 ssh picard.fleet emacsclient -c - bind = $mod, d, exec, ${pkgs.fuzzel}/bin/fuzzel --background-color=253559cc --border-radius=5 --border-width=0 - bind = $mod, s, exec, ${screenshotScript} - bind = , XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5% - bind = , XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%- - bind = $mod, code:60, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +5% - bind = $mod, code:59, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 5%- + bind = $mod SHIFT, q, killactive + bind = $mod SHIFT, f, fullscreen, 0 + bind = $mod SHIFT, e, exit - bind = $mod SHIFT, t, togglegroup - bind = $mod, G, changegroupactive - bind = $mod SHIFT, q, killactive - bind = $mod SHIFT, f, fullscreen, 0 - bind = $mod SHIFT, e, exit + bind = $mod, h, movefocus, l + bind = $mod, l, movefocus, r + bind = $mod, k, movefocus, u + bind = $mod, j, movefocus, d - bind = $mod, h, movefocus, l - bind = $mod, l, movefocus, r - bind = $mod, k, movefocus, u - bind = $mod, j, movefocus, d + bind = $mod SHIFT, h, movewindow, l + bind = $mod SHIFT, l, movewindow, r + bind = $mod SHIFT, k, movewindow, u + bind = $mod SHIFT, j ,movewindow, d - bind = $mod SHIFT, h, movewindow, l - bind = $mod SHIFT, l, movewindow, r - bind = $mod SHIFT, k, movewindow, u - bind = $mod SHIFT, j ,movewindow, d + bind = $mod, p, movecurrentworkspacetomonitor, r + bind = $mod, o, movecurrentworkspacetomonitor, l - bind = $mod, p, movecurrentworkspacetomonitor, r - bind = $mod, o, movecurrentworkspacetomonitor, l + bindm=ALT,mouse:272,movewindow - bindm=ALT,mouse:272,movewindow + bind = $mod, 1, workspace, 1 + bind = $mod, 2, workspace, 2 + bind = $mod, 3, workspace, 3 + bind = $mod, 4, workspace, 4 + bind = $mod, 5, workspace, 5 + bind = $mod, 6, workspace, 6 + bind = $mod, 7, workspace, 7 + bind = $mod, 8, workspace, 8 + bind = $mod, 9, workspace, 9 + bind = $mod, 0, workspace, 10 - bind = $mod, 1, workspace, 1 - bind = $mod, 2, workspace, 2 - bind = $mod, 3, workspace, 3 - bind = $mod, 4, workspace, 4 - bind = $mod, 5, workspace, 5 - bind = $mod, 6, workspace, 6 - bind = $mod, 7, workspace, 7 - bind = $mod, 8, workspace, 8 - bind = $mod, 9, workspace, 9 - bind = $mod, 0, workspace, 10 + bind = $mod SHIFT, 1, movetoworkspace, 1 + bind = $mod SHIFT, 2, movetoworkspace, 2 + bind = $mod SHIFT, 3, movetoworkspace, 3 + bind = $mod SHIFT, 4, movetoworkspace, 4 + bind = $mod SHIFT, 5, movetoworkspace, 5 + bind = $mod SHIFT, 6, movetoworkspace, 6 + bind = $mod SHIFT, 7, movetoworkspace, 7 + bind = $mod SHIFT, 8, movetoworkspace, 8 + bind = $mod SHIFT, 9, movetoworkspace, 9 + bind = $mod SHIFT, 0, movetoworkspace, 10 - bind = $mod SHIFT, 1, movetoworkspace, 1 - bind = $mod SHIFT, 2, movetoworkspace, 2 - bind = $mod SHIFT, 3, movetoworkspace, 3 - bind = $mod SHIFT, 4, movetoworkspace, 4 - bind = $mod SHIFT, 5, movetoworkspace, 5 - bind = $mod SHIFT, 6, movetoworkspace, 6 - bind = $mod SHIFT, 7, movetoworkspace, 7 - bind = $mod SHIFT, 8, movetoworkspace, 8 - bind = $mod SHIFT, 9, movetoworkspace, 9 - bind = $mod SHIFT, 0, movetoworkspace, 10 + general { + gaps_in = 0 + gaps_out = 0 + border_size = 1 + col.active_border = rgba(AF8D61FF) rgba(CEB153FF) rgba(7B8387FF) 45deg + col.inactive_border = rgba(AF8D6166) + } - general { - gaps_in = 0 - gaps_out = 0 - border_size = 1 - col.active_border = rgba(AF8D61FF) rgba(CEB153FF) rgba(7B8387FF) 45deg - col.inactive_border = rgba(AF8D6166) - } + decoration { + # See https://wiki.hyprland.org/Configuring/Variables/ for more - decoration { - # See https://wiki.hyprland.org/Configuring/Variables/ for more + rounding = 2 + # blur = true + # blur_size = 8 + # blur_passes = 1 + # blur_new_optimizations = true - rounding = 2 - # blur = true - # blur_size = 8 - # blur_passes = 1 - # blur_new_optimizations = true + drop_shadow = true + shadow_range = 4 + shadow_render_power = 3 + col.shadow = rgba(a8cfee11) + } - drop_shadow = true - shadow_range = 4 - shadow_render_power = 3 - col.shadow = rgba(a8cfee11) - } + animations { + enabled = true - animations { - enabled = true + # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more - # Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more + bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - bezier = myBezier, 0.05, 0.9, 0.1, 1.05 - - animation = windows, 1, 3, myBezier - animation = windowsOut, 1, 3, default, popin 80% - animation = border, 1, 5, default - animation = borderangle, 1, 4, default - animation = fade, 1, 3, default - animation = workspaces, 1, 3, default - } + animation = windows, 1, 3, myBezier + animation = windowsOut, 1, 3, default, popin 80% + animation = border, 1, 5, default + animation = borderangle, 1, 4, default + animation = fade, 1, 3, default + animation = workspaces, 1, 3, default + } ''; }; } diff --git a/hmModules/nix-index/default.nix b/hmModules/nix-index/default.nix index 726d997..0841b81 100644 --- a/hmModules/nix-index/default.nix +++ b/hmModules/nix-index/default.nix @@ -13,7 +13,7 @@ Service = { CPUSchedulingPolicy = "idle"; IOSchedulingClass = "idle"; - ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgs}"; + ExecStart = "${pkgs.nix-index}/bin/nix-index --nixpkgs ${fleetFlake.inputs.nixpkgsUnstable}"; }; }; diff --git a/hmModules/shell/default.nix b/hmModules/shell/default.nix index 9c1ca0f..9607807 100644 --- a/hmModules/shell/default.nix +++ b/hmModules/shell/default.nix @@ -1,7 +1,9 @@ { + config, lib, pkgs, age, + fleetFlake, hostname, ... }: { @@ -29,24 +31,6 @@ controlMaster = "auto"; }; - systemd.user.services.atuind = { - Unit.Description = "Atuin daemon"; - Install = {WantedBy = ["default.target"];}; - Service.ExecStart = "${lib.getExe pkgs.atuin} daemon"; - }; - - programs.atuin = { - enable = true; - settings = { - daemon.enabled = true; - auto_sync = true; - sync_frequency = "5m"; - sync_address = "http://sisko.fleet:8889"; - search_mode = "fuzzy"; - style = "compact"; - }; - }; - # programs.starship = { # enable = false; # settings = { @@ -238,10 +222,10 @@ nix-zsh-completions comma carapace # used by nushell - neovim ] ++ (lib.optionals (builtins.elem hostname ["kirk" "picard"]) [ - nixd # TODO probably not the best place + nil # TODO probably not best place + (fleetFlake.inputs.nixd.packages.${pkgs.system}.nixd) # TODO probably not best place terraform-lsp # TODO probably not best place python3Packages.jedi-language-server # TODO probably not best place nodePackages.typescript-language-server # TODO probably not best place diff --git a/hmModules/spotify/default.nix b/hmModules/spotify/default.nix index fb7c2e7..db39efa 100644 --- a/hmModules/spotify/default.nix +++ b/hmModules/spotify/default.nix @@ -1,11 +1,7 @@ -{ - lib, - pkgs, - ... -}: let - spotify-adblocked = pkgs.callPackage ../../packages/spotify-adblocked {}; +{pkgs, ...}: let + spotify-adblock = pkgs.nur.repos.nltch.spotify-adblock; in { - home.packages = [spotify-adblocked]; + home.packages = [spotify-adblock]; systemd.user.services.spotify-adblocked = { Install.WantedBy = ["graphical-session.target"]; @@ -16,7 +12,7 @@ in { }; Service = { - ExecStart = lib.getExe spotify-adblocked; + ExecStart = "${spotify-adblock}/bin/spotify"; Restart = "on-failure"; RestartSec = 3; }; diff --git a/hmModules/sway/default.nix b/hmModules/sway/default.nix index af49d1c..1b80b13 100644 --- a/hmModules/sway/default.nix +++ b/hmModules/sway/default.nix @@ -30,7 +30,7 @@ font.name = "Sans,Symbols Nerd Font"; iconTheme = { name = "Adwaita"; - package = pkgs.adwaita-icon-theme; + package = pkgs.gnome.adwaita-icon-theme; }; }; diff --git a/hmModules/swayidle/default.nix b/hmModules/swayidle/default.nix index bc26718..b0eb01b 100644 --- a/hmModules/swayidle/default.nix +++ b/hmModules/swayidle/default.nix @@ -4,6 +4,17 @@ ... }: { services.swayidle = let + # Downgraded due to + # https://github.com/mortie/swaylock-effects/issues/95 + # swaylock-effects = pkgs.swaylock-effects.overrideAttrs (_: { + # version = "jirutka-master"; + # src = pkgs.fetchFromGitHub { + # owner = "jirutka"; + # repo = "swaylock-effects"; + # rev = "7c5681ce96587ce3090c6698501faeccdfdc157d"; + # sha256 = "sha256-09Kq90wIIF9lPjiY2anf9MSgi/EqeXKXW1mFmhxA/aM"; + # }; + # }); swaylockWithArgs = pkgs.writeScriptBin "swaylockWithArgs" '' ${pkgs.swaylock-effects}/bin/swaylock \ --daemonize \ @@ -19,6 +30,7 @@ --line-color 00000000 \ --inside-color 00000088 \ --separator-color 00000000 \ + --grace 2 \ --fade-in 0.2 ''; swaylockCommand = "${swaylockWithArgs}/bin/swaylockWithArgs"; diff --git a/hmModules/tremotesf/default.nix b/hmModules/tremotesf/default.nix deleted file mode 100644 index 37c75d9..0000000 --- a/hmModules/tremotesf/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - home.packages = [pkgs.tremotesf]; - - systemd.user.services.tremotesf = { - Install.WantedBy = ["graphical-session.target"]; - - Unit = { - Description = "tremotesf"; - }; - - Service = { - ExecStart = "${lib.getExe pkgs.tremotesf} --minimized"; - Restart = "on-failure"; - RestartSec = 3; - }; - }; -} diff --git a/hmModules/vscode-server/default.nix b/hmModules/vscode-server/default.nix deleted file mode 100644 index 9c8dd7e..0000000 --- a/hmModules/vscode-server/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ - services.vscode-server = { - enable = true; - enableFHS = true; - }; -} diff --git a/hmModules/waybar/default.nix b/hmModules/waybar/default.nix index f7ac1be..e654892 100644 --- a/hmModules/waybar/default.nix +++ b/hmModules/waybar/default.nix @@ -1,6 +1,7 @@ { pkgs, lib, + fleetFlake, ... }: { programs.waybar = { diff --git a/hmModules/zmkbatx/default.nix b/hmModules/zmkbatx/default.nix index 64771fc..3c6b6ec 100644 --- a/hmModules/zmkbatx/default.nix +++ b/hmModules/zmkbatx/default.nix @@ -6,10 +6,11 @@ home.packages = [pkgs.zmkBATx]; systemd.user.services.zmkBATx = { - Install.WantedBy = ["graphical-session.target" "waybar.service"]; + Install.WantedBy = ["graphical-session.target"]; Unit = { Description = "zmkBATx"; + PartOf = ["graphical-session.target"]; }; Service = { diff --git a/hosts/default.nix b/hosts/default.nix index a96b64b..198b282 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -80,7 +80,7 @@ in builtins.getFlake "github:NixOS/nixpkgs/${rev}"; extraHmModules = [ - # inputs.ccrEmacs.hmModules.default + inputs.ccrEmacs.hmModules.default ]; vpn = { ip = "10.100.0.5"; @@ -107,7 +107,7 @@ inputs.lix-module.nixosModules.default ]; extraHmModules = [ - # inputs.ccrEmacs.hmModules.default + inputs.ccrEmacs.hmModules.default "${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix" ]; secrets = { @@ -132,9 +132,8 @@ # inputs.hercules-ci-agent.nixosModules.agent-service ]; extraHmModules = [ - # inputs.ccrEmacs.hmModules.default + inputs.ccrEmacs.hmModules.default "${inputs.homeManagerGitWorkspace}/modules/services/git-workspace.nix" - inputs.vscode-server.nixosModules.home ]; secrets = { "picard-wireguard-private-key" = {}; @@ -160,6 +159,7 @@ }; extraModules = with inputs; [ disko.nixosModules.disko + arion.nixosModules.arion impermanence.nixosModules.impermanence # lix-module.nixosModules.default # inputs.hercules-ci-agent.nixosModules.agent-service; diff --git a/hosts/deltaflyer/default.nix b/hosts/deltaflyer/default.nix index 915f695..afef6f0 100644 --- a/hosts/deltaflyer/default.nix +++ b/hosts/deltaflyer/default.nix @@ -1,7 +1,9 @@ { fleetModules, + config, lib, pkgs, + fleetFlake, ... }: { imports = diff --git a/hosts/module.nix b/hosts/module.nix index cfc1bdd..3c26ae6 100644 --- a/hosts/module.nix +++ b/hosts/module.nix @@ -28,7 +28,7 @@ in { nixpkgs = lib.mkOption { description = "Used nixpkgs"; type = lib.types.anything; - default = inputs.nixpkgs; + default = inputs.nixpkgsUnstable; }; extraModules = lib.mkOption { description = "Extra NixOS modules"; @@ -64,7 +64,7 @@ in { nixpkgs = lib.mkOption { description = "Used nixpkgs"; type = lib.types.anything; - default = inputs.nixpkgs; + default = inputs.nixpkgsUnstable; }; extraModules = lib.mkOption { description = "Extra NixOS modules"; @@ -101,7 +101,7 @@ in { nixpkgs = lib.mkOption { description = "Used nixpkgs"; type = lib.types.anything; - default = inputs.nixpkgs; + default = inputs.nixpkgsUnstable; }; homeManager = lib.mkOption { description = "Used home-manager"; @@ -174,7 +174,11 @@ in { default = "ccr"; }; }; - config.overlays = with inputs; cfg.overlays; + config.overlays = with inputs; + [ + nur.overlay + ] + ++ cfg.overlays; })); default = {}; }; @@ -256,6 +260,7 @@ in { fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}"); fleetFlake = self; vpn = cfg.vpnExtra // (lib.mapAttrs (_: host: host.vpn) cfg.hosts); + inherit (flakePartsArgs.config.allSystems.${config.system}.allModuleArgs.config._module.args) inputs'; }; }; }; @@ -286,7 +291,7 @@ in { internal = true; default = hostname: config: inputs.nix-on-droid.lib.nixOnDroidConfiguration { - pkgs = inputs.nixpkgs.legacyPackages.aarch64-linux; + pkgs = inputs.nixpkgsUnstable.legacyPackages.aarch64-linux; modules = [ ({ lib, diff --git a/hosts/mothership/default.nix b/hosts/mothership/default.nix index 5b0562f..ea4a2bb 100644 --- a/hosts/mothership/default.nix +++ b/hosts/mothership/default.nix @@ -71,6 +71,13 @@ environment.systemPackages = with pkgs; [waypipe]; + home-manager.users.ccr.gtk = { + enable = true; + iconTheme = { + name = "Adwaita"; + package = pkgs.gnome.adwaita-icon-theme; + }; + }; programs.dconf.enable = true; programs.mosh.enable = true; diff --git a/hosts/picard/default.nix b/hosts/picard/default.nix index 01dfa6f..5337448 100644 --- a/hosts/picard/default.nix +++ b/hosts/picard/default.nix @@ -29,6 +29,7 @@ "printing" "pam" "wireguard-client" + "restic" "binfmt" "greetd" # "syncthing" @@ -36,7 +37,7 @@ "forgejo-runners" "teamviewer" # "macos-ventura" - "sunshine" + # "sunshine" "mount-rock5b" "adb" "guix" @@ -57,8 +58,7 @@ "shell" "element" "zmkbatx" - "tremotesf" - # "emacs" + "emacs" "firefox" "gpg" "mpv" @@ -83,7 +83,6 @@ "obs-studio" "calibre" "reinstall-magisk-on-lineage" - "vscode-server" ]; extraGroups = []; backupPaths = []; @@ -105,18 +104,7 @@ "i2c-dev" # needed? ]; - # https://github.com/NixOS/nixpkgs/issues/328909 - boot.extraModulePackages = [ - (config.boot.kernelPackages.ddcci-driver.overrideAttrs (old: { - patches = []; - src = pkgs.fetchFromGitLab { - owner = "${old.pname}-linux"; - repo = "${old.pname}-linux"; - rev = "7853cbfc28bc62e87db79f612568b25315397dd0"; - hash = "sha256-QImfvYzMqyrRGyrS6I7ERYmteaTijd8ZRnC6+bA9OyM="; - }; - })) - ]; + boot.extraModulePackages = [config.boot.kernelPackages.ddcci-driver]; systemd.services.ddcci = { serviceConfig.Type = "oneshot"; diff --git a/hosts/sisko/default.nix b/hosts/sisko/default.nix index b685f19..a4fead7 100644 --- a/hosts/sisko/default.nix +++ b/hosts/sisko/default.nix @@ -37,18 +37,17 @@ "garmin-collector" "restic" # "immich" - "atuin" ] ++ [ ./disko.nix ]; # boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8; - boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_6_10; - # boot.kernelPackages = let - # pkgs = fleetFlake.inputs.nixpkgsForSisko.legacyPackages.aarch64-linux; - # in - # pkgs.linuxPackagesFor pkgs.linux_testing; + # boot.kernelPackages = pkgs.linuxPackagesFor pkgs.linux_testing; + boot.kernelPackages = let + pkgs = fleetFlake.inputs.nixpkgsUnstableForSisko.legacyPackages.aarch64-linux; + in + pkgs.linuxPackagesFor pkgs.linux_testing; # boot.kernelPackages = pkgs.linuxPackagesFor (pkgs.linux_6_9.override { # argsOverride = { # src = pkgs.fetchFromGitLab { diff --git a/modules/atuin/default.nix b/modules/atuin/default.nix deleted file mode 100644 index ebbefef..0000000 --- a/modules/atuin/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, ...}: { - services.atuin = { - enable = true; - openFirewall = false; # use only in the VPN - port = 8889; - host = "0.0.0.0"; - openRegistration = true; - }; - networking.firewall.interfaces."wg0" = { - allowedTCPPorts = [ - config.services.atuin.port - ]; - }; -} diff --git a/modules/auto-upgrade/default.nix b/modules/auto-upgrade/default.nix index 72cd5c9..510d43d 100644 --- a/modules/auto-upgrade/default.nix +++ b/modules/auto-upgrade/default.nix @@ -7,10 +7,10 @@ system.autoUpgrade = { enable = false; flake = "github:aciceri/nixfleet#${config.networking.hostName}"; - # flags = - # lib.lists.optional - # (builtins.hasAttr "ccrEmacs" options) - # ["--update-input" "ccrEmacs" "ccrEmacs"]; + flags = + lib.lists.optional + (builtins.hasAttr "ccrEmacs" options) + ["--update-input" "ccrEmacs" "ccrEmacs"]; dates = "daily"; allowReboot = false; }; diff --git a/modules/forgejo-runners/default.nix b/modules/forgejo-runners/default.nix index 28b4c35..9c91dbf 100644 --- a/modules/forgejo-runners/default.nix +++ b/modules/forgejo-runners/default.nix @@ -1,13 +1,14 @@ # heavily based on https://discourse.nixos.org/t/gitea-nix-actions-runner-setup/35279 { config, + inputs', pkgs, lib, ... }: let storeDeps = pkgs.runCommand "store-deps" {} '' mkdir -p $out/bin - for dir in ${with pkgs; builtins.toString [coreutils findutils gnugrep gawk git nix bash jq nodejs nix-fast-build curl tea]}; do + for dir in ${toString [pkgs.coreutils pkgs.findutils pkgs.gnugrep pkgs.gawk pkgs.git pkgs.nix pkgs.bash pkgs.jq pkgs.nodejs inputs'.nix-fast-build.packages.nix-fast-build pkgs.curl pkgs.tea]}; do for bin in "$dir"/bin/*; do ln -s "$bin" "$out/bin/$(basename "$bin")" done diff --git a/modules/greetd/default.nix b/modules/greetd/default.nix index d8ee546..47e5f2b 100644 --- a/modules/greetd/default.nix +++ b/modules/greetd/default.nix @@ -13,15 +13,6 @@ Exec=Hyprland ''; }) - (pkgs.writeTextFile { - name = "xorg-session.desktop"; - destination = "/cosmic-session.desktop"; - text = '' - [Desktop Entry] - Name=Cosmic - Exec=cosmic-session - ''; - }) ]; in { services.greetd = { diff --git a/modules/home-assistant/default.nix b/modules/home-assistant/default.nix index efab59b..1ffe137 100644 --- a/modules/home-assistant/default.nix +++ b/modules/home-assistant/default.nix @@ -27,12 +27,53 @@ rev = "d42edcabc67ba6a7f960e849c8aaec1aabef87c0"; hash = "sha256-KqbP6TpH9B0/AjtsW5TcWSNgUhND+w8rO6X8fHqtsDI="; }; + tuya-device-sharing-sdk = ps: + ps.callPackage ( + { + lib, + buildPythonPackage, + fetchPypi, + requests, + paho-mqtt, + cryptography, + }: let + pname = "tuya-device-sharing-sdk"; + version = "0.2.0"; + in + buildPythonPackage { + inherit pname version; + + src = fetchPypi { + inherit pname version; + hash = "sha256-fu8zh59wlnxtstNbNL8mIm10tiXy22oPbi6oUy5x8c8="; + }; + + postPatch = '' + touch requirements.txt + ''; + + doCheck = false; + + propagatedBuildInputs = [ + requests + paho-mqtt + cryptography + ]; + + meta = with lib; { + description = "Tuya Device Sharing SDK"; + homepage = "https://github.com/tuya/tuya-device-sharing-sdk"; + license = licenses.mit; + maintainers = with maintainers; [aciceri]; + }; + } + ) {}; in { services.home-assistant = { enable = true; openFirewall = true; package = pkgs.home-assistant.overrideAttrs (old: { - doInstallCheck = false; + # doInstallCheck = false; # prePatch = # '' # rm -rf homeassistant/components/smartthings @@ -66,7 +107,7 @@ in { # used by pun_sensor holidays beautifulsoup4 - tuya-device-sharing-sdk + (tuya-device-sharing-sdk python3Packages) # remove after https://github.com/NixOS/nixpkgs/pull/294706/ getmac garminconnect tzlocal diff --git a/modules/immich/default.nix b/modules/immich/default.nix index 61ee117..54e0a9f 100644 --- a/modules/immich/default.nix +++ b/modules/immich/default.nix @@ -1,23 +1,221 @@ +# { lib, pkgs, config, ... }: +# let +# immichRoot = "/mnt/hd/immich"; +# immichData = "${immichRoot}/data"; +# # immichVersion = "v1.105.1"; +# immichVersion = "v1.105.1"; +# sharedEnv = { +# # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables +# # The location where your uploaded files are stored +# UPLOAD_LOCATION="./library"; +# DB_DATA_LOCATION="./postgres"; +# IMMICH_VERSION=immichVersion; +# DB_PASSWORD="postgres"; +# DB_USERNAME="postgres"; +# DB_DATABASE_NAME="immich"; +# DB_HOSTNAME="postgres"; +# REDIS_HOSTNAME = "redis"; +# }; +# postgresRoot = "${immichRoot}/pgsql"; +# machineLearning = "${immichRoot}/ml-cache"; +# in { +# systemd.tmpfiles.rules = [ +# "d ${immichRoot} 770 ccr wheel" +# "d ${immichData} 770 ccr wheel" +# "d ${postgresRoot} 770 ccr wheel" +# "d ${machineLearning} 770 ccr wheel" +# ]; +# virtualisation.docker.enable = lib.mkForce false; +# virtualisation.podman.enable = lib.mkForce true; +# virtualisation.podman.dockerSocket.enable = lib.mkForce true; +# virtualisation.podman.defaultNetwork.settings.dns_enabled = lib.mkForce true; +# networking.firewall.interfaces."podman+".allowedUDPPorts = [53 5353]; +# environment.systemPackages = [ +# pkgs.arion +# ]; +# virtualisation.arion = { +# backend = lib.mkForce "podman-socket"; +# projects.immich = { +# serviceName = "immich"; +# settings = { +# project.name = "immich"; +# networks.default = { +# name = "immich"; +# }; +# services = { +# "server" = { +# service = { +# image = "ghcr.io/immich-app/immich-server:${immichVersion}"; +# container_name = "server"; +# command = ["start.sh" "immich"]; +# environment = sharedEnv // { +# # NODE_ENV = "production"; +# }; +# ports = [ +# "2283:3001" +# ]; +# volumes = [ +# "${immichData}:/usr/src/app/upload:rw" +# "/etc/localtime:/etc/localtime:ro" +# ]; +# depends_on = ["redis" "postgres"]; +# restart = "always"; +# }; +# }; +# "microservices" = { +# service = { +# image = "ghcr.io/immich-app/immich-server:${immichVersion}"; +# container_name = "microservices"; +# command = ["start.sh" "microservices"]; +# environment = sharedEnv; +# volumes = ["${immichData}:/usr/src/app/upload:rw"]; +# depends_on = ["redis" "postgres"]; +# restart = "always"; +# }; +# }; +# "machine_learning" = { +# service = { +# image = "ghcr.io/immich-app/immich-machine-learning:${immichVersion}"; +# container_name = "machine_learning"; +# volumes = [ +# "${machineLearning}:/cache" +# ]; +# restart = "always"; +# environment = sharedEnv // { +# # NODE_ENV = "production"; +# }; +# }; +# }; +# "redis" = { +# service = { +# image = "docker.io/redis:6.2-alpine"; +# container_name = "redis"; +# restart = "always"; +# tmpfs = ["/data"]; +# }; +# }; +# "postgres" = { +# service = { +# image = "docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0"; +# container_name = "postgres"; +# volumes = [ +# "${postgresRoot}:/var/lib/postgresql/data" +# ]; +# restart = "always"; +# environment = { +# POSTGRES_PASSWORD = sharedEnv.DB_PASSWORD; +# POSTGRES_USER = sharedEnv.DB_USERNAME; +# POSTGRES_DB = sharedEnv.DB_DATABASE_NAME; +# POSTGRES_INITDB_ARGS = "--data-checksums"; +# }; +# }; +# }; +# }; +# }; +# }; +# }; +# } {config, ...}: let - nixpkgsImmich = builtins.getFlake "github:NixOS/nixpkgs/c0ee4c1770aa1ef998c977c4cc653a07ec95d9bf"; + immichHost = "immich.example.com"; # TODO: put your immich domain name here + + immichRoot = "/mnt/hd/immich"; # TODO: Tweak these to your desired storage locations + immichPhotos = "${immichRoot}/photos"; + immichAppdataRoot = "${immichRoot}/appdata"; + immichVersion = "release"; + # immichExternalVolume1 = "/tank/BackupData/Google Photos/someone@example.com"; # TODO: if external volumes are desired + + postgresRoot = "${immichAppdataRoot}/pgsql"; + postgresPassword = "immich"; # TODO: put a random password here + postgresUser = "immich"; + postgresDb = "immich"; in { - containers.nextcloud = { - nixpkgs = nixpkgsImmich; - autoStart = true; - privateNetwork = true; - # hostAddress = "192.168.100.10"; - # localAddress = "192.168.100.11"; - # hostAddress6 = "fc00::1"; - # localAddress6 = "fc00::2"; - config = { - config, - pkgs, - lib, - ... - }: { - services.immich = { - enable = true; - }; + # The primary source for this configuration is the recommended docker-compose installation of immich from + # https://immich.app/docs/install/docker-compose, which linkes to: + # - https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml + # - https://github.com/immich-app/immich/releases/latest/download/example.env + # and has been transposed into nixos configuration here. Those upstream files should probably be checked + # for serious changes if there are any upgrade problems here. + # + # After initial deployment, these in-process configurations need to be done: + # - create an admin user by accessing the site + # - login with the admin user + # - set the "Machine Learning Settings" > "URL" to http://immich_machine_learning:3003 + + virtualisation.oci-containers.containers.immich_server = { + image = "ghcr.io/immich-app/immich-server:${immichVersion}"; + ports = ["127.0.0.1:2283:3001"]; + extraOptions = [ + "--pull=newer" + # Force DNS resolution to only be the podman dnsname name server; by default podman provides a resolv.conf + # that includes both this server and the upstream system server, causing resolutions of other pod names + # to be inconsistent. + "--dns=10.88.0.1" + ]; + cmd = ["start.sh" "immich"]; + environment = { + IMMICH_VERSION = immichVersion; + DB_HOSTNAME = "immich_postgres"; + DB_USERNAME = postgresUser; + DB_DATABASE_NAME = postgresDb; + DB_PASSWORD = postgresPassword; + REDIS_HOSTNAME = "immich_redis"; }; + volumes = [ + "${immichPhotos}:/usr/src/app/upload" + "/etc/localtime:/etc/localtime:ro" + # "${immichExternalVolume1}:${immichExternalVolume1}:ro" + ]; + }; + + virtualisation.oci-containers.containers.immich_microservices = { + image = "ghcr.io/immich-app/immich-server:${immichVersion}"; + extraOptions = [ + "--pull=newer" + # Force DNS resolution to only be the podman dnsname name server; by default podman provides a resolv.conf + # that includes both this server and the upstream system server, causing resolutions of other pod names + # to be inconsistent. + "--dns=10.88.0.1" + ]; + cmd = ["start.sh" "microservices"]; + environment = { + IMMICH_VERSION = immichVersion; + DB_HOSTNAME = "immich_postgres"; + DB_USERNAME = postgresUser; + DB_DATABASE_NAME = postgresDb; + DB_PASSWORD = postgresPassword; + REDIS_HOSTNAME = "immich_redis"; + }; + volumes = [ + "${immichPhotos}:/usr/src/app/upload" + "/etc/localtime:/etc/localtime:ro" + # "${immichExternalVolume}1:${immichExternalVolume1}:ro" + ]; + }; + + virtualisation.oci-containers.containers.immich_machine_learning = { + image = "ghcr.io/immich-app/immich-machine-learning:${immichVersion}"; + extraOptions = ["--pull=newer"]; + environment = { + IMMICH_VERSION = immichVersion; + }; + volumes = [ + "${immichAppdataRoot}/model-cache:/cache" + ]; + }; + + virtualisation.oci-containers.containers.immich_redis = { + image = "redis:6.2-alpine@sha256:80cc8518800438c684a53ed829c621c94afd1087aaeb59b0d4343ed3e7bcf6c5"; + }; + + virtualisation.oci-containers.containers.immich_postgres = { + image = "tensorchord/pgvecto-rs:pg14-v0.1.11"; + environment = { + POSTGRES_PASSWORD = postgresPassword; + POSTGRES_USER = postgresUser; + POSTGRES_DB = postgresDb; + }; + volumes = [ + "${postgresRoot}:/var/lib/postgresql/data" + ]; }; } diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 737eb63..f42df36 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -32,13 +32,12 @@ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "mlabs.cachix.org-1:gStKdEqNKcrlSQw5iMW6wFCj3+b+1ASpBVY2SYuNV2M=" ]; - # deprecated-features = [ "url-literals" ]; }; - nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgs}"]; + nixPath = ["nixpkgs=${fleetFlake.inputs.nixpkgsUnstable}"]; extraOptions = '' - experimental-features = nix-command flakes impure-derivations + experimental-features = nix-command flakes ca-derivations impure-derivations builders-use-substitutes = true ''; @@ -51,11 +50,19 @@ registry = lib.mkForce ({ nixpkgs.to = { type = "path"; - path = fleetFlake.inputs.nixpkgs; + path = fleetFlake.inputs.nixpkgsUnstable; + }; + nixpkgsUnstable.to = { + type = "path"; + path = fleetFlake.inputs.nixpkgsUnstable; + }; + nixpkgsStable.to = { + type = "path"; + path = fleetFlake.inputs.nixpkgsStable; }; n.to = { type = "path"; - path = fleetFlake.inputs.nixpkgs; + path = fleetFlake.inputs.nixpkgsUnstable; }; } // (lib.optionalAttrs (builtins.hasAttr "ccr" config) { @@ -85,11 +92,11 @@ sshKey = "/home/${config.ccr.username}/.ssh/id_rsa"; } ++ (lib.lists.optional (config.networking.hostName == "picard") { - hostName = "mac.staging.mlabs.city?remote-program=/run/current-system/sw/bin/nix-store"; + hostName = "mac.staging.mlabs.city"; system = "x86_64-darwin"; maxJobs = 4; supportedFeatures = ["kvm" "nixos-test" "big-parallel" "benchmark"]; - protocol = "ssh"; + protocol = "ssh-ng"; sshUser = "root"; sshKey = "/home/${config.ccr.username}/.ssh/id_rsa"; }); diff --git a/modules/pipewire/default.nix b/modules/pipewire/default.nix index b2d9a1b..334c6ea 100644 --- a/modules/pipewire/default.nix +++ b/modules/pipewire/default.nix @@ -1,7 +1,3 @@ -{lib, ...}: { +{ services.pipewire.enable = true; - - hardware.pulseaudio = { - enable = lib.mkForce false; - }; } diff --git a/modules/prometheus-exporters/default.nix b/modules/prometheus-exporters/default.nix index f183852..7a55821 100644 --- a/modules/prometheus-exporters/default.nix +++ b/modules/prometheus-exporters/default.nix @@ -8,7 +8,7 @@ mkFor = hosts: lib.mkIf (builtins.elem hostname hosts); in { services.prometheus.exporters = { - node = mkFor ["sisko" "picard" "kirk"] { + node = mkFor ["sisko" "picard"] { enable = true; enabledCollectors = [ "cpu" @@ -34,10 +34,10 @@ in { ]; extraFlags = ["--collector.ethtool" "--collector.softirqs" "--collector.tcpstat" "--collector.wifi"]; }; - wireguard = mkFor ["sisko" "picard" "kirk"] { + wireguard = mkFor ["sisko" "picard"] { enable = true; }; - zfs = mkFor ["picard" "kirk"] { + zfs = mkFor ["picard"] { enable = true; }; # restic = mkFor ["sisko"] { @@ -49,7 +49,7 @@ in { nginx = mkFor ["sisko"] { enable = true; }; - smartctl = mkFor ["sisko" "picard" "kirk"] { + smartctl = mkFor ["sisko" "picard"] { enable = true; }; }; diff --git a/modules/prometheus/default.nix b/modules/prometheus/default.nix index cd52e90..c35b04e 100644 --- a/modules/prometheus/default.nix +++ b/modules/prometheus/default.nix @@ -35,7 +35,7 @@ in { job_name = "node"; static_configs = [ { - targets = builtins.map (host: "${host}.fleet:9100") ["sisko" "picard" "kirk"]; + targets = builtins.map (host: "${host}.fleet:9100") ["sisko" "picard"]; } ]; } @@ -43,7 +43,7 @@ in { job_name = "wireguard"; static_configs = [ { - targets = builtins.map (host: "${host}.fleet:9586") ["picard" "kirk"]; + targets = builtins.map (host: "${host}.fleet:9586") ["picard"]; } ]; } @@ -51,7 +51,7 @@ in { job_name = "zfs"; static_configs = [ { - targets = builtins.map (host: "${host}.fleet:9134") ["picard" "kirk"]; + targets = builtins.map (host: "${host}.fleet:9134") ["picard"]; } ]; } @@ -83,7 +83,7 @@ in { job_name = "smartctl"; static_configs = [ { - targets = builtins.map (host: "${host}.fleet:9633") ["sisko" "kirk" "picard"]; + targets = builtins.map (host: "${host}.fleet:9633") ["sisko"]; } ]; } diff --git a/modules/rock5b-samba/default.nix b/modules/rock5b-samba/default.nix index e26c8b8..e33b2b7 100644 --- a/modules/rock5b-samba/default.nix +++ b/modules/rock5b-samba/default.nix @@ -10,17 +10,17 @@ samba = { enable = true; securityType = "user"; - settings.global = { - "workgroup" = "WORKGROUP"; - "server string" = "rock5b"; - "netbios name" = "rock5b"; - "security" = "user"; - "map to guest" = "bad user"; - "vfs objects" = "recycle"; - "recycle:repository" = ".recycle"; - "recycle:keeptree" = "yes"; - "recycle:versions" = "yes"; - }; + extraConfig = '' + workgroup = WORKGROUP + server string = rock5b + netbios name = rock5b + security = user + map to guest = bad user + vfs objects = recycle + recycle:repository = .recycle + recycle:keeptree = yes + recycle:versions = yes + ''; shares = { torrent = { path = "/mnt/hd/torrent"; diff --git a/modules/sunshine/default.nix b/modules/sunshine/default.nix index 8913ed1..c420ee3 100644 --- a/modules/sunshine/default.nix +++ b/modules/sunshine/default.nix @@ -1,13 +1,21 @@ { - services.sunshine = { + services.xserver = { enable = true; - autoStart = true; - capSysAdmin = true; - openFirewall = true; + videoDrivers = ["amdgpu"]; + + # displayManager.gdm.enable = true; + # displayManager.defaultSession = "gnome"; + + # displayManager.autoLogin.enable = true; + # displayManager.autoLogin.user = "sunshine"; # user must exists + + # desktopManager.gnome.enable = true; }; - hardware = { - bluetooth.input.General = { - ClassicBondedOnly = false; - }; + + users.users.sunshine = { + isSystemUser = true; + group = "sunshine"; }; + + users.groups.sunshine = {}; } diff --git a/modules/transmission/default.nix b/modules/transmission/default.nix index c1bcc3d..79f12b3 100644 --- a/modules/transmission/default.nix +++ b/modules/transmission/default.nix @@ -45,8 +45,4 @@ ]; ccr.extraGroups = ["transmission"]; - - environment.persistence."/persist".directories = [ - config.services.transmission.home - ]; } diff --git a/packages/default.nix b/packages/default.nix index 9aedeba..d501506 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -19,6 +19,7 @@ type = lib.types.listOf overlayType; default = with inputs; [ agenix.overlays.default + nur.overlay (final: _: { inherit (disko.packages.${final.system}) disko; inherit (self.packages.${final.system}) deploy; @@ -45,7 +46,7 @@ _module.args.pkgs = lib.foldl (legacyPackages: legacyPackages.extend) - inputs.nixpkgs.legacyPackages.${system} + inputs.nixpkgsUnstable.legacyPackages.${system} config.fleet.overlays; packages = diff --git a/packages/spotify-adblocked/default.nix b/packages/spotify-adblocked/default.nix deleted file mode 100644 index 18cb8c5..0000000 --- a/packages/spotify-adblocked/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ - spotify, - rustPlatform, - fetchFromGitHub, - zip, - unzip, -}: let - spotify-adblock = rustPlatform.buildRustPackage { - pname = "spotify-adblock"; - version = "1.0.3"; - src = fetchFromGitHub { - owner = "abba23"; - repo = "spotify-adblock"; - rev = "5a3281dee9f889afdeea7263558e7a715dcf5aab"; - hash = "sha256-UzpHAHpQx2MlmBNKm2turjeVmgp5zXKWm3nZbEo0mYE="; - }; - cargoSha256 = "sha256-wPV+ZY34OMbBrjmhvwjljbwmcUiPdWNHFU3ac7aVbIQ="; - - patchPhase = '' - substituteInPlace src/lib.rs \ - --replace-fail 'config.toml' $out/etc/spotify-adblock/config.toml - ''; - - buildPhase = '' - make - ''; - - installPhase = '' - mkdir -p $out/etc/spotify-adblock - install -D --mode=644 config.toml $out/etc/spotify-adblock - mkdir -p $out/lib - install -D --mode=644 --strip target/release/libspotifyadblock.so $out/lib - ''; - }; -in - spotify.overrideAttrs ( - old: { - buildInputs = (old.buildInputs or []) ++ [zip unzip]; - postInstall = - (old.postInstall or "") - + '' - ln -s ${spotify-adblock}/lib/libspotifyadblock.so $libdir - sed -i "s:^Name=Spotify.*:Name=Spotify-adblock:" "$out/share/spotify/spotify.desktop" - wrapProgram $out/bin/spotify \ - --set LD_PRELOAD "${spotify-adblock}/lib/libspotifyadblock.so" - - # Hide placeholder for advert banner - ${unzip}/bin/unzip -p $out/share/spotify/Apps/xpui.spa xpui.js | sed 's/adsEnabled:\!0/adsEnabled:false/' > $out/share/spotify/Apps/xpui.js - ${zip}/bin/zip --junk-paths --update $out/share/spotify/Apps/xpui.spa $out/share/spotify/Apps/xpui.js - rm $out/share/spotify/Apps/xpui.js - ''; - } - )