Compare commits

...

7 Commits

Author SHA1 Message Date
Astro f076089053 flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/4ecab3273592f27479a583fb6d975d4aba3486fe' (2023-05-31)
  → 'github:NixOS/nixpkgs/18388d019974e90a035bdb938a8a3ca3c0408db9' (2023-06-04)
• Updated input 'openwrt':
    'git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03&rev=ce32068bf2d85e03d3dd034ab345d55247e5626c' (2023-05-28)
  → 'git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03&rev=171b51519206b5e66ebd01d322f41d790976ce87' (2023-06-03)
• Updated input 'openwrt-imagebuilder':
    'github:astro/nix-openwrt-imagebuilder/c600f6dbe0516b34a307d9ec69015e123ec859a4' (2023-05-31)
  → 'github:astro/nix-openwrt-imagebuilder/b5901ec9361152f1f588445d1b3f06239ea4b86c' (2023-06-04)
2023-06-04 23:30:57 +02:00
Astro d7ef05fa64 config/secrets: generate site.dyndnsKey that is accepted by dhcpd 2023-06-04 23:29:17 +02:00
Astro f55cb13ecf nixos-module/server/lxc-containers: prevent restart on host nixos-rebuild switch 2023-06-04 23:14:47 +02:00
Astro 1caffb4f0f nixos-module/server/lxc-containers: shorten coloradio iface names 2023-06-04 23:02:30 +02:00
Astro 7cf95cd2f0 prepare for nixos 23.05 2023-06-04 23:02:06 +02:00
Astro 2ee8f7a5cc flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/781df3d2de37ace250ba3c2731606c0b6bee465b' (2023-04-14)
  → 'github:NixOS/nixpkgs/4ecab3273592f27479a583fb6d975d4aba3486fe' (2023-05-31)
• Updated input 'openwrt':
    'git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03&rev=9af29da281213108cd861ed77b0416bf6eda0aaf' (2023-04-13)
  → 'git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03&rev=ce32068bf2d85e03d3dd034ab345d55247e5626c' (2023-05-28)
• Updated input 'openwrt-imagebuilder':
    'github:astro/nix-openwrt-imagebuilder/b3d1f398472452ea288ce2d8dbf20d6115bf1c64' (2023-04-14)
  → 'github:astro/nix-openwrt-imagebuilder/c600f6dbe0516b34a307d9ec69015e123ec859a4' (2023-05-31)
2023-05-31 23:52:50 +02:00
Astro bb7460ff83 flake.nix: bump inputs.nixpkgs from 22.11 to 23.05 2023-05-31 23:52:05 +02:00
8 changed files with 28 additions and 29 deletions

View File

