nixos/hosts/nebula/default.nix

52 lines
1.2 KiB
Nix
Raw Normal View History

{ inputs, config, lib, pkgs, outputs, ... }:
let
# Disko setup
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
2024-06-28 15:26:16 +01:00
dev = "/dev/sda"; # depends on target hardware
encrypted = false; # currrently only applies to btrfs
2024-06-28 20:21:27 +01:00
impermanence = false; # currrently only applies to btrfs
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
user = "admin";
in
{
imports =
[
# Create users for this host
../common/users/${user}
# Disk configuration
inputs.disko.nixosModules.disko
2024-06-28 20:21:27 +01:00
(import ../common/disks { device = dev; impermanence = impermanence; fsType = fsType; encrypted = encrypted; })
# Import core options
./hardware-configuration.nix
../common/core
# Import optional options
../common/optional/openssh.nix
2024-06-28 16:05:12 +01:00
];
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 3;
};
};
networking = {
2024-06-28 15:26:16 +01:00
hostName = "nebula";
networkmanager.enable = true;
enableIPv6 = false;
};
2024-06-28 15:26:16 +01:00
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
2024-06-28 16:05:12 +01:00
networking.hostId = "18aec5d7";
2024-06-28 15:26:16 +01:00
services.libinput.enable = true;
}