mirror of
https://git.pvv.ntnu.no/Drift/pvv-nixos-config.git
synced 2026-05-02 04:33:15 +02:00
Compare commits
1 Commits
bb20f32df8
...
bicep-revi
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a53612a74 |
@@ -1,32 +1,56 @@
|
|||||||
{ fp, pkgs, values, ... }:
|
{ fp, pkgs, values, lib, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
(fp /base)
|
(fp /base)
|
||||||
./services/nginx
|
#./services/nginx
|
||||||
|
|
||||||
./services/calendar-bot.nix
|
#./services/calendar-bot.nix
|
||||||
#./services/git-mirrors
|
#./services/git-mirrors
|
||||||
./services/minecraft-heatmap.nix
|
#./services/minecraft-heatmap.nix
|
||||||
./services/mysql
|
#./services/mysql
|
||||||
./services/postgresql
|
#./services/postgresql
|
||||||
|
|
||||||
./services/matrix
|
#./services/matrix
|
||||||
];
|
];
|
||||||
|
|
||||||
#systemd.network.networks."30-enp6s0f0" = values.defaultNetworkConfig // {
|
boot.loader = {
|
||||||
systemd.network.networks."30-ens18" = values.defaultNetworkConfig // {
|
systemd-boot.enable = false; # no uefi support on this device
|
||||||
#matchConfig.Name = "enp6s0f0";
|
grub.device = "/dev/disk/by-id/scsi-3600508b1001ca9cf1c96afea40d5451d";
|
||||||
matchConfig.Name = "ens18";
|
grub.enable = true;
|
||||||
address = with values.hosts.bicep; [ (ipv4 + "/25") (ipv6 + "/64") ]
|
};
|
||||||
++ (with values.services.turn; [ (ipv4 + "/25") (ipv6 + "/64") ]);
|
|
||||||
|
boot = {
|
||||||
|
zfs = {
|
||||||
|
extraPools = [ "bicepdata" ];
|
||||||
|
requestEncryptionCredentials = false;
|
||||||
|
};
|
||||||
|
supportedFilesystems.zfs = true;
|
||||||
|
|
||||||
|
kernelPackages = pkgs.linuxPackages;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.zfs.autoScrub = {
|
||||||
|
enable = true;
|
||||||
|
interval = "Wed *-*-8..14 00:00:00";
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostId = "3b4bf6a5";
|
||||||
|
systemd.network.networks."30-ens10f3" = values.defaultNetworkConfig // {
|
||||||
|
matchConfig.Name = "ens10f3";
|
||||||
|
# IPs belong to guest1.pvv.ntnu.no
|
||||||
|
address = [ "129.241.210.248/25" "2001:700:300:1900::248/63" ];
|
||||||
};
|
};
|
||||||
systemd.network.wait-online = {
|
systemd.network.wait-online = {
|
||||||
anyInterface = true;
|
anyInterface = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.qemuGuest.enable = true;
|
# local overrides
|
||||||
|
services.smartd.enable = lib.mkForce false;
|
||||||
|
system.autoUpgrade.enable = lib.mkForce false;
|
||||||
|
#services.userborn.enable = lib.mkForce false;
|
||||||
|
#services.userdbd.enable = lib.mkForce false;
|
||||||
|
|
||||||
# Don't change (even during upgrades) unless you know what you are doing.
|
# Don't change (even during upgrades) unless you know what you are doing.
|
||||||
# See https://search.nixos.org/options?show=system.stateVersion
|
# See https://search.nixos.org/options?show=system.stateVersion
|
||||||
|
|||||||
@@ -5,39 +5,26 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "ahci" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "hpsa" "ohci_pci" "usbhid" "sd_mod" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/20e06202-7a09-47cc-8ef6-5e7afe19453a";
|
{ device = "/dev/disk/by-uuid/ec4ab82a-f31e-4f02-a988-99c18160d04a";
|
||||||
fsType = "ext4";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
# temp data disk, only 128gb not enough until we can add another disk to the system.
|
swapDevices = [
|
||||||
fileSystems."/data" =
|
{
|
||||||
{ device = "/dev/disk/by-uuid/c81af266-0781-4084-b8eb-c2587cbcf1ba";
|
device = "/var/lib/swapfile";
|
||||||
fsType = "ext4";
|
size = 8 * 1024;
|
||||||
};
|
}
|
||||||
|
];
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/198B-E363";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.ens18.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user