@ -280,7 +280,7 @@
ap9.wifi."platform/qca953x_wmac".ssids."Herzzbuehne".psk = "encrypted"; ap9.wifi."platform/qca953x_wmac".ssids."Herzzbuehne".psk = "encrypted";
}; };
site.dyndnsKey = "SECRET"; site.dyndnsKey = "oYmxXCIa0nArp0679L6v+y/UfnhripOudLv+R5Cop8I=";
site.vpn.wireguard = { site.vpn.wireguard = {
privateKey = "wPNXY4ED3Jz3Kz0KOmvfQOou6/wHrgqSsykaMYrtb28="; privateKey = "wPNXY4ED3Jz3Kz0KOmvfQOou6/wHrgqSsykaMYrtb28=";

View File

@ -2,16 +2,16 @@
"nodes": { "nodes": {
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1681490924, "lastModified": 1685912674,
"narHash": "sha256-6WrkhmG0pI09VqeYWRLxEgNlVeWdnM5at6vm0w4prBk=", "narHash": "sha256-9iRV7ZxZO13MXEBZvWTak9OTddkit66qbbDtroqV4X4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "781df3d2de37ace250ba3c2731606c0b6bee465b", "rev": "18388d019974e90a035bdb938a8a3ca3c0408db9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "release-22.11", "ref": "release-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -19,11 +19,11 @@
"openwrt": { "openwrt": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1681412046, "lastModified": 1685795498,
"narHash": "sha256-mW4B/9GVminuxC0EM6WeQ9soqBy2k8INjhpT+mrnIow=", "narHash": "sha256-DZS2L/646UDQjXKVYL5wuqoYXQ1cc/9M7fy5lXQ5/Gw=",
"ref": "openwrt-22.03", "ref": "openwrt-22.03",
"rev": "9af29da281213108cd861ed77b0416bf6eda0aaf", "rev": "171b51519206b5e66ebd01d322f41d790976ce87",
"revCount": 54587, "revCount": 54629,
"type": "git", "type": "git",
"url": "https://git.openwrt.org/openwrt/openwrt.git" "url": "https://git.openwrt.org/openwrt/openwrt.git"
}, },
@ -40,11 +40,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1681468707, "lastModified": 1685874260,
"narHash": "sha256-aD+74KowPjyxWP+bIqmZZaIHe5WxEhoXOSF+qOOCwPg=", "narHash": "sha256-rem5LdqVtunLJZ+lXvwAJCMFucJmT+kaXoTOIbGelXg=",
"owner": "astro", "owner": "astro",
"repo": "nix-openwrt-imagebuilder", "repo": "nix-openwrt-imagebuilder",
"rev": "b3d1f398472452ea288ce2d8dbf20d6115bf1c64", "rev": "b5901ec9361152f1f588445d1b3f06239ea4b86c",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -2,7 +2,7 @@
description = "Zentralwerk network"; description = "Zentralwerk network";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
openwrt = { openwrt = {
url = "git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03"; url = "git+https://git.openwrt.org/openwrt/openwrt.git?ref=openwrt-22.03";
flake = false; flake = false;

View File

@ -6,18 +6,11 @@
(modulesPath + "/virtualisation/lxc-container.nix") (modulesPath + "/virtualisation/lxc-container.nix")
]; ];
boot = {
isContainer = true;
loader = {
initScript.enable = true;
};
};
environment.etc."machine-id".text = environment.etc."machine-id".text =
builtins.substring 0 8 ( builtins.substring 0 8 (
builtins.hashString "sha256" config.networking.hostName builtins.hashString "sha256" config.networking.hostName
); );
nix = { nix = {
settings = { settings = {
sandbox = false; sandbox = false;

View File

@ -26,7 +26,7 @@ in lib.mkIf (pppoeInterfaces != {}) {
enable = true; enable = true;
autostart = true; autostart = true;
config = '' config = ''
plugin rp-pppoe.so plugin pppoe.so
nic-${upstream.link} nic-${upstream.link}
ifname ${ifName} ifname ${ifName}
# Login settings. (PAP) # Login settings. (PAP)
@ -39,11 +39,11 @@ in lib.mkIf (pppoeInterfaces != {}) {
maxfail 0 maxfail 0
# Seconds between reconnection attempts # Seconds between reconnection attempts
holdoff 1 holdoff 1
# LCP settings. # LCP settings.
lcp-echo-interval 5 lcp-echo-interval 5
lcp-echo-failure 6 lcp-echo-failure 6
# PPPoE compliant settings. # PPPoE compliant settings.
noaccomp noaccomp
default-asyncmap default-asyncmap

View File

@ -7,9 +7,9 @@
# Prevents automatic creation of interface bond0 by the kernel # Prevents automatic creation of interface bond0 by the kernel
"bonding.max_bonds=0" "bonding.max_bonds=0"
]; ];
boot.tmpOnTmpfs = true; boot.tmp.useTmpfs = true;
# Includes wireguard # Includes wireguard
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = pkgs.zfsUnstable.latestCompatibleLinuxPackages;
# Keep building # Keep building
boot.zfs.enableUnstable = true; boot.zfs.enableUnstable = true;
@ -35,8 +35,8 @@
}; };
documentation = { documentation = {
enable = false; enable = lib.mkForce false;
nixos.enable = false; nixos.enable = lib.mkForce false;
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -12,7 +12,7 @@
ipmitool ipmitool
]; ];
services.openssh.enable = true; services.openssh.enable = true;
services.openssh.permitRootLogin = "prohibit-password"; services.openssh.settings.PermitRootLogin = "prohibit-password";
# additional config for bare metal # additional config for bare metal
services.collectd = { services.collectd = {

View File

@ -14,6 +14,10 @@ let
shortenNetName = name: shortenNetName = name:
if builtins.match "priv(.*)" name != null if builtins.match "priv(.*)" name != null
then "p" + builtins.substring 4 9 name then "p" + builtins.substring 4 9 name
else if name == "coloradio"
then "cr"
else if name == "coloradio-gw"
then "cr-gw"
else name; else name;
checkIfname = ifname: let checkIfname = ifname: let
@ -248,6 +252,8 @@ in
Restart = "always"; Restart = "always";
RestartSec = "1s"; RestartSec = "1s";
}; };
# Prevent restart on host nixos-rebuild switch
restartIfChanged = false;
}; };
# Starts all the containers after boot # Starts all the containers after boot