nixpkgs-fmt

This commit is contained in:
root@dishwasher 2022-06-26 21:19:15 +02:00
parent 35e93ce43b
commit ebc2829be8
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
11 changed files with 157 additions and 144 deletions

View file

@ -22,7 +22,7 @@
networks."uplink" = { networks."uplink" = {
matchConfig = { Name = "enp1s0"; }; matchConfig = { Name = "enp1s0"; };
networkConfig = { networkConfig = {
DHCP="yes"; # hetzner suggests this as default DHCP = "yes"; # hetzner suggests this as default
}; };
}; };
}; };

View file

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/profiles/qemu-guest.nix") [
(modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sd_mod" "sr_mod" ];
@ -14,12 +15,14 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/627952eb-107a-43c3-8223-bfea9af92837"; {
device = "/dev/disk/by-uuid/627952eb-107a-43c3-8223-bfea9af92837";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5CA6-CCE4"; {
device = "/dev/disk/by-uuid/5CA6-CCE4";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -61,7 +61,7 @@
# nextcloud # nextcloud
{ {
wireguardPeerConfig = { wireguardPeerConfig = {
PublicKey ="KCYoGx7TGei4X79EZo2NONCcmQjPzBUN1Ds6I9lQbz0="; PublicKey = "KCYoGx7TGei4X79EZo2NONCcmQjPzBUN1Ds6I9lQbz0=";
AllowedIPs = [ "10.34.45.100/32" ]; AllowedIPs = [ "10.34.45.100/32" ];
PersistentKeepalive = 25; PersistentKeepalive = 25;
}; };

View file

@ -6,7 +6,8 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -35,7 +36,7 @@
}; };
networkConfig = { networkConfig = {
DHCP = "yes"; DHCP = "yes";
LinkLocalAddressing="ipv6"; LinkLocalAddressing = "ipv6";
IPv6AcceptRA = "yes"; IPv6AcceptRA = "yes";
}; };
dhcpV6Config = { dhcpV6Config = {
@ -47,7 +48,7 @@
}; };
}; };
services.resolved={ services.resolved = {
enable = true; enable = true;
fallbackDns = [ fallbackDns = [
"8.8.8.8" "8.8.8.8"

View file

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
@ -14,37 +15,43 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1"; {
device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nixos" "compress=zstd" "noatime" ]; options = [ "subvol=nixos" "compress=zstd" "noatime" ];
}; };
fileSystems."/var/lib" = fileSystems."/var/lib" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1"; {
device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=var-lib" "compress=zstd" "noatime" ]; options = [ "subvol=var-lib" "compress=zstd" "noatime" ];
}; };
fileSystems."/var/log" = fileSystems."/var/log" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1"; {
device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=var-log" "compress=zstd" "noatime" ]; options = [ "subvol=var-log" "compress=zstd" "noatime" ];
}; };
fileSystems."/var/microvms" = fileSystems."/var/microvms" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1"; {
device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=microvms" "compress=zstd" "noatime" ]; options = [ "subvol=microvms" "compress=zstd" "noatime" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1"; {
device = "/dev/disk/by-uuid/2971597a-b364-405d-8bb2-287556e819e1";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ]; options = [ "subvol=nix" "compress=zstd" "noatime" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2A04-BFAE"; {
device = "/dev/disk/by-uuid/2A04-BFAE";
fsType = "vfat"; fsType = "vfat";
}; };

View file

@ -11,14 +11,15 @@
DHCPServer = false; DHCPServer = false;
IPv6SendRA = true; IPv6SendRA = true;
}; };
addresses = [ { addresses = [{
addressConfig.Address = "10.99.99.1/24"; addressConfig.Address = "10.99.99.1/24";
} { }
{
addressConfig.Address = "fd12:3456:789a::1/64"; addressConfig.Address = "fd12:3456:789a::1/64";
} ]; }];
ipv6Prefixes = [ { ipv6Prefixes = [{
ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64"; ipv6PrefixConfig.Prefix = "fd12:3456:789a::/64";
} ]; }];
# networkConfig = { # networkConfig = {
# Address = "10.99.99.1/24"; # Address = "10.99.99.1/24";
# IPForward = "ipv4"; # IPForward = "ipv4";

View file

@ -89,7 +89,8 @@
tag = "store"; tag = "store";
proto = "virtiofs"; proto = "virtiofs";
socket = "store.socket"; socket = "store.socket";
}] ++ map (dir: { }] ++ map
(dir: {
source = "/var/lib/microvms/${config.networking.hostName}/${dir}"; source = "/var/lib/microvms/${config.networking.hostName}/${dir}";
mountPoint = "/${dir}"; mountPoint = "/${dir}";
tag = dir; tag = dir;
@ -119,4 +120,4 @@
]; ];
system.stateVersion = "22.05"; system.stateVersion = "22.05";
} }

View file

@ -40,16 +40,16 @@
routes = [ routes = [
{ {
routeConfig = { routeConfig = {
Gateway="10.99.99.1"; Gateway = "10.99.99.1";
Destination="0.0.0.0/0"; Destination = "0.0.0.0/0";
Metric=1024; Metric = 1024;
}; };
} }
{ {
routeConfig = { routeConfig = {
Gateway="10.99.99.1"; Gateway = "10.99.99.1";
Destination="10.99.99.0/24"; Destination = "10.99.99.0/24";
Metric=1024; Metric = 1024;
}; };
} }
]; ];

View file

@ -19,12 +19,12 @@
privateKeyFile = config.sops.secrets."wg/wg-dvb-seckey".path; privateKeyFile = config.sops.secrets."wg/wg-dvb-seckey".path;
address = [ "10.13.37.3/32" ]; address = [ "10.13.37.3/32" ];
peers = [ { peers = [{
publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY="; publicKey = "WDvCObJ0WgCCZ0ORV2q4sdXblBd8pOPZBmeWr97yphY=";
allowedIPs = [ "10.13.37.0/24" ]; allowedIPs = [ "10.13.37.0/24" ];
endpoint = "academicstrokes.com:51820"; endpoint = "academicstrokes.com:51820";
persistentKeepalive = 25; persistentKeepalive = 25;
} ]; }];
}; };
mlwd-nl = { mlwd-nl = {