2024-12-05 12:52:17 -08:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./hardware-configuration.nix
|
2024-12-09 11:01:02 -08:00
|
|
|
./addons/peripherals.nix
|
2024-12-05 12:52:17 -08:00
|
|
|
./addons/samba-client.nix
|
2024-12-06 13:53:58 -08:00
|
|
|
./addons/plasma6.nix
|
2024-12-06 18:21:14 -08:00
|
|
|
./addons/gaming.nix
|
|
|
|
./addons/fonts.nix
|
2024-12-09 11:01:02 -08:00
|
|
|
./addons/ollama.nix
|
2024-12-05 12:52:17 -08:00
|
|
|
];
|
2024-12-06 18:21:14 -08:00
|
|
|
|
|
|
|
home-manager.backupFileExtension = "backup";
|
|
|
|
|
2024-12-05 12:52:17 -08:00
|
|
|
# Configure user
|
|
|
|
programs.zsh.enable = true;
|
|
|
|
users.users.joey = {
|
|
|
|
isNormalUser = true;
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
description = "joey";
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
|
|
|
openssh.authorizedKeys.keys = let
|
|
|
|
authorizedKeys = pkgs.fetchurl {
|
|
|
|
url = "https://github.com/Jafner.keys";
|
|
|
|
sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4=";
|
|
|
|
};
|
|
|
|
in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
|
|
|
|
};
|
|
|
|
|
|
|
|
services.flatpak = {
|
|
|
|
enable = true;
|
|
|
|
uninstallUnmanaged = true;
|
|
|
|
remotes = [ { name = "flathub"; location = "https://flathub.org/repo/flathub.flatpakrepo"; } ];
|
|
|
|
};
|
|
|
|
|
|
|
|
time.timeZone = "America/Los_Angeles";
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
i18n.extraLocaleSettings = {
|
|
|
|
LC_ADDRESS = "en_US.UTF-8";
|
|
|
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
|
|
LC_MEASUREMENT = "en_US.UTF-8";
|
|
|
|
LC_MONETARY = "en_US.UTF-8";
|
|
|
|
LC_NAME = "en_US.UTF-8";
|
|
|
|
LC_NUMERIC = "en_US.UTF-8";
|
|
|
|
LC_PAPER = "en_US.UTF-8";
|
|
|
|
LC_TELEPHONE = "en_US.UTF-8";
|
|
|
|
LC_TIME = "en_US.UTF-8";
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable passwordless sudo
|
|
|
|
security.sudo = {
|
|
|
|
enable = true;
|
|
|
|
extraRules = [{
|
|
|
|
commands = [
|
|
|
|
{
|
|
|
|
command = "ALL";
|
|
|
|
options = [ "NOPASSWD" ];
|
|
|
|
}
|
|
|
|
];
|
|
|
|
groups = [ "wheel" ];
|
|
|
|
}];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable SSH server with exclusively key-based auth
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
settings.PasswordAuthentication = false;
|
|
|
|
settings.KbdInteractiveAuthentication = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Configure system packages
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
git
|
|
|
|
networkmanagerapplet
|
|
|
|
];
|
|
|
|
|
|
|
|
# Configure mouse and touchpad
|
|
|
|
services.libinput = {
|
|
|
|
enable = true;
|
|
|
|
mouse.naturalScrolling = true;
|
|
|
|
touchpad.naturalScrolling = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable flakes
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
|
|
# Configure bootloader
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
|
|
# Configure networking
|
|
|
|
networking.hostName = "joey-desktop-nixos";
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
|
|
# Disable systemd's getty and autovt on tty1
|
|
|
|
systemd.services = {
|
|
|
|
"getty@tty1".enable = false;
|
|
|
|
"autovt@tty1".enable = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Enable printing service
|
|
|
|
services.printing.enable = true;
|
|
|
|
|
|
|
|
# Configure audio
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Configure XDG
|
|
|
|
xdg.portal.enable = true;
|
|
|
|
xdg.portal.wlr.enable = true;
|
|
|
|
xdg.portal.extraPortals = with pkgs; [
|
|
|
|
xdg-desktop-portal-gtk
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
programs.steam.enable = true;
|
|
|
|
|
|
|
|
programs.nix-ld = {
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.graphics = {
|
|
|
|
enable = true;
|
|
|
|
enable32Bit = true;
|
|
|
|
extraPackages = [];
|
|
|
|
};
|
|
|
|
hardware.amdgpu = {
|
|
|
|
amdvlk.enable = true;
|
|
|
|
opencl.enable = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# Configure displayManager
|
|
|
|
services.displayManager = {
|
|
|
|
enable = true;
|
|
|
|
autoLogin.enable = true;
|
|
|
|
autoLogin.user = "joey";
|
|
|
|
sddm = {
|
|
|
|
enable = true;
|
|
|
|
autoNumlock = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
# Configure X11 server
|
2024-12-06 13:53:58 -08:00
|
|
|
services.xserver = {
|
|
|
|
enable = true;
|
|
|
|
excludePackages = [ pkgs.xterm ];
|
|
|
|
xkb = {
|
|
|
|
layout = "us";
|
|
|
|
variant = "";
|
|
|
|
};
|
2024-12-05 12:52:17 -08:00
|
|
|
};
|
|
|
|
|
|
|
|
# DO NOT CHANGE
|
|
|
|
system.stateVersion = "24.11";
|
|
|
|
}
|
|
|
|
|