Migrate siit-dc to flakes
This commit is contained in:
parent
35b438b115
commit
a4b95111ab
6 changed files with 52 additions and 14 deletions
|
@ -38,8 +38,6 @@
|
|||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
networking.hostName = "siit-dc";
|
||||
|
||||
imports = [
|
||||
../../shared/base.nix
|
||||
../../shared/hardware/vm.nix
|
||||
../../servers/siit-dc.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
||||
|
|
39
hosts/siit-dc/state.nix
Normal file
39
hosts/siit-dc/state.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ lib, modulesPath, ... }:
|
||||
{
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"uhci_hcd"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"virtio_pci"
|
||||
"virtio_scsi"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/81dc35b1-5a34-4924-b864-b53e5ca9df24";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/D171-033F";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
swapDevices = lib.mkForce [
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16 * 1024;
|
||||
|
|
|
@ -124,12 +124,6 @@
|
|||
|
||||
######################################## Memory management ######################################
|
||||
zramSwap.enable = true;
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 8 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
######################################## Housekeeping ###########################################
|
||||
system.autoUpgrade = {
|
||||
|
|
11
shared/hardware/vm.nix
Normal file
11
shared/hardware/vm.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 2 * 1024;
|
||||
}
|
||||
];
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue