This commit is contained in:
Vivian 2023-12-29 13:01:36 +01:00
parent 10d319f426
commit 2d4b9bb0ed
4 changed files with 136 additions and 121 deletions

View file

@ -49,12 +49,13 @@
enable = true;
allowedTCPPorts = [ 25565 ];
};
users = {
extraUsers = {
users.extraUsers.laura.extraGroups = [ "wheel" ];
users.extraUsers.vivian.extraGroups = [ "wheel" ];
users.groups.mc = { };
laura.extraGroups = [ "wheel" ];
vivian.extraGroups = [ "wheel" ];
users.extraUsers.julia = {
julia = {
isNormalUser = true;
shell = pkgs.zsh;
@ -69,4 +70,7 @@
extraGroups = [ "mc" "wheel" ];
};
};
groups.mc = { };
};
}

View file

@ -7,24 +7,19 @@
];
boot.loader.systemd-boot.enable = true;
services = {
# Enable the OpenSSH daemon.
services.openssh.enable = true;
openssh.enable = true; # Did you read the comment?
# Disable firewall, as NFS makes it annoying
networking.firewall.enable = false;
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
services.nfs.server = {
nfs.server = {
enable = true;
exports = ''
/mnt/storage *(rw,async,no_subtree_check,fsid=0,all_squash,anonuid=0,anongid=0)
'';
};
services.snapraid = {
snapraid = {
enable = true;
parityFiles =
[ "/mnt/parity1/snapraid.parity" "/mnt/parity2/snapraid.parity-2" ];
@ -56,5 +51,12 @@
"/roms/"
];
};
};
# Disable firewall, as NFS makes it annoying
networking.firewall.enable = false;
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11";
}

View file

@ -1,48 +1,48 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ mergerfs mergerfs-tools ];
fileSystems."/mnt/disk1" = {
fileSystems = {
"/mnt/disk1" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/abbfc440-fb3d-4b33-92cb-948b2deeac53";
};
fileSystems."/mnt/disk2" = {
"/mnt/disk2" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/3a57ffa8-8a0f-4839-81df-7f34d99e9dbc";
};
fileSystems."/mnt/disk3" = {
"/mnt/disk3" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/0f72c5f8-b7db-4151-83f0-47e5f703aeb1";
};
fileSystems."/mnt/disk4" = {
"/mnt/disk4" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/b9c72b41-1538-436e-a595-49d1faa5ed01";
};
fileSystems."/mnt/disk5" = {
"/mnt/disk5" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/928d0200-eca1-4a69-b2d6-fbd23a5ee8cd";
};
fileSystems."/mnt/disk6" = {
"/mnt/disk6" = {
fsType = "ext4";
device = "/dev/disk/by-uuid/63381321-fe00-4838-8668-4d1decc94296";
};
fileSystems."/mnt/parity1" = {
"/mnt/parity1" = {
fsType = "ext4";
device = "/dev/disk/by-partuuid/7c9b88ed-b8f8-40c9-bbc3-b75d30e04e01";
};
fileSystems."/mnt/parity2" = {
"/mnt/parity2" = {
fsType = "ext4";
device = "/dev/disk/by-uuid/6c568887-9d2e-45ce-ab85-4c48cca2226a";
};
fileSystems."/mnt/storage" = {
"/mnt/storage" = {
fsType = "fuse.mergerfs";
device = "/mnt/disk*";
options = [
@ -57,4 +57,5 @@
"category.create=mfs"
];
};
};
}

View file

@ -4,28 +4,36 @@
{ lib, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot = {
initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"mpt3sas"
"virtio_pci"
"sd_mod"
"sr_mod"
"virtio_blk"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "mpt3sas" "virtio_pci" "sd_mod" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/cdbb197e-c1a8-4780-acd8-57d23bfb4050";
fileSystems."/" = {
device = "/dev/disk/by-uuid/cdbb197e-c1a8-4780-acd8-57d23bfb4050";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7613-E759";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/7613-E759";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/a3e08ffb-2237-463e-b9bf-8a42c0dbbf22"; }
];
[{ device = "/dev/disk/by-uuid/a3e08ffb-2237-463e-b9bf-8a42c0dbbf22"; }];
# 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