diff --git a/README.md b/README.md deleted file mode 100644 index 33a0d74..0000000 --- a/README.md +++ /dev/null @@ -1,41 +0,0 @@ -# Nix configuration - -## Updating - -Update flake - - nix flake update --commit-lock-file - -Switch current machine - - sudo nixos-rebuild switch --flake . --show-trace - -Switch current home manager - - home-manager switch --flake . --show-trace - -Switch server - - nixos-rebuild switch --target-host root@posixlycorrect.com --use-substitutes --show-trace --flake .\#vps - -Update homepage - - nix flake update --commit-lock-file homepage - - -## Cleanup - -Collect garbage (run with sudo to collect root garbage) - - nix-collect-garbage -d - - -## Submodule management - -Trivionomicon - - git subtree push --prefix=trivionomicon forgejo@git.posixlycorrect.com:deepState/trivionomicon.git master - git subtree pull --prefix=trivionomicon forgejo@git.posixlycorrect.com:deepState/trivionomicon.git master - -## About -This is a unification of my old configs, which had a combined 506 commits. diff --git a/flake.lock b/flake.lock index 64c06da..cef9bbd 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,28 @@ { "nodes": { + "attic": { + "inputs": { + "crane": "crane", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable" + }, + "locked": { + "lastModified": 1720542474, + "narHash": "sha256-aKjJ/4l2I9+wNGTaOGRsuS3M1+IoTibqgEMPDikXm04=", + "owner": "zhaofengli", + "repo": "attic", + "rev": "6139576a3ce6bb992e0f6c3022528ec233e45f00", + "type": "github" + }, + "original": { + "owner": "zhaofengli", + "ref": "main", + "repo": "attic", + "type": "github" + } + }, "authentik-nix": { "inputs": { "authentik-src": "authentik-src", @@ -10,17 +33,15 @@ "nixpkgs": [ "nixpkgs" ], - "pyproject-build-systems": "pyproject-build-systems", - "pyproject-nix": "pyproject-nix", - "systems": "systems", - "uv2nix": "uv2nix" + "poetry2nix": "poetry2nix", + "systems": "systems" }, "locked": { - "lastModified": 1759322529, - "narHash": "sha256-yiv/g/tiJI3PI95F7vhTnaf1TDsIkFLrmmFTjWfb6pQ=", + "lastModified": 1736445563, + "narHash": "sha256-+f1MWPtja+LRlTHJP/i/3yxmnzo2LGtZmxtJJTdAp8o=", "owner": "nix-community", "repo": "authentik-nix", - "rev": "69fac057b2e553ee17c9a09b822d735823d65a6c", + "rev": "bf5a5bf42189ff5f468f0ff26c9296233a97eb6c", "type": "github" }, "original": { @@ -32,28 +53,265 @@ "authentik-src": { "flake": false, "locked": { - "lastModified": 1759190535, - "narHash": "sha256-pIzDaoDWc58cY/XhsyweCwc4dfRvkaT/zqsV1gDSnCI=", + "lastModified": 1736440980, + "narHash": "sha256-Z3rFFrXrOKaF9NpY/fInsEbzdOWnWqLfEYl7YX9hFEU=", "owner": "goauthentik", "repo": "authentik", - "rev": "8d3a289d12c7de2f244c76493af7880f70d08af2", + "rev": "9d81f0598c7735e2b4616ee865ab896056a67408", "type": "github" }, "original": { "owner": "goauthentik", - "ref": "version/2025.8.4", + "ref": "version/2024.12.2", "repo": "authentik", "type": "github" } }, + "cachix": { + "inputs": { + "devenv": "devenv", + "flake-compat": "flake-compat_4", + "nixpkgs": "nixpkgs_3", + "pre-commit-hooks": "pre-commit-hooks" + }, + "locked": { + "lastModified": 1719923519, + "narHash": "sha256-7Rhljj2fsklFRsu+eq7N683Z9qukmreMEj5C1GqCrSA=", + "owner": "cachix", + "repo": "cachix", + "rev": "4e9e71f78b9500fa6210cf1eaa4d75bdbab777c3", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "master", + "repo": "cachix", + "type": "github" + } + }, + "cachix_2": { + "inputs": { + "devenv": "devenv_2", + "flake-compat": [ + "conduwuit", + "cachix", + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "conduwuit", + "cachix", + "devenv", + "nixpkgs" + ], + "pre-commit-hooks": [ + "conduwuit", + "cachix", + "devenv", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1712055811, + "narHash": "sha256-7FcfMm5A/f02yyzuavJe06zLa9hcMHsagE28ADcmQvk=", + "owner": "cachix", + "repo": "cachix", + "rev": "02e38da89851ec7fec3356a5c04bc8349cae0e30", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "cachix", + "type": "github" + } + }, + "complement": { + "flake": false, + "locked": { + "lastModified": 1720637557, + "narHash": "sha256-oZz6nCmFmdJZpC+K1iOG2KkzTI6rlAmndxANPDVU7X0=", + "owner": "matrix-org", + "repo": "complement", + "rev": "0d14432e010482ea9e13a6f7c47c1533c0c9d62f", + "type": "github" + }, + "original": { + "owner": "matrix-org", + "ref": "main", + "repo": "complement", + "type": "github" + } + }, + "conduwuit": { + "inputs": { + "attic": "attic", + "cachix": "cachix", + "complement": "complement", + "crane": "crane_2", + "fenix": "fenix", + "flake-compat": "flake-compat_6", + "flake-utils": "flake-utils_4", + "liburing": "liburing", + "nix-filter": "nix-filter", + "nixpkgs": "nixpkgs_4", + "rocksdb": "rocksdb" + }, + "locked": { + "lastModified": 1721105087, + "narHash": "sha256-t74TUSswsCkOdZCKjgP74qEHKg78ShKTkP6x9/zqYX4=", + "path": "/nix/store/sw263a1qb3z8qc6bb78fm4mslsz5ya7i-source", + "rev": "c29197b3f457cf72197ef5251f9815107b2526d7", + "type": "path" + }, + "original": { + "id": "conduwuit", + "type": "indirect" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "conduwuit", + "attic", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1717025063, + "narHash": "sha256-dIubLa56W9sNNz0e8jGxrX3CAkPXsq7snuFA/Ie6dn8=", + "owner": "ipetkov", + "repo": "crane", + "rev": "480dff0be03dac0e51a8dfc26e882b0d123a450e", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "crane_2": { + "inputs": { + "nixpkgs": [ + "conduwuit", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720546058, + "narHash": "sha256-iU2yVaPIZm5vMGdlT0+57vdB/aPq/V5oZFBRwYw+HBM=", + "owner": "ipetkov", + "repo": "crane", + "rev": "2d83156f23c43598cf44e152c33a59d3892f8b29", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "ref": "master", + "repo": "crane", + "type": "github" + } + }, + "devenv": { + "inputs": { + "cachix": "cachix_2", + "flake-compat": [ + "conduwuit", + "cachix", + "flake-compat" + ], + "nix": "nix_2", + "nixpkgs": [ + "conduwuit", + "cachix", + "nixpkgs" + ], + "pre-commit-hooks": [ + "conduwuit", + "cachix", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1719759336, + "narHash": "sha256-3a34VL/QnHprl5gMy9xlx6d8J+iNp+W88Ex8smkgH9M=", + "owner": "cachix", + "repo": "devenv", + "rev": "bb32aa986f2f695385e54428d0eaf7d05b31466e", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "devenv", + "type": "github" + } + }, + "devenv_2": { + "inputs": { + "flake-compat": [ + "conduwuit", + "cachix", + "devenv", + "cachix", + "flake-compat" + ], + "nix": "nix", + "nixpkgs": "nixpkgs_2", + "poetry2nix": "poetry2nix_2", + "pre-commit-hooks": [ + "conduwuit", + "cachix", + "devenv", + "cachix", + "pre-commit-hooks" + ] + }, + "locked": { + "lastModified": 1708704632, + "narHash": "sha256-w+dOIW60FKMaHI1q5714CSibk99JfYxm0CzTinYWr+Q=", + "owner": "cachix", + "repo": "devenv", + "rev": "2ee4450b0f4b95a1b90f2eb5ffea98b90e48c196", + "type": "github" + }, + "original": { + "owner": "cachix", + "ref": "python-rewrite", + "repo": "devenv", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "conduwuit", + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1720852044, + "narHash": "sha256-3NBYz8VuXuKU+8ONd9NFafCNjPEGHIZQ2Mdoam1a4mY=", + "owner": "nix-community", + "repo": "fenix", + "rev": "5087b12a595ee73131a944d922f24d81dae05725", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "main", + "repo": "fenix", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -62,16 +320,97 @@ "type": "github" } }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_4": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_6": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "ref": "master", + "repo": "flake-compat", + "type": "github" + } + }, "flake-parts": { "inputs": { "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -109,11 +448,11 @@ ] }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -123,15 +462,12 @@ } }, "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "type": "github" }, "original": { @@ -141,6 +477,24 @@ } }, "flake-utils_3": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_4": { "inputs": { "systems": "systems_3" }, @@ -154,11 +508,12 @@ }, "original": { "owner": "numtide", + "ref": "main", "repo": "flake-utils", "type": "github" } }, - "flake-utils_4": { + "flake-utils_5": { "inputs": { "systems": "systems_4" }, @@ -176,16 +531,16 @@ "type": "github" } }, - "flake-utils_5": { + "flake-utils_6": { "inputs": { "systems": "systems_5" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -194,6 +549,44 @@ "type": "github" } }, + "flake-utils_7": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "conduwuit", + "cachix", + "pre-commit-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "hm-isolation": { "locked": { "lastModified": 1675806557, @@ -216,48 +609,47 @@ ] }, "locked": { - "lastModified": 1758463745, - "narHash": "sha256-uhzsV0Q0I9j2y/rfweWeGif5AWe0MGrgZ/3TjpDYdGA=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "3b955f5f0a942f9f60cdc9cacb7844335d0f21c3", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-25.05", + "ref": "release-24.11", "repo": "home-manager", "type": "github" } }, "homepage": { "inputs": { - "flake-utils": "flake-utils_3", - "nixpkgs": [ - "nixpkgs" - ] + "flake-utils": "flake-utils_6", + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1759284596, - "narHash": "sha256-N/poXYxAbHyWf2EBC6CSc6vKq0txtHMqTUMdPNOUB0g=", - "ref": "refs/heads/master", - "rev": "51c57acdbff6f3f0c490bc67e791f5376a3f2be9", - "revCount": 72, + "lastModified": 1737639979, + "narHash": "sha256-GP4bOkJMWSp55OpkBmP4VP1S2MUxmXF36fBX6/qxyOw=", + "ref": "master", + "rev": "a07048bb01ee5fb12f683366315fd3fde4f15412", + "revCount": 24, "type": "git", "url": "https://git.posixlycorrect.com/fabian/homepage.git" }, "original": { + "ref": "master", "type": "git", "url": "https://git.posixlycorrect.com/fabian/homepage.git" } }, "impermanence": { "locked": { - "lastModified": 1737831083, - "narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=", + "lastModified": 1736688610, + "narHash": "sha256-1Zl9xahw399UiZSJ9Vxs1W4WRFjO1SsNdVZQD4nghz0=", "owner": "nix-community", "repo": "impermanence", - "rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170", + "rev": "c64bed13b562fc3bb454b48773d4155023ac31b7", "type": "github" }, "original": { @@ -266,6 +658,23 @@ "type": "github" } }, + "liburing": { + "flake": false, + "locked": { + "lastModified": 1720798442, + "narHash": "sha256-gtPppAoksMLW4GuruQ36nf4EAqIA1Bs6V9Xcx8dBxrQ=", + "owner": "axboe", + "repo": "liburing", + "rev": "1d674f83b7d0f07553ac44d99a401b05853d9dbe", + "type": "github" + }, + "original": { + "owner": "axboe", + "ref": "master", + "repo": "liburing", + "type": "github" + } + }, "mediawikiSkinCitizen": { "flake": false, "locked": { @@ -309,17 +718,109 @@ "type": "github" } }, - "nixGL": { + "nix": { "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs" + "flake-compat": "flake-compat_3", + "nixpkgs": [ + "conduwuit", + "cachix", + "devenv", + "cachix", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1752054764, - "narHash": "sha256-Ob/HuUhANoDs+nvYqyTKrkcPXf4ZgXoqMTQoCK0RFgQ=", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", + "owner": "domenkozar", + "repo": "nix", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", + "type": "github" + }, + "original": { + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nix-filter": { + "locked": { + "lastModified": 1710156097, + "narHash": "sha256-1Wvk8UP7PXdf8bCCaEoMnOT1qe5/Duqgj+rL8sRQsSM=", + "owner": "numtide", + "repo": "nix-filter", + "rev": "3342559a24e85fc164b295c3444e8a139924675b", + "type": "github" + }, + "original": { + "owner": "numtide", + "ref": "main", + "repo": "nix-filter", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "authentik-nix", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1729742964, + "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "e04df33f62cdcf93d73e9a04142464753a16db67", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nix-github-actions_2": { + "inputs": { + "nixpkgs": [ + "conduwuit", + "cachix", + "devenv", + "cachix", + "devenv", + "poetry2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1688870561, + "narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=", + "owner": "nix-community", + "repo": "nix-github-actions", + "rev": "165b1650b753316aa7f1787f3005a8d2da0f5301", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-github-actions", + "type": "github" + } + }, + "nixGL": { + "inputs": { + "flake-utils": "flake-utils_7", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1713543440, + "narHash": "sha256-lnzZQYG0+EXl/6NkGpyIz+FEOc/DSEG57AP1VsdeNrM=", "owner": "guibou", "repo": "nixGL", - "rev": "a8e1ce7d49a149ed70df676785b07f63288f53c5", + "rev": "310f8e49a149e4c9ea52f1adf70cdc768ec53f8a", "type": "github" }, "original": { @@ -328,59 +829,228 @@ "type": "github" } }, - "nixpkgs": { + "nix_2": { + "inputs": { + "flake-compat": [ + "conduwuit", + "cachix", + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "conduwuit", + "cachix", + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression_2" + }, "locked": { - "lastModified": 1746378225, - "narHash": "sha256-OeRSuL8PUjIfL3Q0fTbNJD/fmv1R+K2JAOqWJd3Oceg=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "93e8cdce7afc64297cfec447c311470788131cd9", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", + "owner": "domenkozar", + "repo": "nix", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", "type": "github" }, "original": { - "owner": "nixos", + "owner": "domenkozar", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1711401922, + "narHash": "sha256-QoQqXoj8ClGo0sqD/qWKFWezgEwUL0SUh37/vY2jNhc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "07262b18b97000d16a4bdb003418bd2fb067a932", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-lib": { "locked": { - "lastModified": 1754788789, - "narHash": "sha256-x2rJ+Ovzq0sCMpgfgGaaqgBSwY+LST+WbZ6TytnT9Rk=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "a73b9c743612e4244d865a2fdee11865283c04e6", + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, + "nixpkgs-regression": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-regression_2": { + "locked": { + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1711460390, + "narHash": "sha256-akSgjDZL6pVHEfSE6sz1DNSXuYX6hq+P/1Z5IoYWs7E=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "44733514b72e732bd49f5511bd0203dea9b9a434", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable_2": { + "locked": { + "lastModified": 1718811006, + "narHash": "sha256-0Y8IrGhRmBmT7HHXlxxepg2t8j1X90++qRN3lukGaIk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "03d771e513ce90147b65fe922d87d3a0356fc125", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1759580034, - "narHash": "sha256-YWo57PL7mGZU7D4WeKFMiW4ex/O6ZolUS6UNBHTZfkI=", - "owner": "nixos", + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "3bcc93c5f7a4b30335d31f21e2f1281cba68c318", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-25.05", + "owner": "NixOS", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_3": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "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_4": { + "locked": { + "lastModified": 1720768451, + "narHash": "sha256-EYekUHJE2gxeo2pM/zM9Wlqw1Uw2XTJXOSAO79ksc4Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "7e7c39ea35c5cdd002cd4588b03a3fb9ece6fad9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1719426051, + "narHash": "sha256-yJL9VYQhaRM7xs0M867ZFxwaONB9T2Q4LnGo1WovuR4=", + "path": "/nix/store/f0ddmw6s86y567yg06h5019z72szbzch-source", + "rev": "89c49874fb15f4124bf71ca5f42a04f2ee5825fd", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1660551188, + "narHash": "sha256-a1LARMMYQ8DPx1BgoI/UN4bXe12hhZkCNqdxNi6uS0g=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "441dc5d512153039f19ef198e662e4f3dbb9fd65", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1737299813, + "narHash": "sha256-Qw2PwmkXDK8sPQ5YQ/y/icbQ+TYgbxfjhgnkNJyT1X8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "107d5ef05c0b1119749e381451389eded30fb0d5", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -393,14 +1063,15 @@ "nur": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_8", + "treefmt-nix": "treefmt-nix_2" }, "locked": { - "lastModified": 1759682435, - "narHash": "sha256-bPh7JZnT7WydN4E1kVLq1l87NlzuD2pz1GYwvYSWo1U=", + "lastModified": 1737464637, + "narHash": "sha256-St/dzvMCXfPPZNJME5bi86n4mEuohG9pMKp+a9l5ZqI=", "owner": "nix-community", "repo": "NUR", - "rev": "ba4952df76bc6179d0bb3b9e7b4ff8517cfec870", + "rev": "a44b412c5d24f7bb55d81370501a8f9e6e824ec6", "type": "github" }, "original": { @@ -409,73 +1080,140 @@ "type": "github" } }, - "pyproject-build-systems": { + "poetry2nix": { "inputs": { + "flake-utils": [ + "authentik-nix", + "flake-utils" + ], + "nix-github-actions": "nix-github-actions", "nixpkgs": [ "authentik-nix", "nixpkgs" ], - "pyproject-nix": [ + "systems": [ "authentik-nix", - "pyproject-nix" + "systems" ], - "uv2nix": [ - "authentik-nix", - "uv2nix" - ] + "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1757296493, - "narHash": "sha256-6nzSZl28IwH2Vx8YSmd3t6TREHpDbKlDPK+dq1LKIZQ=", - "owner": "pyproject-nix", - "repo": "build-system-pkgs", - "rev": "5b8e37fe0077db5c1df3a5ee90a651345f085d38", + "lastModified": 1735164664, + "narHash": "sha256-DaWy+vo3c4TQ93tfLjUgcpPaSoDw4qV4t76Y3Mhu84I=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "1fb01e90771f762655be7e0e805516cd7fa4d58e", "type": "github" }, "original": { - "owner": "pyproject-nix", - "repo": "build-system-pkgs", + "owner": "nix-community", + "repo": "poetry2nix", "type": "github" } }, - "pyproject-nix": { + "poetry2nix_2": { "inputs": { + "flake-utils": "flake-utils_3", + "nix-github-actions": "nix-github-actions_2", "nixpkgs": [ - "authentik-nix", + "conduwuit", + "cachix", + "devenv", + "cachix", + "devenv", "nixpkgs" ] }, "locked": { - "lastModified": 1757246327, - "narHash": "sha256-6pNlGhwOIMfhe/RLjHdpXveKS4FyLHvlGe+KtjDild4=", - "owner": "pyproject-nix", - "repo": "pyproject.nix", - "rev": "8d77f342d66ad1601cdb9d97e9388b69f64d4c8e", + "lastModified": 1692876271, + "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", "type": "github" }, "original": { - "owner": "pyproject-nix", - "repo": "pyproject.nix", + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, + "pre-commit-hooks": { + "inputs": { + "flake-compat": "flake-compat_5", + "gitignore": "gitignore", + "nixpkgs": [ + "conduwuit", + "cachix", + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable_2" + }, + "locked": { + "lastModified": 1719259945, + "narHash": "sha256-F1h+XIsGKT9TkGO3omxDLEb/9jOOsI6NnzsXFsZhry4=", + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "rev": "0ff4381bbb8f7a52ca4a851660fc7a437a4c6e07", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "pre-commit-hooks.nix", + "type": "github" + } + }, + "rocksdb": { + "flake": false, + "locked": { + "lastModified": 1720900786, + "narHash": "sha256-Vta9Um/RRuWwZ46BjXftV06iWLm/j/9MX39emXUvSAY=", + "owner": "girlbossceo", + "repo": "rocksdb", + "rev": "911f4243e69c2e320a7a209bf1f5f3ff5f825495", + "type": "github" + }, + "original": { + "owner": "girlbossceo", + "ref": "v9.4.0", + "repo": "rocksdb", "type": "github" } }, "root": { "inputs": { "authentik-nix": "authentik-nix", - "flake-utils": "flake-utils_2", + "conduwuit": "conduwuit", + "flake-utils": "flake-utils_5", "hm-isolation": "hm-isolation", "home-manager": "home-manager", "homepage": "homepage", "impermanence": "impermanence", "mediawikiSkinCitizen": "mediawikiSkinCitizen", "nixGL": "nixGL", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_7", "nur": "nur", - "trivionomicon": "trivionomicon", "unstable": "unstable", "vpsadminos": "vpsadminos" } }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1720717809, + "narHash": "sha256-6I+fm+nTLF/iaj7ffiFGlSY7POmubwUaPA/Wq0Bm53M=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "ffbc5ad993d5cd2f3b8bcf9a511165470944ab91", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1689347949, @@ -551,30 +1289,56 @@ "type": "github" } }, - "trivionomicon": { + "treefmt-nix": { "inputs": { - "flake-utils": "flake-utils_5", "nixpkgs": [ + "authentik-nix", + "poetry2nix", "nixpkgs" ] }, "locked": { - "path": "./trivionomicon", - "type": "path" + "lastModified": 1730120726, + "narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "9ef337e492a5555d8e17a51c911ff1f02635be15", + "type": "github" }, "original": { - "path": "./trivionomicon", - "type": "path" + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, + "treefmt-nix_2": { + "inputs": { + "nixpkgs": [ + "nur", + "nixpkgs" + ] }, - "parent": [] + "locked": { + "lastModified": 1733222881, + "narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "49717b5af6f80172275d47a418c9719a31a78b53", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } }, "unstable": { "locked": { - "lastModified": 1759381078, - "narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=", + "lastModified": 1737062831, + "narHash": "sha256-Tbk1MZbtV2s5aG+iM99U8FqwxU/YNArMcWAv6clcsBc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee", + "rev": "5df43628fdf08d642be8ba5b3625a6c70731c19c", "type": "github" }, "original": { @@ -584,38 +1348,13 @@ "type": "github" } }, - "uv2nix": { - "inputs": { - "nixpkgs": [ - "authentik-nix", - "nixpkgs" - ], - "pyproject-nix": [ - "authentik-nix", - "pyproject-nix" - ] - }, - "locked": { - "lastModified": 1757925761, - "narHash": "sha256-7Hwz0vfHuFqCo5v7Q07GQgLBWuPvZCuf/5/pk4NoADg=", - "owner": "pyproject-nix", - "repo": "uv2nix", - "rev": "780494c40895bb7419a73d942bee326291e80b3b", - "type": "github" - }, - "original": { - "owner": "pyproject-nix", - "repo": "uv2nix", - "type": "github" - } - }, "vpsadminos": { "locked": { - "lastModified": 1759490618, - "narHash": "sha256-H0FC6QbxgEE79pXwlPVvWUNenQOTMldzlWSij5pPyMk=", + "lastModified": 1737136524, + "narHash": "sha256-wMy7IbQs87VUxJOqRSbfFIdxRRTUBQh8G1L/zwI36vY=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "087b340cc897083a31defafd6a6f1c66e5bf48eb", + "rev": "0af10d77ca146293b2ed19d5dcfd98474f1fc285", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f60e7c6..1293ed2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,22 +1,21 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; unstable.url = "github:nixos/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-25.05"; + url = "github:nix-community/home-manager/release-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; - trivionomicon = { - url = "./trivionomicon"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + nur.url = "github:nix-community/NUR"; + impermanence.url = "github:nix-community/impermanence"; + hm-isolation.url = "github:3442/hm-isolation"; + nixGL.url = "github:guibou/nixGL"; + flake-utils.url = "github:numtide/flake-utils"; + vpsadminos.url = "github:vpsfreecz/vpsadminos"; - homepage = { - url = "git+https://git.posixlycorrect.com/fabian/homepage.git"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + homepage.url = "git+https://git.posixlycorrect.com/fabian/homepage.git?ref=master"; authentik-nix = { url = "github:nix-community/authentik-nix"; @@ -27,30 +26,105 @@ url = "github:StarCitizenTools/mediawiki-skins-Citizen/v2.27.0"; flake = false; }; - - flake-utils.url = "github:numtide/flake-utils"; - hm-isolation.url = "github:3442/hm-isolation"; - impermanence.url = "github:nix-community/impermanence"; - nixGL.url = "github:guibou/nixGL"; - nur.url = "github:nix-community/NUR"; - vpsadminos.url = "github:vpsfreecz/vpsadminos"; }; - outputs = flakes: - flakes.trivionomicon.lib.mkSystemFlake { - inherit flakes; + outputs = flakes @ { + self, + nixpkgs, + unstable, + home-manager, + nur, + impermanence, + hm-isolation, + nixGL, + flake-utils, + vpsadminos, + homepage, + conduwuit, + mediawikiSkinCitizen, + authentik-nix, + }: let + system = "x86_64-linux"; - system = "x86_64-linux"; + importPkgs = flake: + import flake { + inherit system; - paths = { - localOverlay = "pkgs"; - nixpkgsConfig = "pkgs/config"; - - nixosSource = "sys"; - nixosPlatforms = "sys/platforms"; - - hmSource = "home"; - hmPlatforms = "home/platforms"; + config = import ./pkgs/config nixpkgs.lib; + overlays = [ + self.overlays.default + nur.overlays.default + nixGL.overlay + ]; }; + + pkgs = importPkgs nixpkgs; + + inherit (pkgs.local.lib) importAll; + + local = final: prev: import ./pkgs {inherit final prev flakes;}; + in + with pkgs.lib; { + formatter.${system} = pkgs.alejandra; + packages.${system} = pkgs.local; + + overlays.default = final: prev: let + locals = local final prev; + in + locals.override + // { + local = locals; + unstable = importPkgs unstable; + }; + + nixosConfigurations = let + nixosSystem = {modules}: + makeOverridable nixpkgs.lib.nixosSystem { + inherit modules pkgs system; + + specialArgs = { + inherit flakes; + }; + }; + + hostConfig = host: + nixosSystem { + modules = [ + ./sys + host + ]; + }; + in + mapAttrs (_: hostConfig) (importAll {root = ./sys/platforms;}); + + homeConfigurations = let + registry = {...}: { + config.nix.registry = + mapAttrs (_: value: { + flake = value; + }) + flakes; + }; + + home = platform: + home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + modules = [ + ./home + platform + registry + hm-isolation.homeManagerModule + ]; + + extraSpecialArgs = { + inherit flakes; + }; + }; + + platformHome = name: platform: + nameValuePair name (home platform); + in + mapAttrs' platformHome (importAll {root = ./home/platforms;}); }; } diff --git a/home/default.nix b/home/default.nix index 3ba92a1..5c7405a 100644 --- a/home/default.nix +++ b/home/default.nix @@ -8,7 +8,5 @@ with lib; { imports = [ ./modules - flakes.trivionomicon.homeManagerModules.default - flakes.hm-isolation.homeManagerModule ]; } diff --git a/home/modules/baseline.nix b/home/modules/baseline.nix index f432d0a..70f0e83 100644 --- a/home/modules/baseline.nix +++ b/home/modules/baseline.nix @@ -2,7 +2,6 @@ config, lib, pkgs, - flakes, ... }: with lib; let @@ -12,50 +11,38 @@ in { enable = mkEnableOption "Basic home settings"; }; config = mkIf cfg.enable { - programs.home-manager.enable = true; - - nix.registry = { - "system".to = { - type = "path"; - path = "/home/fabian/nix"; - }; - - "nixpkgs".flake = flakes.nixpkgs; - "unstable".flake = flakes.unstable; - }; - xdg = { enable = true; + mimeApps = { + enable = true; + defaultApplications = {}; + }; + portal = { + # this shouldnt be on baseline, as servers have no GUI + enable = true; + xdgOpenUsePortal = true; + extraPortals = with pkgs; [xdg-desktop-portal-gtk]; #wtf is this + configPackages = with pkgs; [xdg-desktop-portal-gtk]; #wtf is this + }; }; home = { stateVersion = "24.05"; # DO NOT CHANGE - username = "fabian"; - homeDirectory = "/home/fabian"; - packages = with pkgs; [ calc - dysk - fd file - fzf gcc htop killall man-pages man-pages-posix - nmap - p7zip pv - ripgrep tree units unzip vim - wl-clipboard zip - zoxide ]; keyboard = { layout = "us"; @@ -71,14 +58,5 @@ in { userEmail = "fabian@posixlycorrect.com"; userName = "Fabian Montero"; }; - - local = { - services = { - zsh.enable = true; - }; - programs = { - neovim.enable = true; - }; - }; }; } diff --git a/home/modules/browsers.nix b/home/modules/browsers.nix new file mode 100644 index 0000000..b7996ec --- /dev/null +++ b/home/modules/browsers.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.apps.browsers; +in { + options.local.apps.browsers = { + enable = mkEnableOption "Browser home settings"; + }; + config = mkIf cfg.enable { + home.packages = with pkgs; [ + chromium + firefox + ]; + }; +} diff --git a/home/modules/default.nix b/home/modules/default.nix index 26ce768..31109a9 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -5,21 +5,16 @@ ... }: { imports = [ - ./terminal.nix + ./terminal ./neovim.nix ./baseline.nix - ./gaming.nix + ./gaming ./yubikey.nix - ./firefox.nix + ./browsers.nix ./gui ./zsh ./gpg.nix ./defaultDesktopPack.nix ./accounts.nix - ./syncthing.nix - ./mapping.nix - ./zed.nix - ./pass.nix - ./halloy.nix ]; } diff --git a/home/modules/defaultDesktopPack.nix b/home/modules/defaultDesktopPack.nix index 5985943..436a05e 100644 --- a/home/modules/defaultDesktopPack.nix +++ b/home/modules/defaultDesktopPack.nix @@ -5,67 +5,30 @@ ... }: with lib; let - cfg = config.local.defaultDesktopPack; + cfg = config.local.apps.defaultDesktopPack; in { - options.local.defaultDesktopPack = { - enable = mkEnableOption "common desktop programs and services"; - laptop = mkOption { - type = types.bool; - default = false; - }; + options.local.apps.defaultDesktopPack = { + enable = mkEnableOption "common desktop apps"; }; config = mkIf cfg.enable { home.packages = with pkgs; [ calibre - chromium discord - (gajim.override { - enableSecrets = true; - enableUPnP = true; - enableAppIndicator = true; - enableE2E = true; - enableRST = true; - }) + gwenview libreoffice-fresh mpv obs-studio pavucontrol pdfarranger - qimgv qpdfview - qbittorrent runelite spotify tdesktop - thunderbird usbutils vpsfree-client vscodium-fhs zola + zoom-us ]; - - trivium = { - waybar = { - enable = true; - fontFamily = "JetBrainsMono Nerd Font"; - }; - }; - - local = { - baseline.enable = true; - - services = { - gpg.enable = true; - accounts.enable = true; - pass.enable = true; - syncthing.enable = true; - }; - programs = { - firefox.enable = true; - zed.enable = true; - halloy.enable = true; - terminal.enable = true; - }; - }; }; } diff --git a/home/modules/firefox.nix b/home/modules/firefox.nix deleted file mode 100644 index c260730..0000000 --- a/home/modules/firefox.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.local.programs.firefox; -in { - options.local.programs.firefox = { - enable = mkEnableOption "firefox"; - }; - - config = mkIf cfg.enable { - programs.firefox = { - enable = true; - package = pkgs.firefox.override { - nativeMessagingHosts = [pkgs.passff-host]; - }; - }; - - xdg = { - mimeApps = { - enable = true; - defaultApplications = { - "text/html" = ["firefox.desktop"]; - "text/uri-list" = ["firefox.desktop"]; - "x-scheme-handler/http" = ["firefox.desktop"]; - "x-scheme-handler/https" = ["firefox.desktop"]; - "x-scheme-handler/about" = ["firefox.desktop"]; - "x-scheme-handler/unknown" = ["firefox.desktop"]; - }; - }; - }; - home.sessionVariables.DEFAULT_BROWSER = "${lib.getExe pkgs.firefox}"; - }; -} diff --git a/home/modules/gaming.nix b/home/modules/gaming/default.nix similarity index 50% rename from home/modules/gaming.nix rename to home/modules/gaming/default.nix index 191a8ff..5be0efd 100644 --- a/home/modules/gaming.nix +++ b/home/modules/gaming/default.nix @@ -5,13 +5,18 @@ ... }: with lib; let - cfg = config.local.programs.gaming; + cfg = config.local.apps.gaming; in { - options.local.programs.gaming = { + options.local.apps.gaming = { enable = mkEnableOption "gaming apps"; }; config = mkIf cfg.enable { home.packages = [ + # Steam. todo: move to the steam module later + (pkgs.callPackage ./package.nix {}) + pkgs.protonup + pkgs.winetricks + pkgs.protontricks pkgs.lutris pkgs.openrct2 pkgs.prismlauncher diff --git a/home/modules/gaming/package.nix b/home/modules/gaming/package.nix new file mode 100644 index 0000000..19f241f --- /dev/null +++ b/home/modules/gaming/package.nix @@ -0,0 +1,9 @@ +{ + writeShellScriptBin, + steam-run, + steam, + ... +}: +writeShellScriptBin "steam" '' + exec ${steam-run}/bin/steam-run ${steam}/bin/steam -console +'' diff --git a/home/modules/gpg.nix b/home/modules/gpg.nix index 23346e0..9e317cc 100644 --- a/home/modules/gpg.nix +++ b/home/modules/gpg.nix @@ -12,15 +12,14 @@ in { defaultKey = mkOption { type = types.str; description = "fingerprint of default public key to be used in gpg, git, email, etc."; - example = "A8981D346F8F4130CA16A7775517E687FCCE0BB9"; + example = "7AA277E604A4173916BBB4E91FFAC35E1798174F"; }; }; config = mkIf cfg.enable { programs.gpg = { enable = true; settings = { - default-key = cfg.defaultKey; - encrypt-to = cfg.defaultKey; + default-key = config.local.services.gpg.defaultKey; }; }; @@ -39,7 +38,7 @@ in { maxCacheTtl = 3600 * 6; maxCacheTtlSsh = 3600 * 6; - pinentry.package = pkgs.pinentry-emacs; + pinentryPackage = pkgs.pinentry-emacs; }; accounts.email.accounts = { @@ -47,14 +46,14 @@ in { gpg = { encryptByDefault = true; signByDefault = true; - key = cfg.defaultKey; + key = config.local.services.gpg.defaultKey; }; }; }; programs.git = { signing = { - key = cfg.defaultKey; + key = config.local.services.gpg.defaultKey; signByDefault = true; }; }; diff --git a/home/modules/gui/autorandr.nix b/home/modules/gui/autorandr.nix new file mode 100644 index 0000000..ed35e99 --- /dev/null +++ b/home/modules/gui/autorandr.nix @@ -0,0 +1,32 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.gui; +in { + programs.autorandr = { + profiles."default" = { + fingerprint = + mapAttrs + (monitorId: monitor: monitor.fingerprint) + cfg.monitors; + + config = + mapAttrs ( + monitorId: + filterAttrs + (k: v: + !elem k [ + #list of options to exclude from this list + "fingerprint" + "initialI3Workspace" + "monitorId" + ]) + ) + cfg.monitors; + }; + }; +} diff --git a/home/modules/gui/default.nix b/home/modules/gui/default.nix index fd5ec1f..54bf1bb 100644 --- a/home/modules/gui/default.nix +++ b/home/modules/gui/default.nix @@ -9,61 +9,149 @@ with lib; let monitorType = {setName}: ( types.submodule ({name ? null, ...}: { options = { - width = mkOption { + monitorId = mkOption { type = types.str; - default = "1920"; - example = "1920"; + example = "DP-1"; + readOnly = true; + internal = true; }; - height = mkOption { + primary = mkOption { + type = types.bool; + default = false; + description = "is primary monitor"; + example = "true"; + }; + position = mkOption { type = types.str; - default = "1080"; - example = "1080"; + example = "0x0"; + }; + mode = mkOption { + type = types.str; + description = "resolution"; + default = "1920x1080"; + example = "1920x1080"; }; rate = mkOption { type = types.str; description = "refresh rate"; example = "143.85"; }; - posX = mkOption { + rotate = mkOption { type = types.str; - description = "x axis position"; - default = "0"; - example = "0"; + default = "normal"; + example = "left"; }; - posY = mkOption { + fingerprint = mkOption { type = types.str; - description = "y axis position"; - default = "0"; - example = "0"; + example = "00ffffffffffff003669a03bd4040000231e0104a5341d783bd005ac5048a627125054bfcf00814081809500714f81c0b30001010101023a801871382d40582c450009252100001e0882805070384d400820f80c09252100001a000000fd003090b4b422010a202020202020000000fc004d53492047323443340a20202001a2020320f14d010304131f120211900e0f1d1e230907078301000065030c001000866f80a0703840403020350009252100001a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e9"; }; + initialI3Workspace = mkOption { + type = types.nullOr types.int; + default = null; + example = 1; + }; + }; + config = optionalAttrs setName { + # make this better later + monitorId = name; }; }) ); in { options.local.gui = { enable = mkEnableOption "GUI settings"; + primaryMonitor = mkOption { + type = monitorType {setName = false;}; + readOnly = true; + internal = true; + }; monitors = mkOption { type = types.attrsOf (monitorType {setName = true;}); }; + displayBatteryLevel = mkOption { + type = types.bool; + default = false; + description = "show battery level on polybar"; + example = "true"; + }; }; imports = [ + ./autorandr.nix ./fonts.nix - ./theme.nix - ./sway.nix - ./mako.nix + ./i3.nix + ./polybar.nix + ./startx.nix # move to ly once 24.11 comes out :( + ./picom.nix ]; - config = mkIf cfg.enable { - xdg = { - enable = true; - mimeApps = { + config = let + primaryMonitors = + filter (monitor: monitor.primary) + (attrValues cfg.monitors); + in + mkIf cfg.enable { + assertions = [ + { + assertion = length primaryMonitors == 1; + message = "Exactly one (1) primary monitor is requiered."; + } + ]; + + local.gui.primaryMonitor = head primaryMonitors; + + xsession = { enable = true; - defaultApplications = { - "application/pdf" = with pkgs; ["qpdfview.desktop"]; - "x-scheme-handler/file" = with pkgs; ["foot.desktop"]; + windowManager.i3.enable = true; + }; + + programs.autorandr.enable = true; + services = { + dunst.enable = true; + betterlockscreen.enable = true; + polybar.enable = true; + picom.enable = true; + }; + + gtk = { + enable = true; + + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + theme = { + package = pkgs.materia-theme; + name = "Materia-dark"; + }; + + gtk2.extraConfig = '' + gtk-toolbar-style=GTK_TOOLBAR_BOTH_HORIZ + gtk-menu-images=1 + gtk-button-images=1 + ''; + + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; }; }; + + #qt = { mentioning qt makes qt applications not work, I should probably check how to fix this + # enable = true; + # style.name = "bb10dark"; + #}; + + home.sessionVariables = { + # Use gtk in jvm apps + _JAVA_OPTIONS = concatStringsSep " " [ + "-Dawt.useSystemAAFontSettings=on" + "-Dswing.aatext=true" + "-Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" + "-Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel" + ]; + }; }; - }; } diff --git a/home/modules/gui/fonts.nix b/home/modules/gui/fonts.nix index b74c094..375145a 100644 --- a/home/modules/gui/fonts.nix +++ b/home/modules/gui/fonts.nix @@ -4,37 +4,9 @@ pkgs, ... }: { - fonts.fontconfig = { - enable = true; - defaultFonts = { - monospace = [ - "JetBrainsMono Nerd Font" - "Noto Sans Mono CJK SC" - "Noto Sans Mono" - "Noto Color Emoji" - ]; - sansSerif = [ - "Noto Sans" - "Noto Sans CJK SC" - "Noto Color Emoji" - ]; - serif = [ - "Noto Serif" - "Noto Serif CJK SC" - "Noto Color Emoji" - ]; - emoji = ["Noto Color Emoji"]; - }; - }; + fonts.fontconfig.enable = true; - # this is probably not necessary since they are already installed in sys - # with fonts.packages buy im too lazy to check home.packages = with pkgs; [ jetbrains-mono - nerd-fonts.jetbrains-mono - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - noto-fonts-extra ]; } diff --git a/home/modules/gui/i3.nix b/home/modules/gui/i3.nix new file mode 100644 index 0000000..527f462 --- /dev/null +++ b/home/modules/gui/i3.nix @@ -0,0 +1,108 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; { + xsession.windowManager.i3 = { + package = pkgs.i3-gaps; + + config = let + mod = "Mod4"; + in { + modifier = mod; + + fonts = { + names = ["JetBrains Mono"]; + style = "Regular"; + size = 8.0; + }; + + gaps = { + inner = 10; + outer = -10; + }; + + window = { + hideEdgeBorders = "both"; + titlebar = false; + }; + + workspaceLayout = "tabbed"; + + colors = { + focused = { + background = "#222222"; + border = "#4c7899"; + childBorder = "#222222"; + indicator = "#292d2e"; + text = "#888888"; + }; + }; + + # mkOptionDefault hace que se ponga la config por default + # y se sobreescriba las cosas que pongo acá + # NO QUITARLO. ver man home-configuration.nix + keybindings = mkOptionDefault { + "${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty ${pkgs.tmux}/bin/tmux"; + "${mod}+Tab" = "focus right"; + "${mod}+Shift+Tab" = "focus left"; + "${mod}+Shift+s" = "exec ${pkgs.maim}/bin/maim -s -u | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png -i"; + "${mod}+Shift+w" = "move workspace to output right"; + "${mod}+l" = "exec ${pkgs.betterlockscreen}/bin/betterlockscreen -l"; + }; + + startup = [ + { + command = "${pkgs.xss-lock}/bin/xss-lock --transfer-sleep-lock -- ${pkgs.i3lock}/bin/i3lock --nofork"; + notification = false; + } + { + command = "${pkgs.networkmanagerapplet}/bin/nm-applet"; + notification = false; + } + #todo: sería nice hostear esta imagen en el server y fetchearla si no existe + { + command = "${pkgs.feh}/bin/feh --bg-fill ${config.home.homeDirectory}/Pictures/wallpapers/jupiter.png"; + notification = false; + always = true; + } + { + #todo: move this to browsers module + command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 1; exec ${pkgs.firefox}/bin/firefox'"; + } + { + #todo: move this to telegram module + command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.tdesktop}/bin/telegram-desktop'"; + } + #{ + # command = "${pkgs.i3-gaps}/bin/i3-msg 'workspace 2; exec ${pkgs.element-desktop}/bin/element-desktop'"; + #} + { + command = "${pkgs.systemd}/bin/systemctl --user restart polybar.service"; + notification = false; + always = true; + } + { + command = "${pkgs.autorandr}/bin/autorandr -c"; + notification = false; + always = true; + } + ]; + + workspaceOutputAssign = + mapAttrsToList ( + monitorId: v: + { + output = monitorId; + } + // optionalAttrs (v.initialI3Workspace != null) { + workspace = toString v.initialI3Workspace; + } + ) + config.local.gui.monitors; + bars = []; + }; + }; +} diff --git a/home/modules/gui/mako.nix b/home/modules/gui/mako.nix deleted file mode 100644 index ad6fd11..0000000 --- a/home/modules/gui/mako.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.local.gui; -in { - config = mkIf cfg.enable { - services.mako = { - enable = true; - settings = { - actions = true; - anchor = "top-right"; - background-color = "#000000"; - border-color = "#000000"; - progress-color = "over #FFFFFF"; - border-radius = 0; - default-timeout = 7000; - font = "JetBrainsMono Nerd Font 10"; - icons = true; - ignore-timeout = false; - layer = "top"; - }; - }; - }; -} diff --git a/home/modules/gui/picom.nix b/home/modules/gui/picom.nix new file mode 100644 index 0000000..8807f67 --- /dev/null +++ b/home/modules/gui/picom.nix @@ -0,0 +1,41 @@ +{ + config, + pkgs, + lib, + ... +}: { + services.picom = { + fade = true; + fadeSteps = [0.1 0.1]; + fadeDelta = 10; + settings = { + animations = [ + { + triggers = [ + "open" + "show" + ]; + + preset = "appear"; + duration = "1"; + } + { + triggers = [ + "close" + "hide" + ]; + + preset = "disappear"; + duration = "1"; + } + { + triggers = [ + "geometry" + ]; + preset = "geometry-change"; + duration = "1"; + } + ]; + }; + }; +} diff --git a/home/modules/gui/polybar.nix b/home/modules/gui/polybar.nix new file mode 100644 index 0000000..8012b3b --- /dev/null +++ b/home/modules/gui/polybar.nix @@ -0,0 +1,460 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; { + services.polybar = { + package = pkgs.polybarFull; + script = '' + # Terminate already running bar instances + killall -q polybar + + # Wait until the processes have been shut down + while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done + + # Launch Polybar, using default config location ~/.config/polybar/config + polybar -r main & polybar -r secondary & + ''; + + settings = { + "colors" = { + # background = "\${xrdb:color0:#222}"; + background = "#AA000000"; + background-alt = "#00000000"; + # foreground = "\${xrdb:color7:#222}"; + foreground = "#ffffff"; + foreground-alt = "#ffffff"; + primary = "#ffffff"; + secondary = "#e60053"; + alert = "#bd2c40"; + }; + + "bar/main" = { + monitor = config.local.gui.primaryMonitor.monitorId; + width = "100%"; + height = 30; + offset-x = "0%"; + offset-y = "0%"; + radius = 0.0; + fixed-center = false; + + background = "\${colors.background}"; + foreground = "\${colors.foreground}"; + + line-size = 1; + line-color = "#f0000000"; + + border-size = 0; + border-color = "#00000000"; + + padding-left = 0; + padding-right = 0; + + module-margin-left = 1; + module-margin-right = 1; + + # font-0 = "fixed:pixelsize=10;1"; + font-0 = "JetBrains Mono Light:size=10;0"; + font-1 = "unifont:fontformat=truetype:size=8:antialias=false;0"; + font-2 = "siji:pixelsize=10;1"; + # font-2 = "FontAwesome5Free:style=Regular:size=10;4"; + + modules-left = "i3"; + modules-center = "xwindow"; + modules-right = "xkeyboard pulseaudio filesystem memory cpu temperature gputemperature nvmetemperature wlan eth date semanatec"; + separator = "|"; + + tray-position = "right"; + tray-padding = 2; + + # To allow other windows to be placed above the bar, or to avoid having the bar visible when in fullscreen mode, + # you need to use the following two parameters. Note that it will tell the window manager to back off so no + # area will be reserved, etc. + # + # wm-restack = "i3"; + # override-redirect = true; + + cursor-click = "pointer"; + cursor-scroll = "ns-resize"; + }; + + "bar/secondary" = { + monitor = head (attrNames (filterAttrs (monitorId: v: + !v.primary) + config.local.gui.monitors)); # this is bad. will fail if more than 2 monitors. this sets all monitors other than the primary one for this bar. + "inherit" = "bar/main"; + + modules-left = "i3"; + modules-center = "xwindow"; + modules-right = "xkeyboard pulseaudio date"; + tray-position = "none"; + }; + + "module/xwindow" = { + type = "internal/xwindow"; + label = "%title:0:30:...%"; + }; + + "module/xkeyboard" = { + type = "internal/xkeyboard"; + blacklist-0 = "num lock"; + + format-prefix = ""; + format-prefix-foreground = "\${colors.foreground-alt}"; + + label-layout = "%layout%"; + + label-indicator-padding = 2; + label-indicator-margin = 1; + label-indicator-background = "\${colors.secondary}"; + }; + + "module/filesystem" = { + type = "internal/fs"; + interval = 10; + + mount-0 = "/"; + + label-mounted = "%{F#0a81f5}%mountpoint%%{F-}: %used%/%total%"; + label-unmounted = ""; + }; + + "module/i3" = { + type = "internal/i3"; + format = " "; + index-sort = true; + wrapping-scroll = false; + + # Only show workspaces on the same output as the bar + # pin-workspaces = true + + label-mode-padding = 1; + label-mode-foreground = "#000"; + label-mode-background = "\${colors.primary}"; + + # focused = Active workspace on focused monitor + label-focused = "%index%"; + label-focused-background = "\${colors.background}"; + label-focused-underline = "\${colors.primary}"; + label-focused-padding = 1; + + # unfocused = Inactive workspace on any monitor + label-unfocused = "%index%"; + label-unfocused-padding = 1; + + # visible = Active workspace on unfocused monitor + label-visible = "%index%"; + label-visible-background = "\${self.label-focused-background}"; + label-visible-underline = "\${self.label-focused-underline}"; + label-visible-padding = "\${self.label-focused-padding}"; + + # urgent = Workspace with urgency hint set + label-urgent = "%index%"; + label-urgent-background = "\${colors.alert}"; + label-urgent-padding = 1; + }; + + "module/xbacklight" = { + type = "internal/xbacklight"; + + format = "