2024-05-30 21:20:39 +01:00
|
|
|
{ inputs, config, lib, pkgs, outputs,... }:
|
|
|
|
let
|
|
|
|
# Disko setup
|
|
|
|
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
|
|
|
|
dev = "/dev/vda"; # depends on target hardware
|
|
|
|
encrypted = true; # currrently only applies to btrfs
|
|
|
|
btrfsMountDevice = if encrypted then "/dev/mapper/crypted" else "/dev/root_vg/root";
|
2024-05-31 00:17:16 +01:00
|
|
|
user = "sam";
|
2024-05-30 21:20:39 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports =
|
|
|
|
[
|
|
|
|
# Create users for this host
|
2024-05-31 00:17:16 +01:00
|
|
|
../common/users/${user}
|
2024-05-30 21:20:39 +01:00
|
|
|
|
|
|
|
# Disk configuration
|
|
|
|
inputs.disko.nixosModules.disko
|
|
|
|
(import ../common/disks { device = dev; fsType = fsType; encrypted = encrypted; })
|
|
|
|
|
|
|
|
# Impermanence
|
|
|
|
inputs.impermanence.nixosModules.impermanence
|
|
|
|
(import ../common/disks/btrfs-impermanence.nix { btrfsMountDevice = btrfsMountDevice; lib = lib; })
|
|
|
|
|
|
|
|
# Import core options
|
|
|
|
./hardware-configuration.nix
|
|
|
|
../common/core
|
|
|
|
|
|
|
|
# Import optional options
|
|
|
|
../common/optional/persistence.nix
|
|
|
|
../common/optional/pipewire.nix
|
|
|
|
../common/optional/hyprland.nix
|
|
|
|
../common/optional/displayManager/sddm.nix
|
|
|
|
../common/optional/openssh.nix
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 3;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-30 21:23:59 +01:00
|
|
|
environment.persistence."/persist" = {
|
|
|
|
hideMounts = true;
|
2024-05-31 00:17:16 +01:00
|
|
|
users.${user} = {
|
2024-05-30 21:23:59 +01:00
|
|
|
directories = [
|
|
|
|
"Sync"
|
|
|
|
"Keep"
|
|
|
|
".ssh"
|
|
|
|
".mozilla"
|
|
|
|
".local"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-05-30 21:20:39 +01:00
|
|
|
networking = {
|
|
|
|
hostName = "semita";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
enableIPv6 = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.libinput.enable = true;
|
|
|
|
}
|