Clean up montalin configuration
This commit is contained in:
parent
8424e0875c
commit
4c5c5a42ca
8 changed files with 156 additions and 106 deletions
39
host/montalin/filesystems.nix
Normal file
39
host/montalin/filesystems.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
boot.initrd.luks.devices = {
|
||||
"root".device = "/dev/disk/by-uuid/3a0a5071-67ab-4e13-a0b7-d31b86f5e8b1";
|
||||
"swap".device = "/dev/disk/by-uuid/6dee6e3c-e2f3-46c5-8751-5fce8c80ed49";
|
||||
"backup".device = "/dev/disk/by-uuid/a965933d-516c-46cf-8384-006b1770e46b";
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/mapper/root";
|
||||
fsType = "btrfs";
|
||||
options = [ "defaults" "noatime" ];
|
||||
};
|
||||
"/var/backup" = {
|
||||
device = "/dev/mapper/backup";
|
||||
fsType = "ext4";
|
||||
options = [ "defaults" "noauto" "noatime" ];
|
||||
};
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/0065-E4EA";
|
||||
fsType = "vfat";
|
||||
options = [ "defaults" "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
swapDevices = [{ device = "/dev/mapper/swap"; }];
|
||||
|
||||
# Set Spin-Down times of HDDs
|
||||
# To get the disk identifier with `udevadm info -n /dev/sdX | grep ID_SERIAL_SHORT`
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", KERNEL=="sd[a-z]", ENV{ID_SERIAL_SHORT}=="WD-WXH1A89L54LA", RUN+="${pkgs.hdparm}/bin/hdparm -S 60 /dev/%k"
|
||||
'';
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue