1
Fork 0
satellite/hosts/nixos/lapetus/default.nix

45 lines
976 B
Nix
Raw Normal View History

2023-07-17 19:23:00 +02:00
{ config, ... }:
let
device = "/dev/sda";
in
{
2023-07-17 16:50:07 +02:00
imports = [
../common/global
../common/users/adrielus.nix
../common/optional/slambda.nix
./hardware-configuration.nix
];
# Set the name of this machine!
networking.hostName = "lapetus";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
2023-07-17 19:23:00 +02:00
system.stateVersion = "23.05";
2023-07-17 16:50:07 +02:00
2023-07-17 18:40:39 +02:00
# Configure ZFS
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.extraPools = [ "zroot" ];
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
# We use non-legacy mountpoints
# See [this wiki link](https://nixos.wiki/wiki/ZFS)
# systemd.services.zfs-mount.enable = false;
# Roll back to blank snapshot on boot
# boot.initrd.postDeviceCommands = lib.mkAfter ''
# zfs rollback -r zroot@blank
# '';
2023-07-17 18:54:31 +02:00
disko.devices = import ./partitions.nix {
2023-07-17 19:23:00 +02:00
devices = [ device ];
2023-07-17 18:54:31 +02:00
};
2023-07-17 16:50:07 +02:00
# Boot
boot.loader.grub = {
2023-07-17 19:23:00 +02:00
inherit device;
2023-07-17 16:50:07 +02:00
enable = true;
2023-07-17 18:54:31 +02:00
version = 2;
2023-07-17 16:50:07 +02:00
};
}