nixos/hosts/sparky/default.nix

106 lines
2.2 KiB
Nix
Raw Normal View History

2024-05-16 11:55:24 +01:00
{ inputs, config, lib, pkgs, outputs,... }:
{
imports =
[
2024-05-16 20:19:01 +01:00
# Disk configuration
2024-05-17 20:17:53 +01:00
inputs.disko.nixosModules.disko
(import ../common/disks/std-disk-config.nix { device = "/dev/vda"; })
../common/optional/btrfs-impermanence.nix
2024-05-17 01:07:42 +01:00
inputs.impermanence.nixosModules.impermanence
2024-05-16 20:19:01 +01:00
2024-05-16 11:55:24 +01:00
# Import core options
./hardware-configuration.nix
../common/core
# Create users for this host
2024-05-16 20:19:01 +01:00
../common/users/media
2024-05-16 11:55:24 +01:00
];
2024-05-18 14:51:03 +01:00
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
2024-05-16 11:55:24 +01:00
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
config = {
allowUnfree = true;
};
};
2024-05-17 10:54:53 +01:00
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
users.media = {
directories = [
2024-05-17 20:17:53 +01:00
"sync"
2024-05-17 10:54:53 +01:00
"keep"
".ssh"
];
};
};
2024-05-16 20:19:01 +01:00
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
timeout = 3;
};
};
networking = {
2024-05-17 20:17:53 +01:00
hostName = "sparky";
2024-05-16 20:19:01 +01:00
networkmanager.enable = true;
enableIPv6 = false;
};
services = {
qemuGuest.enable = true;
openssh = {
enable = true;
ports = [22]; # FIXME: Make this use configVars.networking
settings.PermitRootLogin = "yes";
authorizedKeysFiles = lib.mkForce ["/etc/ssh/authorized_keys.d/%u"];
};
};
2024-05-17 20:17:53 +01:00
services.libinput.enable = true;
services.displayManager.defaultSession = "cinnamon";
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
desktopManager = {
cinnamon.enable = true;
};
};
2024-05-16 20:19:01 +01:00
security.pam = {
sshAgentAuth.enable = true;
services = {
sudo.u2fAuth = true;
};
};
2024-05-16 11:55:24 +01:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2024-05-16 20:19:01 +01:00
system.stateVersion = "23.11";
}