nixos/hosts/semita/default.nix

103 lines
2.2 KiB
Nix
Raw Normal View History

2024-09-09 11:41:10 +01:00
{
inputs,
lib,
pkgs,
...
}: let
2024-05-30 21:20:39 +01:00
# Disko setup
fsType = "btrfs"; # one of ext4 or btrfs. Use btrfs if using impermanence
2024-05-31 22:18:40 +01:00
dev = "/dev/nvme0n1"; # depends on target hardware
2024-05-30 21:20:39 +01:00
encrypted = true; # currrently only applies to btrfs
2024-09-09 11:41:10 +01:00
btrfsMountDevice =
if encrypted
then "/dev/mapper/crypted"
else "/dev/root_vg/root";
2024-05-31 00:17:16 +01:00
user = "sam";
2024-06-28 20:21:27 +01:00
impermanence = true;
2024-09-09 11:41:10 +01:00
in {
imports = [
# Create users for this host
../common/users/${user}
2024-05-30 21:20:39 +01:00
2024-09-09 11:41:10 +01:00
# Disk configuration
inputs.disko.nixosModules.disko
(import ../common/disks {
device = dev;
impermanence = impermanence;
fsType = fsType;
encrypted = encrypted;
})
2024-05-30 21:20:39 +01:00
2024-09-09 11:41:10 +01:00
# Impermanence
(import ../common/disks/btrfs/impermanence.nix {
btrfsMountDevice = btrfsMountDevice;
lib = lib;
})
2024-05-30 21:20:39 +01:00
2024-09-09 11:41:10 +01:00
# Import core options
./hardware-configuration.nix
../common/core
2024-05-30 21:20:39 +01:00
2024-09-09 11:41:10 +01:00
# Import optional options
../common/optional/persistence.nix
../common/optional/pipewire.nix
../common/optional/openssh.nix
../common/optional/dwm.nix
../common/optional/nfs-mounts/media.nix
../common/optional/nfs-mounts/homeshare.nix
../common/optional/printing.nix
2024-09-21 22:19:00 +01:00
../common/optional/docker
2024-09-09 11:41:10 +01:00
];
2024-05-30 21:20:39 +01:00
boot = {
2024-09-09 11:41:10 +01:00
blacklistedKernelModules = ["snd_hda_intel" "snd_soc_skl"];
2024-06-01 16:39:14 +01:00
kernelPackages = pkgs.linuxPackagesFor pkgs.linux_latest;
2024-05-30 21:20:39 +01:00
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 3;
};
};
2024-07-20 17:38:49 +01:00
services = {
xserver = {
dpi = 144;
upscaleDefaultCursor = true;
};
};
environment.variables = {
2024-07-20 18:49:27 +01:00
GDK_SCALE = "2";
GDK_DPI_SCALE = "0.6";
2024-07-20 17:38:49 +01:00
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=1.8";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
XCURSOR_SIZE = "32";
};
2024-06-01 16:39:14 +01:00
hardware.firmware = [
pkgs.sof-firmware
];
2024-05-30 21:20:39 +01:00
networking = {
hostName = "semita";
networkmanager.enable = true;
enableIPv6 = false;
2024-09-09 11:41:10 +01:00
nameservers = ["10.0.10.60" "8.8.8.8"];
2024-10-03 14:55:42 +01:00
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [
{
address = "192.10.99.2";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "10.0.10.3";
interface = "eth0";
};
2024-05-30 21:20:39 +01:00
};
services.libinput.enable = true;
}