diff --git a/.sops.yaml b/.sops.yaml index 3afccb7..0967869 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -2,6 +2,7 @@ keys: - &user_patrick 5FA64909521A5C85992F26E0F819AEFF941BB849 - &host_celestia age1vadwmwh8ckfal7j83gwrwn9324gqufwgkxskznhp9v867amndcwqgp2w6t - &host_primordial age12u7ayy2q5dps2pcpc6z7962pz07jxv3tt03hna6jyumlu4fdjvtqdg2n3e + - &host_laptop age1fhnujflp29sekvwjgw0ue2hnmjum3fpcj80vly0rkt07u9xwlf7ql25mkk creation_rules: - path_regex: nixos/celestia/secrets\.yaml$ key_groups: diff --git a/flake.lock b/flake.lock index d0d27d7..b40efb1 100644 --- a/flake.lock +++ b/flake.lock @@ -16,6 +16,36 @@ "type": "gitlab" } }, + "cachix": { + "inputs": { + "devenv": "devenv_2", + "flake-compat": [ + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "pre-commit-hooks": [ + "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" + } + }, "crane": { "inputs": { "nixpkgs": [ @@ -24,11 +54,11 @@ ] }, "locked": { - "lastModified": 1706473964, - "narHash": "sha256-Fq6xleee/TsX6NbtoRuI96bBuDHMU57PrcK9z1QEKbk=", + "lastModified": 1718474113, + "narHash": "sha256-UKrfy/46YF2TRnxTtKCYzqf2f5ZPRRWwKCCJb7O5X8U=", "owner": "ipetkov", "repo": "crane", - "rev": "c798790eabec3e3da48190ae3698ac227aab770c", + "rev": "0095fd8ea00ae0a9e6014f39c375e40c2fbd3386", "type": "github" }, "original": { @@ -44,11 +74,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1704875591, - "narHash": "sha256-eWRLbqRcrILgztU/m/k7CYLzETKNbv0OsT2GjkaNm8A=", + "lastModified": 1718194053, + "narHash": "sha256-FaGrf7qwZ99ehPJCAwgvNY5sLCqQ3GDiE/6uLhxxwSY=", "owner": "serokell", "repo": "deploy-rs", - "rev": "1776009f1f3fb2b5d236b84d9815f2edee463a9b", + "rev": "3867348fa92bc892eba5d9ddb2d7a97b9e127a8a", "type": "github" }, "original": { @@ -59,19 +89,20 @@ }, "devenv": { "inputs": { - "flake-compat": "flake-compat_2", - "nix": "nix", + "cachix": "cachix", + "flake-compat": "flake-compat_3", + "nix": "nix_2", "nixpkgs": [ "nixpkgs" ], "pre-commit-hooks": "pre-commit-hooks" }, "locked": { - "lastModified": 1688058187, - "narHash": "sha256-ipDcc7qrucpJ0+0eYNlwnE+ISTcq4m03qW+CWUshRXI=", + "lastModified": 1718265154, + "narHash": "sha256-eTbBvYwGlKExMSTyHQya6+6kdx1rtva/aVfyAZu2NUU=", "owner": "cachix", "repo": "devenv", - "rev": "c8778e3dc30eb9043e218aaa3861d42d4992de77", + "rev": "1983f635c29dc68bb0d29b3a7e227579a1d98788", "type": "github" }, "original": { @@ -81,18 +112,49 @@ "type": "github" } }, + "devenv_2": { + "inputs": { + "flake-compat": [ + "devenv", + "cachix", + "flake-compat" + ], + "nix": "nix", + "nixpkgs": "nixpkgs_2", + "poetry2nix": "poetry2nix", + "pre-commit-hooks": [ + "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" + } + }, "emacs": { "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_5", + "flake-utils": "flake-utils_5", + "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable_3" }, "locked": { - "lastModified": 1706665628, - "narHash": "sha256-I/VEC6k+4l4paKYqCgzkjrP6a1moxxWJQ8V26xS/Doo=", + "lastModified": 1714614481, + "narHash": "sha256-vykQwGwiu178RHmmRRTzId3qpc9YQtY29Jie7E2GFMg=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "6ed1948db6bf8b21ba2d25b3e2d9a45c0176b166", + "rev": "cccda8508481ea8c8ff4e50a297900ed54b26dc3", "type": "github" }, "original": { @@ -175,11 +237,27 @@ "flake-compat_4": { "flake": false, "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", + "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": { @@ -196,11 +274,11 @@ ] }, "locked": { - "lastModified": 1704982712, - "narHash": "sha256-2Ptt+9h8dczgle2Oo6z5ni5rt/uLMG47UFTR1ry/wgg=", + "lastModified": 1717285511, + "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "07f6395285469419cf9d078f59b5b49993198c00", + "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", "type": "github" }, "original": { @@ -210,12 +288,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems_2" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -226,14 +307,14 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -244,14 +325,14 @@ }, "flake-utils_3": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -262,14 +343,14 @@ }, "flake-utils_4": { "inputs": { - "systems": "systems_4" + "systems": "systems_5" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -279,6 +360,24 @@ } }, "flake-utils_5": { + "inputs": { + "systems": "systems_6" + }, + "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_6": { "locked": { "lastModified": 1637014545, "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", @@ -293,7 +392,7 @@ "type": "github" } }, - "flake-utils_6": { + "flake-utils_7": { "locked": { "lastModified": 1629284811, "narHash": "sha256-JHgasjPR0/J1J3DRm4KxM4zTyAj4IOJY8vIl75v/kPI=", @@ -317,11 +416,11 @@ ] }, "locked": { - "lastModified": 1660459072, - "narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "a20de23b925fd8264fd7fad6454652e142fd7f73", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -339,11 +438,11 @@ ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -354,14 +453,14 @@ }, "home-manager": { "inputs": { - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1706473109, - "narHash": "sha256-iyuAvpKTsq2u23Cr07RcV5XlfKExrG8gRpF75hf1uVc=", + "lastModified": 1719677234, + "narHash": "sha256-qO9WZsj/0E6zcK4Ht1y/iJ8XfwbBzq7xdqhBh44OP/M=", "owner": "nix-community", "repo": "home-manager", - "rev": "d634c3abafa454551f2083b054cd95c3f287be61", + "rev": "36317d4d38887f7629876b0e43c8d9593c5cc48d", "type": "github" }, "original": { @@ -373,19 +472,19 @@ "lanzaboote": { "inputs": { "crane": "crane", - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_4", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_3", - "nixpkgs": "nixpkgs_3", + "flake-utils": "flake-utils_4", + "nixpkgs": "nixpkgs_4", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1706522979, - "narHash": "sha256-2wP2qEFVoZ9q8C9MZdAwXPKDkIIQiEwUzuzCxVKafDc=", + "lastModified": 1718782018, + "narHash": "sha256-8SBmf7Sx5xMLzL4VGEU0fe8cuq0yMumdkXgOPXXD3Bo=", "owner": "nix-community", "repo": "lanzaboote", - "rev": "c42edac7eb881315bb2a8dfd5190c8c87b91e084", + "rev": "6fa7bc0522f71d3906a3788bbd80c344cd9c4523", "type": "github" }, "original": { @@ -394,42 +493,79 @@ "type": "github" } }, - "lowdown-src": { - "flake": false, - "locked": { - "lastModified": 1633514407, - "narHash": "sha256-Dw32tiMjdK9t3ETl5fzGrutQTzh2rufgZV4A/BbxuD4=", - "owner": "kristapsdz", - "repo": "lowdown", - "rev": "d2c2b44ff6c27b936ec27358a2653caaef8f73b8", - "type": "github" - }, - "original": { - "owner": "kristapsdz", - "repo": "lowdown", - "type": "github" - } - }, "nix": { "inputs": { - "lowdown-src": "lowdown-src", + "flake-compat": "flake-compat_2", "nixpkgs": [ + "devenv", + "cachix", "devenv", "nixpkgs" ], "nixpkgs-regression": "nixpkgs-regression" }, "locked": { - "lastModified": 1676545802, - "narHash": "sha256-EK4rZ+Hd5hsvXnzSzk2ikhStJnD63odF7SzsQ8CuSPU=", + "lastModified": 1712911606, + "narHash": "sha256-BGvBhepCufsjcUkXnEEXhEVjwdJAwPglCC2+bInc794=", "owner": "domenkozar", "repo": "nix", - "rev": "7c91803598ffbcfe4a55c44ac6d49b2cf07a527f", + "rev": "b24a9318ea3f3600c1e24b4a00691ee912d4de12", "type": "github" }, "original": { "owner": "domenkozar", - "ref": "relaxed-flakes", + "ref": "devenv-2.21", + "repo": "nix", + "type": "github" + } + }, + "nix-github-actions": { + "inputs": { + "nixpkgs": [ + "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" + } + }, + "nix_2": { + "inputs": { + "flake-compat": [ + "devenv", + "flake-compat" + ], + "nixpkgs": [ + "devenv", + "nixpkgs" + ], + "nixpkgs-regression": "nixpkgs-regression_2" + }, + "locked": { + "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" } @@ -450,33 +586,18 @@ "type": "github" } }, - "nixpkgs-23_05": { + "nixpkgs-24_05": { "locked": { - "lastModified": 1704290814, - "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", + "lastModified": 1717144377, + "narHash": "sha256-F/TKWETwB5RaR8owkPPi+SPJh83AQsm6KrQAlJ8v/uA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", + "rev": "805a384895c696f802a9bf5bf4720f37385df547", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-23.05", - "type": "indirect" - } - }, - "nixpkgs-23_11": { - "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-23.11", + "ref": "nixos-24.05", "type": "indirect" } }, @@ -490,11 +611,11 @@ "parts": "parts" }, "locked": { - "lastModified": 1706667828, - "narHash": "sha256-fevDymcngsNuphl1ImDkuyt4uYNv2r9e6uZQBK1pehE=", + "lastModified": 1714616867, + "narHash": "sha256-GHvEVdWFSP5Ci7J3ZmcrBs/vag+NJ0ub8j9V0tZjAVM=", "owner": "fortuneteller2k", "repo": "nixpkgs-f2k", - "rev": "7dfe02c1d678826d64e8a3f67b908634456f784a", + "rev": "07f53aa9b3f4ce64fd39903ba09a3d8e26e4ecee", "type": "github" }, "original": { @@ -506,18 +627,18 @@ "nixpkgs-fmt": { "inputs": { "fenix": "fenix", - "flake-utils": "flake-utils_5", + "flake-utils": "flake-utils_6", "nixpkgs": [ "nixpkgs-f2k", "nixpkgs" ] }, "locked": { - "lastModified": 1705307188, - "narHash": "sha256-2UDso6ALCoqVH0Q0boIYRT9NJtto8CECAc+gUIHi1/o=", + "lastModified": 1710146057, + "narHash": "sha256-GLZNcoQT3AWGg1ZINKOgHcD1/LgDStI6hZbfsisjOgM=", "owner": "nix-community", "repo": "nixpkgs-fmt", - "rev": "7301bc9f2ba29fe693c04cbcaa12110eb9685c71", + "rev": "f048515c9a98d7e2e4b034ec77641acc8a58098d", "type": "github" }, "original": { @@ -529,11 +650,11 @@ "nixpkgs-lib": { "locked": { "dir": "lib", - "lastModified": 1703961334, - "narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -560,29 +681,45 @@ "type": "github" } }, - "nixpkgs-stable": { + "nixpkgs-regression_2": { "locked": { - "lastModified": 1678872516, - "narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=", + "lastModified": 1643052045, + "narHash": "sha256-uGJ0VXIhWKGXxkeNnq4TvV3CIOkUJ3PAoLZ3HMzNVMw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-22.11", + "repo": "nixpkgs", + "rev": "215d4d0fd80ca5163643b03a33fde804a29cc1e2", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -594,11 +731,11 @@ }, "nixpkgs-stable_3": { "locked": { - "lastModified": 1706515015, - "narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=", + "lastModified": 1714531828, + "narHash": "sha256-ILsf3bdY/hNNI/Hu5bSt2/KbmHaAVhBbNUOdGztTHEg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4", + "rev": "0638fe2715d998fa81d173aad264eb671ce2ebc1", "type": "github" }, "original": { @@ -610,11 +747,11 @@ }, "nixpkgs-stable_4": { "locked": { - "lastModified": 1706515015, - "narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=", + "lastModified": 1719663039, + "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4", + "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", "type": "github" }, "original": { @@ -626,27 +763,43 @@ }, "nixpkgs-stable_5": { "locked": { - "lastModified": 1705957679, - "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", + "lastModified": 1719663039, + "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", + "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", "type": "github" }, "original": { "owner": "NixOS", - "ref": "release-23.05", + "ref": "release-23.11", "repo": "nixpkgs", "type": "github" } }, "nixpkgs_2": { "locked": { - "lastModified": 1706191920, - "narHash": "sha256-eLihrZAPZX0R6RyM5fYAWeKVNuQPYjAkCUBr+JNvtdE=", + "lastModified": 1692808169, + "narHash": "sha256-x9Opq06rIiwdwGeK2Ykj69dNc2IvUH1fY55Wm7atwrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ae5c332cbb5827f6b1f02572496b141021de335f", + "rev": "9201b5ff357e781bf014d0330d18555695df7ba8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1719254875, + "narHash": "sha256-ECni+IkwXjusHsm9Sexdtq8weAq/yUyt1TWIemXt3Ko=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2893f56de08021cffd9b6b6dfc70fd9ccd51eb60", "type": "github" }, "original": { @@ -656,13 +809,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1706370590, - "narHash": "sha256-vq8hTMHsmPkBDaLR2i3m2nSmFObWmo7YwK51KQdI6RY=", + "lastModified": 1718541509, + "narHash": "sha256-TmC5TxW5WPAfmovDzi1hLe1i4qqND79s9SH9UOKcSvo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3fb3707af869e32b0ad0676f589b16cc7711a376", + "rev": "ba06293cdba1c94af9710024abf3b94cf8d76349", "type": "github" }, "original": { @@ -672,29 +825,13 @@ "type": "github" } }, - "nixpkgs_4": { - "locked": { - "lastModified": 1706550542, - "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs_5": { "locked": { - "lastModified": 1706371002, - "narHash": "sha256-dwuorKimqSYgyu8Cw6ncKhyQjUDOyuXoxDTVmAXq88s=", + "lastModified": 1719506693, + "narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c002c6aa977ad22c60398daaa9be52f2203d0006", + "rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a", "type": "github" }, "original": { @@ -706,11 +843,27 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1706173671, - "narHash": "sha256-lciR7kQUK2FCAYuszyd7zyRRmTaXVeoZsCyK6QFpGdk=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4fddc9be4eaf195d631333908f2a454b03628ee5", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1719468428, + "narHash": "sha256-vN5xJAZ4UGREEglh3lfbbkIj+MPEYMuqewMn4atZFaQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1e3deb3d8a86a870d925760db1a5adecc64d329d", "type": "github" }, "original": { @@ -722,11 +875,11 @@ }, "nurpkgs": { "locked": { - "lastModified": 1706737483, - "narHash": "sha256-5Zth6Dtl/7S6dt2nBbPPlHh0PSlFJZQg8Ljqy0FUpIM=", + "lastModified": 1719762299, + "narHash": "sha256-hD+5hNGqPBipDTuZZImSCU36RqacSJadHjQtK/gbaxU=", "owner": "nix-community", "repo": "NUR", - "rev": "ae03b5f3fe8cb99cfa26b31c61a3a96fb8e4ad33", + "rev": "80b917d886c6554264f71e1fc68e6b17cd5fdfa1", "type": "github" }, "original": { @@ -740,11 +893,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1706569497, - "narHash": "sha256-oixb0IDb5eZYw6BaVr/R/1pSoMh4rfJHkVnlgeRIeZs=", + "lastModified": 1714606777, + "narHash": "sha256-bMkNmAXLj8iyTvxaaD/StcLSadbj1chPcJOjtuVnLmA=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "60c614008eed1d0383d21daac177a3e036192ed8", + "rev": "4d34ce6412bc450b1d4208c953dc97c7fc764f1a", "type": "github" }, "original": { @@ -753,13 +906,38 @@ "type": "github" } }, + "poetry2nix": { + "inputs": { + "flake-utils": "flake-utils", + "nix-github-actions": "nix-github-actions", + "nixpkgs": [ + "devenv", + "cachix", + "devenv", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1692876271, + "narHash": "sha256-IXfZEkI0Mal5y1jr6IRWMqK8GW2/f28xJenZIPQqkY0=", + "owner": "nix-community", + "repo": "poetry2nix", + "rev": "d5006be9c2c2417dafb2e2e5034d83fabd207ee3", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "poetry2nix", + "type": "github" + } + }, "pre-commit-hooks": { "inputs": { "flake-compat": [ "devenv", "flake-compat" ], - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "gitignore": "gitignore", "nixpkgs": [ "devenv", @@ -768,11 +946,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1686050334, - "narHash": "sha256-R0mczWjDzBpIvM3XXhO908X5e2CQqjyh/gFbwZk/7/Q=", + "lastModified": 1713775815, + "narHash": "sha256-Wu9cdYTnGQQwtT20QQMg7jzkANKQjwBD9iccfGKkfls=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "6881eb2ae5d8a3516e34714e7a90d9d95914c4dc", + "rev": "2ac4dcbf55ed43f3be0bae15e181f08a57af24a4", "type": "github" }, "original": { @@ -787,10 +965,6 @@ "lanzaboote", "flake-compat" ], - "flake-utils": [ - "lanzaboote", - "flake-utils" - ], "gitignore": "gitignore_2", "nixpkgs": [ "lanzaboote", @@ -799,11 +973,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1706424699, - "narHash": "sha256-Q3RBuOpZNH2eFA1e+IHgZLAOqDD9SKhJ/sszrL8bQD4=", + "lastModified": 1717664902, + "narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "7c54e08a689b53c8a1e5d70169f2ec9e2a68ffaf", + "rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1", "type": "github" }, "original": { @@ -816,10 +990,10 @@ "inputs": { "deploy": "deploy", "devenv": "devenv", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils_3", "home-manager": "home-manager", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "nixpkgs-f2k": "nixpkgs-f2k", "nixpkgs-stable": "nixpkgs-stable_4", "nurpkgs": "nurpkgs", @@ -857,11 +1031,11 @@ ] }, "locked": { - "lastModified": 1706494265, - "narHash": "sha256-4ilEUJEwNaY9r/8BpL3VmZiaGber0j09lvvx0e/bosA=", + "lastModified": 1718504420, + "narHash": "sha256-F2HT/abCfr0CDpkvXwYCscJyD66XDTLMVfdrIMRp2ck=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "246ba7102553851af60e0382f558f6bc5f63fa13", + "rev": "0043c3f92304823cc2c0a4354b0feaa61dfb4cd9", "type": "github" }, "original": { @@ -872,18 +1046,18 @@ }, "rycee-nurpkgs": { "inputs": { - "flake-utils": "flake-utils_6", + "flake-utils": "flake-utils_7", "nixpkgs": [ "nixpkgs" ] }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1706647585, - "narHash": "sha256-HwAWgXIUn0a2FIS5Mye0sAZj1BZ4++YKWzIPM7coFjs=", + "lastModified": 1719644951, + "narHash": "sha256-MTF+/uUIdFNeyzEFirWyza43AFfr3Syld7aPw2CSCkI=", "owner": "rycee", "repo": "nur-expressions", - "rev": "9343a32ef3fc2d3be2f3c5266a09c63cc5019438", + "rev": "590551ba0bb0f960c7fcd37d6ff3a429f7cc9dd1", "type": "gitlab" }, "original": { @@ -896,20 +1070,18 @@ "simple-nixos-mailserver": { "inputs": { "blobs": "blobs", - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_5", "nixpkgs": [ "nixpkgs" ], - "nixpkgs-23_05": "nixpkgs-23_05", - "nixpkgs-23_11": "nixpkgs-23_11", - "utils": "utils_2" + "nixpkgs-24_05": "nixpkgs-24_05" }, "locked": { - "lastModified": 1706219574, - "narHash": "sha256-qO+8UErk+bXCq2ybHU4GzXG4Ejk4Tk0rnnTPNyypW4g=", + "lastModified": 1718697807, + "narHash": "sha256-Enla61WFisytTYbWygPynEbu8vozjeGc6Obkj2GRj7o=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "e47f3719f1db3e0961a4358d4cb234a0acaa7baf", + "rev": "290a995de5c3d3f08468fa548f0d55ab2efc7b6b", "type": "gitlab" }, "original": { @@ -921,15 +1093,15 @@ }, "sops-nix": { "inputs": { - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "nixpkgs-stable": "nixpkgs-stable_5" }, "locked": { - "lastModified": 1706410821, - "narHash": "sha256-iCfXspqUOPLwRobqQNAQeKzprEyVowLMn17QaRPQc+M=", + "lastModified": 1719716556, + "narHash": "sha256-KA9gy2Wkv76s4A8eLnOcdKVTygewbw3xsB8+awNMyqs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "73bf36912e31a6b21af6e0f39218e067283c67ef", + "rev": "b5974d4331fb6c893e808977a2e1a6d34b3162d6", "type": "github" }, "original": { @@ -998,6 +1170,36 @@ "type": "github" } }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "utils": { "inputs": { "systems": "systems" @@ -1015,21 +1217,6 @@ "repo": "flake-utils", "type": "github" } - }, - "utils_2": { - "locked": { - "lastModified": 1605370193, - "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5021eac20303a61fafe17224c087f5519baed54d", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/home-modules/firefox-webapp.nix b/home-modules/firefox-webapp.nix new file mode 100644 index 0000000..1fbbfe4 --- /dev/null +++ b/home-modules/firefox-webapp.nix @@ -0,0 +1,206 @@ +{ + pkgs, + config, + lib, + ... +}: let + inherit (builtins) getAttr stringLength substring; + inherit (lib) mkOption; + inherit (lib.attrsets) mapAttrs mapAttrs' nameValuePair; + inherit (lib.strings) concatStringsSep toUpper; + + make-app-profiles = cfg: + mapAttrs' (name: cfg: + nameValuePair "home-manager-webapp-${name}" { + id = cfg.id; + + userChrome = '' + @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + + browser { + margin-right: 0px; margin-bottom: 0px; + } + + #TabsToolbar { + visibility: collapse !important; + } + + #nav-bar { + margin-top: 0; + margin-bottom: -42px; + z-index: -100; + } + + #main-window[windowtype="navigator:browser"] { + background-color: transparent !important; + } + + .tab-background[selected="true"] { + background: ${cfg.backgroundColor} !important; + } + ''; + + settings = + cfg.extraSettings + // { + "browser.sessionstore.resume_session_once" = false; + "browser.sessionstore.resume_from_crash" = false; + "browser.cache.disk.enable" = false; + "browser.cache.disk.capacity" = 0; + "browser.cache.disk.filesystem_reported" = 1; + "browser.cache.disk.smart_size.enabled" = false; + "browser.cache.disk.smart_size.first_run" = false; + "browser.cache.disk.smart_size.use_old_max" = false; + "browser.ctrlTab.previews" = true; + "browser.tabs.warnOnClose" = false; + "plugin.state.flash" = 2; + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "browser.tabs.drawInTitlebar" = false; + "browser.tabs.inTitlebar" = 0; + "browser.contentblocking.category" = "strict"; + "browser.link.open_newwindow" = 2; + "browser.link.open_newwindow.restriction" = 1; + "network.cookie.lifetimePolicy" = 0; + "layout.css.prefers-color-scheme.content-override" = getAttr cfg.theme { + dark = 0; + light = 1; + system = 2; + }; + }; + }) + cfg; +in { + options.programs.firefox.webapps = mkOption { + default = {}; + + type = with lib.types; + attrsOf (submodule { + options = { + #################### + # Firefox settings # + #################### + url = mkOption { + type = str; + description = "The URL of the webapp to launch."; + }; + + id = mkOption { + type = int; + description = "The Firefox profile ID to set."; + }; + + extraArgs = mkOption { + type = listOf string; + default = []; + description = "Extra args to launch Firefox with."; + }; + + extraSettings = mkOption { + type = attrsOf (either bool (either int str)); + default = {}; + description = "Additional Firefox profile settings."; + }; + + backgroundColor = mkOption { + type = str; + default = "rgba(0, 0, 0, 0)"; + description = "The background color to use for loading pages."; + }; + + theme = mkOption { + type = enum ["dark" "light" "system"]; + default = "system"; + description = "The application CSS theme to use, if supported."; + }; + + ######################### + # Desktop file settings # + ######################### + + # Copied from xdg.desktopEntries, with slight modification for default settings + name = mkOption { + type = nullOr str; + default = null; + description = "Specific name of the application. Defaults to the capitalized attribute name."; + }; + + mimeType = mkOption { + description = "The MIME type(s) supported by this application."; + type = nullOr (listOf str); + default = ["text/html" "text/xml" "application/xhtml_xml"]; + }; + + # Copied verbatim from xdg.desktopEntries. + genericName = mkOption { + type = nullOr str; + default = null; + description = "Generic name of the application."; + }; + + comment = mkOption { + type = nullOr str; + default = null; + description = "Tooltip for the entry."; + }; + + categories = mkOption { + type = nullOr (listOf str); + default = null; + description = "Categories in which the entry should be shown in a menu."; + }; + + icon = mkOption { + type = nullOr (either str path); + default = null; + description = "Icon to display in file manager, menus, etc."; + }; + + prefersNonDefaultGPU = mkOption { + type = nullOr bool; + default = null; + description = '' + If true, the application prefers to be run on a more + powerful discrete GPU if available. + ''; + }; + }; + }); + + description = "Websites to create special site-specific Firefox instances for."; + }; + + config = { + programs.firefox.profiles = make-app-profiles config.programs.firefox.webapps; + + xdg.desktopEntries = + mapAttrs (name: cfg: { + inherit (cfg) genericName comment categories icon mimeType prefersNonDefaultGPU; + + name = + if cfg.name == null + then (toUpper (substring 0 1 name)) + (substring 1 (stringLength name) name) + else cfg.name; + + startupNotify = true; + terminal = false; + type = "Application"; + + exec = concatStringsSep " " ([ + "${config.programs.firefox.package}/bin/firefox" + "--class" + "WebApp-${name}" + "-P" + "${config.programs.firefox.profiles."home-manager-webapp-${name}".path}" + "--no-remote" + ] + ++ cfg.extraArgs + ++ ["${cfg.url}"]); + + settings = { + X-MultipleArgs = "false"; # Consider enabling, don't know what this does + StartupWMClass = "WebApp-${name}"; + }; + }) + config.programs.firefox.webapps; + }; +} diff --git a/home-modules/modules-list.nix b/home-modules/modules-list.nix new file mode 100644 index 0000000..a9cf77d --- /dev/null +++ b/home-modules/modules-list.nix @@ -0,0 +1,5 @@ +{...}: { + imports = [ + ./firefox-webapp.nix + ]; +} diff --git a/home/configurations.nix b/home/configurations.nix new file mode 100644 index 0000000..6f9eb10 --- /dev/null +++ b/home/configurations.nix @@ -0,0 +1,30 @@ +{ + nixpkgs, + nurpkgs, + home-manager, + devenv, + ... +}: let + pkgs = import nixpkgs { + system = "x86_64-linux"; + }; + + nur = import nurpkgs { + inherit pkgs; + nurpkgs = pkgs; + }; +in { + work = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + + extraSpecialArgs = { + inherit devenv; # TODO: Remove dependency on devenv + ff-addons = nur.repos.rycee.firefox-addons; + }; + + modules = [ + ../home-modules/modules-list.nix + ./work + ]; + }; +} diff --git a/home/work/default.nix b/home/work/default.nix new file mode 100644 index 0000000..59b13a0 --- /dev/null +++ b/home/work/default.nix @@ -0,0 +1,24 @@ +{ + config, + pkgs, + devenv, + ... +}: { + home = { + stateVersion = "22.11"; + username = "patrick"; + homeDirectory = "/home/${config.home.username}"; + packages = (pkgs.callPackage ./pkgs.nix {}) ++ [devenv.packages.${pkgs.system}.devenv]; + sessionPath = ["~/.local/bin"]; + sessionVariables = { + SSH_AUTH_SOCK = "/run/user/1000/ssh-agent"; + }; + }; + + xdg.enable = true; + + imports = builtins.concatMap import [ + ./programs + ./services + ]; +} diff --git a/home/work/pkgs.nix b/home/work/pkgs.nix new file mode 100644 index 0000000..f5275d1 --- /dev/null +++ b/home/work/pkgs.nix @@ -0,0 +1,42 @@ +{pkgs, ...}: +with pkgs; [ + age # Modern encryption tool with small explicit keys + arandr # simple GUI for xrandr + atuin + dig # dns command-line tool + fd # "find" for files + geckodriver # remote controll firefox + helix # modal editor + htop # process monitor + hyperfine # command-line benchmarking tool + i3lock # screen locker + imagemagick # selection screenshot stuff + just # just a command runner + keepassxc # password manager + lazygit # git client + libnotify # notify-send command + libsecret + libreoffice + linphone + logseq # note taking utility + mtr # traceroute + mumble # voice call client + ncdu # disk space info (a better du) + neovim-unwrapped # best code editor on the planet + networkmanagerapplet # systray applet for NetworkManager + nitrogen # wallpapger manager + nushellFull # A modern shell written in Rust + ouch # painless compression and decompression for your terminal + pavucontrol # pulseaudio volume control + playerctl # music player controller + podman-compose # podman manager + restic # incremental backup tool + ripgrep # fast grep + rocketchat-desktop # company chat + sops # Mozilla sops (Secrets OPerationS) is an editor of encrypted files + thunderbird # email client + xclip # clipboard support + xsel # clipboard support (also for neovim) + zeal # offline documentation browser + zellij # A terminal workspace with batteries included +] diff --git a/home/work/programs/alacritty/default.nix b/home/work/programs/alacritty/default.nix new file mode 100644 index 0000000..2f6ce0e --- /dev/null +++ b/home/work/programs/alacritty/default.nix @@ -0,0 +1,100 @@ +{...}: { + programs.alacritty = { + enable = true; + + settings = { + live_config_reload = true; + + env.TERM = "xterm-256color"; + bell.duration = 0; + cursor.style = "Block"; + + scrolling = { + history = 10000; + multiplier = 3; + }; + + window = { + decorations = "full"; + dynamic_title = false; + opacity = 0.9; + + dimensions = { + columns = 0; + lines = 0; + }; + + padding = { + x = 2; + y = 2; + }; + }; + + font = { + size = 11.0; + + normal = { + family = "Comic Mono Nerd Font"; + style = "Regular"; + }; + + bold = { + family = "Comic Mono Nerd Font"; + style = "Bold"; + }; + + italic = { + family = "Comic Mono Nerd Font"; + style = "Italic"; + }; + }; + + mouse.bindings = [ + { + mouse = "Middle"; + action = "PasteSelection"; + } + ]; + + colors = { + primary = { + background = "0x000000"; + foreground = "0xeaeaea"; + }; + + normal = { + black = "0x000000"; + red = "0xd54e53"; + green = "0xb9ca4a"; + yellow = "0xe6c547"; + blue = "0x7aa6da"; + magenta = "0xc397d8"; + cyan = "0x70c0ba"; + white = "0xffffff"; + }; + + bright = { + black = "0x666666"; + red = "0xff3334"; + green = "0x9ec400"; + yellow = "0xe7c547"; + blue = "0x7aa6da"; + magenta = "0xb77ee0"; + cyan = "0x54ced6"; + white = "0xffffff"; + }; + + dim = { + black = "0x333333"; + red = "0xf2777a"; + green = "0x99cc99"; + yellow = "0xffcc66"; + blue = "0x6699cc"; + magenta = "0xcc99cc"; + cyan = "0x66cccc"; + white = "0xdddddd"; + }; + }; + }; + }; +} diff --git a/home/work/programs/autorandr/default.nix b/home/work/programs/autorandr/default.nix new file mode 100644 index 0000000..d23475b --- /dev/null +++ b/home/work/programs/autorandr/default.nix @@ -0,0 +1,132 @@ +{...}: let + eDPId = "00ffffffffffff0006af3d5700000000001c0104a51f1178022285a5544d9a270e505400000001010101010101010101010101010101b43780a070383e401010350035ae100000180000000f0000000000000000000000000020000000fe0041554f0a202020202020202020000000fe004231343048414e30352e37200a0070"; + homeLGId = "00ffffffffffff001e6df976f2190200071b010380502278eaca95a6554ea1260f5054256b807140818081c0a9c0b300d1c08100d1cfcd4600a0a0381f4030203a001e4e3100001a295900a0a038274030203a001e4e3100001a000000fd00284b5a5a18000a202020202020000000fc004c4720554c545241574944450a0154020323f12309070747100403011f13128301000065030c001000681a00000101284b008c0ad08a20e02d10103e96001e4e31000018000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000045"; + homeFujitsuId = "00ffffffffffff001ab3f4070101010130150103802f1e782ac665a059589d270e5054a54b008180950001010101010101010101010121399030621a274068b03600da281100001c000000fc00423232572d36204c45440a2020000000fd00384c1e5210000a202020202020000000ff00595633553136343932330a20200065"; + officeFirstId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5312000a202020202020000000fc00484c3234394450420a2020202000c1"; + officeFirstAltId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5310000a202020202020000000fc00484c3234394450420a2020202000c3"; + officeSecondId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5312000a202020202020000000fc00484c3234394450420a2020202000c1"; + officeSecondAltId = "00ffffffffffff0022640565000000002d15010380341d78eaeed5a555489b26125054bfef80d1c0b300a9409500904081808140714f023a801871382d40582c450009252100001e000000ff0031323334353637383930313233000000fd00384b1e5310000a202020202020000000fc00484c3234394450420a2020202000c3"; +in { + programs.autorandr = { + enable = true; + + hooks = { + predetect = {}; + preswitch = {}; + postswitch = {}; + }; + + profiles = { + "laptop" = { + fingerprint = { + eDP-1 = eDPId; + }; + + config = { + eDP-1 = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + rate = "60.03"; + }; + }; + }; + + "home" = { + fingerprint = { + eDP-1 = eDPId; + DP-3 = homeLGId; + DP-5 = homeFujitsuId; + }; + + config = { + eDP-1 = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + rate = "60.03"; + }; + + DP-3 = { + primary = true; + crtc = 0; + mode = "2560x1080"; + position = "1920x0"; + rate = "59.98"; + }; + + DP-5 = { + crtc = 2; + mode = "1680x1050"; + position = "4480x30"; + rate = "59.95"; + }; + }; + }; + + "office" = { + fingerprint = { + eDP-1 = eDPId; + DP-3 = officeFirstId; + DP-5 = officeSecondId; + }; + + config = { + eDP-1 = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + rate = "60.03"; + }; + + DP-3 = { + crtc = 2; + mode = "1920x1080"; + position = "3840x0"; + rate = "60.00"; + }; + + DP-5 = { + primary = true; + crtc = 0; + mode = "1920x1080"; + position = "1920x0"; + rate = "60.00"; + }; + }; + }; + + "office-alt" = { + fingerprint = { + eDP-1 = eDPId; + DP-4 = officeFirstAltId; + DP-7 = officeSecondAltId; + }; + + config = { + eDP-1 = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + rate = "60.03"; + }; + + DP-4 = { + crtc = 2; + mode = "1920x1080"; + position = "3840x0"; + rate = "60.00"; + }; + + DP-7 = { + primary = true; + crtc = 0; + mode = "1920x1080"; + position = "1920x0"; + rate = "60.00"; + }; + }; + }; + }; + }; +} diff --git a/home/work/programs/bash/default.nix b/home/work/programs/bash/default.nix new file mode 100644 index 0000000..f3d6755 --- /dev/null +++ b/home/work/programs/bash/default.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + programs.bash = { + enable = true; + + shellAliases = { + ls = "eza"; + jssh = "ssh-wrapper jssh"; + jrescue = "ssh-wrapper jrescue"; + rescue = "ssh-wrapper rescue"; + }; + + initExtra = '' + source ${pkgs.blesh}/share/blesh/ble.sh + export PATH=$PATH:~/.local/bin + export SSH_AUTH_SOCK=/run/user/1000/ssh-agent + ''; + }; +} diff --git a/home/work/programs/default.nix b/home/work/programs/default.nix new file mode 100644 index 0000000..7d78415 --- /dev/null +++ b/home/work/programs/default.nix @@ -0,0 +1,97 @@ +[ + ./alacritty + ./autorandr + ./bash + ./firefox + ./rofi + ./tmate + ./xresources + ./hyprland + { + programs = { + home-manager.enable = true; + bat.enable = true; + jq.enable = true; + gpg.enable = true; + swaylock.enable = true; + + eza = { + enable = true; + icons = true; + git = true; + }; + + waybar = { + enable = true; + + settings.mainbar = { + layer = "top"; + position = "top"; + height = 30; + + modules-left = ["hyprland/workspaces"]; + modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "battery" "clock" "tray"]; + }; + }; + + atuin = { + enable = true; + flags = ["--disable-up-arrow"]; + settings = { + enter_accept = false; + }; + }; + + direnv = { + enable = true; + nix-direnv.enable = true; + }; + + fzf = { + enable = true; + defaultCommand = "fd --type file --follow"; # FZF_DEFAULT_COMMAND + defaultOptions = ["--height 20%"]; # FZF_DEFAULT_OPTS + fileWidgetCommand = "fd --type file --follow"; # FZF_CTRL_T_COMMAND + }; + + zoxide = { + enable = true; + # nushell moves faster than zoxide updates + enableNushellIntegration = false; + options = ["--cmd" "cd"]; + }; + + starship = { + enable = true; + # nushell moves faster than starship updates + enableNushellIntegration = false; + settings = { + add_newline = false; + }; + }; + + git = { + enable = true; + userName = "Patrick Michl"; + userEmail = "patrick.michl@hetzner.com"; + + signing = { + key = "BFE0ACEE21CD5EB0"; + signByDefault = true; + }; + + extraConfig = { + pull = { + rebase = true; + }; + merge = { + tool = "nvim"; + }; + mergetool = { + prompt = false; + }; + }; + }; + }; + } +] diff --git a/home/work/programs/firefox/default.nix b/home/work/programs/firefox/default.nix new file mode 100644 index 0000000..fa92488 --- /dev/null +++ b/home/work/programs/firefox/default.nix @@ -0,0 +1,140 @@ +{ + pkgs, + lib, + stdenv, + specialArgs, + ... +}: let + extensions = with specialArgs.ff-addons; [ + bitwarden + darkreader + i-dont-care-about-cookies + privacy-badger + ublock-origin + tree-style-tab + tridactyl + ]; + + customChrome = '' + @-moz-document url(chrome://browser/content/browser.xhtml) { + /* tabs on bottom of window */ + /* requires that you set + * toolkit.legacyUserProfileCustomizations.stylesheets = true + * in about:config + */ + #main-window body { flex-direction: column-reverse !important; } + #navigator-toolbox { flex-direction: column-reverse !important; } + #urlbar { + top: unset !important; + bottom: calc((var(--urlbar-toolbar-height) - var(--urlbar-height)) / 2) !important; + box-shadow: none !important; + display: flex !important; + flex-direction: column !important; + } + #urlbar-input-container { + order: 2; + } + #urlbar > .urlbarView { + order: 1; + border-bottom: 1px solid #666; + } + #urlbar-results { + display: flex; + flex-direction: column-reverse; + } + .search-one-offs { display: none !important; } + .tab-background { border-top: none !important; } + #navigator-toolbox::after { border: none; } + #TabsToolbar .tabbrowser-arrowscrollbox, + #tabbrowser-tabs, .tab-stack { min-height: 28px !important; } + .tabbrowser-tab { font-size: 80%; } + .tab-content { padding: 0 5px; } + .tab-close-button .toolbarbutton-icon { width: 12px !important; height: 12px !important; } + toolbox[inFullscreen=true] { display: none; } + } + ''; + + userChrome = customChrome; + + # ~/.mozilla/firefox/PROFILE_NAME/prefs.js | user.js + settings = { + "app.normandy.first_run" = false; + "app.shield.optoutstudies.enabled" = false; + + # disable updates (pretty pointless with nix) + "app.update.channel" = "default"; + + "browser.contentblocking.category" = "standard"; # "strict" + "browser.ctrlTab.recentlyUsedOrder" = false; + + "browser.download.viewableInternally.typeWasRegistered.svg" = true; + "browser.download.viewableInternally.typeWasRegistered.webp" = true; + "browser.download.viewableInternally.typeWasRegistered.xml" = true; + + "browser.search.region" = "DE"; + + "browser.shell.checkDefaultBrowser" = false; + "browser.tabs.loadInBackground" = true; + "browser.urlbar.placeholderName" = "EnteEnteLauf"; + "browser.urlbar.showSearchSuggestionsFirst" = false; + + # disable all the annoying quick actions + "browser.urlbar.quickactions.enabled" = false; + "browser.urlbar.quickactions.showPrefs" = false; + "browser.urlbar.shortcuts.quickactions" = false; + "browser.urlbar.suggest.quickactions" = false; + + "distribution.searchplugins.defaultLocale" = "en-US"; + + "doh-rollout.balrog-migration-done" = true; + "doh-rollout.doneFirstRun" = true; + + "general.useragent.locale" = "en-US"; + + "extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + + "extensions.extensions.activeThemeID" = "firefox-compact-dark@mozilla.org"; + "extensions.update.enabled" = false; + "extensions.webcompat.enable_picture_in_picture_overrides" = true; + "extensions.webcompat.enable_shims" = true; + "extensions.webcompat.perform_injections" = true; + "extensions.webcompat.perform_ua_overrides" = true; + + "privacy.donottrackheader.enabled" = true; + + # Yubikey + "security.webauth.u2f" = true; + "security.webauth.webauthn" = true; + "security.webauth.webauthn_enable_softtoken" = false; + "security.webauth.webauthn_enable_usbtoken" = true; + + "network.dns.ipv4OnlyDomains" = "google.com"; + + "toolkit.legacyUserProfileCustomizations.stylesheets" = true; + "layout.word_select.stop_at_punctuation" = false; + }; +in { + programs.firefox = { + enable = true; + + package = pkgs.firefox-bin; + + profiles = { + default = { + isDefault = true; + id = 0; + inherit extensions settings userChrome; + }; + }; + + webapps = { + rocket-chat = { + url = "https://chat.hetzner.company"; + id = 1; + + genericName = "Internet Messenger"; + categories = ["Network" "InstantMessaging"]; + }; + }; + }; +} diff --git a/home/work/programs/hyprland/default.nix b/home/work/programs/hyprland/default.nix new file mode 100644 index 0000000..6375dd6 --- /dev/null +++ b/home/work/programs/hyprland/default.nix @@ -0,0 +1,145 @@ +{pkgs, ...}: { + wayland.windowManager.hyprland = let + locker = "${pkgs.swaylock}/bin/swaylock"; + set-dpms = "${pkgs.hyprland}/bin/hyprctl dispatcher dpms"; + locked-dpms = pkgs.writeShellScript "locked-dpms.sh" '' + ${pkgs.swayidle}/bin/swayidle -w \ + timeout 10 'if pgrep -x swaylock; then ${set-dpms} off; fi' \ + resume '${set-dpms} on' + ''; + idle-script = pkgs.writeShellScript "idle-lock.sh" '' + ${pkgs.swayidle}/bin/swayidle -w \ + timeout 300 '${locker} -f' \ + timeout 330 '${set-dpms} off' \ + resume '${set-dpms} on' + ''; + in { + enable = true; + + settings = { + "$mod" = "SUPER"; + + exec-once = [ + "${pkgs.waybar}/bin/waybar" + "${pkgs.mako}/bin/mako" + idle-script + locked-dpms + ]; + + monitor = [ + "eDP-1,1920x1080,0x0,1.333333" # Laptop screen + "desc:LG Electronics LG ULTRAWIDE 0x000219F2,2560x1080,1440x0,1" # Primary @home + # "desc:Fujitsu Siemens Computers GmbH B22W-6 LED YV3U164923,1680x1050,4000x0,1" # Secondary @home + ",preferred,auto,1" # Automatically configure everything else + ]; + + device = [ + { + name = "razer-razer-blackwidow-chroma"; + kb_layout = "de"; + } + { + name = "at-translated-set-2-keyboard"; + kb_layout = "de"; + } + ]; + + input = { + kb_layout = "us,de"; + follow_mouse = 1; + }; + + general = { + gaps_in = 5; + gaps_out = 5; + border_size = 1; + layout = "dwindle"; + allow_tearing = false; + "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + }; + + decoration = { + rounding = 5; + drop_shadow = true; + shadow_range = 4; + shadow_render_power = 3; + "col.shadow" = "rgba(1a1a1aee)"; + + blur = { + enabled = true; + size = 3; + passes = 1; + }; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + + animation = [ + "windows, 1, 3, myBezier" + "windowsOut, 1, 3, default, popin 80%" + "border, 1, 3, default" + "borderangle, 1, 3, default" + "fade, 1, 3, default" + "workspaces, 1, 3, default" + ]; + }; + + bind = + [ + ", PRINT, exec, ${pkgs.hyprshot}/bin/hyprshot -m region --clipboard-only" + "$mod, return, exec, ${pkgs.alacritty}/bin/alacritty" + "$mod, D, exec, ${pkgs.rofi-wayland}/bin/rofi -show drun" + "$mod SHIFT, Q, killactive, " + "$mod, L, exec, ${locker}" + "$mod, V, togglefloating, " + "$mod, F, fullscreen, 1" + "$mod, P, pseudo, # dwindle" + "$mod, J, togglesplit, # dwindle" + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" + "$mod, S, togglespecialworkspace, magic" + "$mod SHIFT, S, movetoworkspace, special:magic" + ] + ++ builtins.concatLists (builtins.genList ( + x: let + num = builtins.toString (x + 1); + in [ + "$mod, ${num}, workspace, ${num}" + "$mod SHIFT, ${num}, movetoworkspace, ${num}" + ] + ) + 9); + + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; + + bindl = [ + "$mod SHIFT, L, exec, ${locker}" + ]; + + windowrulev2 = [ + # KeePassXC + "float,class:(org.keepassxc.KeePassXC)" + "size 800 600,class:(org.keepassxc.KeePassXC)" + # Thunderbird + "float,class:thunderbird" # Float all thunderbird windows + "tile,class:thunderbird,title:^(Write)" # Don't float the new mail window + "tile,class:thunderbird,title:(Mozilla Thunderbird)$" # Also dont float the main window + "move 100%-606 30,class:thunderbird" # The rest is the notification window. Float it in the top right corner + "noinitialfocus,class:thunderbird,title:^()$" # Make it not pull focus + ]; + + misc = { + mouse_move_enables_dpms = true; + key_press_enables_dpms = true; + }; + }; + }; +} diff --git a/home/work/programs/rofi/default.nix b/home/work/programs/rofi/default.nix new file mode 100644 index 0000000..5c4e783 --- /dev/null +++ b/home/work/programs/rofi/default.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + programs.rofi = { + enable = true; + terminal = "${pkgs.alacritty}/bin/alacritty"; + theme = ./theme.rafi; + }; +} diff --git a/home/work/programs/rofi/theme.rafi b/home/work/programs/rofi/theme.rafi new file mode 100644 index 0000000..7fff988 --- /dev/null +++ b/home/work/programs/rofi/theme.rafi @@ -0,0 +1,168 @@ +/** + * rofi -dump-theme output. + * Rofi version: 1.7.5 + **/ +* { + red: rgba ( 220, 50, 47, 100 % ); + selected-active-foreground: rgba ( 0, 142, 212, 100 % ); + lightfg: rgba ( 88, 104, 117, 100 % ); + separatorcolor: rgba ( 0, 54, 66, 100 % ); + urgent-foreground: rgba ( 218, 66, 129, 100 % ); + alternate-urgent-background: rgba ( 0, 43, 55, 100 % ); + lightbg: rgba ( 238, 232, 213, 100 % ); + background-color: transparent; + border-color: rgba ( 0, 43, 55, 100 % ); + normal-background: rgba ( 0, 43, 55, 100 % ); + selected-urgent-background: rgba ( 0, 54, 66, 100 % ); + alternate-active-background: rgba ( 0, 43, 55, 100 % ); + spacing: 2; + blue: rgba ( 38, 139, 210, 100 % ); + alternate-normal-foreground: var(foreground); + urgent-background: rgba ( 0, 43, 55, 100 % ); + selected-normal-foreground: rgba ( 129, 147, 150, 100 % ); + active-foreground: rgba ( 0, 142, 212, 100 % ); + background: rgba ( 0, 43, 55, 100 % ); + selected-active-background: rgba ( 0, 54, 66, 100 % ); + active-background: rgba ( 0, 43, 55, 100 % ); + selected-normal-background: rgba ( 0, 54, 66, 100 % ); + alternate-normal-background: rgba ( 0, 43, 55, 100 % ); + foreground: rgba ( 129, 147, 150, 100 % ); + selected-urgent-foreground: rgba ( 218, 66, 129, 100 % ); + normal-foreground: var(foreground); + alternate-urgent-foreground: var(urgent-foreground); + alternate-active-foreground: var(active-foreground); +} +element { + padding: 1px ; + spacing: 5px ; + border: 0; +} +element normal.normal { + background-color: var(normal-background); + text-color: var(normal-foreground); +} +element normal.urgent { + background-color: var(urgent-background); + text-color: var(urgent-foreground); +} +element normal.active { + background-color: var(active-background); + text-color: var(active-foreground); +} +element selected.normal { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +element selected.urgent { + background-color: var(selected-urgent-background); + text-color: var(selected-urgent-foreground); +} +element selected.active { + background-color: var(selected-active-background); + text-color: var(selected-active-foreground); +} +element alternate.normal { + background-color: var(alternate-normal-background); + text-color: var(alternate-normal-foreground); +} +element alternate.urgent { + background-color: var(alternate-urgent-background); + text-color: var(alternate-urgent-foreground); +} +element alternate.active { + background-color: var(alternate-active-background); + text-color: var(alternate-active-foreground); +} +element-text { + background-color: transparent; + highlight: inherit; + text-color: inherit; +} +element-icon { + background-color: transparent; + size: 1.0000em ; + text-color: inherit; +} +window { + padding: 10; + background-color: var(background); + border: 1; +} +mainbox { + padding: 0; + border: 0; +} +message { + padding: 1px ; + border-color: var(separatorcolor); + border: 2px dash 0px 0px ; +} +textbox { + text-color: var(foreground); +} +listview { + padding: 2px 0px 0px ; + scrollbar: true; + border-color: var(separatorcolor); + spacing: 2px ; + fixed-height: 0; + border: 2px dash 0px 0px ; +} +scrollbar { + width: 4px ; + padding: 0; + handle-width: 8px ; + border: 0; + handle-color: var(normal-foreground); +} +sidebar { + border-color: var(separatorcolor); + border: 2px dash 0px 0px ; +} +button { + spacing: 0; + text-color: var(normal-foreground); +} +button selected { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +num-filtered-rows { + expand: false; + text-color: Gray; +} +num-rows { + expand: false; + text-color: Gray; +} +textbox-num-sep { + expand: false; + str: "/"; + text-color: Gray; +} +inputbar { + padding: 1px ; + spacing: 0px ; + text-color: var(normal-foreground); + children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ]; +} +case-indicator { + spacing: 0; + text-color: var(normal-foreground); +} +entry { + text-color: var(normal-foreground); + spacing: 0; + placeholder-color: Gray; + placeholder: "Type to filter"; +} +prompt { + spacing: 0; + text-color: var(normal-foreground); +} +textbox-prompt-colon { + margin: 0px 0.3000em 0.0000em 0.0000em ; + expand: false; + str: ":"; + text-color: inherit; +} diff --git a/home/work/programs/tmate/.tmate.conf b/home/work/programs/tmate/.tmate.conf new file mode 100644 index 0000000..113073d --- /dev/null +++ b/home/work/programs/tmate/.tmate.conf @@ -0,0 +1,36 @@ +set -g history-limit 50000 +set -g default-terminal "screen-256color" +set -g mouse on +set -sg escape-time 50 + +unbind C-b +set-option -g prefix C-a +bind-key C-a send-prefix +bind h split-window -h +bind v split-window -v +unbind '"' +unbind % +bind r source-file ~/.tmate.conf +bind -n M-Left select-window -p +bind -n M-Right select-window -n +set-option -g allow-rename off +bind -n C-t new-window + +bind -n M-0 select-window -T -t 0 +bind -n M-1 select-window -T -t 1 +bind -n M-2 select-window -T -t 2 +bind -n M-3 select-window -T -t 3 +bind -n M-4 select-window -T -t 4 +bind -n M-5 select-window -T -t 5 +bind -n M-6 select-window -T -t 6 +bind -n M-7 select-window -T -t 7 +bind -n M-8 select-window -T -t 8 +bind -n M-9 select-window -T -t 9 + +set -g status-style bg='#44475a',fg='#bd93f9' +set -g status-interval 1 +set -g message-style bg='#44475a',fg='#8be9fd' +set-window-option -g window-status-style fg='#bd93f9',bg=default +set-window-option -g window-status-current-style fg='#ff79c6',bg='#282a36' +set -g window-status-current-format "#[fg=#44475a]#[bg=#bd93f9]#[fg=#f8f8f2]#[bg=#bd93f9] #I #W #[fg=#bd93f9]#[bg=#44475a]" +set -g window-status-format "#[fg=#f8f8f2]#[bg=#44475a]#I #W #[fg=#44475a]" diff --git a/home/work/programs/tmate/default.nix b/home/work/programs/tmate/default.nix new file mode 100644 index 0000000..124a3a5 --- /dev/null +++ b/home/work/programs/tmate/default.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + programs.tmate = { + enable = true; + host = "tmate.hetzner.company"; + port = 10022; + # dsaFingerprint = "SHA256:YspEXM7hBFT+zEcbq9St+V9sj2TCE6lMczdIn+jeZUU"; + # rsaFingerprint = "SHA256:pCOEObNY3ihLZn2k6iIgOUDXS8PX10qz1JPBidrEfgA"; + rsaFingerprint = "SHA256:qILAxjmkvwkqPolJ99qFcnzLg/V5UlfB3q/Z1CDvuWY"; + dsaFingerprint = "SHA256:zGqypd4klAGEGFYPeGlVMy9KJdycFA14rNpk3eD2VZo"; + extraConfig = builtins.readFile ./.tmate.conf; + }; +} diff --git a/home/work/programs/xresources/default.nix b/home/work/programs/xresources/default.nix new file mode 100644 index 0000000..405aa15 --- /dev/null +++ b/home/work/programs/xresources/default.nix @@ -0,0 +1,24 @@ +{...}: { + xresources.properties = { + "XCursor.size" = 16; + "*background" = "#1D1F28"; + "*foreground" = "#FDFDFD"; + "*cursorColor" = "#C574DD"; + "*color0" = "#282A36"; + "*color1" = "#F37F97"; + "*color2" = "#5ADECD"; + "*color3" = "#F2A272"; + "*color4" = "#8897F4"; + "*color5" = "#C574DD"; + "*color6" = "#79E6F3"; + "*color7" = "#FDFDFD"; + "*color8" = "#414458"; + "*color9" = "#FF4971"; + "*color10" = "#18E3C8"; + "*color11" = "#FF8037"; + "*color12" = "#556FFF"; + "*color13" = "#B043D1"; + "*color14" = "#3FDCEE"; + "*color15" = "#BEBEC1"; + }; +} diff --git a/home/work/services/default.nix b/home/work/services/default.nix new file mode 100644 index 0000000..46b5ff2 --- /dev/null +++ b/home/work/services/default.nix @@ -0,0 +1,3 @@ +[ + ./ssh-agent +] diff --git a/home/work/services/ssh-agent/default.nix b/home/work/services/ssh-agent/default.nix new file mode 100644 index 0000000..7b217aa --- /dev/null +++ b/home/work/services/ssh-agent/default.nix @@ -0,0 +1,5 @@ +{...}: { + services.ssh-agent = { + enable = true; + }; +} diff --git a/nixos/configurations.nix b/nixos/configurations.nix index d56b4ba..bf71619 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -21,7 +21,7 @@ gc = { automatic = true; dates = "weekly"; - options = "--delete-older-than 7d"; + options = "--delete-older-than +4"; }; package = pkgs.nixVersions.stable; @@ -67,7 +67,7 @@ ++ [file]; }; in { - laptop = myNixosSystem { + nixos = myNixosSystem { np = nixpkgs; system = "x86_64-linux"; ip = "127.0.0.1"; diff --git a/nixos/laptop/configuration.nix b/nixos/laptop/configuration.nix index e683a58..436813c 100644 --- a/nixos/laptop/configuration.nix +++ b/nixos/laptop/configuration.nix @@ -3,6 +3,7 @@ lib, pkgs, mypkgs, + inputs, ... }: { imports = [./hardware-configuration.nix]; @@ -16,7 +17,7 @@ preLVM = true; }; }; - boot.kernelPackages = pkgs.linuxPackages_6_5; + boot.kernelPackages = pkgs.linuxPackages_6_8; i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Europe/Berlin"; @@ -67,6 +68,12 @@ illum.enable = true; tlp.enable = true; + udev.extraRules = '' + KERNEL=="hidraw*", ATTRS{idVendor}=="3297", MODE="0664", GROUP="plugdev" + # Keymapp Flashing rules for the ZSA Voyager + SUBSYSTEMS=="usb", ATTRS{idVendor}=="3297", MODE:="0666", SYMLINK+="ignition_dfu" + ''; + printing = { enable = true; drivers = [ @@ -111,14 +118,18 @@ enable = true; libinput.enable = true; - windowManager.awesome = { - enable = true; - package = pkgs.callPackage ../../overrides/awesome.nix {}; - }; + # windowManager.awesome = { + # enable = true; + # package = pkgs.callPackage ../../overrides/awesome.nix {}; + # }; displayManager = { - sddm.enable = true; - defaultSession = "none+awesome"; + # sddm.enable = true; + # defaultSession = "none+awesome"; + gdm = { + enable = true; + wayland = true; + }; }; }; @@ -128,10 +139,51 @@ }; }; + # services.jupyter = { + # enable = true; + # package = pkgs.jupyter-all; + # command = "jupyter-lab"; + # group = "users"; + # password = "'$argon2i$v=19$m=4096,t=3,p=1$a2pzamhrdjgzaGtzZGZoZGY4NzcydWhkZnM$fuPanvCWOsPNpBjyLaBz3YRRzmSSdpp8kaYJAyEPtWA'"; + # kernels = let + # juliaEnv = pkgs.julia_19-bin.withPackages ["IJulia" "Plots"]; + # ijulia = builtins.readFile ( + # pkgs.runCommand "${juliaEnv.name}-ijulia-pkgdir" + # { + # buildInputs = [juliaEnv]; + # } '' + # ${juliaEnv}/bin/julia -e 'using IJulia; print(pkgdir(IJulia))' >$out + # '' + # ); + # in { + # ijulia = { + # displayName = "Julia ${juliaEnv.julia.version}"; + # argv = [ + # "${juliaEnv}/bin/julia" + # "-i" + # "--color=yes" + # "${ijulia}/src/kernel.jl" + # "{connection_file}" + # ]; + # language = "julia"; + # interruptMode = "signal"; + # logo32 = "${ijulia}/deps/logo-32x32.png"; + # logo64 = "${ijulia}/deps/logo-64x64.png"; + # }; + # }; + # }; + + # # systemd.services.jupyter.environment.JUPYTER_DATA_DIR = builtins.toString (pkgs.jupyter-kernel.create { + # # definitions = config.services.jupyter.kernels; + # # }); + # systemd.services.jupyter.environment.JUPYTER_DATA_DIR = ".jupyter/data"; + # systemd.services.jupyter.environment.JUPYTER_RUNTIME_DIR = "/var/lib/jupyter/.local/share/jupyter/runtime"; + security.sudo.configFile = '' Defaults lecture=always Defaults lecture_file=${../../misc/sudo_lecture} ''; + security.pam.services.swaylock = {}; fonts.packages = with pkgs; [ font-awesome @@ -140,11 +192,15 @@ ]; programs.fish.enable = true; + programs.hyprland.enable = true; + users.groups.jupyter = {}; + users.groups.plugdev = {}; + users.users.jupyter.group = "jupyter"; users.users.patrick = { isNormalUser = true; - extraGroups = ["networkmanager" "wheel"]; - shell = pkgs.nushellFull; + extraGroups = ["networkmanager" "wheel" "plugdev" "jupyter"]; + shell = pkgs.bashInteractive; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8zNAXScQ4FoWNxF4+ALJXMSi3EbpqZP5pO9kfg9t8o patrick" ]; @@ -152,27 +208,6 @@ virtualisation.podman.enable = true; - # nix = { - # gc = { - # automatic = true; - # dates = "weekly"; - # options = "--delete-older-than 7d"; - # }; - - # package = pkgs.nixVersions.stable; - # # registry.nixpkgs.flake = inputs.nixpkgs; - - # settings = { - # auto-optimise-store = true; - - # experimental-features = ["nix-command" "flakes"]; - - # # Avoid unwanted garbage collection when using nix-direnv - # keep-outputs = true; - # keep-derivations = true; - # }; - # }; - # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/outputs.nix b/outputs.nix index ce1878e..6364292 100644 --- a/outputs.nix +++ b/outputs.nix @@ -2,6 +2,7 @@ self, flake-utils, nixpkgs, + nurpkgs, deploy, home-manager, ... @@ -12,18 +13,14 @@ in { packages = import ./pkgs {inherit pkgs;}; devShell = pkgs.callPackage ./shell.nix { - inherit (deploy.packages.${pkgs.system}) deploy-rs; + inherit (deploy.packages.${system}) deploy-rs; + inherit (home-manager.packages.${system}) home-manager; }; formatter = pkgs.alejandra; })) // { - homeConfigurations.patrick = home-manager.lib.homeManagerConfiguration { - pkgs = import nixpkgs { - system = "x86_64-linux"; - # config.allowUnfree = true; - }; - }; + homeConfigurations = import ./home/configurations.nix (inputs // {inherit inputs;}); nixosConfigurations = import ./nixos/configurations.nix (inputs // {inherit inputs;}); @@ -42,8 +39,11 @@ in { colmena = { meta = { + # Default nixpkgs nixpkgs = nixpkgs.legacyPackages.x86_64-linux; + # Per Node nixpkgs override nodeNixpkgs = builtins.mapAttrs (name: value: value.pkgs) self.nixosConfigurations; + # Per Node additional specialArgs nodeSpecialArgs = builtins.mapAttrs (name: value: value._module.specialArgs) self.nixosConfigurations; }; } diff --git a/shell.nix b/shell.nix index 1aecb62..d3dabd4 100644 --- a/shell.nix +++ b/shell.nix @@ -6,6 +6,7 @@ nixpkgs-fmt, nil, alejandra, + home-manager, }: mkShell { nativeBuildInputs = [ @@ -15,5 +16,6 @@ mkShell { nixpkgs-fmt nil alejandra + home-manager ]; }