NixOS/hardware-configuration/castle.nix

76 lines
2.2 KiB
Nix
Raw Normal View History

2024-06-12 09:54:11 +07:00
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
sops.secrets."smb/secrets" = {
2024-06-13 16:41:13 +07:00
owner = config.profile.user.name;
2024-06-12 09:54:11 +07:00
};
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
2024-06-13 16:41:13 +07:00
system.fsPackages = [ pkgs.bindfs pkgs.cifs-utils ];
2024-06-12 09:54:11 +07:00
fileSystems."/nas" =
{
2024-06-13 16:41:13 +07:00
device = "//192.168.100.5/nas";
2024-06-12 09:54:11 +07:00
fsType = "cifs";
options = [
"_netdev"
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=60"
"x-systemd.device-timeout=5s"
"x-systemd.mount-timeout=5s"
2024-06-13 16:41:13 +07:00
"uid=${toString config.profile.user.uid}"
"gid=${toString config.profile.user.gid}"
2024-06-12 09:54:11 +07:00
"credentials=${config.sops.secrets."smb/secrets".path}"
];
};
fileSystems."/" =
{
device = "/dev/disk/by-uuid/6a987bc7-1f00-4494-bcef-b0f8afc62b7b";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/812C-A3A9";
fsType = "vfat";
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/0add1f95-4cd5-4d44-876e-c1b381b7d133";
fsType = "ext4";
};
fileSystems."/workstation" =
{
device = "/dev/disk/by-uuid/7a3a7a8a-91d5-43fb-a80b-376bacdb54ec";
fsType = "ext4";
};
swapDevices =
[
{ device = "/dev/disk/by-uuid/15139a5f-a695-47a1-bd59-7e530989860c"; }
];
# 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.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}