build: nixos 25.05
This commit is contained in:
parent
9c6d9a0495
commit
ed9f6d2165
39
flake.lock
generated
39
flake.lock
generated
@ -2,43 +2,27 @@
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1717696253,
|
||||
"narHash": "sha256-1+ua0ggXlYYPLTmMl3YeYYsBXDSCqT+Gw3u6l4gvMhA=",
|
||||
"lastModified": 1749494155,
|
||||
"narHash": "sha256-FG4DEYBpROupu758beabUk9lhrblSf5hnv84v1TLqMc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9b5328b7f761a7bbdc0e332ac4cf076a3eedb89b",
|
||||
"rev": "88331c17ba434359491e8d5889cce872464052c2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-24.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1716655032,
|
||||
"narHash": "sha256-kQ25DAiCGigsNR/Quxm3v+JGXAEXZ8I7RAF4U94bGzE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "59a450646ec8ee0397f5fa54a08573e8240eb91f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "release-23.11",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1718543737,
|
||||
"narHash": "sha256-e8S/ODM1vkKHIexSVn9nIvne7vRO5M+35VAq/6JOYto=",
|
||||
"lastModified": 1749558678,
|
||||
"narHash": "sha256-DUVAe8E2X2QM0dAnTGlTiqemMqUMMyIeCH7UeNo0g64=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "683aa7c4e385509ca651d49eeb35e58c7a1baad6",
|
||||
"rev": "a12f3a99614894502e73eb816e9e076b0ab05730",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -59,15 +43,14 @@
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nixpkgs-stable": "nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1716692524,
|
||||
"narHash": "sha256-sALodaA7Zkp/JD6ehgwc0UCBrSBfB4cX66uFGTsqeFU=",
|
||||
"lastModified": 1749592509,
|
||||
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "962797a8d7f15ed7033031731d0bb77244839960",
|
||||
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
description = "NixOS System Config";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -17,9 +17,6 @@
|
||||
};
|
||||
};
|
||||
networking.hostId = "c5543d16";
|
||||
security.sudo.extraConfig = ''
|
||||
%nasp ALL = (root) NOPASSWD: /run/wrappers/bin/crontab
|
||||
'';
|
||||
hardware.nvidia.package = lib.mkForce config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
@ -166,10 +166,9 @@ in
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
hardware.opengl = {
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
systemd.services.nvidia-container-toolkit-cdi-generator = {
|
||||
@ -352,36 +351,36 @@ in
|
||||
(lib.mkIf (gCfg.enable) {
|
||||
## network
|
||||
networking.hostName = assert (gCfg.serial > 0); "g" + (builtins.toString gCfg.serial);
|
||||
networking.search = [ "nasp" ];
|
||||
networking.nameservers = [ "192.168.16.118" ];
|
||||
networking.search = [ "" ];
|
||||
networking.nameservers = [ "192.168.16.1" ];
|
||||
networking.extraHosts = ''
|
||||
192.168.16.101 g1-nasp g1
|
||||
192.168.16.102 g2-nasp g2
|
||||
192.168.16.103 g3-nasp g3
|
||||
192.168.16.104 g4-nasp g4
|
||||
192.168.16.105 g5-nasp g5
|
||||
192.168.16.106 g6-nasp g6
|
||||
192.168.16.107 g7-nasp g7
|
||||
192.168.16.108 g8-nasp g8
|
||||
192.168.16.109 g9-nasp g9
|
||||
192.168.16.110 g10-nasp g10
|
||||
192.168.16.111 g11-nasp g11
|
||||
192.168.16.112 g12-nasp g12
|
||||
192.168.16.113 g13-nasp g13
|
||||
192.168.16.114 g14-nasp g14
|
||||
192.168.16.115 g15-nasp g15
|
||||
192.168.16.116 g16-nasp g16
|
||||
192.168.16.117 g17-nasp g17
|
||||
192.168.16.118 g18-nasp g18 nasp.fit git.nasp.fit
|
||||
192.168.16.119 g19-nasp g19
|
||||
192.168.16.120 g20-nasp g20
|
||||
192.168.16.1 nasp.fit git.nasp.fit
|
||||
192.168.16.101 g1.nasp g1
|
||||
192.168.16.102 g2.nasp g2
|
||||
192.168.16.103 g3.nasp g3
|
||||
192.168.16.104 g4.nasp g4
|
||||
192.168.16.105 g5.nasp g5
|
||||
192.168.16.106 g6.nasp g6
|
||||
192.168.16.107 g7.nasp g7
|
||||
192.168.16.108 g8.nasp g8
|
||||
192.168.16.109 g9.nasp g9
|
||||
192.168.16.110 g10.nasp g10
|
||||
192.168.16.111 g11.nasp g11
|
||||
192.168.16.112 g12.nasp g12
|
||||
192.168.16.113 g13.nasp g13
|
||||
192.168.16.114 g14.nasp g14
|
||||
192.168.16.115 g15.nasp g15
|
||||
192.168.16.116 g16.nasp g16
|
||||
192.168.16.117 g17.nasp g17
|
||||
192.168.16.118 g18.nasp g18
|
||||
192.168.16.119 g19.nasp g19
|
||||
'';
|
||||
networking.firewall.extraCommands = ''
|
||||
iptables -A INPUT -s 192.168.16.0/24 -j ACCEPT
|
||||
iptables -A INPUT -s 12.12.12.0/24 -j ACCEPT
|
||||
'';
|
||||
fileSystems."/gshare" = {
|
||||
device = "192.168.16.118:/data1/share";
|
||||
device = "192.168.16.1:/data1/share";
|
||||
fsType = "nfs";
|
||||
};
|
||||
## packages and services
|
||||
@ -397,7 +396,7 @@ in
|
||||
};
|
||||
services.ntp = {
|
||||
enable = true;
|
||||
servers = [ "192.168.16.118" ];
|
||||
servers = [ "192.168.16.1" ];
|
||||
};
|
||||
})
|
||||
(lib.mkIf (gCfg.enable && gCfg.eth0Name != "") {
|
||||
@ -410,18 +409,14 @@ in
|
||||
address = [ "192.168.16.${builtins.toString (gCfg.serial + 100)}/24" ];
|
||||
routes = [
|
||||
{
|
||||
routeConfig = {
|
||||
Gateway = "192.168.16.118";
|
||||
GatewayOnLink = true;
|
||||
Metric = 90;
|
||||
};
|
||||
Gateway = "192.168.16.1";
|
||||
GatewayOnLink = true;
|
||||
Metric = 90;
|
||||
}
|
||||
{
|
||||
routeConfig = {
|
||||
Gateway = "fd01:da8:bf:300::1";
|
||||
GatewayOnLink = true;
|
||||
Metric = 90;
|
||||
};
|
||||
Gateway = "fd01:da8:bf:300::1";
|
||||
GatewayOnLink = true;
|
||||
Metric = 90;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
3
rebuild.sh
Executable file
3
rebuild.sh
Executable file
@ -0,0 +1,3 @@
|
||||
for i in {1,2,3,5,6,7,8,10,11,12,13,14,17}; do
|
||||
NIX_SSHOPTS="-p 12022 -o StrictHostKeyChecking=accept-new" nixos-rebuild $1 --target-host g$i --flake .#g$i
|
||||
done
|
Loading…
x
Reference in New Issue
Block a user