summaryrefslogtreecommitdiff
path: root/nixos/modules/system
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/system')
-rw-r--r--nixos/modules/system/audio/default.nix21
-rw-r--r--nixos/modules/system/boot/default.nix19
-rw-r--r--nixos/modules/system/hardware/default.nix20
-rw-r--r--nixos/modules/system/locale/default.nix20
-rw-r--r--nixos/modules/system/network/default.nix38
-rw-r--r--nixos/modules/system/nix/default.nix30
-rw-r--r--nixos/modules/system/printing/default.nix14
-rw-r--r--nixos/modules/system/services/default.nix24
-rw-r--r--nixos/modules/system/users/default.nix69
9 files changed, 0 insertions, 255 deletions
diff --git a/nixos/modules/system/audio/default.nix b/nixos/modules/system/audio/default.nix
deleted file mode 100644
index 66ab087..0000000
--- a/nixos/modules/system/audio/default.nix
+++ /dev/null
@@ -1,21 +0,0 @@
-{ 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;
- alsa.support32Bit = true;
- pulse.enable = true;
- };
-
- environment.systemPackages = with pkgs; [
- brightnessctl
- pamixer
- playerctl
- ];
-} \ No newline at end of file
diff --git a/nixos/modules/system/boot/default.nix b/nixos/modules/system/boot/default.nix
deleted file mode 100644
index 54cb1e6..0000000
--- a/nixos/modules/system/boot/default.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ pkgs, ... }:
-
-{
- # systemd-boot on UEFI
- boot.loader.systemd-boot.enable = true;
- boot.loader.efi.canTouchEfiVariables = true;
-
- # 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
- cp ${../../../mi_edid.bin} $out/lib/firmware/edid/mi_edid.bin
- '')
- ];
-} \ No newline at end of file
diff --git a/nixos/modules/system/hardware/default.nix b/nixos/modules/system/hardware/default.nix
deleted file mode 100644
index d81b60e..0000000
--- a/nixos/modules/system/hardware/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ 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" ];
-}
diff --git a/nixos/modules/system/locale/default.nix b/nixos/modules/system/locale/default.nix
deleted file mode 100644
index f95ba12..0000000
--- a/nixos/modules/system/locale/default.nix
+++ /dev/null
@@ -1,20 +0,0 @@
-{ ... }:
-
-{
- # 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";
- LC_IDENTIFICATION = "de_CH.UTF-8";
- LC_MEASUREMENT = "de_CH.UTF-8";
- LC_MONETARY = "de_CH.UTF-8";
- LC_NAME = "de_CH.UTF-8";
- LC_NUMERIC = "de_CH.UTF-8";
- LC_PAPER = "de_CH.UTF-8";
- LC_TELEPHONE = "de_CH.UTF-8";
- LC_TIME = "en_US.UTF-8";
- };
-} \ No newline at end of file
diff --git a/nixos/modules/system/network/default.nix b/nixos/modules/system/network/default.nix
deleted file mode 100644
index 588314e..0000000
--- a/nixos/modules/system/network/default.nix
+++ /dev/null
@@ -1,38 +0,0 @@
-{ ... }:
-
-{
- networking.hostName = "opus";
- networking.networkmanager.enable = true;
-
- # 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.
- # Options live under `settings.Resolve` (the flat `services.resolved.*`
- # aliases were removed upstream โ€” they now emit deprecation warnings).
- services.resolved = {
- enable = true;
- 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)
- services.avahi = {
- enable = true;
- nssmdns4 = true;
- openFirewall = true;
- };
-}
diff --git a/nixos/modules/system/nix/default.nix b/nixos/modules/system/nix/default.nix
deleted file mode 100644
index a02cb6f..0000000
--- a/nixos/modules/system/nix/default.nix
+++ /dev/null
@@ -1,30 +0,0 @@
-{ 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;
- permittedInsecurePackages = [
- "electron-39.8.10"
- ];
- };
-
- # Automatic garbage collection โ€” drop builds older than a week.
- nix.gc = {
- automatic = true;
- dates = "weekly";
- options = "--delete-older-than 7d";
- };
-
- # 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;
-
- environment.variables = {
- SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
- NIX_SSL_CERT_FILE = "/etc/ssl/certs/ca-certificates.crt";
- };
-} \ No newline at end of file
diff --git a/nixos/modules/system/printing/default.nix b/nixos/modules/system/printing/default.nix
deleted file mode 100644
index 91828b2..0000000
--- a/nixos/modules/system/printing/default.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ 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; [
- brlaser
- gutenprint
- cups-filters
- ];
- };
-} \ No newline at end of file
diff --git a/nixos/modules/system/services/default.nix b/nixos/modules/system/services/default.nix
deleted file mode 100644
index 571ae3a..0000000
--- a/nixos/modules/system/services/default.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ ... }:
-
-{
- # 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
- '';
-
- # Cap core dumps so a crashing app can't fill the root partition with
- # multi-GB crash dumps (e.g. java/electron segfaults).
- systemd.coredump.settings.Coredump = {
- ProcessSizeMax = "512M";
- Storage = "external";
- };
-}
diff --git a/nixos/modules/system/users/default.nix b/nixos/modules/system/users/default.nix
deleted file mode 100644
index d9ac254..0000000
--- a/nixos/modules/system/users/default.nix
+++ /dev/null
@@ -1,69 +0,0 @@
-{ 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" ];
- keepEnv = true;
- persist = true;
- }
- ];
- };
-
- # fzf -- proper key bindings + completion for zsh.
- programs.fzf = {
- fuzzyCompletion = true;
- keybindings = true;
- };
-
- # ZSH + completion, oh-my-zsh, autosuggestions.
- programs.zsh = {
- enable = true;
- enableCompletion = true;
- ohMyZsh.enable = true;
- autosuggestions = {
- enable = true;
- highlightStyle = "fg=#6c7086";
- strategy = [ "history" "completion" ];
- };
- interactiveShellInit = ''
- # Fish-style full-screen Ctrl+R history search.
- export FZF_CTRL_R_OPTS="
- --layout=reverse
- --scheme=history
- --height=100%
- --border=sharp
- --border-label=' Ctrl+R '
- --highlight-line
- --pointer=โ†’
- --info=inline-right
- --header-first
- --header='enter: accept ยท ctrl-/ : toggle preview'
- --preview='echo {}' --preview-window=down:3:hidden:wrap
- --bind=ctrl-/:toggle-preview
- "
- '';
- shellAliases = {
- ls = "eza -al --icons=auto";
- ll = "eza -al --icons=auto";
- fs = "fastfetch";
- hf = "hyfetch";
- sudo = "doas";
- open = "xdg-open";
- };
- };
-}