From f8db74a70f8ff6ea05e63a625cd1924933ccabff Mon Sep 17 00:00:00 2001 From: Bauke Date: Wed, 1 Feb 2023 14:31:56 +0100 Subject: [PATCH] Add Nix configuration for Stardust. --- .bauke/nix/stardust/configuration.nix | 25 +++++++ .bauke/nix/stardust/packages.nix | 62 ++++++++++++++++++ .bauke/nix/stardust/programs-services.nix | 45 +++++++++++++ .bauke/nix/stardust/system.nix | 79 +++++++++++++++++++++++ .bauke/nix/stardust/users.nix | 15 +++++ 5 files changed, 226 insertions(+) create mode 100644 .bauke/nix/stardust/configuration.nix create mode 100644 .bauke/nix/stardust/packages.nix create mode 100644 .bauke/nix/stardust/programs-services.nix create mode 100644 .bauke/nix/stardust/system.nix create mode 100644 .bauke/nix/stardust/users.nix diff --git a/.bauke/nix/stardust/configuration.nix b/.bauke/nix/stardust/configuration.nix new file mode 100644 index 0000000..3375592 --- /dev/null +++ b/.bauke/nix/stardust/configuration.nix @@ -0,0 +1,25 @@ +# The main configuration file. + +{ pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ./packages.nix + ./programs-services.nix + ./users.nix + ./system.nix + ]; + + nix = { + settings.experimental-features = [ "flakes" "nix-command" ]; + }; + + nixpkgs = { + config.allowUnfree = true; + }; + + # Before changing this value read the documentation for this option! + # https://search.nixos.org/options?channel=22.11&show=system.stateVersion + system.stateVersion = "22.11"; +} diff --git a/.bauke/nix/stardust/packages.nix b/.bauke/nix/stardust/packages.nix new file mode 100644 index 0000000..18ec2bc --- /dev/null +++ b/.bauke/nix/stardust/packages.nix @@ -0,0 +1,62 @@ +# The list of system packages to install. + +{ pkgs, ... }: + +{ + environment = { + systemPackages = with pkgs; [ + bat + catppuccin-cursors + chromium + exa + delta + deno + direnv + firefox + ffmpeg + gegl + gimp + git + imagemagick + kitty + libnotify + librewolf + mat2 + mpv + nodejs + nodePackages.pnpm + nvitop + osu-lazer + pavucontrol + picard + pop-icon-theme + python310Packages.pipx + qalculate-gtk + restic + ripgrep + rnix-lsp + rustup + standardnotes + starship + steam + tauon + tea + transmission-gtk + vscodium.fhs + xarchiver + xclip + xorg.libXcursor + xfce.xfce4-pulseaudio-plugin + xfce.xfce4-timer-plugin + xfce.xfce4-whiskermenu-plugin + (wrapOBS { + plugins = with obs-studio-plugins; [ + input-overlay + obs-pipewire-audio-capture + obs-source-record + obs-vkcapture + ]; + }) + ]; + }; +} diff --git a/.bauke/nix/stardust/programs-services.nix b/.bauke/nix/stardust/programs-services.nix new file mode 100644 index 0000000..a8a04c1 --- /dev/null +++ b/.bauke/nix/stardust/programs-services.nix @@ -0,0 +1,45 @@ +# Configuration for programs and services. + +{ pkgs, ... }: + +{ + programs = { + gnupg = { + agent = { + enable = true; + enableSSHSupport = true; + }; + }; + + thunar = { + plugins = with pkgs.xfce; [ thunar-archive-plugin ]; + }; + + zsh = { + enable = true; + }; + }; + + services = { + avahi = { + enable = true; + nssmdns = true; + }; + + pipewire = { + alsa.enable = true; + alsa.support32Bit = true; + enable = true; + pulse.enable = true; + }; + + xserver = { + desktopManager.xfce.enable = true; + displayManager.lightdm.enable = true; + enable = true; + layout = "be"; + videoDrivers = [ "nvidia" ]; + xkbVariant = ""; + }; + }; +} diff --git a/.bauke/nix/stardust/system.nix b/.bauke/nix/stardust/system.nix new file mode 100644 index 0000000..6cf4115 --- /dev/null +++ b/.bauke/nix/stardust/system.nix @@ -0,0 +1,79 @@ +# General system configuration. + +{ pkgs, ... }: + +{ + boot = { + loader = { + efi.canTouchEfiVariables = true; + efi.efiSysMountPoint = "/boot/efi"; + systemd-boot.enable = true; + }; + + supportedFilesystems = [ "ntfs" ]; + }; + + console = { + keyMap = "be-latin1"; + }; + + environment = { + extraOutputsToInstall = [ "dev" ]; + shells = [ pkgs.zsh ]; + }; + + fonts.fonts = with pkgs; [ + hasklig + inter + iosevka + noto-fonts + (nerdfonts.override { fonts = [ "Hasklig" ]; }) + ]; + + hardware = { + opengl = { + driSupport32Bit = true; + enable = true; + }; + + opentabletdriver = { + enable = true; + }; + + pulseaudio = { + enable = false; + }; + }; + + i18n = { + defaultLocale = "en_US.UTF-8"; + extraLocaleSettings = { + LC_ADDRESS = "en_GB.UTF-8"; + LC_IDENTIFICATION = "en_GB.UTF-8"; + LC_MEASUREMENT = "en_GB.UTF-8"; + LC_MONETARY = "en_GB.UTF-8"; + LC_NAME = "en_GB.UTF-8"; + LC_NUMERIC = "en_GB.UTF-8"; + LC_PAPER = "en_GB.UTF-8"; + LC_TELEPHONE = "en_GB.UTF-8"; + LC_TIME = "en_GB.UTF-8"; + }; + }; + + networking = { + hostName = "stardust"; + networkmanager.enable = true; + }; + + security = { + rtkit.enable = true; + }; + + sound = { + enable = true; + }; + + time = { + timeZone = "Europe/Brussels"; + }; +} diff --git a/.bauke/nix/stardust/users.nix b/.bauke/nix/stardust/users.nix new file mode 100644 index 0000000..ae4bf41 --- /dev/null +++ b/.bauke/nix/stardust/users.nix @@ -0,0 +1,15 @@ +# Configuration for user accounts. + +{ pkgs, ... }: + +{ + users = { + defaultUserShell = pkgs.zsh; + + users.bauke = { + description = "Bauke"; + extraGroups = [ "networkmanager" "wheel" ]; + isNormalUser = true; + }; + }; +}