nixos/stube-pc/system.nix

105 lines
2.4 KiB
Nix
Raw Normal View History

2024-08-28 11:39:24 +02:00
{ self, config, pkgs, lib, ...}: {
imports = [ ./hardware-configuration.nix ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "spotify" ];
boot.loader.grub = {
enable = true;
device = "/dev/sda";
};
boot.loader.timeout = 1;
networking.hostName = "stube-pc";
networking.networkmanager.enable = true;
networking.firewall.enable = true;
time.timeZone = "Europe/Berlin";
users.mutableUsers = false;
2024-08-28 13:52:41 +02:00
users.users.admin = {
isNormalUser = true;
hashedPassword = "$y$j9T$sYhrjA6IDTFVsUTVrw6aY/$c4qBwMc6SBMip4BWIpHPwzkyVgnOaHdvYxJDUIyw7q1";
extraGroups = [ "wheel" "networkmanager" ];
createHome = true;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDbsWgnT1W25H5fDCekspaXzlIwvKh+rHygTId8xHotU admin" ];
2024-08-28 11:43:25 +02:00
};
2024-08-28 11:39:24 +02:00
users.users.stube = {
isNormalUser = true;
extraGroups = [ "networkmanager" ];
password = "stube";
};
systemd.services."display-manager".after = [ "home-manager-stube.service" ];
console.keyMap = "de";
services.pipewire = {
enable = true;
pulse.enable = true;
};
services.xserver = {
enable = true;
xkb.layout = "de";
desktopManager.xfce.enable = true;
};
services.displayManager = {
enable = true;
defaultSession = "xfce";
autoLogin = {
enable = true;
user = "stube";
};
};
services.xserver.displayManager.lightdm.greeter.enable = false;
services.xserver.displayManager.lightdm.autoLogin.timeout = 0;
services.xserver.desktopManager.xfce.enableScreensaver = false;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
environment.systemPackages = with pkgs; [
vim
2024-08-28 11:45:43 +02:00
git
2024-08-28 11:39:24 +02:00
xfce.xfce4-pulseaudio-plugin
pavucontrol
];
environment.etc."current-nixos".source = self;
environment.persistence."/persist" = {
enable = true;
hideMounts = true;
directories = [
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
"/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub"
"/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub"
];
};
security.polkit.enable = true;
2024-08-28 11:43:25 +02:00
services.openssh = {
enable = true;
openFirewall = true;
2024-08-28 13:52:41 +02:00
settings = {
PasswordAuthentication = false;
AllowUsers = [ "admin" ];
};
2024-08-28 11:43:25 +02:00
};
2024-08-28 11:39:24 +02:00
system.stateVersion = "24.05";
}