diff options
42 files changed, 973 insertions, 1029 deletions
@@ -1 +1 @@ -.nixdeploy +.nixosdeploy diff --git a/devShells/apo.nix b/devShells/apo.nix index a800557..07ed91b 100644 --- a/devShells/apo.nix +++ b/devShells/apo.nix @@ -11,8 +11,10 @@ in pkgs.buildPackages.mkShell { packages = with pkgs; [ qtrvsim - glibc.static + #glibc.static riscvPkgs.buildPackages.gcc + pkgsCross.armv7l-hf-multiplatform.buildPackages.gcc + pkgsCross.armv7l-hf-multiplatform.glibc.static ]; inputsFrom = [c]; meta.platforms = pkgs.lib.platforms.linux; diff --git a/devShells/default.nix b/devShells/default.nix index d09fa70..e6a80ad 100644 --- a/devShells/default.nix +++ b/devShells/default.nix @@ -1,6 +1,6 @@ pkgs: rec { c = import ./c.nix pkgs; - musl = import ./c.nix pkgs.pkgsMusl; + #musl = import ./c.nix pkgs.pkgsMusl; #llvm = import ./c.nix pkgs.pkgsLLVM; apo = import ./apo.nix pkgs c; } @@ -8,11 +8,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1723293904, - "narHash": "sha256-b+uqzj+Wa6xgMS9aNbX4I+sXeb5biPDi39VgvSFqFvU=", + "lastModified": 1747575206, + "narHash": "sha256-NwmAFuDUO/PFcgaGGr4j3ozG9Pe5hZ/ogitWhY+D81k=", "owner": "ryantm", "repo": "agenix", - "rev": "f6291c5935fdc4e0bef208cfc0dcab7e3f7a1c41", + "rev": "4835b1dc898959d8547a871ef484930675cb47f1", "type": "github" }, "original": { @@ -29,11 +29,11 @@ ] }, "locked": { - "lastModified": 1700795494, - "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", "type": "github" }, "original": { @@ -48,11 +48,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -61,40 +61,6 @@ } }, "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_4": { "locked": { "lastModified": 1678901627, "narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=", @@ -108,16 +74,16 @@ "type": "indirect" } }, - "flake-utils_5": { + "flake-utils_3": { "inputs": { - "systems": "systems_5" + "systems": "systems_3" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -125,16 +91,16 @@ "type": "indirect" } }, - "flake-utils_6": { + "flake-utils_4": { "inputs": { - "systems": "systems_6" + "systems": "systems_4" }, "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", "owner": "numtide", "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", "type": "github" }, "original": { @@ -142,21 +108,23 @@ "type": "indirect" } }, - "flake-utils_7": { + "flakepy": { "inputs": { - "systems": "systems_7" + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" + "lastModified": 1746516935, + "narHash": "sha256-JGUkSDpEJg+tBsZw8EQpq35blzrupTDDQb8FDygLY4o=", + "owner": "Cynerd", + "repo": "flakepy", + "rev": "3fcf434e7989b4ee6d29852e945256dc75b16f8d", + "type": "gitlab" }, "original": { - "id": "flake-utils", - "type": "indirect" + "owner": "Cynerd", + "repo": "flakepy", + "type": "gitlab" } }, "home-manager": { @@ -167,11 +135,11 @@ ] }, "locked": { - "lastModified": 1703113217, - "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", "owner": "nix-community", "repo": "home-manager", - "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", "type": "github" }, "original": { @@ -180,17 +148,30 @@ "type": "github" } }, - "nixdeploy": { + "nixos-hardware": { + "locked": { + "lastModified": 1747723695, + "narHash": "sha256-lSXzv33yv1O9r9Ai1MtYFDX3OKhWsZMn/5FFb4Rni/k=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "6ac6ec6fcb410e15a60ef5ec94b8a2b35b5dd282", + "type": "github" + }, + "original": { + "id": "nixos-hardware", + "type": "indirect" + } + }, + "nixosdeploy": { "inputs": { - "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1718017207, - "narHash": "sha256-JQoiRu2+7PbRlPk4S0kX4ss7yK3O+D7GeXscx+87T3M=", + "lastModified": 1744211365, + "narHash": "sha256-9ipXfydIjP5hERD0sRf5rx0wJjav1zC+BAdc+OmyUNw=", "owner": "cynerd", "repo": "nixosdeploy", - "rev": "a44b1eed846479923a968eb465ab39a4bd919434", + "rev": "49a6033472e0961c18bbac299ba729b62619edb1", "type": "gitlab" }, "original": { @@ -199,27 +180,13 @@ "type": "gitlab" } }, - "nixos-hardware": { - "locked": { - "lastModified": 1727665282, - "narHash": "sha256-oKtfbQB1MBypqIyzkC8QCQcVGOa1soaXaGgcBIoh14o=", - "owner": "NixOS", - "repo": "nixos-hardware", - "rev": "11c43c830e533dad1be527ecce379fcf994fbbb5", - "type": "github" - }, - "original": { - "id": "nixos-hardware", - "type": "indirect" - } - }, "nixpkgs": { "locked": { - "lastModified": 1703013332, - "narHash": "sha256-+tFNwMvlXLbJZXiMHqYq77z/RfmpfpiI3yjL6o/Zo9M=", + "lastModified": 1745391562, + "narHash": "sha256-sPwcCYuiEopaafePqlG826tBhctuJsLx/mhKKM5Fmjo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "54aac082a4d9bb5bbc5c4e899603abfb76a3f6d6", + "rev": "8a2f738d9d1f1d986b5a4cd2fd2061a7127237d7", "type": "github" }, "original": { @@ -231,11 +198,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1712883908, - "narHash": "sha256-icE1IJE9fHcbDfJ0+qWoDdcBXUoZCcIJxME4lMHwvSM=", + "lastModified": 1744096231, + "narHash": "sha256-kUfx3FKU1Etnua3EaKvpeuXs7zoFiAcli1gBwkPvGSs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a0c9e3aee1000ac2bfb0e5b98c94c946a5d180a9", + "rev": "b2b0718004cc9a5bca610326de0a82e6ea75920b", "type": "github" }, "original": { @@ -245,26 +212,25 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1727836449, - "narHash": "sha256-+t0jCdN1AFWLpi+XwHK4r/Jp+pJfo9ePHIy+4/BUCI4=", + "lastModified": 1747728033, + "narHash": "sha256-NnXFQu7g4LnvPIPfJmBuZF7LFy/fey2g2+LCzjQhTUk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "35d02934a17a4fdc53a8857826ed35f3694e5f1c", + "rev": "2f9173bde1d3fbf1ad26ff6d52f952f9e9da52ea", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-unstable-small", "type": "indirect" } }, "nixpkgs_4": { "locked": { - "lastModified": 1715653339, - "narHash": "sha256-7lR9tpVXviSccl07GXI0+ve/natd24HAkuy1sQp0OlI=", + "lastModified": 1737622296, + "narHash": "sha256-GWHH9ljsR0LR29IEruJnKVVk6veeQpo7kfolyDyCVGQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "abd6d48f8c77bea7dc51beb2adfa6ed3950d2585", + "rev": "055c50feaa548eadca66407630961b77f3ebb750", "type": "github" }, "original": { @@ -288,11 +254,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1726583932, - "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", + "lastModified": 1743568003, + "narHash": "sha256-ZID5T65E8ruHqWRcdvZLsczWDOAWIE7om+vQOREwiX0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "658e7223191d2598641d50ee4e898126768fe847", + "rev": "b7ba7f9f45c5cd0d8625e9e217c28f8eb6a19a76", "type": "github" }, "original": { @@ -302,11 +268,11 @@ }, "nixpkgs_7": { "locked": { - "lastModified": 1726583932, - "narHash": "sha256-zACxiQx8knB3F8+Ze+1BpiYrI+CbhxyWpcSID9kVhkQ=", + "lastModified": 1746397377, + "narHash": "sha256-5oLdRa3vWSRbuqPIFFmQBGGUqaYZBxX+GGtN9f/n4lU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "658e7223191d2598641d50ee4e898126768fe847", + "rev": "ed30f8aba41605e3ab46421e3dcb4510ec560ff8", "type": "github" }, "original": { @@ -330,15 +296,14 @@ }, "nixturris": { "inputs": { - "flake-utils": "flake-utils_3", "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1715772678, - "narHash": "sha256-UxVyJzWt4/TzJhfbX2LcKAb1fhAH0PXJA9boUaHsyZ0=", + "lastModified": 1746027923, + "narHash": "sha256-hZgIegHN4aRxHeNcXv0fP9o9XulePepIESF1Cs9ERTw=", "owner": "cynerd", "repo": "nixturris", - "rev": "c3cf29dba9af8a226e527f11b80305bcdd22e5dd", + "rev": "546ac84a3c23d7f0649cece24244985f00c9237f", "type": "gitlab" }, "original": { @@ -349,11 +314,11 @@ }, "personal-secret": { "locked": { - "lastModified": 1727854012, - "narHash": "sha256-12HU12uX1UOrJPflagk1aM5r6w2Nh6fCKJugnSqpRkY=", + "lastModified": 1744696740, + "narHash": "sha256-9QtdTBv3WKr0KOetNwE3EavPiPy4DASsWUTyyPW+rsM=", "ref": "refs/heads/master", - "rev": "2215dc87e4d5d7562fbb7953d041c5e7d046a811", - "revCount": 117, + "rev": "e4173c5ba223ce36d3abb1b4ea830596c9cdc1f6", + "revCount": 131, "type": "git", "url": "ssh://git@cynerd.cz/nixos-personal-secret" }, @@ -364,15 +329,15 @@ }, "pyshv": { "inputs": { - "flake-utils": "flake-utils_6", + "flakepy": "flakepy", "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1726844448, - "narHash": "sha256-t7gRe6u+Ax3BYNVSUjRpY3klRRWyq+6SoC3hxehnGe0=", + "lastModified": 1747756733, + "narHash": "sha256-+9cnxYoMnYt+r90GedAwU8NA+jOEWcaFIIAftkuKNq8=", "owner": "silicon-heaven", "repo": "pyshv", - "rev": "f593327ec9aa8f03443392962fba9d825c72a659", + "rev": "d77c7236220dd6b81f68930217c448003b273356", "type": "gitlab" }, "original": { @@ -385,28 +350,29 @@ "inputs": { "agenix": "agenix", "flake-utils": "flake-utils", - "nixdeploy": "nixdeploy", "nixos-hardware": "nixos-hardware", + "nixosdeploy": "nixosdeploy", "nixpkgs": "nixpkgs_3", "nixturris": "nixturris", "personal-secret": "personal-secret", "shellrc": "shellrc", "shvcli": "shvcli", + "shvcli-ell": "shvcli-ell", "usbkey": "usbkey", "vpsadminos": "vpsadminos" } }, "shellrc": { "inputs": { - "flake-utils": "flake-utils_4", + "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1721899791, - "narHash": "sha256-dT+kwR2nuymeq3qqzc5//g4nQJRG1pVWUeZztCXgYCM=", + "lastModified": 1731939821, + "narHash": "sha256-SLJu/sI/wusXwc3Gjxe/lCXAawLvQpQ6h8IyglB6rBg=", "ref": "refs/heads/master", - "rev": "0adc7c32594913d0f4ec774a85cb03554cd719d4", - "revCount": 112, + "rev": "00c2d83c62603a13f54c5037f08d43591a29d6fb", + "revCount": 115, "type": "git", "url": "https://git.cynerd.cz/shellrc" }, @@ -417,16 +383,14 @@ }, "shvcli": { "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_6", "pyshv": "pyshv" }, "locked": { - "lastModified": 1727108673, - "narHash": "sha256-a+4TBiW/r0/Ts7Yd/gBsCQiU15F104bUHIHNecXmGQE=", + "lastModified": 1747810528, + "narHash": "sha256-wv2ADi0yE+12UTg2dBJMxbol6mWynhwF0yJbuv5P6c8=", "owner": "silicon-heaven", "repo": "shvcli", - "rev": "9021aa09b94b0b83e5baf8ad409ca861b5b4edfe", + "rev": "e4f730f80fa7ebde2e626a53ce487bfd349769e3", "type": "github" }, "original": { @@ -435,52 +399,27 @@ "type": "github" } }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" + "shvcli-ell": { + "inputs": { + "shvcli": [ + "shvcli" + ] }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" + "lastModified": 1747829065, + "narHash": "sha256-w/SihkUfMAlyxHAOsUnZPR6AJHoNdvJGhN4/hEv+A7A=", + "owner": "elektroline-predator", + "repo": "shvcli-ell", + "rev": "0e4eab274b9aa9e832aed10ba0001b7a35f2ec7e", + "type": "gitlab" }, "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "owner": "elektroline-predator", + "repo": "shvcli-ell", + "type": "gitlab" } }, - "systems_4": { + "systems": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -495,7 +434,7 @@ "type": "github" } }, - "systems_5": { + "systems_2": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -510,7 +449,7 @@ "type": "github" } }, - "systems_6": { + "systems_3": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -525,7 +464,7 @@ "type": "github" } }, - "systems_7": { + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -542,15 +481,15 @@ }, "usbkey": { "inputs": { - "flake-utils": "flake-utils_7", + "flake-utils": "flake-utils_4", "nixpkgs": "nixpkgs_8" }, "locked": { - "lastModified": 1707940956, - "narHash": "sha256-XUJEkayw/HJlSC1z1pZICju/IA5hx1mgF//ZYHY5QUM=", + "lastModified": 1744029480, + "narHash": "sha256-74ch+U8HooU4UQ+Axyhw7gvTiTQirDWPL33Z50vE9mM=", "owner": "cynerd", "repo": "usbkey", - "rev": "01e2e4b0435163ce65c07573d2dccbfdcca10c36", + "rev": "8905d295c7bc7d44e5dcb925ef6e96bd416c134e", "type": "gitlab" }, "original": { @@ -561,11 +500,11 @@ }, "vpsadminos": { "locked": { - "lastModified": 1727785026, - "narHash": "sha256-pEslwS/jAkI+XeUrdMQHfeXG/mou7srqvlLsSajbKGg=", + "lastModified": 1747760341, + "narHash": "sha256-BN4upeoCsfgcyZrGju++RufU5xiFlYihTRdgHAKK6iw=", "owner": "vpsfreecz", "repo": "vpsadminos", - "rev": "2a52f384d4c16a6e2badd80c7f5c826b609ee416", + "rev": "358134e4630929618d9befc350e110d04c085f42", "type": "github" }, "original": { @@ -2,14 +2,17 @@ description = "Cynerd's personal flake"; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable-small"; nixos-hardware.url = "nixos-hardware"; - nixdeploy.url = "gitlab:cynerd/nixosdeploy"; + nixosdeploy.url = "gitlab:cynerd/nixosdeploy"; personal-secret.url = "git+ssh://git@cynerd.cz/nixos-personal-secret"; shellrc.url = "git+https://git.cynerd.cz/shellrc"; agenix.url = "github:ryantm/agenix"; shvcli.url = "github:silicon-heaven/shvcli"; + shvcli-ell = { + url = "gitlab:elektroline-predator/shvcli-ell"; + inputs.shvcli.follows = "shvcli"; + }; usbkey.url = "gitlab:cynerd/usbkey"; @@ -21,11 +24,11 @@ self, flake-utils, nixpkgs, - nixdeploy, + nixosdeploy, personal-secret, shellrc, agenix, - shvcli, + shvcli-ell, usbkey, nixturris, ... @@ -39,10 +42,10 @@ pkgs = final: prev: import ./pkgs final prev; default = nixpkgs.lib.composeManyExtensions [ agenix.overlays.default - nixdeploy.overlays.default + nixosdeploy.overlays.default self.overlays.pkgs shellrc.overlays.default - shvcli.overlays.default + shvcli-ell.overlays.default usbkey.overlays.default ]; }; @@ -50,7 +53,7 @@ nixosModules = import ./nixos/modules { inherit (nixpkgs) lib; default_modules = [ - nixdeploy.nixosModules.default + nixosdeploy.nixosModules.default nixturris.nixosModules.default personal-secret.nixosModules.default shellrc.nixosModules.default @@ -63,17 +66,23 @@ } // eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages."${system}".extend self.overlays.default; - in { - packages = - {default = pkgs.nixdeploy;} - // mapAttrs' (n: v: let + + osFilterMap = attr: + mapAttrs' (n: v: let os = if v.config.nixpkgs.hostPlatform.system == system then v else (v.extendModules {modules = [{nixpkgs.buildPlatform.system = system;}];}); in - nameValuePair "tarball-${n}" os.config.system.build.tarball) - (filterAttrs (_: v: v.config.system.build ? tarball) self.nixosConfigurations); + nameValuePair "${attr}-${n}" os.config.system.build."${attr}") + (filterAttrs (_: v: v.config.system.build ? "${attr}") + self.nixosConfigurations); + in { + packages = + {inherit (nixosdeploy.packages.${system}) default;} + // (osFilterMap "toplevel") + // (osFilterMap "tarball") + // (osFilterMap "firmware"); legacyPackages = pkgs; devShells = filterPackages system (import ./devShells pkgs); formatter = pkgs.alejandra; diff --git a/nixos/configurations/adm-mpd.nix b/nixos/configurations/adm-mpd.nix index ac3b4de..47ac008 100644 --- a/nixos/configurations/adm-mpd.nix +++ b/nixos/configurations/adm-mpd.nix @@ -5,26 +5,18 @@ }: let inherit (lib) filterAttrs; in { - nixpkgs.hostPlatform.system = "aarch64-linux"; + system.stateVersion = "24.05"; - fileSystems = { - "/" = { - device = "/dev/mmcblk0p2"; - options = ["compress=lzo" "subvol=@nix"]; - }; - "/home" = { - device = "/dev/mmcblk0p2"; - options = ["compress=lzo" "subvol=@home"]; - }; - "/boot" = { - device = "/dev/mmcblk0p1"; - }; + cynerd.rpi = 3; + deploy = { + enable = true; + ssh.host = "nixos@mpd.adm"; }; networking.wireless = { enable = true; networks = filterAttrs (n: _: n == "Nela") config.secrets.wifiNetworks; - environmentFile = "/run/secrets/wifi.env"; + secretsFile = "/run/secrets/wifi.secrets"; userControlled.enable = true; }; @@ -33,24 +25,24 @@ in { #alsa.enable = true; #pulse.enable = true; #}; - hardware.pulseaudio = { - enable = true; - systemWide = true; - zeroconf.publish.enable = true; - }; + #hardware.pulseaudio = { + # enable = true; + # systemWide = true; + # zeroconf.publish.enable = true; + #}; - services.spotifyd = { - enable = true; - settings.global = { - device_name = "Adámkovi"; - device = "sysdefault"; - mixer = "Master"; - bitrate = 320; - cache_path = "/var/cahe/spotify"; - no_audio_cache = true; - volume_normalisation = true; - normalisation_pregain = -10; - initial_volume = 60; - }; - }; + #services.spotifyd = { + # enable = true; + # settings.global = { + # device_name = "Adámkovi"; + # device = "sysdefault"; + # mixer = "Master"; + # bitrate = 320; + # cache_path = "/var/cahe/spotify"; + # no_audio_cache = true; + # volume_normalisation = true; + # normalisation_pregain = -10; + # initial_volume = 60; + # }; + #}; } diff --git a/nixos/configurations/adm-omnia.nix b/nixos/configurations/adm-omnia.nix index 056a68e..55ee733 100644 --- a/nixos/configurations/adm-omnia.nix +++ b/nixos/configurations/adm-omnia.nix @@ -1,10 +1,12 @@ {config, ...}: let hosts = config.cynerd.hosts.adm; in { + system.stateVersion = "24.05"; + turris.board = "omnia"; deploy = { - enable = false; - ssh.host = "omnia.adm"; + enable = true; + ssh.host = "adm.cynerd.cz"; }; cynerd = { @@ -23,16 +25,16 @@ in { }; }; wifiAP.adm = { - enable = false; + enable = true; ar9287 = { - interface = "wlp1s0"; + interface = "wlp2s0"; bssids = config.secrets.wifiMacs.adm-omnia.ar9287; - channel = 11; + channel = 7; }; qca988x = { - interface = "wlp3s0"; + interface = "wlp1s0"; bssids = config.secrets.wifiMacs.adm-omnia.qca988x; - channel = 36; + channel = 44; }; }; wireguard = true; @@ -48,12 +50,18 @@ in { fileSystems = ["/"]; }; - networking = { - useNetworkd = true; - useDHCP = false; + services.fail2ban = { + enable = true; + ignoreIP = ["10.8.1.0/24" "10.8.2.0/24"]; }; + + networking.useDHCP = false; systemd.network = { networks = { + "end2" = { + matchConfig.Name = "end2"; # Ensure that it is managed by systemd-networkd + networkConfig.IPv6AcceptRA = false; + }; "pppoe-wan" = { matchConfig.Name = "pppoe-wan"; networkConfig = { @@ -75,7 +83,7 @@ in { linkConfig.RequiredForOnline = "routable"; }; "lan-brlan" = { - matchConfig.Name = "lan[1-4]"; + matchConfig.Name = "lan4"; networkConfig.Bridge = "brlan"; bridgeVLANs = [ { @@ -86,7 +94,7 @@ in { ]; }; "lan-guest" = { - matchConfig.Name = "lan0"; + matchConfig.Name = "lan[0-3]"; networkConfig.Bridge = "brlan"; bridgeVLANs = [ { @@ -114,10 +122,14 @@ in { password 02 ''; }; - systemd.services."pppd-wan".after = ["sys-subsystem-net-devices-end2.device"]; + systemd.services."pppd-wan" = { + after = ["sys-subsystem-net-devices-end2.device"]; + partOf = ["systemd-networkd.service"]; + }; # TODO limit NSS clamping to just pppoe-wan networking.firewall.extraForwardRules = '' tcp flags syn tcp option maxseg size set rt mtu comment "Needed for PPPoE to fix IPv4" - iifname {"home", "personalvpn", "wg"} oifname {"home", "personalvpn", "wg"} accept + iifname {"home", "wg"} oifname {"home", "wg"} accept + iifname "home" oifname "guest" accept comment "Allow home to access guest devices" ''; } diff --git a/nixos/configurations/adm-omnia2.nix b/nixos/configurations/adm-omnia2.nix index 8b47e63..fc5a92d 100644 --- a/nixos/configurations/adm-omnia2.nix +++ b/nixos/configurations/adm-omnia2.nix @@ -1,4 +1,6 @@ {config, ...}: { + system.stateVersion = "24.05"; + turris.board = "omnia"; deploy = { enable = true; diff --git a/nixos/configurations/albert.nix b/nixos/configurations/albert.nix deleted file mode 100644 index a6a4ee1..0000000 --- a/nixos/configurations/albert.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - nixpkgs.hostPlatform.system = "x86_64-linux"; - - cynerd = { - desktop = { - enable = true; - laptop = true; - }; - wifiClient = true; - openvpn = { - oldpersonal = true; - }; - }; - - boot.initrd.availableKernelModules = ["xhci_pci" "usb_storage" "sd_mod"]; - - hardware.cpu.intel.updateMicrocode = true; - - fileSystems = { - "/" = { - device = "/dev/disk/by-uuid/1c9bafac-fcf8-41c4-b394-bca5917ca82d"; - fsType = "btrfs"; - options = ["compress=lzo" "subvol=@nix"]; - }; - "/home" = { - device = "/dev/disk/by-uuid/1c9bafac-fcf8-41c4-b394-bca5917ca82d"; - fsType = "btrfs"; - options = ["compress=lzo" "subvol=@home"]; - }; - "/boot" = { - device = "/dev/disk/by-uuid/E403-124B"; - fsType = "vfat"; - }; - - "/home2" = { - device = "/dev/disk/by-uuid/55e177a1-215e-475b-ba9c-771b5fa3f8f0"; - fsType = "btrfs"; - options = ["compress=lzo" "subvol=@home"]; - }; - }; -} diff --git a/nixos/configurations/binky.nix b/nixos/configurations/binky.nix index 7765d01..6111637 100644 --- a/nixos/configurations/binky.nix +++ b/nixos/configurations/binky.nix @@ -5,6 +5,7 @@ }: let inherit (lib) mkDefault; in { + system.stateVersion = "24.05"; nixpkgs.hostPlatform.system = "x86_64-linux"; deploy = { enable = true; @@ -88,15 +89,7 @@ in { services.syncthing = { enable = true; - user = mkDefault "cynerd"; - group = mkDefault "cynerd"; - openDefaultPorts = true; - - overrideDevices = false; - overrideFolders = false; - dataDir = "/home/cynerd"; - configDir = "/home/cynerd/.config/syncthing"; }; environment.systemPackages = [pkgs.heroic]; diff --git a/nixos/configurations/dean.nix b/nixos/configurations/dean.nix index 187e148..dfb03e1 100644 --- a/nixos/configurations/dean.nix +++ b/nixos/configurations/dean.nix @@ -1,4 +1,5 @@ {pkgs, ...}: { + system.stateVersion = "24.05"; turris.board = "mox"; deploy.enable = true; diff --git a/nixos/configurations/errol.nix b/nixos/configurations/errol.nix index fd348e8..f986631 100644 --- a/nixos/configurations/errol.nix +++ b/nixos/configurations/errol.nix @@ -6,6 +6,7 @@ }: let inherit (lib) mkDefault; in { + system.stateVersion = "24.05"; nixpkgs.hostPlatform.system = "x86_64-linux"; deploy.enable = true; @@ -26,6 +27,7 @@ in { "encroot" = "/dev/disk/by-uuid/7c412ae6-6016-45af-8c2a-8fcc394dbbe6"; "enchdd1" = "/dev/disk/by-uuid/87f16080-5ff6-43dd-89f3-307455a46fbe"; "enchdd2" = "/dev/disk/by-uuid/be4a33fa-8bc6-431d-a3ac-787668f223ed"; + #"encback" = "/dev/disk/by-uuid/1bd8c637-f71e-4fb0-96de-b660c4f1afaf"; }; fileSystems = { "/" = { @@ -53,6 +55,11 @@ in { fsType = "btrfs"; options = ["compress=lzo" "subvol=@home"]; }; + #"/back" = { + # device = "/dev/mapper/encback"; + # fsType = "btrfs"; + # options = ["compress=lzo"]; + #}; }; services.btrfs.autoScrub = { enable = true; @@ -83,75 +90,42 @@ in { pkgs.nvtopPackages.amd ]; - services.syncthing = { - enable = true; - user = mkDefault "cynerd"; - group = mkDefault "cynerd"; - openDefaultPorts = true; - - overrideDevices = false; - overrideFolders = false; - - dataDir = "/home/cynerd"; - configDir = "/home/cynerd/.config/syncthing"; - }; - - nixpkgs.config.permittedInsecurePackages = ["openssl-1.1.1w"]; # TODO - services.home-assistant = { - enable = true; - openFirewall = true; - configDir = "/var/lib/hass"; - config = { - homeassistant = { - name = "SPT"; - latitude = "!secret latitude"; - longitude = "!secret longitude"; - elevation = "!secret elevation"; - time_zone = "Europe/Prague"; - country = "CZ"; - }; - http.server_port = 8808; - mqtt = { - sensor = import ../modules/home-assistant/sensors.nix; - light = import ../modules/home-assistant/light.nix; - }; - default_config = {}; - automation = "!include automations.yaml"; - }; - extraComponents = ["met"]; - package = pkgs.home-assistant.override { - extraPackages = pkgs: - with pkgs; [ - securetar - pyipp - ]; + ############################################################################## + services = { + syncthing = { + enable = true; + dataDir = "/home/cynerd"; }; - }; - services.zigbee2mqtt = { - enable = true; - settings = { - serial.port = "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812153849-if00"; - mqtt = { - server = "mqtt://${config.cynerd.hosts.spt.mox}:1883"; - user = "zigbee2mqtt"; - password = "!secret.yaml mqtt_password"; - }; - advanced = { - network_key = "!secret.yaml network_key"; - homeassistant_legacy_entity_attributes = false; - legacy_api = false; - legacy_availability_payload = false; - last_seen = "epoch"; + home-assistant = { + enable = true; + openFirewall = true; + configDir = "/var/lib/hass"; + config = { + homeassistant = { + name = "SPT"; + latitude = "!secret latitude"; + longitude = "!secret longitude"; + elevation = "!secret elevation"; + time_zone = "Europe/Prague"; + country = "CZ"; + }; + http.server_port = 8808; + mqtt = { + sensor = import ../home-assistant/sensors.nix; + light = import ../home-assistant/light.nix; + }; + default_config = {}; + automation = "!include automations.yaml"; }; - frontend = true; - availability = true; - homeassistant = { - legacy_triggers = false; + extraComponents = ["met"]; + package = pkgs.home-assistant.override { + extraPackages = pkgs: + with pkgs; [ + securetar + pyipp + ]; }; - device_options.legacy = false; - permit_join = false; - devices = config.secrets.zigbee2mqttDevices; }; }; } diff --git a/nixos/configurations/gaspode.nix b/nixos/configurations/gaspode.nix index 78d8277..5d6d090 100644 --- a/nixos/configurations/gaspode.nix +++ b/nixos/configurations/gaspode.nix @@ -1,4 +1,5 @@ { + system.stateVersion = "25.05"; nixpkgs.hostPlatform.system = "armv7l-linux"; fileSystems = { diff --git a/nixos/configurations/lipwig.nix b/nixos/configurations/lipwig.nix index 7d00a37..5855b6d 100644 --- a/nixos/configurations/lipwig.nix +++ b/nixos/configurations/lipwig.nix @@ -7,6 +7,7 @@ imports = [inputModules.vpsadminos]; config = { + system.stateVersion = "24.05"; nixpkgs.hostPlatform.system = "x86_64-linux"; deploy = { @@ -19,12 +20,14 @@ hw = false; drives = false; }; - syncthing = { - enable = false; - baseDir = "/nas"; - }; wireguard = true; - openvpn.oldpersonal = true; + borgjobs = { + postgresql.dumpCommand = pkgs.writeScript "postgreqsl-backup.sh" '' + /run/wrappers/bin/sudo -u postgres /run/current-system/sw/bin/pg_dumpall + ''; + nextcloud_data.paths = "/nas/nextcloud/data"; + sync_data.paths = "/sync"; + }; }; boot.loader.systemd-boot.enable = false; @@ -39,7 +42,7 @@ ]; }; "/nas/nextcloud-sync" = { - device = "/nas/sync"; + device = "/sync"; fsType = "fuse.bindfs"; options = ["map=syncthing/nextcloud:@syncthing/@nextcloud"]; }; @@ -104,13 +107,17 @@ forceSSL = true; useACMEHost = "cynerd.cz"; }; + "office.cynerd.cz" = { + forceSSL = true; + useACMEHost = "cynerd.cz"; + }; "grafana.cynerd.cz" = { forceSSL = true; useACMEHost = "cynerd.cz"; locations."/" = { - proxyPass = "http://127.0.0.1:${toString config.services.grafana.settings.server.http_port}/"; - extraConfig = "proxy_set_header Host $host;"; + proxyPass = "http://localhost:${toString config.services.grafana.settings.server.http_port}"; proxyWebsockets = true; + recommendedProxySettings = true; }; }; "searx.cynerd.cz" = { @@ -132,6 +139,7 @@ defaults.email = "cynerd+acme@email.cz"; certs."cynerd.cz".extraDomainNames = [ "cloud.cynerd.cz" + "office.cynerd.cz" "git.cynerd.cz" "grafana.cynerd.cz" "searx.cynerd.cz" @@ -191,7 +199,7 @@ # Nextcloud ################################################################ services.nextcloud = { enable = true; - package = pkgs.nextcloud28; + package = pkgs.nextcloud31; https = true; hostName = "cloud.cynerd.cz"; datadir = "/nas/nextcloud"; @@ -200,11 +208,25 @@ adminpassFile = "/run/secrets/nextcloud.admin.pass"; dbtype = "pgsql"; dbhost = "/run/postgresql"; - dbtableprefix = "oc_"; }; settings = { #log_type = "systemd"; + default_locale = "CZ"; default_phone_region = "CZ"; + default_timezone = "Europe/Prague"; + enabledPreviewProviders = [ + "OC\\Preview\\BMP" + "OC\\Preview\\GIF" + "OC\\Preview\\JPEG" + "OC\\Preview\\Krita" + "OC\\Preview\\MarkDown" + "OC\\Preview\\MP3" + "OC\\Preview\\OpenDocument" + "OC\\Preview\\PNG" + "OC\\Preview\\TXT" + "OC\\Preview\\XBitmap" + "OC\\Preview\\HEIC" + ]; }; phpExtraExtensions = php: [php.pgsql php.pdo_pgsql]; phpOptions = { @@ -223,40 +245,49 @@ forms groupfolders impersonate - maps memories notes + onlyoffice phonetrack previewgenerator spreed tasks - twofactor_nextcloud_notification twofactor_webauthn ; # Additional modules can be fetched with: - # NEXTCLOUD_VERSIONS=28 nix run nixpkgs#nc4nix -- -apps "passwords,money,integration_github,integration_gitlab" - passwords = pkgs.fetchNextcloudApp { - url = "https://git.mdns.eu/api/v4/projects/45/packages/generic/passwords/2024.9.0/passwords.tar.gz"; - sha256 = "L+jumcussL0c9xNMg/GMs1GSd1IY9wUvC8ZEg+3U+sc="; - license = "agpl3Plus"; - }; + # NEXTCLOUD_VERSIONS=30 nix run nixpkgs#nc4nix -- -apps "passwords,money,integration_github,integration_gitlab" integration_github = pkgs.fetchNextcloudApp { - url = "https://github.com/nextcloud-releases/integration_github/releases/download/v2.0.7/integration_github-v2.0.7.tar.gz"; - sha256 = "x4BrBdrvmbdwZcZL6FLAY27B5OpkXIsw92XsD076Aqg="; + url = "https://github.com/nextcloud-releases/integration_github/releases/download/v3.1.1/integration_github-v3.1.1.tar.gz"; + hash = "sha256-nm463H33WyXTJkb7+OSsunARNuSl5nc3uGClgwkVvhM="; license = "agpl3Plus"; }; integration_gitlab = pkgs.fetchNextcloudApp { - url = "https://github.com/nextcloud-releases/integration_gitlab/releases/download/v3.1.1/integration_gitlab-v3.1.1.tar.gz"; - sha256 = "nBqnBDVoNEqRGp+WKq4okis1kCr6pzEz4G6368MaxuE="; + url = "https://github.com/nextcloud-releases/integration_gitlab/releases/download/v3.1.2/integration_gitlab-v3.1.2.tar.gz"; + hash = "sha256-nCH0DqYmr4T856sOU5PhSK6WAHIF9mnYThgytxEbkNA="; license = "agpl3Plus"; }; money = pkgs.fetchNextcloudApp { - url = "https://github.com/powerpaul17/nc_money/releases/download/v0.29.0/money.tar.gz"; - sha256 = "EXcY69z5h6rT0RdkmOhQYKSWmVBr2zaWuSRj/m5dMkI="; + url = "https://github.com/powerpaul17/nc_money/releases/download/v0.30.0/money.tar.gz"; + hash = "sha256-4gHm6sF9S+1G1naRTr+eR8ZyjCpB3viXTzRCNQFUtF0="; + license = "agpl3Plus"; + }; + passwords = pkgs.fetchNextcloudApp { + url = "https://git.mdns.eu/api/v4/projects/45/packages/generic/passwords/2025.5.1/passwords.tar.gz"; + hash = "sha256-v4IVpqbTN3TKORESFX+sJsiSrLkUc0b5Stj8CmznSIw="; + license = "agpl3Plus"; + }; + maps = pkgs.fetchNextcloudApp { + url = "https://github.com/nextcloud/maps/releases/download/v1.6.0-3-nightly/maps-1.6.0-3-nightly.tar.gz"; + hash = "sha256-E0S/CwXyye19lcuiONEQCyHJqlL0ZG1A9Q7oOTEZH1g="; license = "agpl3Plus"; }; }; }; + # OnlyOffice ############################################################### + services.onlyoffice = { + enable = true; + hostname = "office.cynerd.cz"; + }; # Postgresql ############################################################### services.postgresql = { @@ -348,16 +379,12 @@ }; users.groups.searx.members = ["nginx"]; - # Old Syncthing ############################################################ + # Syncthing ################################################################ services.syncthing = { enable = true; - openDefaultPorts = true; - - overrideDevices = false; - overrideFolders = false; - - dataDir = "/nas/sync"; - configDir = "/nas/sync/.syncthing"; + user = "syncthing"; + group = "syncthing"; + dataDir = "/sync"; }; }; } diff --git a/nixos/configurations/ridcully.nix b/nixos/configurations/ridcully.nix index 2be1a7a..0b2705c 100644 --- a/nixos/configurations/ridcully.nix +++ b/nixos/configurations/ridcully.nix @@ -5,6 +5,7 @@ }: let inherit (lib) mkDefault; in { + system.stateVersion = "24.05"; nixpkgs.hostPlatform.system = "x86_64-linux"; deploy.enable = true; @@ -26,6 +27,7 @@ in { cynerd.autounlock = { "encroot" = "/dev/disk/by-uuid/bc7d2ba4-6e04-4c49-b40c-3aecd1a86c71"; "enchdd" = "/dev/disk/by-uuid/7fee3cda-efa0-47cd-8832-fdead9a7e6db"; + "encback" = "/dev/disk/by-uuid/b426cbe7-fba2-473b-90f9-9ebe3e34b76e"; }; fileSystems = { "/" = { @@ -48,6 +50,11 @@ in { fsType = "btrfs"; options = ["compress=lzo" "subvol=@home"]; }; + "/back" = { + device = "/dev/mapper/encback"; + fsType = "btrfs"; + options = ["compress=lzo"]; + }; }; services.btrfs.autoScrub = { enable = true; @@ -61,10 +68,6 @@ in { systemd.network = { wait-online.enable = false; }; - #networking.vlans."enp6s0.adm" = { - #id = 2; - #interface = "enp6s0"; - #}; environment.systemPackages = [ pkgs.nvtopPackages.amd @@ -72,15 +75,7 @@ in { services.syncthing = { enable = true; - user = mkDefault "cynerd"; - group = mkDefault "cynerd"; - openDefaultPorts = true; - - overrideDevices = false; - overrideFolders = false; - dataDir = "/home/cynerd"; - configDir = "/home/cynerd/.config/syncthing"; }; # Force nix to use less jobs diff --git a/nixos/configurations/spt-mox.nix b/nixos/configurations/spt-mox.nix index 989df29..8af976c 100644 --- a/nixos/configurations/spt-mox.nix +++ b/nixos/configurations/spt-mox.nix @@ -1,12 +1,17 @@ -{config, ...}: { +{ + config, + pkgs, + ... +}: { + system.stateVersion = "24.05"; turris.board = "mox"; deploy = { enable = true; ssh.host = "mox.spt"; + configurationLimit = 8; }; cynerd = { - home-assistant = true; monitoring.drives = false; switch = { enable = true; @@ -23,13 +28,15 @@ }; }; - services.journald.extraConfig = '' - SystemMaxUse=512M - ''; + services = { + journald.extraConfig = '' + SystemMaxUse=512M + ''; - services.btrfs.autoScrub = { - enable = true; - fileSystems = ["/"]; + btrfs.autoScrub = { + enable = true; + fileSystems = ["/"]; + }; }; networking = { @@ -49,4 +56,119 @@ ]; }; }; + + ############################################################################## + networking.firewall.allowedTCPPorts = [ + 1883 # Mosquitto + ]; + services = { + mosquitto = { + enable = true; + listeners = [ + { + users = { + cynerd = { + acl = ["readwrite #"]; + passwordFile = "/run/secrets/mosquitto.cynerd.pass"; + }; + telegraf = { + acl = ["read bigclown/node/#"]; + passwordFile = "/run/secrets/mosquitto.telegraf.pass"; + }; + homeassistant = { + acl = [ + "readwrite homeassistant/#" + "readwrite bigclown/#" + "readwrite zigbee2mqtt/#" + ]; + passwordFile = "/run/secrets/mosquitto.homeassistant.pass"; + }; + bigclown = { + acl = ["readwrite bigclown/#"]; + passwordFile = "/run/secrets/mosquitto.bigclown.pass"; + }; + zigbee2mqtt = { + acl = [ + "readwrite homeassistant/#" + "readwrite zigbee2mqtt/#" + ]; + passwordFile = "/run/secrets/mosquitto.zigbee2mqtt.pass"; + }; + }; + } + ]; + }; + + telegraf.extraConfig = { + outputs.influxdb_v2 = [ + { + urls = ["http://cynerd.cz:8086"]; + token = "$INFLUX_TOKEN"; + organization = "personal"; + bucket = "bigclown"; + tagpass.source = ["bigclown"]; + } + ]; + inputs.mqtt_consumer = let + consumer = data_type: topics: { + tags = {source = "bigclown";}; + servers = ["tcp://localhost:1883"]; + inherit topics; + username = "telegraf"; + password = "$MQTT_PASSWORD"; + data_format = "value"; + inherit data_type; + topic_parsing = [ + { + topic = "bigclown/node/+/+/+/+"; + measurement = "_/_/_/_/_/measurement"; + tags = "_/_/device/field/_/_"; + } + ]; + }; + in [ + (consumer "float" [ + "bigclown/node/+/battery/+/voltage" + "bigclown/node/+/thermometer/+/temperature" + "bigclown/node/+/hygrometer/+/relative-humidity" + "bigclown/node/+/lux-meter/+/illuminance" + "bigclown/node/+/barometer/+/pressure" + "bigclown/node/+/pir/+/event-count" + "bigclown/node/+/push-button/+/event-count" + ]) + (consumer "boolean" [ + "bigclown/node/+/flood-detector/+/alarm" + ]) + ]; + processors.pivot = [ + { + tag_key = "field"; + value_key = "value"; + tagpass.source = ["bigclown"]; + } + ]; + }; + + bcg = { + enable = true; + device = "/dev/ttyUSB0"; + baseTopicPrefix = "bigclown/"; + environmentFiles = ["/run/secrets/bigclown.env"]; + mqtt = { + username = "bigclown"; + password = "\${MQTT_PASSWORD}"; + }; + }; + }; + + systemd.services = { + telegraf.wants = ["mosquitto.service"]; + + bigclown-leds = { + description = "Bigclown LEDs control"; + wantedBy = ["multi-user.target"]; + wants = ["mosquitto.service"]; + serviceConfig.ExecStart = "${pkgs.bigclown-leds}/bin/bigclown-leds /run/secrets/bigclown-leds.ini"; + }; + }; } diff --git a/nixos/configurations/spt-mox2.nix b/nixos/configurations/spt-mox2.nix index b416671..fd2c074 100644 --- a/nixos/configurations/spt-mox2.nix +++ b/nixos/configurations/spt-mox2.nix @@ -1,8 +1,5 @@ -{ - config, - pkgs, - ... -}: { +{config, ...}: { + system.stateVersion = "24.05"; turris.board = "mox"; deploy = { enable = true; diff --git a/nixos/configurations/spt-mpd.nix b/nixos/configurations/spt-mpd.nix index b212932..1849d9b 100644 --- a/nixos/configurations/spt-mpd.nix +++ b/nixos/configurations/spt-mpd.nix @@ -2,6 +2,7 @@ imports = [inputModules.nixos-hardware.raspberry-pi-2]; config = { + system.stateVersion = "24.05"; nixpkgs.hostPlatform.system = "armv7l-linux"; fileSystems = { diff --git a/nixos/configurations/spt-omnia.nix b/nixos/configurations/spt-omnia.nix index e55e34f..1809b2a 100644 --- a/nixos/configurations/spt-omnia.nix +++ b/nixos/configurations/spt-omnia.nix @@ -1,6 +1,7 @@ {config, ...}: let hosts = config.cynerd.hosts.spt; in { + system.stateVersion = "24.05"; turris.board = "omnia"; deploy = { enable = true; @@ -28,7 +29,7 @@ in { channel = 11; }; qca988x = { - interface = "wlp3s0"; + interface = "wlp2s0"; bssids = config.secrets.wifiMacs.spt-omnia.qca988x; channel = 36; }; @@ -121,10 +122,43 @@ in { password metronet ''; }; - systemd.services."pppd-wan".after = ["sys-subsystem-net-devices-end2.848.device"]; + systemd.services."pppd-wan" = { + after = ["sys-subsystem-net-devices-end2.848.device"]; + partOf = ["systemd-networkd.service"]; + }; # TODO limit NSS clamping to just pppoe-wan networking.firewall.extraForwardRules = '' tcp flags syn tcp option maxseg size set rt mtu comment "Needed for PPPoE to fix IPv4" - iifname {"home", "personalvpn", "wg"} oifname {"home", "personalvpn", "wg"} accept + iifname {"home", "wg"} oifname {"home", "wg"} accept ''; + + ############################################################################## + services = { + zigbee2mqtt = { + enable = true; + settings = { + serial.port = "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812153849-if00"; + mqtt = { + server = "mqtt://${config.cynerd.hosts.spt.mox}:1883"; + user = "zigbee2mqtt"; + password = "!secret.yaml mqtt_password"; + }; + advanced = { + network_key = "!secret.yaml network_key"; + homeassistant_legacy_entity_attributes = false; + legacy_api = false; + legacy_availability_payload = false; + last_seen = "epoch"; + }; + frontend = true; + availability = true; + homeassistant = { + legacy_triggers = false; + }; + device_options.legacy = false; + permit_join = false; + devices = config.secrets.zigbee2mqttDevices; + }; + }; + }; } diff --git a/nixos/modules/home-assistant/light.nix b/nixos/home-assistant/light.nix index a9d158b..a9d158b 100644 --- a/nixos/modules/home-assistant/light.nix +++ b/nixos/home-assistant/light.nix diff --git a/nixos/modules/home-assistant/sensors.nix b/nixos/home-assistant/sensors.nix index fadd4eb..fadd4eb 100644 --- a/nixos/modules/home-assistant/sensors.nix +++ b/nixos/home-assistant/sensors.nix diff --git a/nixos/modules/backup.nix b/nixos/modules/backup.nix new file mode 100644 index 0000000..3f5042b --- /dev/null +++ b/nixos/modules/backup.nix @@ -0,0 +1,63 @@ +{ + config, + lib, + ... +}: let + inherit (builtins) elem readFile readDir; + inherit (lib) mkOption types mkIf hasSuffix removeSuffix hasAttr filterAttrs mapAttrs mapAttrs' nameValuePair mergeAttrsList recursiveUpdate; + + servers = ["ridcully"]; # TODO "errol" + clients = + mapAttrs' (fname: _: + nameValuePair (removeSuffix ".pub" fname) + (readFile (config.personal-secrets + "/unencrypted/backup/${fname}"))) + (filterAttrs (n: v: v == "regular" && hasSuffix ".pub" n) + (readDir (config.personal-secrets + "/unencrypted/backup"))); + edpersonal = readFile (config.personal-secrets + "/unencrypted/edpersonal.pub"); +in { + options.cynerd = { + borgjobs = mkOption { + type = with types; attrsOf anything; + description = "Job to be backed up for this "; + }; + }; + + config = { + services.borgbackup = { + repos = mkIf (elem config.networking.hostName servers) ( + mapAttrs (name: key: { + path = "/back/${name}"; + authorizedKeys = [key edpersonal]; + allowSubRepos = true; + }) + clients + ); + + jobs = mkIf (hasAttr config.networking.hostName clients) (mergeAttrsList + (map (server: (mapAttrs' (n: v: + nameValuePair "${server}-${n}" + (recursiveUpdate + (recursiveUpdate { + encryption.mode = "none"; + prune = { + keep = { + daily = 7; + weekly = 4; + monthly = -1; + }; + prefix = n; + }; + } + v) + { + repo = "borg@${server}:./${n}"; + environment = { + BORG_RSH = "ssh -i /run/secrets/borgbackup.key"; + }; + archiveBaseName = null; + })) + config.cynerd.borgjobs)) + servers)); + }; + }; +} diff --git a/nixos/modules/desktop.nix b/nixos/modules/desktop.nix index 54c50d2..06c8215 100644 --- a/nixos/modules/desktop.nix +++ b/nixos/modules/desktop.nix @@ -72,9 +72,6 @@ in { astroid dodo taskwarrior3 - vdirsyncer - khal - khard gnupg pinentry-gnome3 pinentry-curses @@ -124,7 +121,6 @@ in { tigervnc freerdp - plasma5Packages.kdeconnect-kde gnome-firmware hdparm @@ -144,21 +140,24 @@ in { gimp inkscape blender - kdenlive + tenacity + #kdePackages.kdenlive # GStreamer - gst_all_1.gst-libav - gst_all_1.gst-plugins-bad + gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good + gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-ugly - gst_all_1.gst-plugins-viperfx + gst_all_1.gst-plugins-rs + gst_all_1.gst-libav + gst_all_1.gst-vaapi # Writing typst - typst-fmt + typstfmt typst-live - typst-lsp + tinymist vale # CAD @@ -200,6 +199,8 @@ in { enableSSHSupport = true; enableBrowserSocket = true; }; + + kdeconnect.enable = true; }; xdg = { @@ -245,9 +246,15 @@ in { alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - extraConfig.pipewire."10-zeroconf" = { - "context.modules" = [{name = "libpipewire-module-zeroconf-discover";}]; - }; + configPackages = [ + (pkgs.writeTextDir "share/pipewire/pipewire.conf.d/10-zeroconf-discover.conf" '' + context.modules = [ + { name = libpipewire-module-zeroconf-discover + args = { } + } + ] + '') + ]; }; upower.enable = true; @@ -272,6 +279,12 @@ in { davfs2.enable = true; locate.enable = true; + + gnome = { + at-spi2-core.enable = true; + gnome-keyring.enable = true; + gnome-online-accounts.enable = true; + }; }; # Beneficial for Pipewire @@ -284,7 +297,7 @@ in { }; fonts.packages = with pkgs; [ - (nerdfonts.override {fonts = ["Hack"];}) + nerd-fonts.hack arkpandora_ttf corefonts dejavu_fonts diff --git a/nixos/modules/develop.nix b/nixos/modules/develop.nix index 446d205..6444473 100644 --- a/nixos/modules/develop.nix +++ b/nixos/modules/develop.nix @@ -43,6 +43,7 @@ in { cachix nurl nil + nixfmt-rfc-style alejandra statix deadnix @@ -82,6 +83,7 @@ in { pygraphviz matplotlib + seaborn plotly pygal @@ -105,6 +107,9 @@ in { pyserial pylibftdi + pyusb + usbtmc + pylxd selenium ])) @@ -123,6 +128,9 @@ in { # Julia julia + # XML + libxml2 + # Qemmu qemu virt-manager @@ -152,12 +160,15 @@ in { stdmanpages # SHV - shvcli + (shvcli.withPlugins [python3Packages.shvcli-ell]) # Images imagemagick ]; - programs.wireshark.package = pkgs.wireshark; + programs.wireshark = { + enable = true; + package = pkgs.wireshark; + }; documentation = { nixos = { @@ -173,6 +184,7 @@ in { SUBSYSTEMS=="usb", ATTRS{idVendor}=="a600", ATTRS{idProduct}=="a003", MODE:="0660", GROUP="develop", SYMLINK+="aix_forte_%n" SUBSYSTEMS=="usb", ATTRS{idVendor}=="1366", ATTRS{idProduct}=="0105", MODE:="0660", GROUP="develop", SYMLINK+="jlink_%n" SUBSYSTEMS=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2111", MODE:="0660", GROUP="develop", SYMLINK+="cmsip_dap_%n" + SUBSYSTEMS=="usb", ATTRS{idVendor}=="1ab1", ATTRS{idProduct}=="0e11", MODE:="0660", GROUP="develop" ''; virtualisation = { diff --git a/nixos/modules/gaming.nix b/nixos/modules/gaming.nix index 64af068..6e25320 100644 --- a/nixos/modules/gaming.nix +++ b/nixos/modules/gaming.nix @@ -18,7 +18,14 @@ in { config = mkIf cnf { cynerd.desktop.enable = true; - environment.systemPackages = [pkgs.heroic]; + environment.systemPackages = with pkgs; [ + heroic + prismlauncher + ]; + + nixpkgs.config.permittedInsecurePackages = [ + "SDL_ttf-2.0.11" # TODO + ]; programs.steam = { enable = true; @@ -31,8 +38,28 @@ in { with pkgs; [ ncurses xorg.libXpm - flac1_3 + #flac134 + libopus + ]; + }; + heroic = pkgs.heroic.override { + extraPkgs = pkgs: + with pkgs; [ + ncurses + xorg.libXpm + #flac134 libopus + SDL + SDL2_image + SDL2_mixer + SDL2_ttf + SDL_image + SDL_mixer + SDL_ttf + glew110 + libdrm + libidn + tbb ]; }; }; diff --git a/nixos/modules/generic.nix b/nixos/modules/generic.nix index 02afd17..e029058 100644 --- a/nixos/modules/generic.nix +++ b/nixos/modules/generic.nix @@ -6,10 +6,8 @@ inherit (lib) mkOverride mkDefault; in { config = { - system.stateVersion = "24.05"; - nix = { - extraOptions = "experimental-features = nix-command flakes repl-flake"; + extraOptions = "experimental-features = nix-command flakes"; settings = { auto-optimise-store = true; substituters = [ @@ -31,8 +29,11 @@ in { }; boot = { - loader.systemd-boot.enable = mkOverride 1100 true; - loader.efi.canTouchEfiVariables = mkDefault true; + loader = { + systemd-boot.enable = mkOverride 1100 true; + efi.canTouchEfiVariables = mkDefault true; + grub.enable = mkOverride 1100 false; + }; kernelPackages = mkOverride 1100 pkgs.linuxPackages_latest; kernelParams = ["boot.shell_on_fail"]; }; @@ -59,11 +60,6 @@ in { }) ]; - system.extraSystemBuilderCmds = '' - substituteAll ${./nixos-system.sh} $out/bin/nixos-system - chmod +x $out/bin/nixos-system - ''; - documentation = { enable = mkDefault false; doc.enable = mkDefault false; diff --git a/nixos/modules/home-assistant.nix b/nixos/modules/home-assistant.nix deleted file mode 100644 index ab16e8a..0000000 --- a/nixos/modules/home-assistant.nix +++ /dev/null @@ -1,164 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: let - inherit (lib) mkIf mkEnableOption; -in { - options = { - cynerd.home-assistant = mkEnableOption "Enable Home Assistant and Bigclown"; - }; - - config = mkIf config.cynerd.home-assistant { - services.mosquitto = { - enable = true; - listeners = [ - { - users = { - cynerd = { - acl = ["readwrite #"]; - passwordFile = "/run/secrets/mosquitto.cynerd.pass"; - }; - telegraf = { - acl = ["read bigclown/node/#"]; - passwordFile = "/run/secrets/mosquitto.telegraf.pass"; - }; - homeassistant = { - acl = [ - "readwrite homeassistant/#" - "readwrite bigclown/#" - "readwrite zigbee2mqtt/#" - ]; - passwordFile = "/run/secrets/mosquitto.homeassistant.pass"; - }; - bigclown = { - acl = ["readwrite bigclown/#"]; - passwordFile = "/run/secrets/mosquitto.bigclown.pass"; - }; - zigbee2mqtt = { - acl = [ - "readwrite homeassistant/#" - "readwrite zigbee2mqtt/#" - ]; - passwordFile = "/run/secrets/mosquitto.zigbee2mqtt.pass"; - }; - }; - } - ]; - }; - networking.firewall.allowedTCPPorts = [ - 1883 # Mosquitto - ]; - - services.bcg = { - enable = true; - device = "/dev/ttyUSB0"; - baseTopicPrefix = "bigclown/"; - environmentFiles = ["/run/secrets/bigclown.env"]; - mqtt = { - username = "bigclown"; - password = "\${MQTT_PASSWORD}"; - }; - }; - - systemd.services.bigclown-leds = { - description = "Bigclown LEDs control"; - wantedBy = ["multi-user.target"]; - wants = ["mosquitto.service"]; - serviceConfig.ExecStart = "${pkgs.bigclown-leds}/bin/bigclown-leds /run/secrets/bigclown-leds.ini"; - }; - - services.telegraf.extraConfig = { - outputs.influxdb_v2 = [ - { - urls = ["http://cynerd.cz:8086"]; - token = "$INFLUX_TOKEN"; - organization = "personal"; - bucket = "bigclown"; - tagpass.source = ["bigclown"]; - } - ]; - inputs.mqtt_consumer = let - consumer = data_type: topics: { - tags = {source = "bigclown";}; - servers = ["tcp://localhost:1883"]; - inherit topics; - username = "telegraf"; - password = "$MQTT_PASSWORD"; - data_format = "value"; - inherit data_type; - topic_parsing = [ - { - topic = "bigclown/node/+/+/+/+"; - measurement = "_/_/_/_/_/measurement"; - tags = "_/_/device/field/_/_"; - } - ]; - }; - in [ - (consumer "float" [ - "bigclown/node/+/battery/+/voltage" - "bigclown/node/+/thermometer/+/temperature" - "bigclown/node/+/hygrometer/+/relative-humidity" - "bigclown/node/+/lux-meter/+/illuminance" - "bigclown/node/+/barometer/+/pressure" - "bigclown/node/+/pir/+/event-count" - "bigclown/node/+/push-button/+/event-count" - ]) - (consumer "boolean" [ - "bigclown/node/+/flood-detector/+/alarm" - ]) - ]; - processors.pivot = [ - { - tag_key = "field"; - value_key = "value"; - tagpass.source = ["bigclown"]; - } - ]; - }; - systemd.services.telegraf.wants = ["mosquitto.service"]; - - #nixpkgs.config.permittedInsecurePackages = ["openssl-1.1.1w"]; # TODO - services.home-assistant = { - enable = false; - openFirewall = true; - configDir = "/var/lib/hass"; - config = { - homeassistant = { - name = "SPT"; - latitude = "!secret latitude"; - longitude = "!secret longitude"; - elevation = "!secret elevation"; - time_zone = "Europe/Prague"; - country = "CZ"; - }; - http.server_port = 8808; - mqtt = { - sensor = import ./home-assistant/sensors.nix; - light = import ./home-assistant/light.nix; - }; - default_config = {}; - automation = "!include automations.yaml"; - }; - extraComponents = ["met"]; - package = pkgs.home-assistant.override { - extraPackages = pkgs: - with pkgs; [ - securetar - pyipp - ]; - packageOverrides = _: super: { - scapy = super.scapy.override { - withPlottingSupport = false; - }; - s3transfer = super.s3transfer.overridePythonAttrs { - dontUsePytestCheck = true; - dontUseSetuptoolsCheck = true; - }; - }; - }; - }; - }; -} diff --git a/nixos/modules/hosts.nix b/nixos/modules/hosts.nix index f53fd8c..4b358b8 100644 --- a/nixos/modules/hosts.nix +++ b/nixos/modules/hosts.nix @@ -64,7 +64,7 @@ in { "ridcully" = "10.8.3.60"; "3dprint" = "10.8.3.80"; "mpd" = "10.8.3.51"; - "printer" = "192.168.0.20"; + "printer" = "192.168.1.20"; # Portable "albert" = "10.8.3.61"; "binky" = "10.8.3.63"; diff --git a/nixos/modules/monitoring.nix b/nixos/modules/monitoring.nix index e4fa195..e8ba2a9 100644 --- a/nixos/modules/monitoring.nix +++ b/nixos/modules/monitoring.nix @@ -136,8 +136,8 @@ in { }) (mkIf (config.networking.hostName == "lipwig") { - # InfluxDB services = { + # InfluxDB influxdb2.enable = true; telegraf.extraConfig.inputs.prometheus = { urls = ["http://localhost:8086/metrics"]; diff --git a/nixos/modules/nixos-system.sh b/nixos/modules/nixos-system.sh deleted file mode 100644 index 7a220bb..0000000 --- a/nixos/modules/nixos-system.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!@shell@ -# Simple script handy to be used for activation - -while getopts "s" opt; do - case "$opt" in - s) - if [ ! -v NIXOS_SYSTEM_GNU_SCREEN ]; then - export NIXOS_SYSTEM_GNU_SCREEN=1 - exec @out@/sw/bin/screen "$0" "$@" - fi - ;; - *) - echo "Invalid argument: $1" >&2 - exit 1 - ;; - esac -done -shift $((OPTIND - 1)) - - -@out@/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set '@out@' - -@out@/bin/switch-to-configuration "$@" || { - echo "Switch failed!" >&2 - read -r _ - exit 1 -} diff --git a/nixos/modules/openvpn.nix b/nixos/modules/openvpn.nix index 6a21721..da29dd7 100644 --- a/nixos/modules/openvpn.nix +++ b/nixos/modules/openvpn.nix @@ -9,11 +9,6 @@ in { options = { cynerd.openvpn = { - oldpersonal = mkOption { - type = types.bool; - default = false; - description = "My personal old OpenVPN"; - }; elektroline = mkOption { type = types.bool; default = false; @@ -24,9 +19,6 @@ in { config = { services.openvpn.servers = { - oldpersonal = mkIf cnf.oldpersonal { - config = "config /run/secrets/old.ovpn"; - }; elektroline = mkIf cnf.elektroline { config = "config /run/secrets/elektroline.ovpn"; up = '' diff --git a/nixos/modules/packages.nix b/nixos/modules/packages.nix index 1052f56..155d8a5 100644 --- a/nixos/modules/packages.nix +++ b/nixos/modules/packages.nix @@ -41,9 +41,7 @@ in { btop iotop mc - screen tmux - pv # ls tools tree @@ -65,14 +63,19 @@ in { wakeonlan speedtest-cli librespeed-cli - termshark + #termshark w3m lm_sensors ] + ++ optionals (system != "armv7l-linux") [ + ranger + ] ++ optionals (system == "x86_64-linux") [ nmap ltrace + pv + screen ] ++ optionals (!isNative) [ ncdu_1 diff --git a/nixos/modules/rpi.md b/nixos/modules/rpi.md new file mode 100644 index 0000000..43b172f --- /dev/null +++ b/nixos/modules/rpi.md @@ -0,0 +1,25 @@ +# Raspberry Pi SD card preparation steps + +``` +~# parted /dev/sdx +(parted) mktable msdos +(parted) mkpart primary fat16 0% 120M +(parted) mkpart primary btrfs 120M 100% +(parted) set 2 boot on +(parted) quit +~# mkfs.vfat -F16 /dev/sdx1 +~# mkfs.btrfs /dev/sdx2 + +~# mount /dev/sdx1 /mnt +~# nix build .#firmware-HOST +~# cp -r result/* /mnt/ +~# umount mnt + +~# mount /dev/sdx2 /mnt +~# nix copy --to /mnt .#toplevel-HOST +~# nix build --print-out-paths .#toplevel-HOST +~# nix eval .#nixosConfigurations.HOST.config.boot.loader.generic-extlinux-compatible.populateCmd +"/nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-extlinux-conf-builder.sh -g 20 -t 5" +~# /nix/store/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA-extlinux-conf-builder.sh -c -d ./mnt/boot +~# umount mnt +``` diff --git a/nixos/modules/rpi.nix b/nixos/modules/rpi.nix new file mode 100644 index 0000000..e4e10fe --- /dev/null +++ b/nixos/modules/rpi.nix @@ -0,0 +1,88 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib) mkOption types mkMerge mkIf; + + configTxt = pkgs.writeText "config.txt" '' + [pi3] + kernel=u-boot-rpi3.bin + + # Boot in 64-bit mode. + arm_64bit=1 + + # Otherwise the serial output will be garbled. + core_freq=250 + # Boot in 64-bit mode. + arm_64bit=1 + + [all] + # U-Boot needs this to work, regardless of whether UART is actually used or not. + # Look in arch/arm/mach-bcm283x/Kconfig in the U-Boot tree to see if this is still + # a requirement in the future. + enable_uart=1 + + # Prevent the firmware from smashing the framebuffer setup done by the mainline kernel + # when attempting to show low-voltage or overtemperature warnings. + avoid_warnings=1 + ''; +in { + options.cynerd.rpi = mkOption { + type = with types; nullOr (enum [2 3]); + default = null; + description = "If machine is RaspberryPi and which version"; + }; + + config = mkMerge [ + (mkIf (config.cynerd.rpi == 2) { + nixpkgs.hostPlatform.system = "armv7l-linux"; + }) + (mkIf (config.cynerd.rpi == 3) { + nixpkgs.hostPlatform.system = "aarch64-linux"; + boot.kernelParams = ["console=ttyS1,115200n8"]; + }) + (mkIf (config.cynerd.rpi != null) { + boot.loader = { + systemd-boot.enable = false; + efi.canTouchEfiVariables = false; + generic-extlinux-compatible.enable = true; + }; + boot.consoleLogLevel = 7; + + fileSystems = { + "/" = { + device = "/dev/mmcblk0p2"; + fsType = "ext4"; + }; + #"/" = { + # device = "/dev/mmcblk0p2"; + # fsType = "btrfs"; + # options = ["compress=lzo"]; + #}; + "/boot/firmware" = { + device = "/dev/mmcblk0p1"; + fsType = "vfat"; + options = ["nofail"]; + }; + }; + + services.journald.extraConfig = '' + SystemMaxUse=512M + ''; + + system.build.firmware = pkgs.callPackage ({stdenvNoCC}: + stdenvNoCC.mkDerivation { + name = "${config.system.name}-firmware"; + buildCommand = '' + mkdir $out + cp -r ${pkgs.raspberrypifw}/share/raspberrypi/boot/* $out/ + cp ${configTxt} $out/config.txt + # TODO support rpi2 + cp ${pkgs.ubootRaspberryPi3_btrfs}/u-boot.bin $out/u-boot-rpi3.bin + ''; + }) {}; + }) + ]; +} diff --git a/nixos/modules/syncthing.nix b/nixos/modules/syncthing.nix index 91736ca..1148da6 100644 --- a/nixos/modules/syncthing.nix +++ b/nixos/modules/syncthing.nix @@ -3,119 +3,96 @@ lib, ... }: let - inherit (lib) filterAttrs mkOption types mkIf any mkDefault recursiveUpdate genAttrs; - cnf = config.cynerd.syncthing; - inherit (config.networking) hostName; + inherit (lib) elem filterAttrs mkIf any mkDefault recursiveUpdate genAttrs; + allDevices = [ - "albert" "binky" "errol" "lipwig" "ridcully" - "spt-omnia" - ]; - mediaDevices = [ - "lipwig" - "binky" - "errol" - "ridcully" - "spt-omnia" ]; bigStorageDevices = [ "errol" "ridcully" - "spt-omnia" ]; + + inherit (config.networking) hostName; + baseDir = config.services.syncthing.dataDir; filterDevice = filterAttrs (_: v: any (d: d == hostName) v.devices); in { - options = { - cynerd.syncthing = { - enable = mkOption { - type = types.bool; - default = false; - description = "My personal Syncthing configuration"; - }; - - baseDir = mkOption { - type = types.str; - default = "/home/cynerd"; - description = "Base directory for all folders being synced."; - }; - }; - }; - - config = mkIf cnf.enable { + config = mkIf (config.services.syncthing.enable && elem hostName allDevices) { services.syncthing = { - enable = any (n: n == hostName) allDevices; user = mkDefault "cynerd"; + group = mkDefault "cynerd"; + key = "/run/secrets/syncthing.key.pem"; cert = "/run/secrets/syncthing.cert.pem"; openDefaultPorts = true; - overrideFolders = true; - folders = filterDevice { - "${cnf.baseDir}/documents" = { - label = "Documents"; - id = "documents"; - devices = allDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/notes" = { - label = "Notes"; - id = "notes"; - devices = allDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/projects" = { - label = "Projects"; - id = "projects"; - devices = allDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/pictures" = { - label = "Pictures"; - id = "pictures"; - devices = mediaDevices; - ignorePerms = false; - }; - # TODO phone-photos - "${cnf.baseDir}/music/primary" = { - label = "Music-primary"; - id = "music-primary"; - devices = mediaDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/music/secondary" = { - label = "Music-secondary"; - id = "music-secondary"; - devices = bigStorageDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/music/flac" = { - label = "Music-flac"; - id = "music-flac"; - devices = bigStorageDevices; - ignorePerms = false; - }; - "${cnf.baseDir}/video" = { - label = "Video"; - id = "video"; - devices = bigStorageDevices; - ignorePerms = false; - }; - }; - overrideDevices = true; - devices = - recursiveUpdate - (genAttrs allDevices (name: { - id = config.secrets.syncthingIDs."${name}"; - })) - { - lipwig.addresses = ["tcp://cynerd.cz"]; + + settings = { + folders = filterDevice { + "${baseDir}/documents" = { + label = "Documents"; + id = "documents"; + devices = allDevices; + ignorePerms = false; + }; + "${baseDir}/notes" = { + label = "Notes"; + id = "notes"; + devices = allDevices; + ignorePerms = false; + }; + "${baseDir}/projects" = { + label = "Projects"; + id = "projects"; + devices = allDevices; + ignorePerms = false; + }; + "${baseDir}/elektroline" = { + label = "Elektroline"; + id = "elektroline"; + devices = allDevices; + ignorePerms = false; + }; + "${baseDir}/pictures" = { + label = "Pictures"; + id = "pictures"; + devices = bigStorageDevices; + ignorePerms = false; + }; + "${baseDir}/music" = { + label = "Music"; + id = "music"; + devices = bigStorageDevices; + ignorePerms = false; + }; + "${baseDir}/video" = { + label = "Video"; + id = "video"; + devices = bigStorageDevices; + ignorePerms = false; + }; + "${baseDir}/turris" = { + label = "Turris"; + id = "turris"; + devices = bigStorageDevices; + ignorePerms = false; + }; }; - # TODO phone + + devices = + recursiveUpdate + (genAttrs allDevices (name: { + id = config.secrets.syncthingIDs."${name}"; + })) + { + lipwig.addresses = ["tcp://cynerd.cz"]; + }; + }; }; }; } diff --git a/nixos/modules/users.nix b/nixos/modules/users.nix index 1c143bb..7d0dc77 100644 --- a/nixos/modules/users.nix +++ b/nixos/modules/users.nix @@ -4,7 +4,7 @@ ... }: let isNative = config.nixpkgs.hostPlatform == config.nixpkgs.buildPlatform; - isArm = config.nixpkgs.hostPlatform.isAarch; + isArm = pkgs.hostPlatform.isAarch; in { users = { mutableUsers = false; @@ -73,8 +73,6 @@ in { defaultEditor = !isArm; withNodeJs = true; }; - - wireshark.enable = true; }; programs.fuse.userAllowOther = true; diff --git a/nixos/modules/wifi-adm.nix b/nixos/modules/wifi-adm.nix index 1db730c..56ca65a 100644 --- a/nixos/modules/wifi-adm.nix +++ b/nixos/modules/wifi-adm.nix @@ -3,9 +3,73 @@ lib, ... }: let - inherit (lib) mkOption mkEnableOption types mkIf hostapd elemAt; + inherit (lib) mkOption mkEnableOption types mkIf mkMerge hostapd elemAt; cnf = config.cynerd.wifiAP.adm; + wifi-networks = name: { + "${cnf."${name}".interface}" = { + bssid = elemAt cnf."${name}".bssids 0; + ssid = "TurrisAdamkovi"; + authentication = { + mode = "wpa3-sae-transition"; + wpaPasswordFile = "/run/secrets/hostapd-TurrisAdamkovi.pass"; + saePasswordsFile = "/run/secrets/hostapd-TurrisAdamkovi.pass"; + }; + }; + "${cnf."${name}".interface}.nela" = { + bssid = elemAt cnf."${name}".bssids 1; + ssid = "Nela"; + authentication = { + mode = "wpa2-sha256"; + wpaPasswordFile = "/run/secrets/hostapd-Nela.pass"; + }; + }; + "${cnf."${name}".interface}.milan" = { + bssid = elemAt cnf."${name}".bssids 2; + ssid = "MILAN-AC"; + authentication = { + mode = "wpa2-sha1"; + wpaPasswordFile = "/run/secrets/hostapd-MILAN-AC.pass"; + }; + }; + }; + + net-networks = name: { + "lan-${cnf."${name}".interface}" = { + matchConfig = { + Name = cnf."${name}".interface; + WLANInterfaceType = "ap"; + }; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 1; + PVID = 1; + } + ]; + }; + "lan-${cnf."${name}".interface}.nela" = { + matchConfig.Name = "${cnf."${name}".interface}-nela"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 2; + PVID = 2; + } + ]; + }; + "lan-${cnf."${name}".interface}.milan" = { + matchConfig.Name = "${cnf."${name}".interface}.milan"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 2; + PVID = 2; + } + ]; + }; + }; + wOptions = card: channelDefault: { interface = mkOption { type = with types; nullOr str; @@ -43,32 +107,7 @@ in { enable = true; inherit (hostapd.qualcomAtherosAR9287.wifi4) capabilities; }; - networks = { - "${cnf.ar9287.interface}" = { - bssid = elemAt cnf.ar9287.bssids 0; - ssid = "TurrisAdamkovi"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-TurrisAdamkovi.pass"; - }; - }; - "${cnf.ar9287.interface}-nela" = { - bssid = elemAt cnf.ar9287.bssids 1; - ssid = "Nela"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-Nela.pass"; - }; - }; - "${cnf.ar9287.interface}.milan" = { - bssid = elemAt cnf.ar9287.bssids 2; - ssid = "MILAN-AC"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-MILAN-AC.pass"; - }; - }; - }; + networks = wifi-networks "ar9287"; }; "${cnf.qca988x.interface}" = mkIf (cnf.qca988x.interface != null) { countryCode = "CZ"; @@ -82,96 +121,13 @@ in { enable = true; inherit (hostapd.qualcomAtherosQCA988x.wifi5) capabilities; }; - networks = { - "${cnf.qca988x.interface}" = { - bssid = elemAt cnf.qca988x.bssids 0; - ssid = "TurrisAdamkovi"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-TurrisAdamkovi.pass"; - }; - }; - "${cnf.qca988x.interface}-nela" = { - bssid = elemAt cnf.qca988x.bssids 1; - ssid = "Nela"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-Nela.pass"; - }; - }; - "${cnf.qca988x.interface}.milan" = { - bssid = elemAt cnf.qca988x.bssids 2; - ssid = "MILAN-AC"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-MILAN-AC.pass"; - }; - }; - }; + networks = wifi-networks "qca988x"; }; }; }; - systemd.network.networks = { - "lan-${cnf.ar9287.interface}" = { - matchConfig.Name = cnf.ar9287.interface; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 1; - PVID = 1; - } - ]; - }; - "lan-${cnf.ar9287.interface}-nela" = { - matchConfig.Name = "${cnf.ar9287.interface}-nela"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - "lan-${cnf.ar9287.interface}.milan" = { - matchConfig.Name = "${cnf.ar9287.interface}.milan"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - "lan-${cnf.qca988x.interface}" = { - matchConfig.Name = cnf.qca988x.interface; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 1; - PVID = 1; - } - ]; - }; - "lan-${cnf.qca988x.interface}-nela" = { - matchConfig.Name = "${cnf.qca988x.interface}-nela"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - "lan-${cnf.qca988x.interface}.milan" = { - matchConfig.Name = "${cnf.qca988x.interface}.milan"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - }; + systemd.network.networks = mkMerge [ + (mkIf (cnf.ar9287.interface != null) (net-networks "ar9287")) + (mkIf (cnf.qca988x.interface != null) (net-networks "qca988x")) + ]; }; } diff --git a/nixos/modules/wifi-spt.nix b/nixos/modules/wifi-spt.nix index d013473..bec093e 100644 --- a/nixos/modules/wifi-spt.nix +++ b/nixos/modules/wifi-spt.nix @@ -6,6 +6,61 @@ inherit (lib) mkOption mkEnableOption types mkIf mkForce mkMerge hostapd elemAt; cnf = config.cynerd.wifiAP.spt; + wifi-networks = name: let + is2g = cnf."${name}".channel <= 14; + in { + "${cnf."${name}".interface}" = { + bssid = elemAt cnf."${name}".bssids 0; + ssid = "TurrisRules${ + if is2g + then "" + else "5" + }"; + authentication = { + mode = "wpa2-sha256"; + wpaPasswordFile = "/run/secrets/hostapd-TurrisRules.pass"; + }; + settings = mkIf is2g { + ieee80211w = 0; + wpa_key_mgmt = mkForce "WPA-PSK"; # force use without sha256 + }; + }; + "${cnf."${name}".interface}.guest" = { + bssid = elemAt cnf."${name}".bssids 1; + ssid = "Kocovi"; + authentication = { + mode = "wpa2-sha256"; + wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; + }; + }; + }; + + net-networks = name: { + "lan-${cnf."${name}".interface}" = { + matchConfig = { + Name = cnf."${name}".interface; + WLANInterfaceType = "ap"; + }; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 1; + PVID = 1; + } + ]; + }; + "lan-${cnf."${name}".interface}-guest" = { + matchConfig.Name = "${cnf."${name}".interface}.guest"; + networkConfig.Bridge = "brlan"; + bridgeVLANs = [ + { + EgressUntagged = 2; + PVID = 2; + } + ]; + }; + }; + wOptions = card: channelDefault: { interface = mkOption { type = with types; nullOr str; @@ -48,28 +103,7 @@ in { enable = true; inherit (hostapd.qualcomAtherosAR9287.wifi4) capabilities; }; - networks = { - "${cnf.ar9287.interface}" = { - bssid = elemAt cnf.ar9287.bssids 0; - ssid = "TurrisRules"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-TurrisRules.pass"; - }; - settings = { - ieee80211w = 0; - wpa_key_mgmt = mkForce "WPA-PSK"; # force use without sha256 - }; - }; - "${cnf.ar9287.interface}.guest" = { - bssid = elemAt cnf.ar9287.bssids 1; - ssid = "Kocovi"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; - }; - }; - }; + networks = wifi-networks "ar9287"; }; }) (mkIf (cnf.qca988x.interface != null) { @@ -90,87 +124,14 @@ in { enable = !is2g; inherit (hostapd.qualcomAtherosQCA988x.wifi5) capabilities; }; - networks = { - "${cnf.qca988x.interface}" = { - bssid = elemAt cnf.qca988x.bssids 0; - ssid = "TurrisRules${ - if is2g - then "" - else "5" - }"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-TurrisRules.pass"; - }; - settings = mkIf is2g { - ieee80211w = 0; - wpa_key_mgmt = mkForce "WPA-PSK"; # force use without sha256 - }; - }; - "${cnf.qca988x.interface}.guest" = { - bssid = elemAt cnf.qca988x.bssids 1; - ssid = "Kocovi"; - authentication = { - mode = "wpa2-sha256"; - wpaPasswordFile = "/run/secrets/hostapd-Kocovi.pass"; - }; - }; - }; + networks = wifi-networks "qca988x"; }; }) ]; }; systemd.network.networks = mkMerge [ - (mkIf (cnf.ar9287.interface != null) { - "lan-${cnf.ar9287.interface}" = { - matchConfig = { - Name = cnf.ar9287.interface; - WLANInterfaceType = "ap"; - }; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 1; - PVID = 1; - } - ]; - }; - "lan-${cnf.ar9287.interface}-guest" = { - matchConfig.Name = "${cnf.ar9287.interface}.guest"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - }) - (mkIf (cnf.qca988x.interface != null) { - "lan-${cnf.qca988x.interface}" = { - matchConfig = { - Name = cnf.qca988x.interface; - WLANInterfaceType = "ap"; - }; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 1; - PVID = 1; - } - ]; - }; - "lan-${cnf.qca988x.interface}-guest" = { - matchConfig.Name = "${cnf.qca988x.interface}.guest"; - networkConfig.Bridge = "brlan"; - bridgeVLANs = [ - { - EgressUntagged = 2; - PVID = 2; - } - ]; - }; - }) + (mkIf (cnf.ar9287.interface != null) (net-networks "ar9287")) + (mkIf (cnf.qca988x.interface != null) (net-networks "qca988x")) ]; }; } diff --git a/nixos/modules/wireguad.nix b/nixos/modules/wireguard.nix index 1b1db90..b49eaae 100644 --- a/nixos/modules/wireguad.nix +++ b/nixos/modules/wireguard.nix @@ -44,18 +44,15 @@ in { PublicKey = config.secrets.wireguardPubs.spt-omnia; } // (optionalAttrs (!is_endpoint) {PersistentKeepalive = 25;})) - #{ - # wireguardPeerConfig = - # { - # Endpoint = "adm.cynerd.cz:51820"; - # AllowedIPs = [ - # "${config.cynerd.hosts.wg.adm-omnia}/32" - # "10.8.3.0/24" - # ]; - # PublicKey = config.secrets.wireguardPubs.adm-omnia; - # } - # // (optionalAttrs (!is_endpoint) {PersistentKeepalive = 25;}); - #} + ({ + Endpoint = "adm.cynerd.cz:51820"; + AllowedIPs = [ + "${config.cynerd.hosts.wg.adm-omnia}/32" + "10.8.3.0/24" + ]; + PublicKey = config.secrets.wireguardPubs.adm-omnia; + } + // (optionalAttrs (!is_endpoint) {PersistentKeepalive = 25;})) ] ++ (optionals is_endpoint (mapAttrsToList (n: v: { AllowedIPs = "${config.cynerd.hosts.wg."${n}"}/32"; @@ -69,20 +66,14 @@ in { IPv4Forwarding = "yes"; }; routes = - (optional (hostName != "lipwig") { - # OpenVPN network - Gateway = config.cynerd.hosts.wg.lipwig; - Destination = "10.8.0.0/24"; - Metric = 2048; - }) - ++ (optional (hostName != "spt-omnia") { + (optional (hostName != "spt-omnia") { # SPT network Gateway = config.cynerd.hosts.wg.spt-omnia; Destination = "10.8.2.0/24"; Metric = 2048; }) - ++ (optional (hostName != "adm-omnia" && hostName != "lipwig") { - # Adamkovi network + ++ (optional (hostName != "adm-omnia") { + # ADM network Gateway = config.cynerd.hosts.wg.adm-omnia; Destination = "10.8.3.0/24"; Metric = 2048; diff --git a/pkgs/default.nix b/pkgs/default.nix index 68c6951..82bd1a8 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,13 +1,4 @@ -final: prev: let - # The NodeJS packages has to be build in 32bit environment if host platform is - # also 32bit because it uses 32bit stubs and links against 32bit OpenSSL. The - # only architecture that generally supports execution of 32bit is x86_64 and - # thus that is the only one handled here. - callPackageNodejs = - if prev.stdenv.buildPlatform.isx86_64 && prev.stdenv.is32bit - then prev.buildPackages.pkgsi686Linux.callPackage - else prev.callPackage; -in { +final: prev: { luks-hw-password = final.callPackage ./luks-hw-password {}; dev = final.callPackage ./dev { devShells = import ../devShells final; @@ -22,7 +13,7 @@ in { stardict-en-cz = final.callPackage ./stardict/en-cz.nix {}; stardict-de-cz = final.callPackage ./stardict/de-cz.nix {}; stardict-cz = final.callPackage ./stardict/cz.nix {}; - sdcv-unwrapped = final.callPackage ./sdcv {}; + sdcv-unwrapped = prev.sdcv; sdcv = final.callPackage ./stardict/wrapper.nix {stardict = final.sdcv-unwrapped;}; lorem-text = final.callPackage ./lorem-text {}; @@ -30,20 +21,35 @@ in { bigclown-leds = final.callPackage ./bigclown-leds {}; dodo = final.callPackage ./dodo {}; + astroid = prev.astroid.overrideAttrs (oldAttrs: { + version = "240629"; + src = final.fetchFromGitHub { + owner = "astroidmail"; + repo = "astroid"; + rev = "65acc24048a57039753cf2326dbfca6b608b91d1"; + hash = "sha256-PXFVOaCgBHNUg0aCJD1TL/ulzjz9v70/jW5ManUPcHw="; + }; + patches = []; + buildInputs = oldAttrs.buildInputs ++ [final.webkitgtk_4_1]; + meta = oldAttrs.meta // {broken = false;}; + }); # nixpkgs patches zigbee2mqtt = prev.zigbee2mqtt.overrideAttrs { npmInstallFlags = ["--no-optional"]; # Fix cross build }; - nodejs_18 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v18.nix") {}; - nodejs-slim_18 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v18.nix") {enableNpm = false;}; - nodejs_20 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v20.nix") {}; - nodejs-slim_20 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v20.nix") {enableNpm = false;}; - nodejs_22 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v22.nix") {}; - nodejs-slim_22 = callPackageNodejs (prev.path + "/pkgs/development/web/nodejs/v22.nix") {enableNpm = false;}; + ubootRaspberryPi3_btrfs = prev.buildUBoot { + defconfig = "rpi_3_defconfig"; + extraConfig = '' + CONFIG_FS_BTRFS=y + CONFIG_CMD_BTRFS=y + ''; + extraMeta.platforms = ["aarch64-linux"]; + filesToInstall = ["u-boot.bin"]; + }; # Older version of packages - flac1_3 = prev.flac.overrideAttrs { + flac134 = prev.flac.overrideAttrs { version = "1.3.4"; src = final.fetchurl { url = "http://downloads.xiph.org/releases/flac/flac-1.3.4.tar.xz"; diff --git a/pkgs/dodo/default.nix b/pkgs/dodo/default.nix index 3491377..2984de3 100644 --- a/pkgs/dodo/default.nix +++ b/pkgs/dodo/default.nix @@ -6,14 +6,14 @@ }: python3Packages.buildPythonApplication { pname = "dodo"; - version = "240917"; + version = "250313"; pyproject = true; src = fetchFromGitHub { owner = "akissinger"; repo = "dodo"; - rev = "194fb49523c7851bedc3ca8c11adea04830fb28d"; - hash = "sha256-iGMIeGGqJnp0xi4q1Dpev4dkSp0tdFGu0U/MGeHrtcY="; + rev = "c108dd93aa637ef757fa8d86cf210d37093f03ec"; + hash = "sha256-tRLaPOh2y87zcBKTtZazfsNzJnLUXRaAEMEMND7XnNY="; }; build-system = with python3Packages; [ diff --git a/pkgs/sdcv/default.nix b/pkgs/sdcv/default.nix deleted file mode 100644 index 8817270..0000000 --- a/pkgs/sdcv/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - lib, - stdenv, - fetchFromGitHub, - cmake, - pkg-config, - gettext, - zlib, - glib, - pcre, - readline, -}: -stdenv.mkDerivation (attrs: { - pname = "sdcv"; - version = "0.5.5"; - - src = fetchFromGitHub { - owner = "Dushistov"; - repo = attrs.pname; - rev = "v${attrs.version}"; - hash = "sha256-EyvljVXhOsdxIYOGTzD+T16nvW7/RNx3DuQ2OdhjXJ4="; - }; - - nativeBuildInputs = [cmake pkg-config gettext]; - buildInputs = [zlib glib pcre readline]; - makeFlags = "sdcv lang"; - - meta = with lib; { - description = "Console version of Stardict program"; - homepage = "https://dushistov.github.io/sdcv/"; - license = licenses.gpl2; - }; -}) |