Refactor configuration.nix using attribute sets
This commit is contained in:
parent
9aa4f91d33
commit
38ca59706d
|
@ -10,6 +10,7 @@
|
|||
CLOSED: [2019-10-18 Fri 00:03]
|
||||
*** TODO Tmux
|
||||
*** TODO Smartmontools
|
||||
*** TODO Zeroconf
|
||||
** Printing
|
||||
*** TODO Cups
|
||||
*** TODO SANE
|
||||
|
|
|
@ -10,16 +10,20 @@
|
|||
|
||||
# A bunch of boot parameters needed for optimal runtime on RPi 3B
|
||||
boot.kernelParams = ["cma=32M"];
|
||||
boot.loader.raspberryPi.enable = true;
|
||||
boot.loader.raspberryPi.version = 3;
|
||||
boot.loader.raspberryPi.uboot.enable = true;
|
||||
boot.loader.raspberryPi.firmwareConfig = ''
|
||||
boot.loader.raspberryPi = {
|
||||
enable = true;
|
||||
version = 3;
|
||||
uboot.enable = true;
|
||||
firmwareConfig = ''
|
||||
hdmi_force_hotplug=1
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
raspberrypi-tools
|
||||
(import ./vim.nix)
|
||||
git
|
||||
tmux
|
||||
];
|
||||
|
||||
# File systems configuration for using the installer's partition layout
|
||||
|
@ -34,8 +38,10 @@
|
|||
swapDevices = [ { device = "/swapfile"; size = 1024; } ];
|
||||
|
||||
# Configure basic SSH access
|
||||
services.openssh.enable = true;
|
||||
services.openssh.permitRootLogin = "yes";
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
|
||||
# Cleanup tmp on startup
|
||||
boot.cleanTmpDir = true;
|
||||
|
@ -54,7 +60,6 @@
|
|||
# Set vim as default editor
|
||||
programs.vim.defaultEditor = true;
|
||||
|
||||
|
||||
# Set timezone and synchronize NTP
|
||||
time.timeZone = "Europe/Brussels";
|
||||
services.timesyncd.enable = true;
|
||||
|
@ -64,12 +69,17 @@
|
|||
boot.supportedFilesystems = [ "zfs" ];
|
||||
|
||||
# Scrub zpool monthly
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.zfs.autoScrub.interval = "monthly";
|
||||
services.zfs.autoScrub = {
|
||||
enable = true;
|
||||
interval = "monthly";
|
||||
};
|
||||
|
||||
# Auto-upgrade the system and reboot if needed
|
||||
system.autoUpgrade.enable = true;
|
||||
system.autoUpgrade.allowReboot = true;
|
||||
system.autoUpgrade = {
|
||||
enable = true;
|
||||
allowReboot = true;
|
||||
};
|
||||
|
||||
|
||||
# Import other configuration modules
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue