mirror of
https://github.com/kmein/niveum
synced 2026-03-24 05:31:08 +01:00
Compare commits
3 Commits
263e13c8f8
...
acdc09efe0
| Author | SHA1 | Date | |
|---|---|---|---|
| acdc09efe0 | |||
| 13860cfb32 | |||
| 77d75b4d8b |
101
flake.lock
generated
101
flake.lock
generated
@@ -8,14 +8,15 @@
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
],
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701216516,
|
||||
"narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=",
|
||||
"lastModified": 1703433843,
|
||||
"narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "13ac9ac6d68b9a0896e3d43a082947233189e247",
|
||||
"rev": "417caa847f9383e111d1397039c9d4337d024bf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -173,11 +174,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673295039,
|
||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||
"lastModified": 1700795494,
|
||||
"narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||
"rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -264,7 +265,7 @@
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1692799911,
|
||||
@@ -297,7 +298,7 @@
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
"systems": "systems_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
@@ -315,7 +316,7 @@
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"inputs": {
|
||||
"systems": "systems_3"
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
@@ -408,11 +409,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702195709,
|
||||
"narHash": "sha256-+zRjWkm5rKqQ57PuLZ3JF3xi3vPMiOJzItb1m/43Cq4=",
|
||||
"lastModified": 1703367386,
|
||||
"narHash": "sha256-FMbm48UGrBfOWGt8+opuS+uLBLQlRfhiYXhHNcYMS5k=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "6761b8188b860f374b457eddfdb05c82eef9752f",
|
||||
"rev": "d5824a76bc6bb93d1dce9ebbbcb09a9b6abcc224",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -493,11 +494,11 @@
|
||||
"nixpkgs": "nixpkgs_5"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701854747,
|
||||
"narHash": "sha256-wn76tnMwQq6F0GucdDXhJIzevHu59/Yf57s+44qb9GI=",
|
||||
"lastModified": 1702906210,
|
||||
"narHash": "sha256-V/nSui5BkCg0zX6uaIeax/Jrl8voxd0r7FUQRMVrHN0=",
|
||||
"owner": "kmein",
|
||||
"repo": "menstruation.rs",
|
||||
"rev": "de721213c3385a79ec654c0edf5c15309f9cbbed",
|
||||
"rev": "1c8d6f4463fb746eb6c9855d2419cb4e8f48ac50",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -731,26 +732,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixinate_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1688141737,
|
||||
"narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=",
|
||||
"owner": "matthewcroughan",
|
||||
"repo": "nixinate",
|
||||
"rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "matthewcroughan",
|
||||
"repo": "nixinate",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1693636127,
|
||||
@@ -849,11 +830,11 @@
|
||||
},
|
||||
"nixpkgs-unstable_2": {
|
||||
"locked": {
|
||||
"lastModified": 1702200362,
|
||||
"narHash": "sha256-zIoN61aLoVIqV6iyXhuVSFUpH6dGCnCZ8IDhngZ4lVw=",
|
||||
"lastModified": 1703758609,
|
||||
"narHash": "sha256-00RUKgbe4Gigou38fV2vIAaTxpBXGd+sl1fyxyNS1M4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4d8e10e3124746ccd24c6c5dc849032aa7f5dc32",
|
||||
"rev": "2fcb2da9e88f6b7bbee426a5753bd0fd3fda228d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -926,11 +907,11 @@
|
||||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1701952659,
|
||||
"narHash": "sha256-TJv2srXt6fYPUjxgLAL0cy4nuf1OZD4KuA1TrCiQqg0=",
|
||||
"lastModified": 1703467016,
|
||||
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b4372c4924d9182034066c823df76d6eaf1f4ec4",
|
||||
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1082,11 +1063,11 @@
|
||||
},
|
||||
"nur_2": {
|
||||
"locked": {
|
||||
"lastModified": 1702197840,
|
||||
"narHash": "sha256-2ehZcpdU+4thpykyABbUF1cjDMocR+VM1YFMv5G4rc4=",
|
||||
"lastModified": 1703754831,
|
||||
"narHash": "sha256-8v8R0uWYEGePw7Gb7YRft7lPz8fAMV6cCD+rnKXj0cM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "5c3f53c97e6f52f7a771a5ccdcbe4b76c23d4675",
|
||||
"rev": "8df7eb39e347fe6cf2d172d3cda9a93cd9e6b6ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1164,11 +1145,11 @@
|
||||
},
|
||||
"retiolum_2": {
|
||||
"locked": {
|
||||
"lastModified": 1701943332,
|
||||
"narHash": "sha256-E7GpAlUcKDB4iXE1jh5s5xnU5m4Ew2TaC7gsuh3zsgw=",
|
||||
"lastModified": 1702906007,
|
||||
"narHash": "sha256-6lx+WZDJyxW5vwdgqHfGPupBIIxXtA5U/+fSXpS3W+I=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "bd87b89d8aed2e29920e604032937095ed0aef36",
|
||||
"revCount": 333,
|
||||
"rev": "dfb07640a4b450582fb3a021223c8f801943c1cd",
|
||||
"revCount": 334,
|
||||
"type": "git",
|
||||
"url": "https://git.thalheim.io/Mic92/retiolum"
|
||||
},
|
||||
@@ -1186,7 +1167,6 @@
|
||||
"menstruation-backend": "menstruation-backend_2",
|
||||
"menstruation-telegram": "menstruation-telegram_2",
|
||||
"nix-on-droid": "nix-on-droid_2",
|
||||
"nixinate": "nixinate_2",
|
||||
"nixpkgs": "nixpkgs_6",
|
||||
"nixpkgs-old": "nixpkgs-old_2",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable_2",
|
||||
@@ -1257,11 +1237,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1702174662,
|
||||
"narHash": "sha256-zzJ4fy83Jxc7hiMf8b7bUSA7I5r6T+KhGdRoqWBy0cs=",
|
||||
"lastModified": 1703729606,
|
||||
"narHash": "sha256-5QlUMNPKv++mWlS2r3F8bffoSBHXq1qHg+V5mnfSixg=",
|
||||
"owner": "oxalica",
|
||||
"repo": "rust-overlay",
|
||||
"rev": "59e7dd6170f20bed0d10cfd443896bef4a0c42d6",
|
||||
"rev": "347789ef125df15b685e8295364ad8ed331fef94",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -1429,6 +1409,21 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"telebots": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
|
||||
91
flake.nix
91
flake.nix
@@ -9,7 +9,6 @@
|
||||
menstruation-backend.url = "github:kmein/menstruation.rs";
|
||||
menstruation-telegram.url = "github:kmein/menstruation-telegram";
|
||||
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
|
||||
nixinate.url = "github:matthewcroughan/nixinate";
|
||||
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
|
||||
@@ -37,7 +36,6 @@
|
||||
menstruation-telegram.inputs.nixpkgs.follows = "nixpkgs-old";
|
||||
nix-on-droid.inputs.home-manager.follows = "home-manager";
|
||||
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixinate.inputs.nixpkgs.follows = "nixpkgs";
|
||||
recht.inputs.flake-utils.follows = "flake-utils";
|
||||
recht.inputs.nixpkgs.follows = "nixpkgs";
|
||||
rust-overlay.inputs.flake-utils.follows = "flake-utils";
|
||||
@@ -61,7 +59,6 @@
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
home-manager,
|
||||
nixinate,
|
||||
agenix,
|
||||
retiolum,
|
||||
flake-utils,
|
||||
@@ -70,32 +67,37 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
apps =
|
||||
nixinate.nixinate.x86_64-linux self
|
||||
// {
|
||||
x86_64-linux = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
apps = {
|
||||
x86_64-linux = let
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
mock-secrets = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "mock-secrets" ''
|
||||
${pkgs.findutils}/bin/find secrets -not -path '*/.*' -type f | ${pkgs.coreutils}/bin/sort > secrets.txt
|
||||
'');
|
||||
};
|
||||
deploy = {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy" ''
|
||||
if [ $# -eq 0 ]
|
||||
then
|
||||
systems='${toString (builtins.attrNames self.nixosConfigurations)}'
|
||||
else
|
||||
systems=$*
|
||||
fi
|
||||
${pkgs.parallel}/bin/parallel --line-buffer --tagstring '{}' 'nix run .\?submodules=1\#apps.nixinate.{}' ::: $systems
|
||||
'');
|
||||
}
|
||||
# the following error prevents remote building of ful: https://github.com/NixOS/nixpkgs/issues/177873
|
||||
// builtins.listToAttrs (map (hostname: let
|
||||
externalNetwork = import ./lib/external-network.nix;
|
||||
targets = {
|
||||
ful = "root@ful";
|
||||
zaatar = "root@zaatar";
|
||||
makanek = "root@makanek";
|
||||
manakish = "root@manakish";
|
||||
kabsa = "root@kabsa";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.attrsets.nameValuePair "deploy-${hostname}" {
|
||||
type = "app";
|
||||
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
|
||||
exec nixos-rebuild switch --log-format internal-json --flake .?submodules=1#${hostname} --build-host ${targets.${hostname}} --target-host ${targets.${hostname}} 2>&1 | ${pkgs.nix-output-monitor}/bin/nom --json
|
||||
'');
|
||||
}) (builtins.attrNames self.nixosConfigurations));
|
||||
};
|
||||
|
||||
nixosModules = {
|
||||
htgen = import modules/htgen.nix;
|
||||
@@ -147,15 +149,6 @@
|
||||
system = "aarch64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "ful";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
systems/ful/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
inputs.self.nixosModules.passport
|
||||
@@ -168,15 +161,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "zaatar";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
systems/zaatar/configuration.nix
|
||||
inputs.self.nixosModules.moodle-dl
|
||||
agenix.nixosModules.default
|
||||
@@ -188,15 +172,6 @@
|
||||
# for using inputs in other config files
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "makanek";
|
||||
sshUser = "root";
|
||||
buildOn = "local";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
systems/makanek/configuration.nix
|
||||
inputs.self.nixosModules.telegram-bot
|
||||
inputs.self.nixosModules.htgen
|
||||
@@ -226,15 +201,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "manakish";
|
||||
sshUser = "root";
|
||||
buildOn = "local";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
systems/manakish/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
@@ -247,15 +213,6 @@
|
||||
system = "x86_64-linux";
|
||||
specialArgs = niveumSpecialArgs system;
|
||||
modules = [
|
||||
{
|
||||
_module.args.nixinate = {
|
||||
host = "kabsa";
|
||||
sshUser = "root";
|
||||
buildOn = "remote";
|
||||
substituteOnTarget = true;
|
||||
hermetic = false;
|
||||
};
|
||||
}
|
||||
systems/kabsa/configuration.nix
|
||||
agenix.nixosModules.default
|
||||
retiolum.nixosModules.retiolum
|
||||
|
||||
Reference in New Issue
Block a user