From caf6b24398dc6b5174ce8ea69c8a03c8ed9d2643 Mon Sep 17 00:00:00 2001 From: voidarclabs Date: Sun, 4 Jan 2026 16:46:33 +0000 Subject: [PATCH] added nix formatting --- common.nix | 469 +++++++++++++++++++++---------------------- configuration-pc.nix | 68 +++---- flake.nix | 75 +++---- 3 files changed, 305 insertions(+), 307 deletions(-) diff --git a/common.nix b/common.nix index 8e99d29..b47fecb 100644 --- a/common.nix +++ b/common.nix @@ -1,267 +1,266 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: { - imports = - [ - /etc/nixos/hardware-configuration.nix - inputs.walker.nixosModules.default - ]; + imports = [ + /etc/nixos/hardware-configuration.nix + inputs.walker.nixosModules.default + ]; -# Allow Nix command and flakes (ofc) - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Allow Nix command and flakes (ofc) + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; -# Allow unfree packages - nixpkgs = { - config = { - allowUnfree = true; - packageOverrides = pkgs: { - unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {}; - }; - }; - }; + # Allow unfree packages + nixpkgs = { + config = { + allowUnfree = true; + packageOverrides = pkgs: { + unstable = + import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") + { }; + }; + }; + }; -# Boot - boot = { - loader = { - timeout = 2; - efi = { - canTouchEfiVariables = true; - }; - grub = { - efiSupport = true; - device = "nodev"; - theme = pkgs.catppuccin-grub; - }; - }; - plymouth = { - enable = true; - theme = "catppuccin-mocha"; - themePackages = with pkgs; [ -# By default we would install all themes - (catppuccin-plymouth.override { - variant = "mocha"; - }) - ]; - }; - }; + # Boot + boot = { + loader = { + timeout = 2; + efi = { + canTouchEfiVariables = true; + }; + grub = { + efiSupport = true; + device = "nodev"; + theme = pkgs.catppuccin-grub; + }; + }; + plymouth = { + enable = true; + theme = "catppuccin-mocha"; + themePackages = with pkgs; [ + # By default we would install all themes + (catppuccin-plymouth.override { + variant = "mocha"; + }) + ]; + }; + }; -# Use latest kernel. - boot.kernelPackages = pkgs.linuxPackages_latest; + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; -# Networking settings - # networking.hostName = "mobile02"; # Define your hostname. - networking.networkmanager.enable = true; + networking.networkmanager.enable = true; -# Enable bluetooth - hardware.bluetooth.enable = true; + # Enable bluetooth + hardware.bluetooth.enable = true; -# # Opengl and vulkan -# hardware.graphics = { -# enable = true; -# extraPackages = with pkgs; [ -# intel-vaapi-driver -# libva-vdpau-driver -# ]; -# }; + # Set your time zone. + time.timeZone = "Europe/London"; -# Set your time zone. - time.timeZone = "Europe/London"; + # Locale + i18n.defaultLocale = "en_GB.UTF-8"; + i18n.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"; + }; -# Locale - i18n.defaultLocale = "en_GB.UTF-8"; - i18n.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"; - }; + # Windowing Systems + services.xserver.enable = true; -# Windowing Systems - services.xserver.enable = true; + programs.hyprland.enable = true; + security.polkit.enable = true; -# services.displayManager.sddm = { -# enable = true; -# theme = "catppuccin-mocha-mauve"; -# package = pkgs.kdePackages.sddm; -# }; + # Keymap + services.xserver.xkb = { + layout = "gb"; + variant = ""; + }; + console.keyMap = "uk"; - programs.hyprland.enable = true; - security.polkit.enable = true; + # Pipewire + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; -# Keymap - services.xserver.xkb = { - layout = "gb"; - variant = ""; - }; - console.keyMap = "uk"; + # Local User + users.users.user01 = { + isNormalUser = true; + shell = pkgs.zsh; + description = "user01"; + extraGroups = [ + "input" + "bluetooth" + "networkmanager" + "docker" + "wheel" + ]; + packages = with pkgs; [ + # Ricing + bibata-cursors + catppuccin-gtk + # inputs.way-edges.packages.${pkgs.system}.way-edges + waybar + hyprlock + swaynotificationcenter + inputs.chataigne.packages.${pkgs.system}.chataigne + wlogout + wpaperd + kando + oh-my-posh + grimblast -# Pipewire - services.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; + # Terminal + carapace + kitty + github-cli + # light + bluetuith + wget + playerctl + git + fastfetch + lsd + inputs.doot.packages.${pkgs.system}.default + stow + fzf + ripgrep + zsh-autocomplete + nodejs + lazygit + tailscale -# Local User - users.users.user01 = { - isNormalUser = true; - shell = pkgs.zsh; - description = "user01"; - extraGroups = [ "input" "bluetooth" "networkmanager" "docker" "wheel" ]; - packages = with pkgs; [ -# Ricing - bibata-cursors - catppuccin-gtk - # inputs.way-edges.packages.${pkgs.system}.way-edges - waybar - hyprlock - swaynotificationcenter - inputs.chataigne.packages.${pkgs.system}.chataigne - wlogout - wpaperd - kando - oh-my-posh - grimblast + # Thunar stuff + xfce.thunar + xfce.thunar-volman + xfce.thunar-vcs-plugin + xfce.thunar-archive-plugin -# Terminal - carapace - kitty - github-cli - # light - bluetuith - wget - playerctl - git - fastfetch - lsd - inputs.doot.packages.${pkgs.system}.default - stow - fzf - ripgrep - zsh-autocomplete - nodejs - lazygit - tailscale + # Apps + pavucontrol + firefox + tor-browser + gotify-desktop + techmino + mpv + prismlauncher + delfin + libreoffice-qt6 + syncthing + xremap + blueman + ]; + }; -# Thunar stuff - xfce.thunar - xfce.thunar-volman - xfce.thunar-vcs-plugin - xfce.thunar-archive-plugin + # Zsh + programs.zsh = { + enable = true; + enableCompletion = true; + enableBashCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + histSize = 10000; + ohMyZsh = { + enable = true; + plugins = [ + "git" + "dirhistory" + "history" + ]; + }; + }; -# Apps - pavucontrol - firefox - tor-browser - gotify-desktop - techmino - mpv - prismlauncher - delfin - libreoffice-qt6 - syncthing - xremap - blueman - ]; - }; + # User programs + programs.steam.enable = true; + programs.walker.enable = true; -# Zsh - programs.zsh = { - enable = true; - enableCompletion = true; - enableBashCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - histSize = 10000; - ohMyZsh = { - enable = true; - plugins = [ "git" "dirhistory" "history" ]; - }; - }; + # User Services + services.gvfs.enable = true; + services.tailscale.enable = true; + services.printing.enable = true; + services.upower.enable = true; + services.openssh.enable = true; + services.elephant.enable = true; -# User programs - programs.steam.enable = true; - programs.walker.enable = true; + # Fonts + fonts.packages = with pkgs; [ + nerd-fonts.fira-mono + ]; -# User Services - services.gvfs.enable = true; - services.tailscale.enable = true; - services.printing.enable = true; - services.upower.enable = true; - services.openssh.enable = true; - services.elephant.enable = true; + fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ]; + environment.systemPackages = with pkgs; [ -# Fonts - fonts.packages = with pkgs; [ - nerd-fonts.fira-mono - ]; + (pkgs.symlinkJoin { + name = "nvim-with-lsp"; + paths = [ pkgs.neovim ]; + buildInputs = [ pkgs.makeWrapper ]; + postBuild = '' + wrapProgram $out/bin/nvim \ + --prefix PATH : ${ + pkgs.lib.makeBinPath [ + pkgs.lua-language-server + pkgs.vscode-langservers-extracted + pkgs.emmet-ls + pkgs.prettier + pkgs.black + pkgs.nixfmt + pkgs.ripgrep + pkgs.nil + pkgs.nixd + pkgs.typescript-language-server + pkgs.tailwindcss-language-server + pkgs.stylua + ] + } + ''; + }) + vim + unzip + python310 # Its python like come on - fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ]; - environment.systemPackages = with pkgs; [ + # Graphics Drivers + mesa + vulkan-tools -# Catppuccin sddm theme -# (pkgs.catppuccin-sddm.override { -# flavor = "mocha"; -# font = "Fira Mono Nerd Font"; -# fontSize = "11"; -# background = null; -# }) -# Terminal things - (pkgs.symlinkJoin { - name = "nvim-with-lsp"; - paths = [ pkgs.neovim ]; - buildInputs = [ pkgs.makeWrapper ]; - postBuild = '' - wrapProgram $out/bin/nvim \ - --prefix PATH : ${pkgs.lib.makeBinPath [ - pkgs.lua-language-server - pkgs.vscode-langservers-extracted - pkgs.emmet-ls - pkgs.ripgrep - pkgs.nil - pkgs.nixd - pkgs.typescript-language-server - pkgs.tailwindcss-language-server - pkgs.stylua - ]} - ''; - }) - vim - unzip - python310 # Its python like come on + # FileSystem Dependancies + gvfs -# Graphics Drivers - mesa - vulkan-tools + # C copmpiler + clang -# FileSystem Dependancies - gvfs + # XDG Desktop Portal Etc + xdg-desktop-portal + xdg-desktop-portal-hyprland -# C copmpiler - clang + # Other things (from gnome) + glib + gnutls + appimage-run + libnotify + gsettings-desktop-schemas + ]; -# XDG Desktop Portal Etc - xdg-desktop-portal - xdg-desktop-portal-hyprland - -# Other things (from gnome) - glib - gnutls - appimage-run - libnotify - gsettings-desktop-schemas - ]; - -# The comment - system.stateVersion = "25.05"; # Did you read the comment? + # The comment + system.stateVersion = "25.05"; # Did you read the comment? } - diff --git a/configuration-pc.nix b/configuration-pc.nix index 1dfa1fd..49cefec 100644 --- a/configuration-pc.nix +++ b/configuration-pc.nix @@ -1,45 +1,37 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: { - networking.hostName = "HACKSTATION"; # Define your hostname. + networking.hostName = "HACKSTATION"; + # Opengl and vulkan + hardware.graphics = { + enable = true; + enable32Bit = true; + }; -# Opengl and vulkan - hardware.graphics = { - enable = true; - extraPackages = with pkgs; [ - intel-vaapi-driver - libva-vdpau-driver - ]; - }; + services.displayManager = { + autoLogin.enable = true; + autoLogin.user = "user01"; + sddm = { + enable = true; + }; + }; - services.displayManager.sddm = { - enable = true; - autoLogin.enable = true; - autoLogin.user = "user01"; - }; - -services.getty.autologinUser = "user01"; - -# Catppuccin sddm theme -# (pkgs.catppuccin-sddm.override { -# flavor = "mocha"; -# font = "Fira Mono Nerd Font"; -# fontSize = "11"; -# background = null; -# }) - -# Local User - users.users.user01 = { - extraGroups = [ ]; - packages = with pkgs; [ -# Ricing - -# Terminal - -# Apps - bottles - ]; - }; + # Local User + users.users.user01 = { + extraGroups = [ ]; + packages = with pkgs; [ + bottles + ferdium + delfin + jellyfin-tui + ]; + }; } diff --git a/flake.nix b/flake.nix index 1aa4a92..3147b7b 100644 --- a/flake.nix +++ b/flake.nix @@ -6,46 +6,53 @@ elephant.url = "github:abenz1267/elephant"; chataigne.url = "./chataigne"; doot.url = "github:voidarclabs/nixos.doot"; - way-edges.url = "github:way-edges/way-edges"; + way-edges.url = "github:way-edges/way-edges"; walker = { - url = "github:abenz1267/walker"; - inputs.elephant.follows = "elephant"; + url = "github:abenz1267/walker"; + inputs.elephant.follows = "elephant"; }; }; - outputs = { self, doot, chataigne, nixpkgs, ... }@inputs: let - stdenv.hostPlatform.system = "x86_64-linux"; - system = stdenv.hostPlatform.system; - hardwareConfig = import /etc/nixos/hardware-configuration.nix; - in - { - nixosConfigurations.mobile02 = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = {inherit inputs;}; + outputs = + { + self, + doot, + chataigne, + nixpkgs, + ... + }@inputs: + let + stdenv.hostPlatform.system = "x86_64-linux"; + system = stdenv.hostPlatform.system; + hardwareConfig = import /etc/nixos/hardware-configuration.nix; + in + { + nixosConfigurations.mobile02 = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; - modules = [ - ./configuration-laptop.nix - ./common.nix - hardwareConfig - { - nixpkgs.config.allowUnfree = true; - } - ]; - }; - nixosConfigurations.hackstation = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = {inherit inputs;}; + modules = [ + ./configuration-laptop.nix + ./common.nix + hardwareConfig + { + nixpkgs.config.allowUnfree = true; + } + ]; + }; + nixosConfigurations.hackstation = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; - modules = [ - ./configuration-pc.nix - ./common.nix - hardwareConfig - { - nixpkgs.config.allowUnfree = true; - } - ]; + modules = [ + ./configuration-pc.nix + ./common.nix + hardwareConfig + { + nixpkgs.config.allowUnfree = true; + } + ]; + }; }; - }; } -