Compare commits

..
8 Commits
64 changed files with 143 additions and 1878 deletions
+5 -5
View File
@@ -4,7 +4,7 @@ keys:
- &comfy-station age1xkmnvzus6fhundn4c0f6hyuwrj0f0m7x3hxtuhnez6cecr6m032qalw308 - &comfy-station age1xkmnvzus6fhundn4c0f6hyuwrj0f0m7x3hxtuhnez6cecr6m032qalw308
- &monolith age1clh2c489j7mx94aqr44u6k2cx5axqme9rlshqu9l2mcynluwhq6qwn0sv0 - &monolith age1clh2c489j7mx94aqr44u6k2cx5axqme9rlshqu9l2mcynluwhq6qwn0sv0
creation_rules: creation_rules:
- path_regex: secrets/[^/]+$ - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
- *jonas - *jonas
@@ -12,24 +12,24 @@ creation_rules:
- *comfy-station - *comfy-station
- *monolith - *monolith
- path_regex: secrets/jonas/[^/]+$ - path_regex: secrets/jonas/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
- *jonas - *jonas
- path_regex: secrets/comfy-station/[^/]+$ - path_regex: secrets/comfy-station/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
- *comfy-station - *comfy-station
- *jonas - *jonas
- path_regex: secrets/harbor/[^/]+$ - path_regex: secrets/harbor/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
- *harbor - *harbor
- *jonas - *jonas
- path_regex: secrets/monolith/[^/]+$ - path_regex: secrets/monolith/[^/]+\.(yaml|json|env|ini)$
key_groups: key_groups:
- age: - age:
- *monolith - *monolith
Generated
+43 -424
View File
@@ -1,82 +1,5 @@
{ {
"nodes": { "nodes": {
"cachix": {
"inputs": {
"devenv": [
"wordle-solver",
"crate2nix"
],
"flake-compat": [
"wordle-solver",
"crate2nix"
],
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1767714506,
"narHash": "sha256-WaTs0t1CxhgxbIuvQ97OFhDTVUGd1HA+KzLZUZBhe0s=",
"owner": "cachix",
"repo": "cachix",
"rev": "894c649f0daaa38bbcfb21de64be47dfa7cd0ec9",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "latest",
"repo": "cachix",
"type": "github"
}
},
"crate2nix": {
"inputs": {
"cachix": "cachix",
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_2",
"nix-test-runner": "nix-test-runner",
"nixpkgs": [
"wordle-solver",
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1782759041,
"narHash": "sha256-2577vxyoBa8+ZRiXr3CuPtOuEtPRYsFPSZuEc/KI/80=",
"owner": "nix-community",
"repo": "crate2nix",
"rev": "5e1ecfd2d15b34ec90c2e51fdffbe8116595a767",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "crate2nix",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": [
"wordle-solver",
"crate2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768818222,
"narHash": "sha256-460jc0+CZfyaO8+w8JNtlClB2n4ui1RbHfPTLkpwhU8=",
"owner": "numtide",
"repo": "devshell",
"rev": "255a2b1725a20d060f566e4755dbf571bbbb5f76",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -84,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781152676, "lastModified": 1773889306,
"narHash": "sha256-RxWs5ND31KzTG7wvMM+PMfUjyNpmIEr999lqNARaM5o=", "narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "ff8702b4de27f72b4c78573dfb89ec74e36abdf1", "rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -125,11 +48,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1788840136, "lastModified": 1775707386,
"narHash": "sha256-ej5jnQIfjbw4wwPzy8Y4ntG9F3asdF6YBkLqpYeGUxc=", "narHash": "sha256-1tNzciseW4+JQTSUxCVz1UhW//LuosLb9f3liFOhrL8=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "555b23e68256c5abfb8a85a385231830d1d7ad1f", "rev": "c1db0626fa993fe4e773d4c83df4cbb9684e434f",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@@ -155,30 +78,16 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"revCount": 69,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": { "flake-parts": {
"inputs": { "inputs": {
"nixpkgs-lib": "nixpkgs-lib" "nixpkgs-lib": "nixpkgs-lib"
}, },
"locked": { "locked": {
"lastModified": 1788450739, "lastModified": 1775087534,
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=", "narHash": "sha256-91qqW8lhL7TLwgQWijoGBbiD4t7/q75KTi8NxjVmSmA=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993", "rev": "3107b77cd68437b9a76194f0f7f9c55f2329ca5b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -187,123 +96,6 @@
"type": "github" "type": "github"
} }
}, },
"flake-parts_2": {
"inputs": {
"nixpkgs-lib": [
"wordle-solver",
"crate2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
"locked": {
"lastModified": 1785627969,
"narHash": "sha256-4dtXQk/NMePegK/nWp5NSeuZKLATItOq61lpEvmXqGw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "427bf4bd9435fdf21321c8cc628c24efc14c0f7a",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"wordle-solver",
"crate2nix",
"cachix",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"wordle-solver",
"crate2nix",
"cachix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1765404074,
"narHash": "sha256-+ZDU2d+vzWkEJiqprvV5PR26DVFN2vgddwG5SnPZcUM=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "2d6f58930fbcd82f6f9fd59fb6d13e37684ca529",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"wordle-solver",
"crate2nix",
"cachix",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"wordle-solver",
"crate2nix",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -311,27 +103,27 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1788642154, "lastModified": 1775425411,
"narHash": "sha256-sPpQFVaFTDqO/4vvCAhuAhqTgqN/ygu+9eJcs5eB0js=", "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "fd0956c99c41ae3c13a73a638f1f7e963aebc4ab", "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-26.05", "ref": "release-25.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"import-tree": { "import-tree": {
"locked": { "locked": {
"lastModified": 1788467110, "lastModified": 1773693634,
"narHash": "sha256-ljEMTXP/rH0tOvDzc9gzwww6KcHRPRnEHzd9lK48V7s=", "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=",
"owner": "vic", "owner": "vic",
"repo": "import-tree", "repo": "import-tree",
"rev": "eb1b52eaecc57f7c136d07ae8a93e724dfecac46", "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -349,11 +141,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1788840747, "lastModified": 1775703388,
"narHash": "sha256-nZ6Yt+8u5NhPSP46VcYXEcu4cJpeOiR/K+lfyk3COVA=", "narHash": "sha256-q2OBj67rcfKFSuUB1OApJdseF75T7cOpUjPJkZCYN7M=",
"owner": "Infinidoge", "owner": "Infinidoge",
"repo": "nix-minecraft", "repo": "nix-minecraft",
"rev": "1e6052f5ecebddbbb2d372e0fe6f1b7bc4b95a9e", "rev": "fffe21e97a9cb0a1ebcf1baa17a423d2517bb1f7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -362,32 +154,13 @@
"type": "github" "type": "github"
} }
}, },
"nix-test-runner": {
"flake": false,
"locked": {
"lastModified": 1588761593,
"narHash": "sha256-FKJykltAN/g3eIceJl4SfDnnyuH2jHImhMrXS2KvGIs=",
"owner": "stoeffel",
"repo": "nix-test-runner",
"rev": "c45d45b11ecef3eb9d834c3b6304c05c49b06ca2",
"type": "github"
},
"original": {
"owner": "stoeffel",
"repo": "nix-test-runner",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": { "locked": {
"lastModified": 1788860136, "lastModified": 1775490113,
"narHash": "sha256-MhPMOFV4pVkygWEbQ8t1De/uQ9cWF1u++tRe2L5tG48=", "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "62173785b9a18c78b4a15aca2623d02bceb9d077", "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -399,39 +172,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1767892417, "lastModified": 1775595990,
"narHash": "sha256-8bW3q88CEg2u4hSP66Vf4lpbLonHz7hqDNBMcCY7E9U=", "narHash": "sha256-OEf7YqhF9IjJFYZJyuhAypgU+VsRB5lD4DuiMws5Ltc=",
"rev": "3497aa5c9457a9d88d71fa93a4a8368816fbeeba", "owner": "nixos",
"type": "tarball", "repo": "nixpkgs",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.05pre924538.3497aa5c9457/nixexprs.tar.xz" "rev": "4e92bbcdb030f3b4782be4751dc08e6b6cb6ccf2",
"type": "github"
}, },
"original": { "original": {
"type": "tarball", "owner": "nixos",
"url": "https://channels.nixos.org/nixos-unstable/nixexprs.tar.xz" "ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
} }
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1788057806, "lastModified": 1774748309,
"narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=", "narHash": "sha256-+U7gF3qxzwD5TZuANzZPeJTZRHS29OFQgkQ2kiTJBIQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c", "rev": "333c4e0545a6da976206c74db8773a1645b5870a",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-lib_2": {
"locked": {
"lastModified": 1785031560,
"narHash": "sha256-OmshNvn2vupOFpYinLUu+1Dnpu4n7Q5N3ggGVNHpkUI=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "0e79af5e3d4dcfcd676ab5ba3f95d2e3352e078c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -442,11 +203,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1788752844, "lastModified": 1775423009,
"narHash": "sha256-VaWGJ6+cIYN2erfSecbRV+4ljI185Ty2wUrXyvQbgOw=", "narHash": "sha256-vPKLpjhIVWdDrfiUM8atW6YkIggCEKdSAlJPzzhkQlw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dc5d91f840324650bac8c379428c7037a416959a", "rev": "68d8aa3d661f0e6bd5862291b5bb263b2a6595c9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -456,66 +217,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1788807765,
"narHash": "sha256-J9oC0bKnkXUrMegqRTXVkyDFJ0gn2U/Qpoo9HgGMQmA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "93108a538f079596c9a16c72cf03e9322782b6dd",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1765186076,
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": [
"wordle-solver",
"crate2nix",
"flake-compat"
],
"gitignore": "gitignore_2",
"nixpkgs": [
"wordle-solver",
"crate2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1769069492,
"narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
@@ -526,32 +227,9 @@
"import-tree": "import-tree", "import-tree": "import-tree",
"nix-minecraft": "nix-minecraft", "nix-minecraft": "nix-minecraft",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix"
"spicetify-nix": "spicetify-nix",
"wordle-solver": "wordle-solver"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"wordle-solver",
"nixpkgs"
]
},
"locked": {
"lastModified": 1787022047,
"narHash": "sha256-wNlYM/obKOkkRELrOfto1JT5CRANR6hB/RjOELp223U=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "b32685dd7c5a965aa8273adb7ddaf7f5b40d0faa",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -561,11 +239,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1788337237, "lastModified": 1775682595,
"narHash": "sha256-gkSH8VUtCo6hnysNmb9DbTuDepH2t5pv+QWjP75xKAk=", "narHash": "sha256-0E9PohY/VuESLq0LR4doaH7hTag513sDDW5n5qmHd1Q=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "fbf759290e0cb0a98dfc813a4eb7d53ad1dacb57", "rev": "d2e8438d5886e92bc5e7c40c035ab6cae0c41f76",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -574,27 +252,6 @@
"type": "github" "type": "github"
} }
}, },
"spicetify-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_2"
},
"locked": {
"lastModified": 1788683578,
"narHash": "sha256-bERpuakmPAC2b36zgXy6OXh+SkZUjbaV+vV2sPmm6p8=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "a4ef43fb13e3615f36e5a0935aabe8cc29363dc9",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "spicetify-nix",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@@ -609,44 +266,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"wordle-solver": {
"inputs": {
"crate2nix": "crate2nix",
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1788884686,
"narHash": "sha256-wl0NGoryP5veIaRn6azmejz1JsTbwHlBU/MT/icTKQ4=",
"ref": "refs/heads/main",
"rev": "a827bd5eef0354f7e4fdca57383971ff6008b5d3",
"revCount": 42,
"type": "git",
"url": "https://git.jroeger.de/jonas/wordle-solver-rs"
},
"original": {
"type": "git",
"url": "https://git.jroeger.de/jonas/wordle-solver-rs"
}
} }
}, },
"root": "root", "root": "root",
+2 -6
View File
@@ -2,13 +2,13 @@
description = "Nixos config flake"; description = "Nixos config flake";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05"; nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts"; flake-parts.url = "github:hercules-ci/flake-parts";
import-tree.url = "github:vic/import-tree"; import-tree.url = "github:vic/import-tree";
nixos-hardware.url = "github:NixOS/nixos-hardware/master"; nixos-hardware.url = "github:NixOS/nixos-hardware/master";
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-26.05"; url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
sops-nix = { sops-nix = {
@@ -27,10 +27,6 @@
}; };
nix-minecraft.url = "github:Infinidoge/nix-minecraft"; nix-minecraft.url = "github:Infinidoge/nix-minecraft";
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
wordle-solver.url = "git+https://git.jroeger.de/jonas/wordle-solver-rs";
wordle-solver.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = inputs @ { outputs = inputs @ {
-1
View File
@@ -9,7 +9,6 @@
hive.doom.enable = true; hive.doom.enable = true;
hive.doom.asDefaultEditor = true; hive.doom.asDefaultEditor = true;
hive.doom.enableCopilot = true; hive.doom.enableCopilot = true;
hive.doom.enableLtexPlus = true;
hive.doom.withNixPkgs = true; hive.doom.withNixPkgs = true;
hive.doom.withShellPkgs = true; hive.doom.withShellPkgs = true;
hive.doom.withCXXPkgs = true; hive.doom.withCXXPkgs = true;
+1 -1
View File
@@ -36,7 +36,7 @@ in {
programs.borgmatic.backups = { programs.borgmatic.backups = {
workspaces = { workspaces = {
location = { location = {
sourceDirectories = ["${config.xdg.userDirs.extraConfig.WORKSPACES}"]; sourceDirectories = ["${config.xdg.userDirs.extraConfig.XDG_WORKSPACES_DIR}"];
repositories = [repo]; repositories = [repo];
excludeHomeManagerSymlinks = true; excludeHomeManagerSymlinks = true;
extraConfig = { extraConfig = {
+3 -4
View File
@@ -46,12 +46,11 @@
}; };
}; };
xdg.userDirs.enable = true; xdg.userDirs.enable = true;
xdg.userDirs.setSessionVariables = true;
xdg.userDirs.createDirectories = true; xdg.userDirs.createDirectories = true;
xdg.userDirs.extraConfig = { xdg.userDirs.extraConfig = {
WORKSPACES = "${config.home.homeDirectory}/Workspaces"; XDG_WORKSPACES_DIR = "${config.home.homeDirectory}/Workspaces";
NEXTCLOUD = "${config.home.homeDirectory}/Nextcloud"; XDG_NEXTCLOUD_DIR = "${config.home.homeDirectory}/Nextcloud";
NOTES = "${config.home.homeDirectory}/Notes"; XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes";
}; };
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
+3 -4
View File
@@ -52,12 +52,11 @@
}; };
}; };
xdg.userDirs.enable = true; xdg.userDirs.enable = true;
xdg.userDirs.setSessionVariables = true;
xdg.userDirs.createDirectories = true; xdg.userDirs.createDirectories = true;
xdg.userDirs.extraConfig = { xdg.userDirs.extraConfig = {
WORKSPACES = "${config.home.homeDirectory}/Workspaces"; XDG_WORKSPACES_DIR = "${config.home.homeDirectory}/Workspaces";
NEXTCLOUD = "${config.home.homeDirectory}/Nextcloud"; XDG_NEXTCLOUD_DIR = "${config.home.homeDirectory}/Nextcloud";
NOTES = "${config.home.homeDirectory}/Notes"; XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes";
}; };
# This value determines the Home Manager release that your configuration is # This value determines the Home Manager release that your configuration is
+1 -1
View File
@@ -11,7 +11,7 @@
./configuration.nix ./configuration.nix
inputs.sops-nix.homeManagerModules.sops inputs.sops-nix.homeManagerModules.sops
# self.homeModules.layan self.homeModules.layan
self.homeModules.nextcloud-client self.homeModules.nextcloud-client
self.homeModules.firefox self.homeModules.firefox
self.homeModules.kdeconnect self.homeModules.kdeconnect
+1
View File
@@ -42,6 +42,7 @@
image-raw-processing = true; image-raw-processing = true;
video-editing-light = true; video-editing-light = true;
}; };
hive.ntsync.enable = true;
# system packages # system packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
-1
View File
@@ -27,7 +27,6 @@
self.nixosModules.firefox self.nixosModules.firefox
self.nixosModules.kdeconnect self.nixosModules.kdeconnect
self.nixosModules.ntsync self.nixosModules.ntsync
self.nixosModules.follow-hive-nixpkgs
]; ];
}; };
} }
+2 -36
View File
@@ -29,14 +29,6 @@
owner = config.hive.gotify-instance.user; owner = config.hive.gotify-instance.user;
key = "adminPassword"; key = "adminPassword";
}; };
sops.secrets.matrix-hs-secret = {
format = "binary";
sopsFile = ../../secrets/harbor/hs_ed25519_secret_key;
};
sops.secrets.hidden-matrix-hostname = {
sopsFile = ../../secrets/harbor/hidden-matrix.yaml;
key = "hostname";
};
# gc settings and binary caches # gc settings and binary caches
nix = { nix = {
@@ -90,20 +82,6 @@
hive.borg-server.repositories.comfy-station.ssh_public_key = builtins.readFile (../../static/keys + "/borg-jonas@comfy-station.pub"); hive.borg-server.repositories.comfy-station.ssh_public_key = builtins.readFile (../../static/keys + "/borg-jonas@comfy-station.pub");
hive.wg.server.enable = true; hive.wg.server.enable = true;
hive.wg.server.privateKeyFile = config.sops.secrets.wg-priv.path; hive.wg.server.privateKeyFile = config.sops.secrets.wg-priv.path;
hive.matrix.enable = true;
hive.matrix.hiddenServiceSecret = config.sops.secrets.matrix-hs-secret.path;
hive.matrix.hiddenServiceHostnameSopsKey = config.sops.secrets.hidden-matrix-hostname.name;
hive.calibre.enable = true;
hive.calibre.instanceFQDN = "calibre.jroeger.de";
hive.calibre.libraries = ["Rote Bücher" "Bürgerliche Bücher" "Brain Maxxing" "Technik" "Wissenschaft oder so" "Dokumente"];
hive.korrosync.enable = true;
hive.korrosync.localPort = 7416;
hive.korrosync.instanceFQDN = "korrosync.jroeger.de";
hive.wallabag.enable = true;
hive.wallabag.localPort = 39184;
hive.wallabag.instanceFQDN = "wallabag.jroeger.de";
hive.wordle-solver.enable = true;
hive.wordle-solver.instanceFQDN = "wordle-solver.jroeger.de";
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
@@ -119,6 +97,7 @@
boot.loader.grub.version = 2; boot.loader.grub.version = 2;
boot.kernelParams = [ boot.kernelParams = [
"net.ifnames=0" # ensure iface is called eth0 "net.ifnames=0" # ensure iface is called eth0
"ip=173.249.42.252::173.249.42.1:255.255.255.0:harbor:eth0:none:8.8.8.8"
]; ];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
networking = { networking = {
@@ -137,19 +116,6 @@
# Temporary ssh server for disk unlock # Temporary ssh server for disk unlock
boot.initrd = { boot.initrd = {
availableKernelModules = ["virtio_pci"]; availableKernelModules = ["virtio_pci"];
systemd.enable = true;
systemd.users.root.shell = "/usr/bin/systemd-tty-ask-password-agent";
systemd.network = {
enable = true;
networks."10-eth" = {
matchConfig.Name = "eth0";
networkConfig = {
Address = "173.249.42.252/24";
Gateway = "173.249.42.1";
};
routes = [{Gateway = "173.249.42.1";}];
};
};
network = { network = {
enable = true; enable = true;
ssh = { ssh = {
@@ -159,7 +125,7 @@
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602" "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602"
]; ];
hostKeys = ["/etc/secrets/initrd/ssh_host_rsa_key"]; hostKeys = ["/etc/secrets/initrd/ssh_host_rsa_key"];
shell = "/usr/bin/systemd-tty-ask-password-agent"; shell = "/bin/cryptsetup-askpass";
}; };
}; };
}; };
-5
View File
@@ -20,11 +20,6 @@
self.nixosModules.minecraft-server self.nixosModules.minecraft-server
self.nixosModules.borg-server self.nixosModules.borg-server
self.nixosModules.wireguard-server self.nixosModules.wireguard-server
self.nixosModules.matrix
self.nixosModules.calibre
self.nixosModules.korrosync-hive
self.nixosModules.wallabag
self.nixosModules.wordle-solver
]; ];
}; };
} }
+1 -3
View File
@@ -76,8 +76,6 @@
}; };
hive.ntsync.enable = true; hive.ntsync.enable = true;
services.flatpak.enable = true;
# system packages # system packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
age age
@@ -174,7 +172,7 @@
boot.plymouth.enable = true; boot.plymouth.enable = true;
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = true;
boot.supportedFilesystems = ["ntfs"]; boot.supportedFilesystems = ["ntfs"];
boot.kernelPackages = pkgs.linuxPackages_7_1; boot.kernelPackages = pkgs.linuxPackages_latest;
# Configure console keymap # Configure console keymap
console.keyMap = "de"; console.keyMap = "de";
-2
View File
@@ -33,8 +33,6 @@
self.nixosModules.kdeconnect self.nixosModules.kdeconnect
self.nixosModules.spotify-shortcuts self.nixosModules.spotify-shortcuts
self.nixosModules.ntsync self.nixosModules.ntsync
self.nixosModules.spicetify
self.nixosModules.follow-hive-nixpkgs
]; ];
}; };
} }
+9 -8
View File
@@ -43,8 +43,7 @@
]; ];
}; };
environment.systemPackages = with pkgs.kdePackages; [dolphin kio-extras]; environment.systemPackages = with pkgs; [spaceFM];
services.gvfs.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
programs.hyprlock.enable = true; programs.hyprlock.enable = true;
security.pam.services.hyprlock = {}; security.pam.services.hyprlock = {};
@@ -229,7 +228,6 @@
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
configType = "hyprlang";
settings = { settings = {
exec-once = [ exec-once = [
"${pkgs.wpaperd}/bin/wpaperd &" "${pkgs.wpaperd}/bin/wpaperd &"
@@ -358,13 +356,15 @@
layerrule = [ layerrule = [
# blur for wlogout # blur for wlogout
"blur on, match:namespace logout_dialog" "blur, logout_dialog"
# blur for swaync # blur for swaync
"blur on, match:namespace swaync-control-center" "blur, swaync-control-center"
"blur on, match:namespace swaync-notification-window" "blur, swaync-notification-window"
"ignore_alpha 0.5, match:namespace swaync-control-center" "ignorezero, swaync-control-center"
"ignore_alpha 0.5, match:namespace swaync-notification-window" "ignorezero, swaync-notification-window"
"ignorealpha 0.5, swaync-control-center"
"ignorealpha 0.5, swaync-notification-window"
]; ];
decoration = { decoration = {
@@ -399,6 +399,7 @@
dwindle = { dwindle = {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = "yes"; # you probably want this preserve_split = "yes"; # you probably want this
}; };
+2 -5
View File
@@ -30,15 +30,13 @@
pkgs.tela-circle-icon-theme pkgs.tela-circle-icon-theme
]; ];
qt.enable = true; qt.enable = false;
qt.style.name = "kvantum"; qt.style.name = "kvantum";
qt.style.package = pkgs.kdePackages.qtstyleplugin-kvantum; qt.style.package = pkgs.kdePackages.qtstyleplugin-kvantum;
qt.platformTheme.name = "gtk"; qt.platformTheme.name = "gtk";
home.sessionVariables = {
QT_STYLE_OVERRIDE = "kvantum";
};
systemd.user.settings.Manager.DefaultEnvironment = lib.mapAttrs (_: lib.mkDefault) { systemd.user.settings.Manager.DefaultEnvironment = lib.mapAttrs (_: lib.mkDefault) {
QT_STYLE_OVERRIDE = "kvantum"; QT_STYLE_OVERRIDE = "kvantum";
QT_QPA_PLATFORMTHEME = "gtk";
}; };
xdg.configFile."Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} { xdg.configFile."Kvantum/kvantum.kvconfig".text = lib.generators.toINI {} {
General.theme = "LayanDark"; General.theme = "LayanDark";
@@ -47,7 +45,6 @@
# add nord like gtk theme # add nord like gtk theme
gtk = { gtk = {
enable = true; enable = true;
gtk4.theme = null;
cursorTheme = { cursorTheme = {
package = pkgs.unstable.layan-cursors; package = pkgs.unstable.layan-cursors;
name = "Layan-cursors"; name = "Layan-cursors";
+14 -1
View File
@@ -1,5 +1,10 @@
{ {
flake.homeModules.waybar = {pkgs, ...}: { flake.homeModules.waybar = {
config,
lib,
pkgs,
...
}: {
programs.waybar.enable = true; programs.waybar.enable = true;
programs.waybar.systemd.enable = true; programs.waybar.systemd.enable = true;
@@ -7,6 +12,14 @@
services.network-manager-applet.enable = true; services.network-manager-applet.enable = true;
services.pasystray.enable = true; services.pasystray.enable = true;
# is already fixed on latest home-manager rev
systemd.user.services = {
blueman-applet.Unit.After = lib.mkForce ["graphical-session.target"];
network-manager-applet.Unit.After = lib.mkForce ["graphical-session.target"];
pasystray.Unit.After = lib.mkForce ["graphical-session.target"];
waybar.Unit.After = lib.mkForce ["graphical-session.target"];
};
home.packages = with pkgs; [ home.packages = with pkgs; [
pulsemixer pulsemixer
pavucontrol pavucontrol
+2 -15
View File
@@ -70,7 +70,6 @@
++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs) ++ lib.optionals cfg.withCXXPkgs (cfg.overrideCXXPkgs default-cxx-pkgs)
++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs) ++ lib.optionals cfg.withPythonPkgs (cfg.overridePythonPkgs default-python-pkgs)
++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server ++ lib.optional cfg.enableCopilot pkgs.unstable.copilot-language-server
++ lib.optional cfg.enableLtexPlus pkgs.ltex-ls-plus
++ default-core-pkgs; ++ default-core-pkgs;
doom-socket-name = "main"; doom-socket-name = "main";
wrapped-emacs = pkgs.symlinkJoin { wrapped-emacs = pkgs.symlinkJoin {
@@ -115,7 +114,6 @@
asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)"; asDefaultEditor = lib.mkEnableOption "set the EDITOR variable to use the current emacs server (graphical/non-graphical)";
enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs"; enableCopilot = lib.mkEnableOption "Enable Copilot in Doom Emacs";
enableTidal = lib.mkEnableOption "Enable TidalCycles"; enableTidal = lib.mkEnableOption "Enable TidalCycles";
enableLtexPlus = lib.mkEnableOption "Enable grammar checks via LtexPlus";
withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withLatexPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path"; withShellPkgs = lib.mkEnableOption "Enable shell packages in doom path";
withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path"; withNixPkgs = lib.mkEnableOption "Enable LaTeX packages in doom path";
@@ -234,11 +232,6 @@
enable = cfg.enableCopilot; enable = cfg.enableCopilot;
source = ./static/config.d/copilot.el; source = ./static/config.d/copilot.el;
}; };
"doom-config/config.d/ltex-plus.el" = {
enable = cfg.enableLtexPlus;
source = ./static/config.d/ltex-plus.el;
onChange = "${doom-setup} sync --force -u -e";
};
"doom-config/packages/treesit-docgen.el" = { "doom-config/packages/treesit-docgen.el" = {
source = ./static/packages/treesit-docgen.el; source = ./static/packages/treesit-docgen.el;
}; };
@@ -255,11 +248,6 @@
source = ./static/packages.d/copilot.el; source = ./static/packages.d/copilot.el;
onChange = "${doom-setup} sync --force -u -e"; onChange = "${doom-setup} sync --force -u -e";
}; };
"doom-config/packages.d/ltex-plus.el" = {
enable = cfg.enableLtexPlus;
source = ./static/packages.d/ltex-plus.el;
onChange = "${doom-setup} sync --force -u -e";
};
"doom-config/packages.d/tidal.el" = { "doom-config/packages.d/tidal.el" = {
enable = cfg.enableTidal; enable = cfg.enableTidal;
source = ./static/packages.d/tidal.el; source = ./static/packages.d/tidal.el;
@@ -267,9 +255,8 @@
}; };
"doom-emacs" = { "doom-emacs" = {
source = builtins.fetchGit { source = builtins.fetchGit {
url = "https://github.com/doomemacs/core"; url = "https://github.com/doomemacs/doomemacs";
rev = "d1986c0181aadcbfe0d118fd1ae713fac8da7fab"; rev = "a0d6aac43fc94def29c98826e2f0088bcb703d13";
submodules = true;
}; };
onChange = "${doom-setup} --force sync -u -e"; onChange = "${doom-setup} --force sync -u -e";
}; };
@@ -1,4 +0,0 @@
(use-package! lsp-ltex-plus
:defer t
:init
(lsp-ltex-plus-enable-for-modes))
+9 -38
View File
@@ -115,15 +115,6 @@
:config :config
(setq graphviz-dot-indent-width 4)) (setq graphviz-dot-indent-width 4))
(after! svelte-ts-mode
(add-to-list 'auto-mode-alist '("\\.svelte\\'" . svelte-ts-mode))
(add-hook! 'svelte-ts-mode-hook
(setq-local lsp-format-buffer-on-save t)))
(after! typescript-ts-mode
(add-hook! 'typescript-ts-mode-hook
(setq-local lsp-format-buffer-on-save t)))
(after! auctex (after! auctex
(add-hook! 'LaTeX-mode-hook 'lsp) (add-hook! 'LaTeX-mode-hook 'lsp)
(map! :map LaTeX-mode-map (map! :map LaTeX-mode-map
@@ -166,21 +157,13 @@
(set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode nix-ts-mode)) (set-formatter! 'alejandra '("alejandra" "--quiet") :modes '(nix-mode nix-ts-mode))
;; nixd ;; nixd
(after! lsp-mode (after! 'lsp-mode
(lsp-register-client (lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection "nixd") (make-lsp-client :new-connection (lsp-stdio-connection "nixd")
:major-modes '(nix-mode) :major-modes '(nix-mode)
:priority 0 :priority 0
:server-id 'nixd))) :server-id 'nixd)))
;; typescript-language-server
(after! lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection '("typescript-language-server" "--stdio"))
:major-modes '(typescript-ts-mode typescript-mode)
:priority 0
:server-id 'typescript-language-server)))
;;Use TS-modes ;;Use TS-modes
(after! treesit (after! treesit
(load! "packages/treesit-docgen.el")) (load! "packages/treesit-docgen.el"))
@@ -262,30 +245,18 @@
(haskell-ts-mode . lsp-deferred) (haskell-ts-mode . lsp-deferred)
(c-or-c++-ts-mode . lsp-deferred) (c-or-c++-ts-mode . lsp-deferred)
(bash-ts-mode . lsp-deferred) (bash-ts-mode . lsp-deferred)
(json-ts-mode . lsp-deferred) (json-ts-mode . lsp-deferred)))
(typescript-ts-mode . lsp-deferred)
(svelte-ts-mode . lsp-deferred)
(svelte-mode . lsp-deferred)
))
(use-package! majutsu (after! jj-mode
:config (map! :leader (map! :leader
(:prefix ("j" . "majutsu") (:prefix ("j" . "Jujutsu")
:desc "Log" "j" #'majutsu-log :desc "Log" "j" #'jj-log
:desc "Describe" "d" #'jj-describe
:desc "Abandon" "a" #'jj-abandon
:desc "New" "n" #'jj-new
))) )))
;; Org-mode custom property for remaining effort (not-done-items)
(defun my-org-columns-collect-open-effort (property)
"Return PROPERTY only or unfinished entries."
(if (member (org-get-todo-state) org-not-done-keywords)
(org-entry-get nil property)
""))
(setq org-columns-summary-types
'(("remaining:" org-columns--summary-sum-times my-org-columns-collect-open-effort)))
(setq auto-mode-alist (cons '("\\.smt$" . smtlib-mode) auto-mode-alist)) (setq auto-mode-alist (cons '("\\.smt$" . smtlib-mode) auto-mode-alist))
(autoload 'smtlib-mode "smtlib" "Major mode for SMTLIB" t) (autoload 'smtlib-mode "smtlib" "Major mode for SMTLIB" t)
+3 -3
View File
@@ -83,8 +83,8 @@
:checkers :checkers
syntax ; tasing you for every semicolon you forget syntax ; tasing you for every semicolon you forget
;;(spell +flyspell) ; tasing you for misspelling mispelling (spell +flyspell) ; tasing you for misspelling mispelling
;;grammar ; tasing grammar mistake every you make grammar ; tasing grammar mistake every you make
:tools :tools
;;ansible ;;ansible
@@ -144,7 +144,7 @@
;;idris ; a language you can depend on ;;idris ; a language you can depend on
(json +tree-sitter) ; At least it ain't XML (json +tree-sitter) ; At least it ain't XML
(java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome (java +lsp +tree-sitter) ; the poster child for carpal tunnel syndrome
(javascript +lsp +tree-sitter) ; all(hope(abandon(ye(who(enter(here)))))) ;;javascript ; all(hope(abandon(ye(who(enter(here))))))
;;julia ; a better, faster MATLAB ;;julia ; a better, faster MATLAB
;;kotlin ; a better, slicker Java(Script) ;;kotlin ; a better, slicker Java(Script)
(latex +lsp +latexmk) ; writing papers in Emacs has never been so fun (latex +lsp +latexmk) ; writing papers in Emacs has never been so fun
@@ -1 +0,0 @@
(package! lsp-ltex-plus)
+1 -6
View File
@@ -83,18 +83,13 @@
) )
:pin "71f67971bc5eb2974ae2f738512c8f09f0822527") :pin "71f67971bc5eb2974ae2f738512c8f09f0822527")
(package! svelte-ts-mode
:recipe (:host github
:repo "leafOfTree/svelte-ts-mode"
:branch "main")
:pin "b1b5b4a5b09493063394a51d0f0f022645a18444")
(package! pdf-tools) (package! pdf-tools)
(package! eww) (package! eww)
(package! pandoc-mode) (package! pandoc-mode)
(package! tramp) (package! tramp)
(package! graphviz-dot-mode) (package! graphviz-dot-mode)
(package! rainbow-delimiters) (package! rainbow-delimiters)
(package! majutsu :recipe (:host github :repo "0WD0/majutsu")) (package! jj-mode :recipe (:host github :repo "bolivier/jj-mode.el"))
(let ((package-dir (expand-file-name "packages.d" doom-user-dir))) (let ((package-dir (expand-file-name "packages.d" doom-user-dir)))
(when (file-directory-p package-dir) (when (file-directory-p package-dir)
+1 -2
View File
@@ -4,10 +4,9 @@
programs.firefox.nativeMessagingHosts.packages = [pkgs.passff-host]; programs.firefox.nativeMessagingHosts.packages = [pkgs.passff-host];
}; };
flake.homeModules.firefox = {config, ...}: { flake.homeModules.firefox = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
configPath = "${config.home.homeDirectory}/.mozilla/firefox";
# Default profile # Default profile
profiles.jonas = { profiles.jonas = {
-39
View File
@@ -1,39 +0,0 @@
{
inputs,
self,
...
}: {
flake.overlays.spicetify = final: prev: {
spicetifyPkgs = inputs.spicetify-nix.legacyPackages.${final.stdenv.hostPlatform.system};
};
flake.nixosModules.spicetify-overlay = {
nixpkgs.overlays = [
self.overlays.spicetify
];
};
flake.nixosModules.spicetify = {pkgs, ...}: {
imports = [
self.nixosModules.spicetify-overlay
inputs.spicetify-nix.nixosModules.default
];
programs.spicetify = {
enable = true;
theme = pkgs.spicetifyPkgs.themes.bloom;
enabledCustomApps = with pkgs.spicetifyPkgs.apps; [
historyInSidebar
newReleases
];
enabledExtensions = with pkgs.spicetifyPkgs.extensions; [
betterGenres
catJamSynced
sortPlay
wikify
];
};
};
}
-122
View File
@@ -1,122 +0,0 @@
{
flake.nixosModules.calibre = {
config,
lib,
pkgs,
...
}: let
cfg = config.hive.calibre;
calibre = config.services.calibre-server.package;
calibre-user = config.services.calibre-server.user;
calibre-group = config.services.calibre-server.group;
calibre-users = "${cfg.basePath}/users.sqlite";
libraries = map (n: "${cfg.basePath}/${n}") cfg.libraries;
ensure-libs = lib.concatStrings (
map (l: ''
if [ ! -d "${l}" ]; then
echo "Creating Calibre libraray directory \"${l}\""
mkdir "${l}"
chown ${calibre-user}:${calibre-group} "${l}"
fi
if [ ! -f "${l}/metadata.db" ]; then
echo "Creating Calibre libraray metadata \"${l}\""
${calibre}/bin/calibredb --with-library="${l}" list
chown -R ${calibre-user}:${calibre-group} "${l}"
fi
'')
libraries
);
in {
options.hive.calibre = {
enable = lib.mkEnableOption "Enable calibre server";
localPort = lib.mkOption {
type = lib.types.int;
example = 8080;
default = 45988;
description = "Specify the local port calibre server uses.";
};
basePath = lib.mkOption {
type = lib.types.path;
example = "/var/calibre-server";
default = "/srv/calibre-server";
description = "The base-path for calibre data";
};
instanceFQDN = lib.mkOption {
type = lib.types.singleLineStr;
example = "calibre.example.com";
description = "Fully qualified domain name of the calibre instance";
};
libraries = lib.mkOption {
type = lib.types.listOf lib.types.singleLineStr;
example = ["library1" "private" "foo"];
default = ["library"];
description = "A list of libraries to serve. (Must be present in the base-path, will be initialized if not existing)";
};
};
config = lib.mkIf cfg.enable {
services.calibre-server = {
enable = true;
auth.enable = true;
auth.mode = "basic";
auth.userDb = "${calibre-users}";
host = "::1";
port = cfg.localPort;
inherit libraries;
};
# Fallback server with only 403
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
default = true;
locations."/".return = 403;
forceSSL = true;
enableACME = true;
};
# Virtual host for calibre
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://[::1]:${toString cfg.localPort}";
extraConfig = ''
client_max_body_size 150M;
'';
};
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "calibre-manager-users" ''
sudo -u ${calibre-user} ${calibre}/bin/calibre-server --userdb=${calibre-users} --manage-users
'')
];
systemd.services.calibre-init = {
description = "Initialize Calibre databases";
wantedBy = ["calibre-server.service"];
before = ["calibre-server.service"];
serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "calibre-init" ''
if [ ! -d ${cfg.basePath} ]; then
echo "Creating Calibre base directory \"${cfg.basePath}\""
mkdir ${cfg.basePath}
chown ${calibre-user}:${calibre-group} ${cfg.basePath}
fi
${ensure-libs}
'';
RemainAfterExit = true;
};
};
};
};
}
+8 -26
View File
@@ -2,7 +2,6 @@
flake.nixosModules.gitea-instance = { flake.nixosModules.gitea-instance = {
config, config,
lib, lib,
pkgs,
... ...
}: let }: let
cfg = config.hive.gitea-instance; cfg = config.hive.gitea-instance;
@@ -40,7 +39,6 @@
passwordFile = cfg.databasePasswordFile; passwordFile = cfg.databasePasswordFile;
}; };
settings = { settings = {
repository.ENABLE_PUSH_CREATE_USER = true;
server.PROTOCOL = "http+unix"; server.PROTOCOL = "http+unix";
server.ROOT_URL = "https://${cfg.instanceFQDN}/"; server.ROOT_URL = "https://${cfg.instanceFQDN}/";
server.DOMAIN = cfg.instanceFQDN; server.DOMAIN = cfg.instanceFQDN;
@@ -62,14 +60,6 @@
enableACME = true; enableACME = true;
locations."/" = { locations."/" = {
proxyPass = "http://unix:/run/gitea/gitea.sock"; proxyPass = "http://unix:/run/gitea/gitea.sock";
extraConfig = ''
client_max_body_size 1G;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
'';
}; };
}; };
@@ -86,25 +76,13 @@
}; };
# act_runner # act_runner
services.gitea-actions-runner.instances.nixoshost = { services.gitea-actions-runner = lib.mkIf cfg.nativeRunner {
enable = cfg.nativeRunner; instances.nixos-host = {
enable = true;
name = "nixos-host-runner"; name = "nixos-host-runner";
url = "https://${cfg.instanceFQDN}"; url = "https://${cfg.instanceFQDN}";
tokenFile = "/var/lib/gitea-registration/nixos-host"; tokenFile = "/var/lib/gitea-registration/nixos-host";
hostPackages = with pkgs; [
bash
coreutils
curl
gawk
gitMinimal
gnused
nix
nodejs
skopeo
wget
];
labels = ["nixos:host"]; labels = ["nixos:host"];
settings = { settings = {
@@ -113,9 +91,13 @@
}; };
}; };
}; };
systemd.services.gitea-runner-nixoshost = lib.mkIf cfg.nativeRunner { };
systemd.services.gitea-runner-nixos-host = lib.mkIf cfg.nativeRunner {
after = ["gitea-runner-gen-token.service"]; after = ["gitea-runner-gen-token.service"];
requires = ["gitea-runner-gen-token.service"]; requires = ["gitea-runner-gen-token.service"];
serviceConfig.Environment = ''
PATH=/run/current-system/sw/bin:/usr/bin:/bin
'';
}; };
systemd.services.gitea-runner-gen-token = lib.mkIf cfg.nativeRunner { systemd.services.gitea-runner-gen-token = lib.mkIf cfg.nativeRunner {
wantedBy = ["multi-user.target"]; wantedBy = ["multi-user.target"];
@@ -1,46 +0,0 @@
{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
cacert,
...
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "korrosync";
version = "0.4.0";
# Use patched version until https://github.com/szaffarano/korrosync/pull/131 is merged
src = fetchFromGitHub {
owner = "inaltoasinistra";
repo = "korrosync";
rev = "df735653b100071ce9303f3b7b71cb235189ba5d";
hash = "sha256-8Gp5i7pN7gXjGESHNO5h4P1mWXEtR8jAh2Y39Mcur6g=";
};
buildInputs = [
openssl
pkg-config
];
nativeBuildInputs = [
pkg-config
];
checkFlags = [
"--skip"
"cli_should_start_server"
];
cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock";
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
NIX_SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
meta = {
description = "KOReader Sync Server";
license = lib.licenses.mit;
homepage = "https://github.com/szaffarano/korrosync";
};
})
@@ -1,162 +0,0 @@
{self, ...}: {
flake.overlays.korrosync = final: prev: {
korrosync = final.callPackage ./_derivation.nix {};
};
flake.nixosModules.korrosync-overlay = {
nixpkgs.overlays = [self.overlays.korrosync];
};
perSystem = {pkgs, ...}: {
packages.korrosync = pkgs.callPackage ./_derivation.nix {};
};
flake.nixosModules.korrosync = {
config,
lib,
pkgs,
...
}: let
cfg = config.services.korrosync;
in {
options.services.korrosync = {
enable = lib.mkEnableOption "Enable KOrrosync service";
enable-service = lib.mkOption {
type = lib.types.bool;
description = "Enable korrosync service";
example = true;
default = true;
};
enable-configured-binary = lib.mkEnableOption "Put a korrosync binary into system-packges using the set configuration options.";
data-path = lib.mkOption {
type = lib.types.path;
description = "The path where korrosync saves it's data.";
example = "/var/lib/korrosync";
default = "/var/lib/korrosync";
};
user = lib.mkOption {
type = lib.types.singleLineStr;
description = "The user under with korrosync runs.";
example = "korrosync";
default = "korrosync";
};
group = lib.mkOption {
type = lib.types.singleLineStr;
description = "The group under with korrosync runs.";
example = "korrosync";
default = "korrosync";
};
listen-address = lib.mkOption {
description = "The listen address of the korrosync server";
type = lib.types.singleLineStr;
example = "0.0.0.0";
default = "127.0.0.1";
};
listen-port = lib.mkOption {
description = "The listen port of the korrosync server";
type = lib.types.int;
example = 3000;
default = 3000;
};
rate-limit-per-second = lib.mkOption {
type = lib.types.int;
description = "Rate limit replenishment rate per second";
example = 2;
default = 2;
};
rate-limit-burst-size = lib.mkOption {
type = lib.types.int;
description = "Maximum burst size before rate limiting";
example = 5;
default = 5;
};
};
imports = [
self.nixosModules.korrosync-overlay
];
config = lib.mkIf cfg.enable {
# User setup
users.users = lib.mkIf (cfg.user == "korrosync") {
korrosync = {
description = "Korrosync service";
useDefaultShell = true;
group = cfg.group;
isSystemUser = true;
};
};
users.groups = lib.mkIf (cfg.group == "korrosync") {
korrosync = {};
};
# Pre-configured binary
environment.systemPackages = lib.mkIf cfg.enable-configured-binary [
(let
envVars = config.systemd.services.korrosync.environment;
in
pkgs.writeShellScriptBin "korrosync"
''
export KORROSYNC_DB_PATH="${envVars.KORROSYNC_DB_PATH}"
export KORROSYNC_SERVER_ADDRESS="${envVars.KORROSYNC_SERVER_ADDRESS}"
export KORROSYNC_USE_TLS="${envVars.KORROSYNC_USE_TLS}"
export KORROSYNC_RATE_LIMIT_PER_SECOND="${envVars.KORROSYNC_RATE_LIMIT_PER_SECOND}"
export KORROSYNC_RATE_LIMIT_BURST_SIZE="${envVars.KORROSYNC_RATE_LIMIT_BURST_SIZE}"
exec ${pkgs.korrosync}/bin/korrosync "$@"
'')
];
# base service
systemd.services.korrosync = {
enable = cfg.enable-service;
description = "Korrosync - KOReader Sync Server";
after = ["network.target"];
wantedBy = ["multi-user.target"];
environment = {
KORROSYNC_DB_PATH = "${cfg.data-path}/db.redb";
KORROSYNC_SERVER_ADDRESS = "${cfg.listen-address}:${toString cfg.listen-port}";
KORROSYNC_USE_TLS = "false";
KORROSYNC_RATE_LIMIT_PER_SECOND = "${toString cfg.rate-limit-per-second}";
KORROSYNC_RATE_LIMIT_BURST_SIZE = "${toString cfg.rate-limit-burst-size}";
};
serviceConfig = {
Type = "simple";
User = cfg.user;
Group = cfg.group;
ExecStart = "${pkgs.korrosync}/bin/korrosync serve";
Restart = "on-failure";
RestartSec = "5s";
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = true;
ReadWritePaths = cfg.data-path;
};
};
# Initialize data directory
systemd.services.korrosync-init = {
description = "Initialize Korrosync databases";
wantedBy = ["korrosync.service"];
before = ["korrosync.service"];
serviceConfig = {
Type = "oneshot";
ExecStart = pkgs.writeShellScript "korrosync-init" ''
if [ ! -d ${cfg.data-path} ]; then
echo "Creating Korrosync base directory \"${cfg.data-path}\""
mkdir ${cfg.data-path}
chmod 770 ${cfg.data-path}
chown ${cfg.user}:${cfg.group} ${cfg.data-path}
fi
'';
RemainAfterExit = true;
};
};
};
};
}
@@ -1,65 +0,0 @@
{self, ...}: {
flake.nixosModules.korrosync-hive = {
config,
lib,
...
}: let
cfg = config.hive.korrosync;
in {
options.hive.korrosync = {
enable = lib.mkEnableOption "Enable korrosync server";
localPort = lib.mkOption {
type = lib.types.int;
example = 8080;
default = 45988;
description = "Specify the local port korrosync server uses.";
};
instanceFQDN = lib.mkOption {
type = lib.types.singleLineStr;
example = "calibre.example.com";
description = "Fully qualified domain name of the korrosync instance";
};
blockUserCreation = lib.mkOption {
type = lib.types.bool;
description = "Disallow /user/create endpoint via nginx";
example = true;
default = true;
};
};
imports = [
self.nixosModules.korrosync
];
config = lib.mkIf cfg.enable {
services.korrosync = {
enable = true;
listen-port = cfg.localPort;
listen-address = "127.0.0.1";
data-path = "/srv/korrosync";
enable-configured-binary = true;
};
# Fallback server with only 403
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
default = true;
locations."/".return = 403;
forceSSL = true;
enableACME = true;
};
# Virtual host for korrosync
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
forceSSL = true;
enableACME = true;
locations =
{
"/".proxyPass = "http://127.0.0.1:${toString cfg.localPort}";
}
// (lib.optionalAttrs cfg.blockUserCreation {
"/users/create".return = 403;
});
};
};
};
}
-126
View File
@@ -1,126 +0,0 @@
{
flake.nixosModules.matrix = {
config,
lib,
...
}: let
cfg = config.hive.matrix;
ketesa-web-root = fetchTarball {
url = "https://github.com/etkecc/ketesa/releases/download/v1.4.0/ketesa.tar.gz";
sha256 = "sha256:0za0rddcbxn2ra4xlykn7v8b4j0ddyacivyzp91m80r071ds1dk7";
};
in {
options.hive.matrix = {
enable = lib.mkEnableOption "Enable matrix server (synapse)";
localPort = lib.mkOption {
type = lib.types.int;
default = 8474;
description = "The internal port of the synapse server";
};
ketesaLocalPort = lib.mkOption {
type = lib.types.int;
default = 8475;
description = "The internal port of the ketesa virtual host";
};
hiddenServiceHostnameSopsKey = lib.mkOption {
type = lib.types.str;
description = "The sops key of the secret containing the hostname of the hidden service";
};
hiddenServiceSecret = lib.mkOption {
type = lib.types.path;
description = "The file containing the hidden service's secret";
};
};
config = lib.mkIf cfg.enable {
# Database setup
services.postgresql = {
enable = true;
};
# Hidden service
services.tor = {
enable = true;
enableGeoIP = false;
relay.onionServices.matrix = {
secretKey = cfg.hiddenServiceSecret;
version = 3;
map = [
{
port = 80;
target = {
addr = "[::1]";
port = cfg.localPort;
};
}
{
port = 8080;
target = {
addr = "127.0.0.1";
port = cfg.ketesaLocalPort;
};
}
];
};
};
# Virtual host for ketesa
services.nginx.virtualHosts."ketesa-localhost" = {
listen = [
{
addr = "127.0.0.1";
port = cfg.ketesaLocalPort;
}
];
forceSSL = false;
enableACME = false;
root = "${ketesa-web-root}";
};
# Secret hostname for matrix-synapse
sops.templates."hidden-matrix-synapse".owner = "matrix-synapse";
sops.templates."hidden-matrix-synapse".content = ''
server_name: "${config.sops.placeholder.${cfg.hiddenServiceHostnameSopsKey}}"
public_baseurl: "http://${config.sops.placeholder.${cfg.hiddenServiceHostnameSopsKey}}"
'';
# Synapse
services.matrix-synapse = {
enable = true;
settings.listeners = [
{
port = cfg.localPort;
bind_addresses = ["::1"];
type = "http";
tls = false;
x_forwarded = false;
resources = [
{
names = [
"client"
];
compress = false;
}
];
}
];
settings = {
enable_registration = true;
registration_requires_token = true;
report_stats = false;
federation_domain_whitelist = [];
federation_ip_range_blacklist = ["0.0.0.0/0"];
matrix_static_files_file_matrix_support_enabled = true;
};
extraConfigFiles = [
config.sops.templates."hidden-matrix-synapse".path
];
};
};
};
}
@@ -36,7 +36,7 @@
servers.bmc3 = lib.optionalAttrs cfg.enable { servers.bmc3 = lib.optionalAttrs cfg.enable {
enable = true; enable = true;
autoStart = false; autoStart = true;
package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;}; package = pkgs."${loader}Servers".${serverVersion}.override {inherit loaderVersion;};
jvmOpts = modpack.variables.JAVA_ARGS; jvmOpts = modpack.variables.JAVA_ARGS;
symlinks = { symlinks = {
@@ -45,18 +45,6 @@
serverProperties = { serverProperties = {
motd = "Woher kommt der Stein?"; motd = "Woher kommt der Stein?";
white-list = true; white-list = true;
server-port = 25566;
};
};
servers.vanilla = lib.optionalAttrs cfg.enable {
enable = true;
autoStart = false;
package = pkgs.vanillaServers.vanilla-26_1_2;
jvmOpts = "-Xms4G -Xmx4G";
serverProperties = {
motd = "Woher kommt der Stein?";
white-list = true;
server-port = 25565;
}; };
}; };
}; };
+1 -1
View File
@@ -33,7 +33,7 @@
services.nextcloud = { services.nextcloud = {
# Instance # Instance
enable = true; enable = true;
package = pkgs.nextcloud34; package = pkgs.nextcloud33;
hostName = cfg.instanceFQDN; hostName = cfg.instanceFQDN;
https = cfg.ssl; https = cfg.ssl;
configureRedis = true; configureRedis = true;
-53
View File
@@ -1,53 +0,0 @@
{
flake.nixosModules.wallabag = {
config,
lib,
...
}: let
cfg = config.hive.wallabag;
in {
options.hive.wallabag = {
enable = lib.mkEnableOption "Enable wallabag service";
localPort = lib.mkOption {
type = lib.types.int;
example = 8080;
default = 8088;
description = "Specify the local port wallabag server uses.";
};
instanceFQDN = lib.mkOption {
type = lib.types.singleLineStr;
example = "wallabag.example.com";
description = "Fully qualified domain name of the wallabag instance";
};
};
config = lib.mkIf cfg.enable {
# Fallback server with only 403
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
default = true;
locations."/".return = 403;
forceSSL = true;
enableACME = true;
};
# Virtual host for wallabag
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://127.0.0.1:${toString cfg.localPort}";
};
virtualisation.oci-containers.containers.wallabag = {
image = "wallabag/wallabag:latest";
ports = ["127.0.0.1:${toString cfg.localPort}:80"];
volumes = [
"wallabag-data:/var/www/wallabag/data"
"wallabag-images:/var/www/wallabag/web/assets/images"
];
environment = {
"SYMFONY__ENV__DOMAIN_NAME" = "https://${cfg.instanceFQDN}";
};
};
};
};
}
-36
View File
@@ -1,36 +0,0 @@
{inputs, ...}: {
flake.nixosModules.wordle-solver = {
config,
lib,
pkgs,
...
}: let
cfg = config.hive.wordle-solver;
in {
options.hive.wordle-solver = {
enable = lib.mkEnableOption "Enable wordle-solver site";
instanceFQDN = lib.mkOption {
type = lib.types.singleLineStr;
example = "wordle-solver.example.com";
description = "Fully qualified domain name of the wordle-solver host";
};
};
config = lib.mkIf cfg.enable {
# Fallback server with only 403
services.nginx.virtualHosts.${config.networking.domain} = lib.mkDefault {
default = true;
locations."/".return = 403;
forceSSL = true;
enableACME = true;
};
# Virtual host for wordle-solver
services.nginx.virtualHosts."${cfg.instanceFQDN}" = {
forceSSL = true;
enableACME = true;
root = "${inputs.wordle-solver.packages.${pkgs.system}.wordle-solver-web}/";
};
};
};
}
-1
View File
@@ -26,7 +26,6 @@
# Zsh # Zsh
programs.zsh = { programs.zsh = {
enable = true; enable = true;
dotDir = "${config.xdg.configHome}/zsh";
enableCompletion = true; enableCompletion = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
+5 -13
View File
@@ -4,14 +4,10 @@ declare -rA presets=(
[davinci-resolve]="-c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le" [davinci-resolve]="-c:v dnxhd -profile:v dnxhr_hq -pix_fmt yuv422p -c:a pcm_s16le"
[instagram]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)':flags=lanczos -r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k" [instagram]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)':flags=lanczos -r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k"
[insta-4k]="-r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k" [insta-4k]="-r 30 -c:v libx264 -profile:v high -level 4.1 -pix_fmt yuv420p -preset slow -crf 18 -bf 2 -g 15 -keyint_min 15 -x264-params \"open-gop=0:cabac=1:b-pyramid=none\" -movflags +faststart -c:a aac -b:a 96k"
[network-hevc]="-c:v libx265 -preset slow -crf 26 -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -pix_fmt yuv422p -c:a copy" [storage-hevc]="-c:v libx265 -preset slower -crf 18 -pix_fmt yuv420p10le -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -c:a copy"
[storage-hevc-faster]="-c:v libx265 -preset slow -crf 26 -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -c:a copy" [storage-av1]="-c:v libsvtav1 -preset 6 -crf 28 -pix_fmt yuv420p -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy"
[storage-hevc]="-c:v libx265 -preset slower -crf 22 -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -c:a copy" [storage-av1-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libsvtav1 -preset 6 -crf 28 -pix_fmt yuv420p -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy"
[storage-av1]="-c:v libsvtav1 -preset 6 -crf 28 -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy" [storage-av1-nvenc]="-c:v av1_nvenc -cq 28 -preset slow -pix_fmt yuv420p10le -c:a copy"
[storage-av1-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libsvtav1 -preset 6 -crf 28 -g 240 -svtav1-params tune=0:aq-mode=2 -c:a copy"
[storage-av1-nvenc]="-c:v av1_nvenc -cq 28 -preset slow -c:a copy"
[network-hevc]="-c:v libx265 -preset slower -crf 22 -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -pix_fmt yuv420p -c:a aac -b:a 128k"
[network-hevc-faster]="-c:v libx265 -preset slow -crf 26 -x265-params aq-mode=3:aq-strength=1.0:psy-rd=1.8:psy-rdoq=1.0 -pix_fmt yuv420p -c:a aac -b:a 128k"
[network]="-c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k" [network]="-c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k"
[network-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k" [network-1080p]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 22 -pix_fmt yuv420p -c:a aac -b:a 128k"
[whatsapp]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 30 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 25 -g 50 -c:a aac -b:a 160k -r:a 44100" [whatsapp]="-vf scale='if(gte(iw/ih,1),1920,-1)':'if(gte(iw/ih,1),-1,1920)' -c:v libx264 -preset slow -crf 30 -profile:v baseline -level 3.0 -pix_fmt yuv420p -r 25 -g 50 -c:a aac -b:a 160k -r:a 44100"
@@ -21,14 +17,10 @@ declare -rA containers=(
[davinci-resolve]="mov" [davinci-resolve]="mov"
[instagram]="mp4" [instagram]="mp4"
[insta-4k]="mp4" [insta-4k]="mp4"
[network-hevc]="mp4" [storage-hevc]="mkv"
[storage-hevc-faster]="mp4"
[storage-hevc]="mp4"
[storage-av1]="mkv" [storage-av1]="mkv"
[storage-av1-1080p]="mkv" [storage-av1-1080p]="mkv"
[storage-av1-nvenc]="mkv" [storage-av1-nvenc]="mkv"
[network-hevc]="mp4"
[network-hevc-faster]="mp4"
[network]="mp4" [network]="mp4"
[network-1080p]="mp4" [network-1080p]="mp4"
[whatsapp]="mp4" [whatsapp]="mp4"
-1
View File
@@ -1 +0,0 @@
use flake ../../#follow-hive-nixpkgs --show-trace
@@ -1,8 +0,0 @@
{python3Packages}:
with python3Packages;
buildPythonApplication {
name = "follow-hive-nixpkgs";
pyproject = true;
build-system = [setuptools];
src = ./.;
}
@@ -1,15 +0,0 @@
{pkgs ? import <nixpkgs> {}}: let
drv = pkgs.callPackage ./_derivation.nix {};
in
pkgs.mkShell {
packages = [
pkgs.pyright
pkgs.black
];
inputsFrom = [drv];
shellHook = ''
export PYTHONPATH="$PYTHONPATH:$(pwd)"
'';
}
@@ -1,26 +0,0 @@
{self, ...}: {
flake.overlays.follow-hive-nixpkgs = final: prev: {
follow-hive-nixpkgs = final.callPackage ./_derivation.nix {};
};
perSystem = {pkgs, ...}: {
packages.follow-hive-nixpkgs = pkgs.callPackage ./_derivation.nix {};
devShells.follow-hive-nixpkgs = import ./_shell.nix {inherit pkgs;};
};
flake.nixosModules.follow-hive-nixpkgs-overlay = {
nixpkgs.overlays = [
self.overlays.follow-hive-nixpkgs
];
};
flake.nixosModules.follow-hive-nixpkgs = {pkgs, ...}: {
imports = [
self.nixosModules.follow-hive-nixpkgs-overlay
];
environment.systemPackages = [
pkgs.follow-hive-nixpkgs
];
};
}
@@ -1,5 +0,0 @@
from follow_hive_nixpkgs.app import app
def main():
app.main()
@@ -1,30 +0,0 @@
from follow_hive_nixpkgs.config import Config
from follow_hive_nixpkgs.lock import loadNixpkgs, writeNixpkgs
from pathlib import Path
import json
def dry_run(c: Config):
s = loadNixpkgs(c.source_lock, c.source_nixpkgs)
t = loadNixpkgs(c.target_lock, "nixpkgs")
print(
f"Would change {c.target_lock} from:\n{json.dumps(t, indent=2)} to:\n{json.dumps(s, indent=2)}\nWith values from {c.source_lock}"
)
def main():
c = Config.load(
[
Path.home() / ".config/follow-hive-nixpkgs/config.json",
Path("/etc/follow-hive-nixpkgs/config.json"),
]
)
print(c)
if c.dry:
dry_run(c)
else:
s = loadNixpkgs(c.source_lock, c.source_nixpkgs)
writeNixpkgs(s, c.target_lock)
@@ -1,76 +0,0 @@
from dataclasses import dataclass
from pathlib import Path
from typing import Self
import argparse
import sys
import json
@dataclass
class Config:
source_lock: Path = Path.home() / ".hive/flake.lock"
source_nixpkgs: str = "nixpkgs-unstable"
target_lock: Path = Path.cwd() / "flake.lock"
dry: bool = False
@classmethod
def load(cls, paths: list[Path]) -> Self:
c = cls()
args = cls.argparse()
c.dry = args.dry
# Target lock can only be set via args
if args.target_lock:
c.target_lock = Path(args.target_lock)
# We do not need to read config files.
if args.source_lock:
c.source_lock = Path(args.source_lock)
return c
# Check if source_lock is set somewhere
for p in paths:
if not p.exists():
continue
with p.open(mode="r") as f:
cfg = json.load(f)
c.source_lock = Path(cfg["source_lock"])
c.source_nixpkgs = cfg["source_nixpkgs"]
break
return c
@staticmethod
def argparse() -> argparse.Namespace:
args = argparse.ArgumentParser()
args.add_argument(
"--source_lock",
type=Path,
default=None,
required=False,
help="The flake.lock file to read nixpkgs from.",
)
args.add_argument(
"--source_nixpkgs",
type=Path,
default=None,
required=False,
help="The nixpkgs in flake.lock to use.",
)
args.add_argument(
"--target_lock",
type=Path,
default=None,
required=False,
help="The flake.lock file to write nixpkgs to. Use CWD/flake.lock if unset",
)
args.add_argument(
"--dry",
action="store_true",
help="Only show what would be done.",
)
return args.parse_args(sys.argv[1:])
@@ -1,34 +0,0 @@
import json
from pathlib import Path
import sys
def loadNixpkgs(source: Path, nixpkgs: str) -> dict:
if not source.exists():
print(f"{source} does not exist.")
sys.exit(1)
with source.open(mode="r") as f:
src = json.load(f)
if nixpkgs not in src["nodes"]:
print(f"There is no {nixpkgs} entry in {source}")
sys.exit(1)
return src["nodes"][nixpkgs]
def writeNixpkgs(nixpkgs: dict, target: Path):
if not target.exists():
print(f"{target} does not exist.")
sys.exit(1)
with target.open(mode="r+") as f:
tgt = json.load(f)
if "nixpkgs" not in tgt["nodes"]:
print(f"There is no nixpkgs entry in {target}")
sys.exit(1)
tgt["nodes"]["nixpkgs"] = nixpkgs
f.seek(0)
json.dump(tgt, f, indent=2)
f.truncate()
@@ -1,14 +0,0 @@
#!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name="follow_hive_nixpkgs",
version="1.0",
packages=find_packages(),
entry_points={
"console_scripts": [
"follow-hive-nixpkgs=follow_hive_nixpkgs.app:main",
],
},
)
-26
View File
@@ -1,26 +0,0 @@
hostname: ENC[AES256_GCM,data:XRWNaOW738h9s1ppu6mopw6fEdrO7FoH0Tg3sqxFacMGvwIUonCaTm0dKtuqaToq8PNVlOE3Fkg74bMnzJ4=,iv:7iRalbTlrpoGXkNBm+StetvMBQyxtT0+ZYhMyBmipts=,tag:HQqnBP2Wj6I3bZTsoc27Yw==,type:str]
registration_secret: ENC[AES256_GCM,data:jPiq+n3c2o4lC1AnA6E=,iv:kTjRl3ipV8WSEXqLUgveUQtxq1QWeNIUN17o2xGS3dI=,tag:He2zK/jXRi4GOWisw4yjSA==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBaTWJ6djJqU0FtdUkvL2d6
SWt3NHBSUS9jQmlJVUVpaUZ3RGVJS0NCT2t3CkhvZzc3cUIyV3ZlT1ZVMUhFbDRE
RWtGTmxFQllnOTdJQ3ppNCtNcG9qbmcKLS0tIEdQNGlpQzBVU2c4alVrTUlmeXNZ
enRwUWl0Mzd6bmtRaDhkSlN0cGVRVG8KpJqu51CIRNK/nVLnUoFhPSyEWdW0TdqS
EUbDt71zKUEg4jHe+RqR9ThT2PSY3j03ZtkCYJ+aDIftWJrmpisUew==
-----END AGE ENCRYPTED FILE-----
recipient: age1wf0rq27v0n27zfy0es8ns3n25e2fdt063dgn68tt3f89rgrtu9csq4yhsp
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2TWZxVDEzckNjMTRrNXpF
RGtMUmVVMjdjbVNzWHBHc21aV1RQZGExSmlrCnNpbXZLUHhnaWxNbFNyUHVnM05F
cWVYSFhGbUF2ejlGRjNvRWp6SFFQMncKLS0tIGt2VXhmcGFGOTNlSzdCM3Y3NFNr
NStxbkN4VitSOUJwN3BxWjljM1QvUWMK4dgk/luLWp9qDGLOp9vy/xJco/dLvepz
SSXKtuT3UbbyWqjV6AJ/slzsVWbBQCnf4fkJKpBnlCiqprjaFehXFg==
-----END AGE ENCRYPTED FILE-----
recipient: age1expg8vyduf290pz7l4f3mjzvk9f0azfdn48pyjzs3m6p7v4qjq0qwtn36z
lastmodified: "2026-07-17T21:59:19Z"
mac: ENC[AES256_GCM,data:hZ14dzYNrXLr2FK7LPZoggYT36n0kD2gX1Nd3OM256+uJcvLV1jyqhGqeg+xWLVWC4R31YZlhHWQwA6ZcGrzgk/ograarGEgE1pDkG74+02fRyqcvC6SxvF8I1hq2FxDKzmAK89lXh7GTjiFmo9nqrkgA1aDTnogW0FHoJhVB+4=,iv:3cPMHQmpc+Lfu2GpiGKn9H9y1DNo0dhGfr8M5zzXvl8=,tag:6uhGRnBXN7Mnw6M1iULZCQ==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.2
-19
View File
@@ -1,19 +0,0 @@
{
"data": "ENC[AES256_GCM,data:1OXbkYAQrKgB49ex8UUOJXSirXD0Pjbm+IvUUniYLrCU8mItyuEvyuU3KNifn4ygkcm2pJ/oVbHpNtUvikxUWgrAVbc2t1U0GaEpTEEz/Si9g4uliJov4Qke+RZtz4Mh,iv:eReke55jV8N44YgNQEQffLPrk2+0DK0T9knPAFofW5Y=,tag:/653TVicd4StzEanhH9vFw==,type:str]",
"sops": {
"age": [
{
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvSk5XM1dIVXZvOHFzbzRo\nSzcvZEtWMGZtaTIxa1hRbUZXVFRodC9JRkdBCkJ3V0t4R2N4bEdTUFNrNU9vUGs1\nVjRGZ1VzZnBBYUpIL1JXcmNtNEhWM0UKLS0tIG5XbjdobkFrMGZXaHlaRFdwMWo0\nU21MNnlNbkk1TVcwbEtsUC81Q1JBbFUKkgAiQCIscxuuIG+7Aplx67L4G1F4pMhX\n3UUnR6uWlrhhYS84K/oRb5h7tqHcK2ZPNRQtf66+QYLeYnoQkw2fAA==\n-----END AGE ENCRYPTED FILE-----\n",
"recipient": "age1wf0rq27v0n27zfy0es8ns3n25e2fdt063dgn68tt3f89rgrtu9csq4yhsp"
},
{
"enc": "-----BEGIN AGE ENCRYPTED FILE-----\nYWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKRFdkTmlZc3RqVWwvMXJE\nZHVhNzNRWE1Wc3Y0M0VjR1M4R1pITlBBRTJrCllETlFiaEJGcHN0WW1jTnVldTZl\nV2ZxbUtBdytFeDFocXhVZ1Z3M01TWW8KLS0tIEpyeTJhMy95NnNaU3Fhbm91TVpu\nZjNjdmQwWGJ6YUlCRXh6Uk54eHlPUGMK5RGFrteIcon1CpVWddI0jftU3Q/SXGdz\nw9DwqtwkFTQpvRl2RGSJToipGwy91Pn3vubF+U77xEcPvtAhW8cIcQ==\n-----END AGE ENCRYPTED FILE-----\n",
"recipient": "age1expg8vyduf290pz7l4f3mjzvk9f0azfdn48pyjzs3m6p7v4qjq0qwtn36z"
}
],
"lastmodified": "2026-07-17T20:23:08Z",
"mac": "ENC[AES256_GCM,data:vwz/UOSbE3p57HzYx5Im2Zgq/W7qHh9SSX10k6sIzJJQHIKTSFJaA8qwYJIStz8ULyBw0CDcROun+1RBhdpUCBDNl/fVcXHVgk39ubBbLJji0z84eW1qZmg9/WAW7y/nAid1SH5TU95OwC1KCUxSLzDdUNuO2YdRwvQ10ST8QJo=,iv:9yJ0yP7SoNhuFJ9LR1BXileQTYNus/FwSKLZETXY8Hg=,tag:S8tXzl6DhN/u6wMjIsr13w==,type:str]",
"unencrypted_suffix": "_unencrypted",
"version": "3.13.2"
}
}
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env bash
# ^ make editor happy
#
# Use https://direnv.net/ to automatically load the dev shell.
#
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
watch_file nix/**
watch_file -- **/*.nix
# Adding files to git includes them in a flake
# But it is also a bit much reloading.
# watch_file .git/index .git/HEAD
use flake . --show-trace
-8
View File
@@ -1,8 +0,0 @@
*.aux
*.aux
*.fdb_latexmk
*.fls
*.pdf
*.sta
*.toc
.auctex-auto/
-12
View File
@@ -1,12 +0,0 @@
\documentclass[class=report, crop=false]{standalone}
\usepackage[subpreambles=true]{standalone}
\usepackage{import}
\usepackage{lipsum}
\begin{document}
\chapter{Chapter One}
\lipsum[25]
\end{document}
-14
View File
@@ -1,14 +0,0 @@
\documentclass[class=report, crop=false]{standalone}
\usepackage[subpreambles=true]{standalone}
\usepackage{import}
\usepackage{lipsum}
\begin{document}
\chapter{Chapter Two}
\lipsum[40]
\subimport{.}{tikz-fig}
\end{document}
@@ -1,22 +0,0 @@
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[
roundnode/.style={circle, draw=green!60, fill=green!5, very thick, minimum size=7mm},
squarednode/.style={rectangle, draw=red!60, fill=red!5, very thick, minimum size=5mm},
]
%Nodes
\node[squarednode] (maintopic) {2};
\node[roundnode] (uppercircle) [above=of maintopic] {1};
\node[squarednode] (rightsquare) [right=of maintopic] {3};
\node[roundnode] (lowercircle) [below=of maintopic] {4};
%Lines
\draw[->] (uppercircle.south) -- (maintopic.north);
\draw[->] (maintopic.east) -- (rightsquare.west);
\draw[->] (rightsquare.south) .. controls +(down:7mm) and +(right:7mm) .. (lowercircle.east);
\end{tikzpicture}
\end{document}
-71
View File
@@ -1,71 +0,0 @@
{
description = "LaTeX environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {
self,
flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} (top: {
imports = [];
flake = {};
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem = {
pkgs,
self',
...
}: let
tex = pkgs.texlive.combine {
inherit
(pkgs.texlive)
scheme-basic
latexmk
lipsum
standalone
filehook
svn-prov
import
pgf
luatex85
;
};
mainTexFileDrv = dir: file:
pkgs.stdenvNoCC.mkDerivation rec {
name = "${dir}/file";
src = self;
buildInputs = [tex];
phases = ["unpackPhase" "buildPhase" "installPhase"];
buildPhase = ''
export PATH="${pkgs.lib.makeBinPath (buildInputs ++ [pkgs.coreutils])}";
env \
HOME=$(mktemp -d) \
SOURCE_DATE_EPOCH=${toString self.lastModified} \
latexmk "${dir}/${file}.tex"
'';
installPhase = ''
mkdir -p $out
cp "${dir}/${file}.pdf" $out/
'';
};
in {
legacyPackages = pkgs;
packages.default = self'.packages.main;
packages.main = mainTexFileDrv "main";
packages.c01 = mainTexFileDrv "chapters" "01";
packages.c02 = mainTexFileDrv "chapters" "02";
devShells.default = pkgs.mkShellNoCC {
buildInputs = [tex pkgs.texlab];
};
};
});
}
-5
View File
@@ -1,5 +0,0 @@
# Use lualatex as the engine
$pdf_mode = 1;
$pdflatex = 'lualatex -interaction=nonstopmode %O %S';
$do_cd = 1;
$clean_ext = "sta"
-20
View File
@@ -1,20 +0,0 @@
\documentclass{report}
\usepackage[subpreambles=true]{standalone}
\usepackage{import}
\title{Standalone package example}
\author{The almightly Flake}
\date{\today}
\begin{document}
\maketitle
\tableofcontents
\import{chapters}{01}
\import{chapters}{02}
\end{document}
-2
View File
@@ -11,8 +11,6 @@ fi
watch_file nix/** watch_file nix/**
watch_file -- **/*.nix watch_file -- **/*.nix
watch_file Cargo.toml
watch_file rust-toolchain.toml
# Adding files to git includes them in a flake # Adding files to git includes them in a flake
# But it is also a bit much reloading. # But it is also a bit much reloading.
# watch_file .git/index .git/HEAD # watch_file .git/index .git/HEAD
+16 -27
View File
@@ -1,13 +1,13 @@
{ {
description = "Rust-Package"; description = "Rust-Hello";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-utils.url = "github:numtide/flake-utils";
crate2nix = { crate2nix = {
url = "github:nix-community/crate2nix"; url = "github:nix-community/crate2nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -15,25 +15,20 @@
}; };
outputs = inputs @ { outputs = inputs @ {
flake-parts,
crate2nix, crate2nix,
flake-utils,
nixpkgs,
rust-overlay, rust-overlay,
... ...
}: }:
flake-parts.lib.mkFlake {inherit inputs;} { flake-utils.lib.eachDefaultSystem (
systems = [ system: let
"aarch64-linux" # Overlay pkgs with rust-bin
"aarch64-darwin" overlays = [(import rust-overlay)];
"x86_64-darwin" pkgs = import nixpkgs {
"x86_64-linux" inherit system overlays;
]; };
perSystem = {
pkgs,
system,
self',
...
}: let
# Use rust-bin to generate the toolchain from rust-toolchain.toml # Use rust-bin to generate the toolchain from rust-toolchain.toml
rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml; rust-toolchain = pkgs.rust-bin.fromRustupToolchainFile ./rust-toolchain.toml;
@@ -53,20 +48,14 @@
inherit pkgs buildRustCrateForPkgs; inherit pkgs buildRustCrateForPkgs;
}; };
in { in {
# Overlay pkgs with rust-bin packages = rec {
_module.args.pkgs = import inputs.nixpkgs {
inherit system;
overlays = [(import rust-overlay)];
};
packages = {
hello = cargoNix.rootCrate.build; hello = cargoNix.rootCrate.build;
default = self'.packages.hello; default = hello;
}; };
devShells.default = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = [rust-toolchain]; buildInputs = [rust-toolchain];
}; };
}; }
}; );
} }
+1 -1
View File
@@ -1,3 +1,3 @@
[toolchain] [toolchain]
channel = "1.96.0" channel = "1.85.0"
components = [ "rustfmt", "rustc-dev", "rust-analyzer", "rust-src"] components = [ "rustfmt", "rustc-dev", "rust-analyzer", "rust-src"]
-19
View File
@@ -1,19 +0,0 @@
#!/usr/bin/env bash
# ^ make editor happy
#
# Use https://direnv.net/ to automatically load the dev shell.
#
if ! has nix_direnv_version || ! nix_direnv_version 3.0.4; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.4/direnvrc" "sha256-DzlYZ33mWF/Gs8DDeyjr8mnVmQGx7ASYqA5WlxwvBG4="
fi
watch_file nix/**
watch_file -- **/*.nix
watch_file uv.lock
# Adding files to git includes them in a flake
# But it is also a bit much reloading.
# watch_file .git/index .git/HEAD
use flake . --show-trace
-95
View File
@@ -1,95 +0,0 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
pyproject-nix.url = "github:pyproject-nix/pyproject.nix";
pyproject-nix.inputs.nixpkgs.follows = "nixpkgs";
uv2nix.url = "github:pyproject-nix/uv2nix";
uv2nix.inputs.pyproject-nix.follows = "pyproject-nix";
uv2nix.inputs.nixpkgs.follows = "nixpkgs";
pyproject-build-systems.url = "github:pyproject-nix/build-system-pkgs";
pyproject-build-systems.inputs.pyproject-nix.follows = "pyproject-nix";
pyproject-build-systems.inputs.uv2nix.follows = "uv2nix";
pyproject-build-systems.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs @ {
flake-parts,
pyproject-nix,
uv2nix,
pyproject-build-systems,
...
}: let
projectName = "YOUR_PROJECT_NAME"; # TODO: Fill in your project name
in
flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
perSystem = {
pkgs,
self',
...
}: let
workspace = uv2nix.lib.workspace.loadWorkspace {workspaceRoot = ./.;};
python = pkgs.lib.head (pyproject-nix.lib.util.filterPythonInterpreters {
inherit (workspace) requires-python;
inherit (pkgs) pythonInterpreters;
});
overlay = workspace.mkPyprojectOverlay {
sourcePreference = "wheel";
};
pythonBase = pkgs.callPackage pyproject-nix.build.packages {
inherit python;
};
pythonSet = pythonBase.overrideScope (
pkgs.lib.composeManyExtensions [
pyproject-build-systems.overlays.wheel
overlay
]
);
editableOverlay = workspace.mkEditablePyprojectOverlay {
root = "$REPO_ROOT";
};
editablePythonSet = pythonSet.overrideScope editableOverlay;
devvenv = editablePythonSet.mkVirtualEnv "${projectName}-dev-env" workspace.deps.all;
venv = pythonSet.mkVirtualEnv "${projectName}-env" workspace.deps.default;
in {
packages.default = self'.packages.${projectName};
packages.${projectName} = (pkgs.callPackage pyproject-nix.build.util {}).mkApplication {
inherit venv;
package = pythonSet.${projectName};
};
apps.default = self'.apps.${projectName};
apps.${projectName} = {
type = "app";
program = "${self'.packages.default}/bin/${projectName}";
};
devShells.default = pkgs.mkShell {
packages = [
devvenv
pkgs.uv
];
env = {
UV_NO_SYNC = "1";
UV_PYTHON = editablePythonSet.python.interpreter;
UV_PYTHON_DOWNLOADS = "never";
};
shellHook = ''
unset PYTHONPATH
export REPO_ROOT=$(git rev-parse --show-toplevel)
'';
};
devShells.uv = pkgs.mkShell {
packages = with pkgs; [python3 uv];
};
};
};
}
-6
View File
@@ -1,6 +0,0 @@
_: {
flake.templates.multifile-tex = {
path = ./_multifile_tex;
description = "A multifile tex report.";
};
}
-17
View File
@@ -1,17 +0,0 @@
_: {
flake.templates.uv-python = {
path = ./_uv-python;
description = "A simple uv2nix python project";
welcomeText = ''
# Setup your uv project first
- Run `nix develop .#uv`
- Run `uv init --app --packages`
- Run `uv lock`
- Edit `projectName` in flake.nix
# Start developing
- Run `direnv allow` or `nix develop`
- Add packages with `uv add --dev black pyright`
'';
};
}