dotfiles/nixos/configuration.linux.nix

118 lines
2.5 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#
# Our generic NixOS configuration for all systems.
# Individual machines are set up in ../flake.nix and their ./hosts entries.
#
# vim: et:ts=2:sw=2:
#
{ pkgs, deprekages, talon, ... }:
{
# Ensures the system state isn't changed breakingly (e.g. by updating
# a program to a version that takes a newer data format) from the version
# listed here.
system.stateVersion = "23.11";
#
# Generic system settings.
#
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "nl_NL.UTF-8";
# Allow use of e.g. 'nix search' and flakes.
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Allow use of unfree software.
nixpkgs.config.allowUnfree = true;
# You can trust us. I swear.
nix.settings.trusted-users = [ "deprekated" ];
# Xonsh is currently broken in unstable.
# Add a harmless workaround to all of our systems.
imports = [
./overlays/always-wrap-xonsh.nix
];
#
# General tweaks and fixes.
#
# Make systemd not hang here forever.
systemd.extraConfig = "DefaultTimeoutStopSec=20";
#
# Users.
#
# Create a device groups, which are useful for USB stuffs.
users.groups.plugdev = { };
users.groups.input = { };
# Define a user account. Don't forget to set a password with passwd.
users.users.deprekated = {
isNormalUser = true;
description = "Kate Adkins";
uid = 1000;
extraGroups = [
"audio"
"disk"
"dialout"
"libvirtd"
"networkmanager"
"plugdev"
"qmemu-libvirtd"
"video"
"wheel"
"input"
"kvm"
];
# Use xonsh as our default shell.
shell = deprekages.xonsh-with-xontribs;
};
programs.xonsh = {
enable = true;
package = deprekages.xonsh-with-xontribs;
# Unfortunately, repeating this here is temporarily necessary due to NixOS module wonk.
extraPackages = [
deprekages.xontrib-whole-word-jumping
deprekages.xontrib-term-integrations
deprekages.xontrib-prompt-starship
deprekages.xontrib-prompt-bar
deprekages.xontrib-sh
];
};
#
# Services
#
services.pcscd.enable = true;
services.openssh.enable = true;
services.mullvad-vpn.enable = true;
virtualisation.docker.enable = true;
services.udev.packages = [
pkgs.minipro
] ++ (if pkgs.stdenv.isAarch64 then [] else [
#talon.default
]);
services.fwupd.enable = true;
# Use avahi for local DNS.
services.avahi = {
enable = true;
nssmdns4 = true;
nssmdns6 = true;
publish = {
enable = true;
userServices = true;
};
};
}