summaryrefslogtreecommitdiff
path: root/nixos/modules
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/features/appimage/default.nix4
-rw-r--r--nixos/modules/features/audio-tools/default.nix1
-rw-r--r--nixos/modules/features/binary-compat/default.nix4
-rw-r--r--nixos/modules/features/cli-tools/default.nix5
-rw-r--r--nixos/modules/features/desktop-apps/default.nix4
-rw-r--r--nixos/modules/features/dev-tools/default.nix1
-rw-r--r--nixos/modules/features/drag-n-drop/default.nix11
-rw-r--r--nixos/modules/features/editors/default.nix2
-rw-r--r--nixos/modules/features/file-managers/default.nix10
-rw-r--r--nixos/modules/features/fonts/default.nix2
-rw-r--r--nixos/modules/features/gst-codecs/default.nix2
-rw-r--r--nixos/modules/features/monitoring/default.nix1
-rw-r--r--nixos/modules/features/mouse/default.nix13
-rw-r--r--nixos/modules/features/mpd/default.nix10
-rw-r--r--nixos/modules/features/niri/default.nix5
-rw-r--r--nixos/modules/features/noctalia-greeter/default.nix4
-rw-r--r--nixos/modules/features/noctalia-shell/default.nix6
-rw-r--r--nixos/modules/features/nvidia/default.nix5
-rw-r--r--nixos/modules/features/starship/default.nix5
-rw-r--r--nixos/modules/features/swingmusic/default.nix2
-rw-r--r--nixos/modules/features/terminals/default.nix2
-rw-r--r--nixos/modules/features/wayland-tools/default.nix1
-rw-r--r--nixos/modules/features/wireshark/default.nix4
-rw-r--r--nixos/modules/system/audio/default.nix4
-rw-r--r--nixos/modules/system/boot/default.nix12
-rw-r--r--nixos/modules/system/hardware/default.nix4
-rw-r--r--nixos/modules/system/locale/default.nix2
-rw-r--r--nixos/modules/system/network/default.nix25
-rw-r--r--nixos/modules/system/nix/default.nix6
-rw-r--r--nixos/modules/system/printing/default.nix2
-rw-r--r--nixos/modules/system/services/default.nix4
-rw-r--r--nixos/modules/system/users/default.nix9
32 files changed, 119 insertions, 53 deletions
diff --git a/nixos/modules/features/appimage/default.nix b/nixos/modules/features/appimage/default.nix
index fba4ed7..e16189b 100644
--- a/nixos/modules/features/appimage/default.nix
+++ b/nixos/modules/features/appimage/default.nix
@@ -1,6 +1,8 @@
{ pkgs, ... }:
{
+ # AppImage support: binfmt registers the interpreter so you can run
+ # AppImages directly. The override pulls in WebKit for GUI AppImages.
programs.appimage = {
enable = true;
binfmt = true;
@@ -10,4 +12,4 @@
];
};
};
-}
+} \ No newline at end of file
diff --git a/nixos/modules/features/audio-tools/default.nix b/nixos/modules/features/audio-tools/default.nix
index b3013b0..fa550d8 100644
--- a/nixos/modules/features/audio-tools/default.nix
+++ b/nixos/modules/features/audio-tools/default.nix
@@ -1,6 +1,7 @@
{ pkgs, ... }:
{
+ # User-facing audio/media clients (the MPD *server* lives in the `mpd` module)
environment.systemPackages = with pkgs; [
mpc
mpd
diff --git a/nixos/modules/features/binary-compat/default.nix b/nixos/modules/features/binary-compat/default.nix
index e88349b..56212e1 100644
--- a/nixos/modules/features/binary-compat/default.nix
+++ b/nixos/modules/features/binary-compat/default.nix
@@ -1,8 +1,8 @@
{ pkgs, ... }:
{
- # Libraries shipped so non-Nix binaries (AppImages, dynamically linked
- # programs via nix-ld) can resolve their runtime deps.
+ # Runtime libraries so non-Nix binaries (AppImages, dynamically linked
+ # programs loaded via envfs/nix-ld) can resolve their shared-object deps.
environment.systemPackages = with pkgs; [
cacert
libGL
diff --git a/nixos/modules/features/cli-tools/default.nix b/nixos/modules/features/cli-tools/default.nix
index f5baef1..cdd0439 100644
--- a/nixos/modules/features/cli-tools/default.nix
+++ b/nixos/modules/features/cli-tools/default.nix
@@ -15,4 +15,7 @@
yt-dlp
caligula
];
-}
+
+ # Cross-shell prompt; its config lives in the dotfiles repo, not NixOS.
+ programs.starship.enable = true;
+} \ No newline at end of file
diff --git a/nixos/modules/features/desktop-apps/default.nix b/nixos/modules/features/desktop-apps/default.nix
index 385af11..d1db1d5 100644
--- a/nixos/modules/features/desktop-apps/default.nix
+++ b/nixos/modules/features/desktop-apps/default.nix
@@ -1,12 +1,13 @@
{ pkgs, inputs, ... }:
{
+ # Desktop GUI applications
environment.systemPackages = with pkgs; [
+ # Packaged from a flake input (see flake.nix)
inputs.helium-browser.packages.${pkgs.stdenv.hostPlatform.system}.helium
secretspec
claude-code
cryptomator
- ente-desktop
keepassxc
libreoffice
hunspellDicts.ru_RU
@@ -18,6 +19,7 @@
obsidian
obs-studio
pkgs.qbittorrent
+ evince
pkgs.masterpdfeditor
mullvad-browser
librewolf
diff --git a/nixos/modules/features/dev-tools/default.nix b/nixos/modules/features/dev-tools/default.nix
index 6b20cf7..7613495 100644
--- a/nixos/modules/features/dev-tools/default.nix
+++ b/nixos/modules/features/dev-tools/default.nix
@@ -1,6 +1,7 @@
{ pkgs, ... }:
{
+ # Compilers, language tooling, and IDEs for development
environment.systemPackages = with pkgs; [
black
cargo
diff --git a/nixos/modules/features/drag-n-drop/default.nix b/nixos/modules/features/drag-n-drop/default.nix
deleted file mode 100644
index 7bf65ad..0000000
--- a/nixos/modules/features/drag-n-drop/default.nix
+++ /dev/null
@@ -1,11 +0,0 @@
-{ configs, pkgs, ... }:
-
-{
- environment.systemPackages = with pkgs; [
- yaziPlugins.drag
- ripdrag
- dragon-drop
- ];
- programs.dconf.enable = true;
- programs.yazi.enable = true;
-}
diff --git a/nixos/modules/features/editors/default.nix b/nixos/modules/features/editors/default.nix
index 1570aa3..7f1dd9a 100644
--- a/nixos/modules/features/editors/default.nix
+++ b/nixos/modules/features/editors/default.nix
@@ -1,10 +1,12 @@
{ pkgs, ... }:
{
+ # Text editors / IDEs
environment.systemPackages = with pkgs; [
micro
neovim
(emacs.override { withNativeCompilation = true; })
+ # IME input method integration for the Vim/Neovim ecosystem.
pkgs.vimPlugins.im-select-nvim
];
} \ No newline at end of file
diff --git a/nixos/modules/features/file-managers/default.nix b/nixos/modules/features/file-managers/default.nix
index 950b34e..f3ad4b3 100644
--- a/nixos/modules/features/file-managers/default.nix
+++ b/nixos/modules/features/file-managers/default.nix
@@ -9,5 +9,13 @@
nautilus
sushi
yazi
+ # Drag & drop file transfer (yazi plugin + standalone helpers)
+ yaziPlugins.drag
+ ripdrag
+ dragon-drop
];
-}
+
+ # yazi (terminal file manager) and its drag-and-drop helpers; the module
+ # also registers yazi's shell integration.
+ programs.yazi.enable = true;
+} \ No newline at end of file
diff --git a/nixos/modules/features/fonts/default.nix b/nixos/modules/features/fonts/default.nix
index 322d449..7f2c371 100644
--- a/nixos/modules/features/fonts/default.nix
+++ b/nixos/modules/features/fonts/default.nix
@@ -1,6 +1,8 @@
{ pkgs, ... }:
{
+ # Fonts: installed under fonts.packages (NOT environment.systemPackages) so
+ # they land in the fontconfig cache instead of just the PATH.
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [
diff --git a/nixos/modules/features/gst-codecs/default.nix b/nixos/modules/features/gst-codecs/default.nix
index 7a85bf2..eac6777 100644
--- a/nixos/modules/features/gst-codecs/default.nix
+++ b/nixos/modules/features/gst-codecs/default.nix
@@ -1,6 +1,8 @@
{ pkgs, ... }:
{
+ # GStreamer plugin set so apps (e.g. mpv, totem, browsers) can decode media.
+ # Installed system-wide so anything linking GStreamer picks them up.
environment.systemPackages = with pkgs; [
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
diff --git a/nixos/modules/features/monitoring/default.nix b/nixos/modules/features/monitoring/default.nix
index df0a937..942e95e 100644
--- a/nixos/modules/features/monitoring/default.nix
+++ b/nixos/modules/features/monitoring/default.nix
@@ -2,6 +2,7 @@
{
environment.systemPackages = with pkgs; [
+ # System monitors / fetch tools
(btop.override { cudaSupport = true; })
duf
fastfetch
diff --git a/nixos/modules/features/mouse/default.nix b/nixos/modules/features/mouse/default.nix
index 3c71537..e0f44a8 100644
--- a/nixos/modules/features/mouse/default.nix
+++ b/nixos/modules/features/mouse/default.nix
@@ -1,9 +1,10 @@
{ config, pkgs, ... }:
{
- services.input-remapper.enable = true;
- environment.systemPackages = with pkgs; [
- piper
- input-remapper
-];
-}
+ # Input remapping service (mouse buttons/keys) + its configuration GUI.
+ services.input-remapper.enable = true;
+ environment.systemPackages = with pkgs; [
+ piper
+ input-remapper
+ ];
+} \ No newline at end of file
diff --git a/nixos/modules/features/mpd/default.nix b/nixos/modules/features/mpd/default.nix
index 383180d..a339622 100644
--- a/nixos/modules/features/mpd/default.nix
+++ b/nixos/modules/features/mpd/default.nix
@@ -1,7 +1,9 @@
{ pkgs, ... }:
{
- # MPD server
+ # MPD server (music player daemon). The audio_output points at PipeWire
+ # through its PulseAudio compatibility layer, since desktop audio is handled
+ # by modules/system/audio.
services.mpd = {
enable = true;
user = "seraphim";
@@ -21,12 +23,14 @@
};
};
+ # MPD runs as a system service, so it needs the per-user runtime dir to
+ # reach the PipeWire socket.
systemd.services.mpd.environment = {
XDG_RUNTIME_DIR = "/run/user/1000";
};
- # mpd-mpris is the MPRIS bridge for MPD — only useful when MPD is on,
- # so it lives in the same feature. Disable by removing this block.
+ # mpd-mpris bridges MPD to the MPRIS media control interface (used by
+ # Waybar/media keys). Lives here because it only matters when MPD is on.
systemd.user.services.mpd-mpris = {
description = "MPD MPRIS Service for Waybar";
wantedBy = [ "default.target" ];
diff --git a/nixos/modules/features/niri/default.nix b/nixos/modules/features/niri/default.nix
index 84f1d15..8f48be7 100644
--- a/nixos/modules/features/niri/default.nix
+++ b/nixos/modules/features/niri/default.nix
@@ -1,13 +1,18 @@
{ pkgs, ... }:
{
+ # niri: scrollable-tiling Wayland compositor.
+ # enableDefaultPath = false stops the bundled unit pre-setting PATH, so the
+ # session uses the environment NixOS generates.
programs.niri.enable = true;
systemd.user.services.niri.enableDefaultPath = false;
+ # Icon themes + cursors the compositor and its launchers rely on.
environment.systemPackages = with pkgs; [
adwaita-icon-theme
bibata-cursors
hicolor-icon-theme
+ # Shows polkit authentication dialogs as a layer-shell popup.
hyprpolkitagent
];
} \ No newline at end of file
diff --git a/nixos/modules/features/noctalia-greeter/default.nix b/nixos/modules/features/noctalia-greeter/default.nix
index b80465c..c65f806 100644
--- a/nixos/modules/features/noctalia-greeter/default.nix
+++ b/nixos/modules/features/noctalia-greeter/default.nix
@@ -1,6 +1,8 @@
{ pkgs, inputs, ... }:
{
+ # Noctalia greeter (display manager login screen).
+ # The module comes from the flake input rather than nixpkgs.
imports = [
inputs.noctalia-greeter.nixosModules.default
];
@@ -15,4 +17,4 @@
};
};
};
-}
+} \ No newline at end of file
diff --git a/nixos/modules/features/noctalia-shell/default.nix b/nixos/modules/features/noctalia-shell/default.nix
index a137d32..251ccff 100644
--- a/nixos/modules/features/noctalia-shell/default.nix
+++ b/nixos/modules/features/noctalia-shell/default.nix
@@ -1,10 +1,12 @@
{ pkgs, inputs, ... }:
{
+ # Noctalia shell (the desktop shell this configuration is named after).
+ # Two copies are installed:
+ # - inputs.noctalia: the project built straight from the flake input.
+ # - noctalia-shell: the packaged copy shipped in nixpkgs.
environment.systemPackages = with pkgs; [
- # v5 from the flake input
inputs.noctalia.packages.${stdenv.hostPlatform.system}.default
- # packaged copy from nixpkgs (also installed in the original config)
noctalia-shell
];
} \ No newline at end of file
diff --git a/nixos/modules/features/nvidia/default.nix b/nixos/modules/features/nvidia/default.nix
index 8a83433..f5f4d8f 100644
--- a/nixos/modules/features/nvidia/default.nix
+++ b/nixos/modules/features/nvidia/default.nix
@@ -1,6 +1,8 @@
{ config, pkgs, ... }:
{
+ # NVIDIA GPU driver. `open = false` uses the proprietary blob; modesetting
+ # enables modeset + nvidia-drm for proper Wayland support.
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
@@ -10,6 +12,7 @@
};
environment.systemPackages = with pkgs; [
+ # VA-API translation layer so NVIDIA can accelerate video decode.
nvidia-vaapi-driver
];
@@ -18,4 +21,4 @@
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NIXOS_OZONE_WL = "1";
};
-}
+} \ No newline at end of file
diff --git a/nixos/modules/features/starship/default.nix b/nixos/modules/features/starship/default.nix
deleted file mode 100644
index b364c5d..0000000
--- a/nixos/modules/features/starship/default.nix
+++ /dev/null
@@ -1,5 +0,0 @@
-{ ... }:
-
-{
- programs.starship.enable = true;
-} \ No newline at end of file
diff --git a/nixos/modules/features/swingmusic/default.nix b/nixos/modules/features/swingmusic/default.nix
index 6c3bc90..e666b72 100644
--- a/nixos/modules/features/swingmusic/default.nix
+++ b/nixos/modules/features/swingmusic/default.nix
@@ -1,6 +1,8 @@
{ ... }:
{
+ # Swing Music: self-hosted local music server. Built separately and placed
+ # in the user's home; this unit just turns it into a managed session service.
systemd.user.services.swingmusic = {
description = "Swing Music Local Server";
wantedBy = [ "graphical-session.target" ];
diff --git a/nixos/modules/features/terminals/default.nix b/nixos/modules/features/terminals/default.nix
index a290b42..22c5662 100644
--- a/nixos/modules/features/terminals/default.nix
+++ b/nixos/modules/features/terminals/default.nix
@@ -5,4 +5,4 @@
foot
ghostty
];
-}
+} \ No newline at end of file
diff --git a/nixos/modules/features/wayland-tools/default.nix b/nixos/modules/features/wayland-tools/default.nix
index 30253a1..399fcb0 100644
--- a/nixos/modules/features/wayland-tools/default.nix
+++ b/nixos/modules/features/wayland-tools/default.nix
@@ -1,6 +1,7 @@
{ pkgs, ... }:
{
+ # Wayland clipboard, screenshot, launcher and input tooling
environment.systemPackages = with pkgs; [
cliphist
fuzzel
diff --git a/nixos/modules/features/wireshark/default.nix b/nixos/modules/features/wireshark/default.nix
index 7b2141e..afebd39 100644
--- a/nixos/modules/features/wireshark/default.nix
+++ b/nixos/modules/features/wireshark/default.nix
@@ -1,6 +1,8 @@
{ pkgs, ... }:
{
+ # Wireshark: packet capture/analysis. The `wireshark` group grants non-root
+ # capture permissions to the user (programs.wireshark sets up dumpcap).
programs.wireshark = {
enable = true;
package = pkgs.wireshark;
@@ -9,4 +11,4 @@
users.users.seraphim = {
extraGroups = [ "wireshark" ];
};
-}
+} \ No newline at end of file
diff --git a/nixos/modules/system/audio/default.nix b/nixos/modules/system/audio/default.nix
index 140b08c..66ab087 100644
--- a/nixos/modules/system/audio/default.nix
+++ b/nixos/modules/system/audio/default.nix
@@ -1,7 +1,11 @@
{ pkgs, ... }:
{
+ # Real-time scheduling grants for the audio stack.
security.rtkit.enable = true;
+
+ # PipeWire is the desktop audio server; the PulseAudio shim keeps old
+ # clients (e.g. MPD's "pulse" output) working without a real PulseAudio.
services.pipewire = {
enable = true;
alsa.enable = true;
diff --git a/nixos/modules/system/boot/default.nix b/nixos/modules/system/boot/default.nix
index df64426..54cb1e6 100644
--- a/nixos/modules/system/boot/default.nix
+++ b/nixos/modules/system/boot/default.nix
@@ -1,15 +1,15 @@
{ pkgs, ... }:
{
+ # systemd-boot on UEFI
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
- # EDID firmware loading is kept here because it's a kernel-level boot concern.
- # Commented kernel params from the original config are preserved.
- # boot.kernelParams = [
- # "drm.edid_firmware=DP-1:edid/mi_edid.bin"
- # "video=DP-1:2560x1440@180"
- # ];
+ # EDID firmware (monitor identity) is exposed to the kernel as firmware so
+ # the display can be driven at its native resolution; mi_edid.bin lives at
+ # the repo root next to hardware-configuration.nix.
+ # NOTE: the matching --kernel-params (drm.edid_firmware / video=) are kept
+ # commented out because they hard-pin a specific DP output name.
hardware.firmware = [
(pkgs.runCommand "custom-edid" {} ''
mkdir -p $out/lib/firmware/edid
diff --git a/nixos/modules/system/hardware/default.nix b/nixos/modules/system/hardware/default.nix
index bad717c..b3f1bbb 100644
--- a/nixos/modules/system/hardware/default.nix
+++ b/nixos/modules/system/hardware/default.nix
@@ -1,16 +1,20 @@
{ config, pkgs, ... }:
{
+ # Secondary data drive, mounted as a regular user (rw, no root needed).
fileSystems."/mnt/giga" = {
device = "/dev/disk/by-uuid/bfed3a37-05e1-465b-a4b7-d74cd31bf937";
fsType = "ext4";
options = [ "defaults" "user" "rw" ];
};
+ # Mesa graphics stack (needed even on NVIDIA for software fallbacks / GL).
hardware.graphics = {
enable = true;
enable32Bit = true;
};
+ # The actual NVIDIA driver is configured in modules/features/nvidia; this
+ # just tells the X server legacy path to prefer the nvidia driver name.
services.xserver.videoDrivers = [ "nvidia" ];
} \ No newline at end of file
diff --git a/nixos/modules/system/locale/default.nix b/nixos/modules/system/locale/default.nix
index 4c07d59..f95ba12 100644
--- a/nixos/modules/system/locale/default.nix
+++ b/nixos/modules/system/locale/default.nix
@@ -1,8 +1,10 @@
{ ... }:
{
+ # Etc/GMT-7 is the Posix name for UTC+7 (no DST).
time.timeZone = "Etc/GMT-7";
+ # Swiss German by default; only LC_TIME uses American English.
i18n.defaultLocale = "de_CH.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_CH.UTF-8";
diff --git a/nixos/modules/system/network/default.nix b/nixos/modules/system/network/default.nix
index a862235..5601ff8 100644
--- a/nixos/modules/system/network/default.nix
+++ b/nixos/modules/system/network/default.nix
@@ -5,22 +5,29 @@
networking.networkmanager.enable = true;
programs.amnezia-vpn.enable = true;
- # Primary DNS via Mullvad DoT (Base mode)
+ # Primary DNS via Mullvad DoT (Base mode).
+ # When systemd-resolved is enabled, these servers are fed into its
+ # `Resolve.DNS` list. The `#server` suffix is systemd-resolved's
+ # DoT (DNS-over-TLS) syntax and is ignored by non-resolved consumers.
networking.nameservers = [
"194.242.2.4#base.dns.mullvad.net"
"194.242.2.2#dns.mullvad.net"
];
- # systemd-resolved: Mullvad primary, Quad9 fallback
+ # systemd-resolved: Mullvad primary, Quad9 fallback.
+ # Options live under `settings.Resolve` (the flat `services.resolved.*`
+ # aliases were removed upstream — they now emit deprecation warnings).
services.resolved = {
enable = true;
- dnsovertls = "opportunistic";
- dnssec = "false";
- domains = [ "~." ];
- fallbackDns = [
- "9.9.9.9#dns.quad9.net"
- "149.112.112.112#dns.quad9.net"
- ];
+ settings.Resolve = {
+ DNSOverTLS = "opportunistic";
+ DNSSEC = "false";
+ Domains = [ "~." ];
+ FallbackDNS = [
+ "9.9.9.9#dns.quad9.net"
+ "149.112.112.112#dns.quad9.net"
+ ];
+ };
};
# Avahi (Printer / Network Discovery)
diff --git a/nixos/modules/system/nix/default.nix b/nixos/modules/system/nix/default.nix
index 8f33990..9cefbf5 100644
--- a/nixos/modules/system/nix/default.nix
+++ b/nixos/modules/system/nix/default.nix
@@ -1,16 +1,20 @@
{ config, pkgs, lib, inputs, ... }:
{
+ # Nix itself: enable the flake + nix-command features this config relies on.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
+ # Automatic garbage collection — drop builds older than a week.
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
- programs.nix-ld.enable = true;
+ # envfs is the modern replacement for nix-ld: it mounts a FUSE filesystem
+ # on /usr/bin and /bin that resolves shebangs (e.g. #!/usr/bin/env) to the
+ # executables on the caller's PATH. It supersedes programs.nix-ld entirely.
services.envfs.enable = true;
security.polkit.enable = true;
diff --git a/nixos/modules/system/printing/default.nix b/nixos/modules/system/printing/default.nix
index 26ceb03..91828b2 100644
--- a/nixos/modules/system/printing/default.nix
+++ b/nixos/modules/system/printing/default.nix
@@ -1,6 +1,8 @@
{ pkgs, ... }:
{
+ # CUPS printing with drivers for common Brother (brlaser) and generic
+ # printers (gutenprint); cups-filters provides the filter backends.
services.printing = {
enable = true;
drivers = with pkgs; [
diff --git a/nixos/modules/system/services/default.nix b/nixos/modules/system/services/default.nix
index 0f06931..74ac531 100644
--- a/nixos/modules/system/services/default.nix
+++ b/nixos/modules/system/services/default.nix
@@ -1,11 +1,15 @@
{ ... }:
{
+ # File indexer (gvfs) + thumbnailer (tumbler) for the desktop shell.
services.gvfs.enable = true;
services.tumbler.enable = true;
+ # GNOME Keyring: stores secrets for Chrome/keepassxc seams etc.
services.gnome.gnome-keyring.enable = true;
+ # dconf is the config DB used by GSettings-backed apps (nautilus, etc.).
programs.dconf.enable = true;
+ # Keep the journal bounded so it can't fill the root partition.
services.journald.extraConfig = ''
SystemMaxUse=50M
MaxRetentionSec=1month
diff --git a/nixos/modules/system/users/default.nix b/nixos/modules/system/users/default.nix
index f43149d..6eafd7c 100644
--- a/nixos/modules/system/users/default.nix
+++ b/nixos/modules/system/users/default.nix
@@ -1,16 +1,20 @@
{ pkgs, ... }:
{
+ # Main desktop user.
users.users."seraphim" = {
isNormalUser = true;
description = "seraphim";
shell = pkgs.zsh;
+ # wheel for sudo/doas, networkmanager to manage connections itself.
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
+ # doas (simpler sudo replacement)
security.doas = {
enable = true;
+ # Give seraphim persistent passwordless-ish privileges, keeping the env.
extraRules = [
{
users = [ "seraphim" ];
@@ -20,12 +24,15 @@
];
};
+ # ZSH + completion, oh-my-zsh, autosuggestions, and fzf key bindings.
programs.zsh = {
enable = true;
enableCompletion = true;
+ ohMyZsh.enable = true;
autosuggestions = {
enable = true;
highlightStyle = "fg=#6c7086";
+ strategy = [ "history" "completion" ];
};
interactiveShellInit = ''
source ${pkgs.fzf}/share/fzf/key-bindings.zsh
@@ -34,6 +41,8 @@
shellAliases = {
ls = "eza -al --icons=auto";
ll = "eza -al --icons=auto";
+ sudo = "doas";
+ open = "xdg-open";
};
};
}