Files
frank-nix/hosts/shared/nixos-pc.nix
T

245 lines
4.8 KiB
Nix

{
pkgs,
lib,
inputs,
...
}:
{
imports = [
../../features/bash.nix
../../features/nix-ld.nix
../../features/docker.nix
../../features/vim.nix
../../features/avahi.nix
../../features/systemd-boot.nix
../../features/i18n.nix
../../features/sudo.nix
./nix-package-manager.nix
];
boot = {
consoleLogLevel = 3;
kernelParams = [
"quiet"
"rd.udev.log_level=3"
"rd.systemd.show_status=auto"
];
initrd = {
verbose = false;
};
kernelModules = [
"ntsync"
];
plymouth = {
enable = true;
theme = "bgrt";
};
};
fonts = {
fontconfig = {
enable = true;
subpixel.rgba = "none";
hinting.style = "slight";
};
};
services = {
flatpak = {
packages = [
{
appId = "com.github.dynobo.normcap";
origin = "flathub";
}
{
appId = "com.usebottles.bottles";
origin = "flathub";
}
{
appId = "io.github.ungoogled_software.ungoogled_chromium";
origin = "flathub";
}
{
appId = "org.gtk.Gtk3theme.Breeze";
origin = "flathub";
}
{
appId = "io.mpv.Mpv";
origin = "flathub";
}
];
};
# Configures snapshots for home subvolume.
# Requires /home/.snapshots subvolume to function.
snapper = {
snapshotInterval = "hourly";
cleanupInterval = "1d";
configs = {
home = {
SUBVOLUME = "/home";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = "10";
TIMELINE_LIMIT_DAILY = "7";
TIMELINE_LIMIT_WEEKLY = "2";
TIMELINE_LIMIT_MONTHLY = "0";
TIMELINE_LIMIT_YEARLY = "0";
BACKGROUND_COMPARISON = "yes";
NUMBER_CLEANUP = "no";
NUMBER_MIN_AGE = "1800";
NUMBER_LIMIT = "50";
NUMBER_LIMIT_IMPORTANT = "10";
EMPTY_PRE_POST_CLEANUP = "yes";
EMPTY_PRE_POST_MIN_AGE = "1800";
};
};
};
# Enable KMSCON DRM TTY.
kmscon = {
enable = true;
config = {
hwAccel = true;
term = "xterm-256color";
font-name = "Hack Nerd Font Mono";
};
};
# Configure pipewire. Disables 32Bit ALSA since it causes build errors
# and is largely vestigial.
pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = lib.mkForce false;
};
openssh.enable = true;
affinity-thumbnailer.enable = true;
};
networking = {
wireless.enable = true;
networkmanager.enable = true;
networkmanager.plugins = with pkgs; [ networkmanager-openvpn ];
firewall = {
allowedTCPPorts = [ 22 ];
allowedTCPPortRanges = [
{
from = 1714;
to = 1764;
} # KDE Connect
];
allowedUDPPortRanges = [
{
from = 1714;
to = 1764;
} # KDE Connect
];
};
};
security.rtkit.enable = true;
programs = {
ssh.startAgent = true;
firefox.enable = true;
gnupg.agent = {
enable = true;
pinentryPackage = pkgs.pinentry-qt;
};
appimage = {
enable = true;
binfmt = true;
};
};
users.users.frank = {
isNormalUser = true;
description = "Frank LoTurco";
extraGroups = [
"networkmanager"
"wheel"
"input"
"video"
"uinput"
];
};
nixpkgs = {
# Fix msitools compiling and failing it's test-suite.
overlays = [
(final: prev: {
msitools = prev.msitools.overrideAttrs (old: {
doCheck = false;
});
})
inputs.affinity-nix.overlays.default
];
};
environment = {
systemPackages = with pkgs; [
wget
dnsmasq
guestfs-tools
unrar
p7zip
btrfs-assistant
nil
bash-language-server
nerd-fonts.hack
jump
weather
kdePackages.kfind
desktop-file-utils
openjdk
openjdk17
openjdk25
tmux
zathura
hunspell
hunspellDicts.en_US
hyphenDicts.en_US
affinity-v3
libreoffice-qt
qimgv
vorta
distrobox
devenv
ripgrep
rtk
inputs.appimage-manager.packages.${pkgs.stdenv.hostPlatform.system}.default
inputs.gloomberb.packages.${pkgs.stdenv.hostPlatform.system}.default
inputs.pi.packages.${pkgs.stdenv.hostPlatform.system}.default
(python3.withPackages (
python-pkgs: with python-pkgs; [
requests
pandas
]
))
(callPackage ../../packages/heidisql/package.nix { })
];
shellAliases = import ../../features/aliases.nix { inherit pkgs; };
sessionVariables = import ../../features/xdg.nix { inherit pkgs; };
};
system.stateVersion = "26.05";
}