diff options
| author | Natasha Moongrave <natasha@256phi.eu> | 2026-03-30 20:46:26 +0200 |
|---|---|---|
| committer | Natasha Moongrave <natasha@256phi.eu> | 2026-03-30 20:46:26 +0200 |
| commit | 67e324107e05f3245ddac034607afd0e1dea478f (patch) | |
| tree | d14a4b6e98fc707c72e24f0879b0e4297aaad78f | |
| parent | 2316eab54de77c351e88c5657eeaaa703ff4c498 (diff) | |
Refactored the entire configuration
35 files changed, 1659 insertions, 326 deletions
diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..10ef3ce --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,74 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is a NixOS declarative system configuration repository using Nix flakes to manage multiple machines (kronos laptop, herra desktop) with modular, composable configurations. It uses NixOS 25.11 and Home Manager 25.11. + +## Common Commands + +```bash +# Apply configuration changes +sudo nixos-rebuild switch + +# Test configuration without applying +sudo nixos-rebuild test + +# Validate flake syntax +nix flake check + +# Preview changes +sudo nixos-rebuild dry-run +``` + +## Architecture + +The configuration uses a **layered orchestrator pattern** where `default.nix` files act as local aggregators that import related modules: + +``` +flake.nix # Entry point, defines inputs + ↓ +hosts/{kronos,herra}/ # Per-machine configs + └─ configuration.nix # System orchestrator + ├─ modules/nixos/base/ # Base system (applied to all machines) + └─ modules/nixos/des/ # Desktop environment (i3wm or gnome) + +mun.nix # Home-manager orchestrator for user "mun" + └─ modules/home/i3wm/ # User-level app configs + └─ nord-blue/ # Current i3wm "rice" (theme/config) +``` + +### Four Configuration Layers + +1. **System-Wide Base** (`modules/nixos/base/`): Boot, networking, users, services, packages - applied to all machines +2. **Environment-Specific System** (`modules/nixos/des/`): Desktop environment choice (i3wm vs gnome) +3. **Home-Manager User Config** (`mun.nix`): User-specific settings, shell, SSH, packages +4. **Environment-Specific Home** (`modules/home/i3wm/nord-blue/`): UI configs, keybindings, theming + +### Key Files + +- `flake.nix` - Defines nixpkgs and home-manager inputs +- `hosts/kronos/configuration.nix` - Laptop system config +- `hosts/herra/configuration.nix` - Desktop system config (dual-boot with Windows) +- `mun.nix` - Home-manager entry point for user "mun" +- `modules/nixos/base/packages.nix` - System-wide packages +- `modules/home/i3wm/nord-blue/variables.nix` - Color scheme and theme variables + +## Adding Configurations + +**New system package:** Add to `modules/nixos/base/packages.nix` + +**New base system module:** Create file in `modules/nixos/base/`, add import to `modules/nixos/base/default.nix` + +**New home-manager module:** Create file in the active rice directory (e.g., `modules/home/i3wm/nord-blue/`), add import to its `default.nix` + +**New i3wm rice:** Create new directory under `modules/home/i3wm/` with its own `default.nix` orchestrator + +## Environment Switching + +To switch desktop environments, edit both: +1. `hosts/{machine}/configuration.nix` - Change import in `modules/nixos/des/` +2. `mun.nix` - Change import in `modules/home/` + +Then run `sudo nixos-rebuild switch`. diff --git a/enviroments/i3wm.nix b/enviroments/i3wm.nix deleted file mode 100644 index 0421853..0000000 --- a/enviroments/i3wm.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ config, lib, pkgs, ... }: - - -let - get_spotify_status = pkgs.writeShellScript "get_spotify_status.sh" '' - #!/bin/bash - PARENT_BAR="example" - PARENT_BAR_PID=$(pgrep -a "polybar" | grep "$PARENT_BAR" | cut -d" " -f1) - PLAYER="playerctld" - FORMAT="{{ title }} - {{ artist }}" - - update_hooks() { - while IFS= read -r id; do - polybar-msg -p "$id" hook spotify-play-pause $2 1>/dev/null 2>&1 - done < <(echo "$1") - } - - PLAYERCTL_STATUS=$(playerctl --player=$PLAYER status 2>/dev/null) - EXIT_CODE=$? - - if [ $EXIT_CODE -eq 0 ]; then - STATUS=$PLAYERCTL_STATUS - else - STATUS="No player is running" - fi - - if [ "$1" == "--status" ]; then - echo "$STATUS" - else - if [ "$STATUS" = "Stopped" ]; then - echo "Music Stopped" - elif [ "$STATUS" = "Paused" ]; then - update_hooks "$PARENT_BAR_PID" 2 - playerctl --player=$PLAYER metadata --format "$FORMAT" - elif [ "$STATUS" = "No player is running" ]; then - echo "Music Off" - else - update_hooks "$PARENT_BAR_PID" 1 - playerctl --player=$PLAYER metadata --format "$FORMAT" - fi - fi - ''; - - hidePolybarInFullscreen = pkgs.writeShellScript "hidePolybarInFullscreen.sh" '' - #!/usr/bin/env bash - sleep 1 - i3-msg -t subscribe -m '[ "window" ]' | while read -r event; do - if echo "$event" | grep -q '"fullscreen_mode":[[:space:]]*1'; then - polybar-msg cmd hide - elif echo "$event" | grep -q '"fullscreen_mode":[[:space:]]*0'; then - polybar-msg cmd show - fi - done - ''; -in -{ - services = { - xserver = { - enable = true; - windowManager.i3 = { - enable = true; - }; - }; - displayManager.defaultSession = "none+i3"; - }; - - home = { - - }; - -}
\ No newline at end of file @@ -1,5 +1,166 @@ { "nodes": { + "base16": { + "inputs": { + "fromYaml": "fromYaml" + }, + "locked": { + "lastModified": 1755819240, + "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "owner": "SenchoPens", + "repo": "base16.nix", + "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "base16.nix", + "type": "github" + } + }, + "base16-fish": { + "flake": false, + "locked": { + "lastModified": 1765809053, + "narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=", + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + }, + "original": { + "owner": "tomyun", + "repo": "base16-fish", + "rev": "86cbea4dca62e08fb7fd83a70e96472f92574782", + "type": "github" + } + }, + "base16-helix": { + "flake": false, + "locked": { + "lastModified": 1760703920, + "narHash": "sha256-m82fGUYns4uHd+ZTdoLX2vlHikzwzdu2s2rYM2bNwzw=", + "owner": "tinted-theming", + "repo": "base16-helix", + "rev": "d646af9b7d14bff08824538164af99d0c521b185", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-helix", + "type": "github" + } + }, + "base16-vim": { + "flake": false, + "locked": { + "lastModified": 1732806396, + "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-vim", + "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "type": "github" + } + }, + "fenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "rust-analyzer-src": "rust-analyzer-src" + }, + "locked": { + "lastModified": 1774887814, + "narHash": "sha256-8bsvr2SgW9t70nFxUdMVQg4RSU+E/y9+Je4urivtOYE=", + "owner": "nix-community", + "repo": "fenix", + "rev": "9b6c1cb49eff1346e1f5d2430994a0ba0fa02910", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "fenix", + "type": "github" + } + }, + "firefox-gnome-theme": { + "flake": false, + "locked": { + "lastModified": 1764873433, + "narHash": "sha256-1XPewtGMi+9wN9Ispoluxunw/RwozuTRVuuQOmxzt+A=", + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "rev": "f7ffd917ac0d253dbd6a3bf3da06888f57c69f92", + "type": "github" + }, + "original": { + "owner": "rafaelmardojai", + "repo": "firefox-gnome-theme", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767609335, + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "fromYaml": { + "flake": false, + "locked": { + "lastModified": 1731966426, + "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "owner": "SenchoPens", + "repo": "fromYaml", + "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "type": "github" + }, + "original": { + "owner": "SenchoPens", + "repo": "fromYaml", + "type": "github" + } + }, + "gnome-shell": { + "flake": false, + "locked": { + "host": "gitlab.gnome.org", + "lastModified": 1767737596, + "narHash": "sha256-eFujfIUQDgWnSJBablOuG+32hCai192yRdrNHTv0a+s=", + "owner": "GNOME", + "repo": "gnome-shell", + "rev": "ef02db02bf0ff342734d525b5767814770d85b49", + "type": "gitlab" + }, + "original": { + "host": "gitlab.gnome.org", + "owner": "GNOME", + "ref": "gnome-49", + "repo": "gnome-shell", + "type": "gitlab" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -37,10 +198,202 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1774709303, + "narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nur": { + "inputs": { + "flake-parts": [ + "stylix", + "flake-parts" + ], + "nixpkgs": [ + "stylix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1767886815, + "narHash": "sha256-pB2BBv6X9cVGydEV/9Y8+uGCvuYJAlsprs1v1QHjccA=", + "owner": "nix-community", + "repo": "NUR", + "rev": "4ff84374d77ff62e2e13a46c33bfeb73590f9fef", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { + "fenix": "fenix", "home-manager": "home-manager", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", + "stylix": "stylix" + } + }, + "rust-analyzer-src": { + "flake": false, + "locked": { + "lastModified": 1774787924, + "narHash": "sha256-Cbpmf0+1pqi/zbpub2vkp5lTPx3QdVtDkkagDwQzHHg=", + "owner": "rust-lang", + "repo": "rust-analyzer", + "rev": "f1297b21119565c626320c1ffc248965fffb2527", + "type": "github" + }, + "original": { + "owner": "rust-lang", + "ref": "nightly", + "repo": "rust-analyzer", + "type": "github" + } + }, + "stylix": { + "inputs": { + "base16": "base16", + "base16-fish": "base16-fish", + "base16-helix": "base16-helix", + "base16-vim": "base16-vim", + "firefox-gnome-theme": "firefox-gnome-theme", + "flake-parts": "flake-parts", + "gnome-shell": "gnome-shell", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur", + "systems": "systems", + "tinted-foot": "tinted-foot", + "tinted-kitty": "tinted-kitty", + "tinted-schemes": "tinted-schemes", + "tinted-tmux": "tinted-tmux", + "tinted-zed": "tinted-zed" + }, + "locked": { + "lastModified": 1774194089, + "narHash": "sha256-SCczWhr8y8aaXVHG+gOGcRahNb0BU1Z5zYZuv9W/nA8=", + "owner": "danth", + "repo": "stylix", + "rev": "7c34241d80ea64dd2039bb3a786fb66b4c6261d9", + "type": "github" + }, + "original": { + "owner": "danth", + "ref": "release-25.11", + "repo": "stylix", + "type": "github" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tinted-foot": { + "flake": false, + "locked": { + "lastModified": 1726913040, + "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-foot", + "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "type": "github" + } + }, + "tinted-kitty": { + "flake": false, + "locked": { + "lastModified": 1735730497, + "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "owner": "tinted-theming", + "repo": "tinted-kitty", + "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-kitty", + "type": "github" + } + }, + "tinted-schemes": { + "flake": false, + "locked": { + "lastModified": 1767817087, + "narHash": "sha256-eGE8OYoK6HzhJt/7bOiNV2cx01IdIrHL7gXgjkHRdNo=", + "owner": "tinted-theming", + "repo": "schemes", + "rev": "bd99656235aab343e3d597bf196df9bc67429507", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "schemes", + "type": "github" + } + }, + "tinted-tmux": { + "flake": false, + "locked": { + "lastModified": 1767489635, + "narHash": "sha256-e6nnFnWXKBCJjCv4QG4bbcouJ6y3yeT70V9MofL32lU=", + "owner": "tinted-theming", + "repo": "tinted-tmux", + "rev": "3c32729ccae99be44fe8a125d20be06f8d7d8184", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "tinted-tmux", + "type": "github" + } + }, + "tinted-zed": { + "flake": false, + "locked": { + "lastModified": 1767488740, + "narHash": "sha256-wVOj0qyil8m+ouSsVZcNjl5ZR+1GdOOAooAatQXHbuU=", + "owner": "tinted-theming", + "repo": "base16-zed", + "rev": "11abb0b282ad3786a2aae088d3a01c60916f2e40", + "type": "github" + }, + "original": { + "owner": "tinted-theming", + "repo": "base16-zed", + "type": "github" } } }, @@ -1,46 +1,88 @@ { - description = "A very basic flake"; + description = "NixOS configuration for multiple machines with modular home-manager and rice support"; inputs = { + # Core nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + + # Home Manager home-manager = { url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + + # Theming - centralized color management + stylix = { + url = "github:danth/stylix/release-25.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + # Rust toolchain (optional, for development) + fenix = { + url = "github:nix-community/fenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, + nixpkgs-unstable, home-manager, + stylix, + fenix, ... } @ inputs: let - hmModule = { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.mun = import ./mun.nix; + system = "x86_64-linux"; + + # Overlays for the system + overlays = [ + # Access unstable packages via pkgs.unstable.* + (final: prev: { + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + }) + # Fenix Rust overlay + fenix.overlays.default + ]; + + # Shared home-manager configuration + homeManagerModule = { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + extraSpecialArgs = {inherit inputs;}; + users.mun = import ./home/mun; + }; + }; + + # Helper to create a NixOS system + mkSystem = hostname: nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = {inherit inputs;}; + modules = [ + # Apply overlays via nixpkgs module + { + nixpkgs = { + inherit overlays; + config.allowUnfree = true; + }; + } + ./hosts/${hostname}/configuration.nix + ./system + home-manager.nixosModules.home-manager + stylix.nixosModules.stylix + homeManagerModule + ]; }; + in { nixosConfigurations = { - kronos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/kronos/configuration.nix - home-manager.nixosModules.home-manager - hmModule # ← use shared module - ]; - }; - - herra = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/herra/configuration.nix - home-manager.nixosModules.home-manager - hmModule - ]; - }; + kronos = mkSystem "kronos"; + herra = mkSystem "herra"; }; }; } diff --git a/flake.nix.bak b/flake.nix.bak deleted file mode 100755 index ade56b2..0000000 --- a/flake.nix.bak +++ /dev/null @@ -1,46 +0,0 @@ -{ - description = "A very basic flake"; - - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; - home-manager = { - url = "github:nix-community/home-manager/release-25.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, home-manager, ... }@inputs: { - let - hmModule = { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.mun = import ./mun.nix; - }; - in { - nixosConfigurations = { - kronos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - - home-manager.users.mun = import ./mun.nix; - } - ]; - }; - herra = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/herra/configuration.nix - home-manager.nixosModules.home-manager - hmModule - ]; - }; - }; - }; -} diff --git a/home/mun/default.nix b/home/mun/default.nix new file mode 100644 index 0000000..678f21e --- /dev/null +++ b/home/mun/default.nix @@ -0,0 +1,104 @@ +{pkgs, ...}: { + imports = [ + ./programs/zsh.nix + ./programs/ssh.nix + ./programs/git.nix + ../rices/nord-blue + ]; + + home = { + username = "mun"; + homeDirectory = "/home/mun"; + stateVersion = "25.11"; + + packages = with pkgs; [ + # Development + clippy + ruff + + # Applications + discord + spotify + openrocket + kicad + + # Utilities + pay-respects + zathura + ripgrep + fd + git + lazygit + tree-sitter + gcr + perl + gnome-disk-utility + syncthing + + # CLI Tools + bat + tealdeer + claude-code + + # Fun + peaclock + kdePackages.kdenlive + dwarf-fortress + dwarf-fortress-packages.themes.spacefox + tetris + minefair + + # Documents & Creative + thunderbird + libreoffice + texstudio + krita + aseprite + audacity + + # Network + clipman + xclip + qbittorrent + + # Gaming + godotPackages_4_5.godot + prismlauncher + vlc + + # Editors + obsidian + vscodium + peazip + + # Wine/Compatibility + wine + bottles + lutris + + # File manager + xfce.thunar + + # TeX Live + (texlive.combine { + inherit (texlive) scheme-full; + notestex = texlivePackages.notestex; + screenplay = texlivePackages.screenplay; + }) + + # RetroArch + (retroarch.withCores (cores: + with cores; [ + fceumm + mgba + gambatte + sameboy + ])) + ]; + + sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + }; + }; +} diff --git a/home/mun/programs/git.nix b/home/mun/programs/git.nix new file mode 100644 index 0000000..7addeb0 --- /dev/null +++ b/home/mun/programs/git.nix @@ -0,0 +1,9 @@ +{...}: { + programs.git = { + enable = true; + settings.user = { + name = "mun"; + # email = "your@email.com"; # Uncomment and set your email + }; + }; +} diff --git a/home/mun/programs/ssh.nix b/home/mun/programs/ssh.nix new file mode 100644 index 0000000..7d13317 --- /dev/null +++ b/home/mun/programs/ssh.nix @@ -0,0 +1,17 @@ +{...}: { + programs.ssh = { + enable = true; + enableDefaultConfig = false; + matchBlocks = { + "*" = { + addKeysToAgent = "yes"; + forwardAgent = false; + }; + "cgit" = { + user = "git"; + hostname = "cgit"; + identityFile = "~/.ssh/cgit"; + }; + }; + }; +} diff --git a/home/mun/programs/zsh.nix b/home/mun/programs/zsh.nix new file mode 100644 index 0000000..26756ae --- /dev/null +++ b/home/mun/programs/zsh.nix @@ -0,0 +1,24 @@ +{...}: { + programs.zsh = { + enable = true; + syntaxHighlighting.enable = true; + + shellAliases = { + ll = "ls -l"; + rebuild = "sudo nixos-rebuild switch"; + edit = "sudo vi /etc/nixos/configuration.nix"; + }; + + history.size = 10000; + + oh-my-zsh = { + enable = true; + plugins = ["git"]; + theme = "simple"; + }; + + initContent = '' + fastfetch --config examples/9.jsonc + ''; + }; +} diff --git a/home/rices/nord-blue/alacritty.nix b/home/rices/nord-blue/alacritty.nix new file mode 100644 index 0000000..772718c --- /dev/null +++ b/home/rices/nord-blue/alacritty.nix @@ -0,0 +1,13 @@ +{ + pkgs, + lib, + ... +}: { + # Let Stylix handle Alacritty theming + # Only override font size if needed + programs.alacritty.settings.font.size = lib.mkForce 10; + + home.packages = with pkgs; [ + nerd-fonts.jetbrains-mono + ]; +} diff --git a/home/rices/nord-blue/default.nix b/home/rices/nord-blue/default.nix new file mode 100644 index 0000000..1eb5514 --- /dev/null +++ b/home/rices/nord-blue/default.nix @@ -0,0 +1,13 @@ +{...}: { + imports = [ + ./alacritty.nix + ./i3.nix + ./nvim.nix + ./helix.nix + ./picom.nix + ./fastfetch.nix + ]; + + # Rice is purely home-manager level + # Desktop environment (X server, i3wm) is set in system/desktop.nix +} diff --git a/home/rices/nord-blue/fastfetch.nix b/home/rices/nord-blue/fastfetch.nix new file mode 100644 index 0000000..700ae80 --- /dev/null +++ b/home/rices/nord-blue/fastfetch.nix @@ -0,0 +1,24 @@ +{...}: { + programs.fastfetch = { + enable = true; + settings = { + logo = { + type = "builtin"; + source = "nixos_small"; + }; + display.separator = " "; + modules = [ + "title" + "os" + "kernel" + "uptime" + "packages" + "shell" + "terminal" + "cpu" + "memory" + "disk" + ]; + }; + }; +} diff --git a/home/rices/nord-blue/helix.nix b/home/rices/nord-blue/helix.nix new file mode 100644 index 0000000..eb893ee --- /dev/null +++ b/home/rices/nord-blue/helix.nix @@ -0,0 +1,171 @@ +{ + pkgs, + lib, + ... +}: { + programs.helix = { + enable = true; + defaultEditor = false; + settings = { + # Let Stylix handle theming + editor = { + cursor-shape = { + normal = "block"; + insert = "bar"; + select = "underline"; + }; + line-number = "relative"; + bufferline = "multiple"; + color-modes = true; + cursorline = true; + auto-save = { + after-delay.enable = true; + after-delay.timeout = 10000; + }; + auto-format = true; + end-of-line-diagnostics = "hint"; + inline-diagnostics.cursor-line = "hint"; + lsp = { + display-messages = true; + display-inlay-hints = true; + }; + popup-border = "popup"; + statusline.left = [ + "mode" + "spinner" + "spacer" + "version-control" + "file-name" + "diagnostics" + "read-only-indicator" + "file-modification-indicator" + "spacer" + ]; + statusline.right = [ + "workspace-diagnostics" + "register" + "position" + "selections" + "file-encoding" + "file-type" + ]; + idle-timeout = 50; + completion-timeout = 100; + indent-guides = { + render = true; + character = "|"; + skip-levels = 3; + }; + soft-wrap.enable = true; + whitespace = { + render = { + space = "none"; + tab = "all"; + newline = "none"; + }; + characters = { + nbsp = "·"; + tab = "→"; + }; + }; + }; + }; + languages = { + language-server = { + "bash-language-server" = { + command = "${pkgs.bash-language-server}/bin/bash-language-server"; + args = ["start"]; + }; + "superhtml" = { + command = "${pkgs.superhtml}/bin/superhtml"; + }; + "vscode-css-languageserver" = { + command = "${pkgs.vscode-css-languageserver}/bin/vscode-css-languageserver"; + }; + "rust-analyzer" = { + command = "${pkgs.rust-analyzer}/bin/rust-analyzer"; + }; + "pyright" = { + command = "${pkgs.pyright}/bin/pyright"; + }; + "nil" = { + command = "${pkgs.nil}/bin/nil"; + }; + "texlab" = { + command = "${pkgs.texlab}/bin/texlab"; + }; + texlab.config.texlab = { + build = { + onSave = true; + forwardSearchAfter = true; + }; + chktext.onEdit = true; + forwardSearch = { + executable = "zathura"; + args = ["--synctex-forward" "%l:1:%f" "%p"]; + }; + }; + "marksman" = { + command = "${pkgs.marksman}/bin/marksman"; + }; + }; + language = [ + { + name = "bash"; + language-servers = ["bash-language-server"]; + auto-format = true; + } + { + name = "html"; + language-servers = ["superhtml"]; + auto-format = true; + } + { + name = "css"; + language-servers = ["vscode-css-languageserver"]; + auto-format = true; + } + { + name = "rust"; + language-servers = ["rust-analyzer"]; + auto-format = true; + } + { + name = "python"; + language-servers = ["pyright"]; + auto-format = true; + } + { + name = "nix"; + language-servers = ["nil"]; + auto-format = true; + } + { + name = "latex"; + language-servers = ["texlab"]; + auto-format = true; + } + { + name = "markdown"; + language-servers = ["marksman"]; + auto-format = true; + } + ]; + }; + }; + + home.packages = with pkgs; [ + zathura + ripgrep + fd + bash-language-server + superhtml + vscode-css-languageserver + rust-analyzer + llvmPackages_latest.lldb + pyright + nil + texlab + marksman + ]; +} diff --git a/home/rices/nord-blue/i3.nix b/home/rices/nord-blue/i3.nix new file mode 100644 index 0000000..b42f223 --- /dev/null +++ b/home/rices/nord-blue/i3.nix @@ -0,0 +1,107 @@ +{ + pkgs, + lib, + ... +}: let + vars = import ./variables.nix; + mod = "Mod4"; + + lock-screen = pkgs.writeShellScriptBin "lock-screen" '' + #!/usr/bin/env sh + set -eu + WALL="''${1:-$HOME/Pictures/wallpaper.png}" + TMP="/tmp/lockscreen.png" + RES=$(xrandr | awk '/\*/ {print $1; exit}') + magick "$WALL" -resize "''${RES}^" -gravity center -extent "$RES" "$TMP" + i3lock -i "$TMP" + ''; + + app-launcher = pkgs.writeShellScriptBin "app-launcher" '' + #!/usr/bin/env sh + BG='${vars.colors.background}' + FG='${vars.colors.foreground}' + ACCENT='${vars.colors.accent}' + TEXT='${vars.colors.text}' + dmenu_run -fn 'JetBrains Mono-12' -nb "$BG" -nf "$FG" -sb "$ACCENT" -sf "$TEXT" + ''; +in { + xsession.windowManager.i3 = { + enable = true; + config = { + modifier = mod; + bars = []; + + window = { + titlebar = false; + border = 3; + }; + + # Colors handled by Stylix + + startup = [ + {command = "sh -c 'feh --bg-scale ~/Pictures/wallpaper.png'";} + ]; + + keybindings = lib.mkOptionDefault { + "${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty"; + "${mod}+d" = "exec ${app-launcher}/bin/app-launcher"; + "${mod}+m" = "exec ${app-launcher}/bin/app-launcher"; + "${mod}+Shift+m" = "exec alacritty -e nnn"; + "${mod}+n" = "exec firefox"; + "${mod}+q" = "kill"; + "${mod}+Ctrl+l" = "exec ${lock-screen}/bin/lock-screen"; + "${mod}+Shift+r" = "restart"; + "${mod}+Ctrl+Shift+e" = "exec sh -c 'i3-msg exit'"; + "${mod}+Shift+s" = "exec flameshot gui"; + + # Focus (vim bindings) + "${mod}+h" = "focus left"; + "${mod}+j" = "focus down"; + "${mod}+k" = "focus up"; + "${mod}+l" = "focus right"; + + # Focus (arrow keys) + "${mod}+Left" = "focus left"; + "${mod}+Down" = "focus down"; + "${mod}+Up" = "focus up"; + "${mod}+Right" = "focus right"; + + # Move (vim bindings) + "${mod}+Shift+h" = "move left"; + "${mod}+Shift+j" = "move down"; + "${mod}+Shift+k" = "move up"; + "${mod}+Shift+l" = "move right"; + + # Move (arrow keys) + "${mod}+Shift+Left" = "move left"; + "${mod}+Shift+Down" = "move down"; + "${mod}+Shift+Up" = "move up"; + "${mod}+Shift+Right" = "move right"; + + # Volume + "XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"; + "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"; + "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + "XF86AudioMicMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; + + # Brightness + "XF86MonBrightnessUp" = "exec brightnessctl set 5%+"; + "XF86MonBrightnessDown" = "exec brightnessctl set 5%-"; + }; + }; + + extraConfig = '' + smart_borders on + ''; + }; + + home.packages = with pkgs; [ + dmenu + i3lock + imagemagick + polybar + alacritty + feh + nnn + ]; +} diff --git a/home/rices/nord-blue/nvim.nix b/home/rices/nord-blue/nvim.nix new file mode 100644 index 0000000..9677c57 --- /dev/null +++ b/home/rices/nord-blue/nvim.nix @@ -0,0 +1,279 @@ +{pkgs, ...}: { + home.packages = with pkgs; [ + zathura + ripgrep + fd + lazygit + stylua + alejandra + black + shfmt + + # Language servers + lua-language-server + nil + rust-analyzer + pyright + bash-language-server + texlab + ]; + + programs.neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + + plugins = with pkgs.vimPlugins; [ + # UI + catppuccin-nvim + nvim-web-devicons + which-key-nvim + gitsigns-nvim + + # Syntax + (nvim-treesitter.withPlugins (p: [ + p.lua + p.nix + p.rust + p.python + p.bash + p.latex + p.c + ])) + + # LSP + nvim-lspconfig + + # Completion / snippets + nvim-cmp + cmp-nvim-lsp + cmp_luasnip + luasnip + friendly-snippets + nvim-autopairs + + # Formatting + conform-nvim + comment-nvim + + # Navigation + telescope-nvim + plenary-nvim + nvim-tree-lua + + # Terminal + toggleterm-nvim + + # Writing + vimtex + orgmode + + # Start screen + { + plugin = vim-startify; + config = "let g:startify_change_to_vcs_root = 0"; + } + ]; + + extraLuaConfig = '' + ------------------------------------------------- + -- LEADER + ------------------------------------------------- + vim.g.mapleader = " " + + ------------------------------------------------- + -- BASIC OPTIONS + ------------------------------------------------- + vim.opt.number = true + vim.opt.relativenumber = true + vim.opt.clipboard = "unnamedplus" + vim.opt.showtabline = 2 + vim.o.timeout = true + vim.o.timeoutlen = 300 + + ------------------------------------------------- + -- THEME + ------------------------------------------------- + require("catppuccin").setup({ + flavour = "mocha", + }) + vim.cmd.colorscheme("catppuccin") + + ------------------------------------------------- + -- GITSIGNS + ------------------------------------------------- + require("gitsigns").setup() + + ------------------------------------------------- + -- TREESITTER + ------------------------------------------------- + require("nvim-treesitter.configs").setup({ + highlight = { enable = true }, + indent = { enable = true }, + }) + + vim.opt.foldmethod = "expr" + vim.opt.foldexpr = "nvim_treesitter#foldexpr()" + vim.opt.foldenable = false + + ------------------------------------------------- + -- SNIPPETS + ------------------------------------------------- + require("luasnip.loaders.from_vscode").lazy_load() + + ------------------------------------------------- + -- COMPLETION + ------------------------------------------------- + local cmp = require("cmp") + local luasnip = require("luasnip") + + cmp.setup({ + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + ["<C-Space>"] = cmp.mapping.complete(), + ["<CR>"] = cmp.mapping.confirm({ select = true }), + }), + sources = { + { name = "nvim_lsp" }, + { name = "luasnip" }, + }, + }) + + require("nvim-autopairs").setup({}) + + ------------------------------------------------- + -- LSP + ------------------------------------------------- + local capabilities = require("cmp_nvim_lsp").default_capabilities() + + local servers = { + "lua_ls", + "nil_ls", + "rust_analyzer", + "pyright", + "bashls", + "texlab", + } + + for _, server in ipairs(servers) do + vim.lsp.config(server, { + capabilities = capabilities + }) + vim.lsp.enable(server) + end + + ------------------------------------------------- + -- LSP KEYMAPS + ------------------------------------------------- + vim.keymap.set("n", "<leader>ld", vim.lsp.buf.definition) + vim.keymap.set("n", "<leader>lD", vim.lsp.buf.declaration) + vim.keymap.set("n", "<leader>li", vim.lsp.buf.implementation) + vim.keymap.set("n", "<leader>lr", vim.lsp.buf.references) + vim.keymap.set("n", "lh", vim.lsp.buf.hover) + vim.keymap.set("n", "ln", vim.lsp.buf.rename) + vim.keymap.set("n", "la", vim.lsp.buf.code_action) + vim.keymap.set("n", "lf", function() vim.lsp.buf.format() end) + + ------------------------------------------------- + -- DIAGNOSTICS + ------------------------------------------------- + vim.keymap.set("n", "lj", vim.diagnostic.goto_next) + vim.keymap.set("n", "lk", vim.diagnostic.goto_prev) + vim.keymap.set("n", "le", vim.diagnostic.open_float) + + ------------------------------------------------- + -- FORMATTER + ------------------------------------------------- + require("conform").setup({ + format_on_save = { + timeout_ms = 500, + lsp_format = "fallback", + }, + formatters_by_ft = { + lua = { "stylua" }, + nix = { "alejandra" }, + rust = { "rustfmt" }, + python = { "black" }, + bash = { "shfmt" }, + }, + }) + + require("Comment").setup() + + ------------------------------------------------- + -- TELESCOPE + ------------------------------------------------- + local builtin = require("telescope.builtin") + + require("telescope").setup({ + defaults = { + layout_strategy = "horizontal", + sorting_strategy = "ascending", + file_ignore_patterns = { "node_modules", ".git/" }, + }, + }) + + vim.keymap.set("n", "<leader><leader>", builtin.find_files) + vim.keymap.set("n", "<leader>fg", builtin.live_grep) + vim.keymap.set("n", "<leader>fb", builtin.buffers) + + ------------------------------------------------- + -- WHICH KEY + ------------------------------------------------- + local wk = require("which-key") + wk.add({ + { "<leader>l", desc = "LSP" } + }) + + ------------------------------------------------- + -- NVIM TREE + ------------------------------------------------- + require("nvim-tree").setup({}) + vim.keymap.set("n", "<leader>e", "<cmd>NvimTreeToggle<CR>") + + ------------------------------------------------- + -- TERMINAL + ------------------------------------------------- + require("toggleterm").setup({ + direction = "float", + }) + + local Terminal = require("toggleterm.terminal").Terminal + + local lazygit = Terminal:new({ + cmd = "lazygit", + hidden = true, + direction = "float", + }) + + vim.keymap.set("n", "<leader>gg", function() + lazygit:toggle() + end) + + ------------------------------------------------- + -- ORGMODE + ------------------------------------------------- + local projects = { + "~/Documents/2_Writing/0_SOC/**/*.org", + "~/Documents/2_Writing/2_Notes/**/*.org", + "~/Documents/1_Projects/6_CRC-Altura/**/*.org", + "~/ORG/**/*.org" + } + + require("orgmode").setup({ + org_agenda_files = projects, + org_default_notes_file = "~/INBOX.org" + }) + + ------------------------------------------------- + -- VIMTEX + ------------------------------------------------- + vim.g.vimtex_view_method = "zathura" + ''; + }; +} diff --git a/home/rices/nord-blue/picom.nix b/home/rices/nord-blue/picom.nix new file mode 100644 index 0000000..06cf94a --- /dev/null +++ b/home/rices/nord-blue/picom.nix @@ -0,0 +1,54 @@ +{pkgs, ...}: { + services.picom = { + enable = true; + package = pkgs.picom-pijulius; + + settings = { + backend = "glx"; + vsync = true; + + # Opacity + inactive-opacity = 0.9; + active-opacity = 1.0; + + # Fading + fading = true; + fade-delta = 5; + fade-in-step = 0.09; + fade-out-step = 0.09; + + # Shadows + shadow = true; + shadow-radius = 15; + shadow-opacity = 0.5; + shadow-offset-x = 12; + shadow-offset-y = 12; + shadow-exclude = [ + "class_g = 'i3-frame'" + "window_type = 'dock'" + "window_type = 'desktop'" + "name = 'dmenu'" + "class_g = 'dmenu'" + ]; + + # Rounded corners + corner-radius = 15; + round-borders = 1; + rounded-corners-exclude = [ + "class_g = 'i3-frame'" + "window_type = 'dock'" + ]; + + # Animations + animations = true; + animation-stiffness = 25; + animation-dampening = 1; + animation-window-mass = 0.01; + animation-for-open-window = "zoom"; + animation-for-unmap-window = "slide-up"; + animation-for-transient-window = "zoom"; + animation-for-move-window = "slide"; + animation-for-resize-window = "stretch"; + }; + }; +} diff --git a/home/rices/nord-blue/variables.nix b/home/rices/nord-blue/variables.nix new file mode 100644 index 0000000..09268e3 --- /dev/null +++ b/home/rices/nord-blue/variables.nix @@ -0,0 +1,10 @@ +{ + colors = { + background = "#2D333F"; + accent = "#82A3C0"; + foreground = "#C6D0F5"; + text = "#D5A18E"; + }; + + wallpaper = "~/Pictures/wallpaper.png"; +} diff --git a/home/rices/nord-blue/wallpapers/wave-minimal.png b/home/rices/nord-blue/wallpapers/wave-minimal.png Binary files differnew file mode 100644 index 0000000..5d322d4 --- /dev/null +++ b/home/rices/nord-blue/wallpapers/wave-minimal.png diff --git a/hosts/herra/configuration.nix b/hosts/herra/configuration.nix index 35542a8..2e0dd75 100644 --- a/hosts/herra/configuration.nix +++ b/hosts/herra/configuration.nix @@ -1,30 +1,10 @@ -# hosts/desktop/configuration.nix -{ - config, - lib, - pkgs, - ... -}: { +{...}: { imports = [ ./hardware-configuration.nix - ../../modules/nixos/base/default.nix - - # === Environment Choice === - ../../modules/nixos/des/i3wm.nix - #../../modules/nixos/des/gnome.nix ]; - # Override boot for GRUB dual boot with Windows - boot.loader = { - efi.canTouchEfiVariables = true; - grub = { - enable = true; - device = "nodev"; - efiSupport = true; - useOSProber = true; # auto-detects Windows 11 - }; - }; + networking.hostName = "herra"; - # Desktop-specific hostname - networking.hostName = "herra"; # or whatever you want + # Dual-boot with Windows 11 + boot.loader.grub.useOSProber = true; } diff --git a/hosts/kronos/configuration.nix b/hosts/kronos/configuration.nix index 79b637b..d032921 100755 --- a/hosts/kronos/configuration.nix +++ b/hosts/kronos/configuration.nix @@ -1,16 +1,7 @@ -{ - config, - lib, - pkgs, - ... -}: { +{...}: { imports = [ ./hardware-configuration.nix - ../../modules/nixos/base/default.nix - - # === Environment Choice === - # Uncomment one of the following to select your environment: - ../../modules/nixos/des/i3wm.nix - #../../modules/nixos/des/gnome.nix ]; + + networking.hostName = "kronos"; } diff --git a/modules/nixos/base/networking.nix b/modules/nixos/base/networking.nix index b1c22dd..58854d5 100644 --- a/modules/nixos/base/networking.nix +++ b/modules/nixos/base/networking.nix @@ -1,6 +1,5 @@ { config, lib, pkgs, ... }: { - networking.hostName = "kronos"; networking.networkmanager.enable = true; } diff --git a/mun.nix b/mun.nix deleted file mode 100755 index 8306276..0000000 --- a/mun.nix +++ /dev/null @@ -1,147 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - imports = [ - ./modules/home/default.nix - ]; - home = { - username = "mun"; - homeDirectory = "/home/mun"; - stateVersion = "25.11"; - - packages = with pkgs; [ - # === Development Tools === - clippy - ruff - - # === Applications === - discord - spotify - openrocket - kicad - - # === Utilities === - pay-respects - zathura - ripgrep - fd - git - lazygit - tree-sitter - gcr - perl - gnome-disk-utility - syncthing - - # === CLI Tools === - fastfetch - bat - tealdeer - claude-code - - # === Fun Stuff === # - peaclock - kdePackages.kdenlive - dwarf-fortress - dwarf-fortress-packages.themes.spacefox - tetris - minefair - - # === Text/Document Tools === - thunderbird - libreoffice - texstudio - zathura - krita - aseprite - audacity - - # === Network & Utilities === - clipman - xclip - qbittorrent - - # === Gaming & Emulation === - godotPackages_4_5.godot - prismlauncher - vlc - - # === Creative & Editors === - obsidian - vscodium - peazip - - # === Wine/Compatibility === - wine - bottles - lutris - - # === Miscellaneous === - xfce.thunar - - # === TeX Live === - (texlive.combine { - inherit (texlive) scheme-full; - notestex = texlivePackages.notestex; - screenplay = texlivePackages.screenplay; - }) - - # === RetroArch with Cores === - (retroarch.withCores (cores: - with cores; [ - fceumm - mgba - gambatte - sameboy - ])) - ]; - - sessionVariables = { - EDITOR = "nvim"; - VISUAL = "nvim"; - }; - }; - - programs = { - ssh = { - enable = true; - matchBlocks = { - "*" = { - addKeysToAgent = "yes"; - forwardAgent = false; # or true if you actually need it - }; - "cgit" = { - user = "git"; - hostname = "cgit"; # tailscale MagicDNS name - identityFile = "~/.ssh/cgit"; - }; - }; - }; - - zsh = { - enable = true; - syntaxHighlighting.enable = true; - - shellAliases = { - ll = "ls -l"; - rebuild = "sudo nixos-rebuild switch"; - edit = "sudo vi /etc/nixos/configuration.nix"; - }; - - history.size = 10000; - - oh-my-zsh = { - enable = true; - plugins = ["git"]; - theme = "simple"; - }; - - initContent = '' - fastfetch --config examples/9.jsonc - ''; - }; - }; -} diff --git a/system/audio.nix b/system/audio.nix new file mode 100644 index 0000000..80dd60b --- /dev/null +++ b/system/audio.nix @@ -0,0 +1,15 @@ +{pkgs, ...}: { + security.rtkit.enable = true; + + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + environment.systemPackages = with pkgs; [ + pavucontrol + ]; +} diff --git a/system/bluetooth.nix b/system/bluetooth.nix new file mode 100644 index 0000000..a4bc960 --- /dev/null +++ b/system/bluetooth.nix @@ -0,0 +1,15 @@ +{...}: { + hardware.bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + Experimental = true; + FastConnectable = true; + }; + Policy = { + AutoEnable = true; + }; + }; + }; +} diff --git a/system/boot.nix b/system/boot.nix new file mode 100644 index 0000000..a238999 --- /dev/null +++ b/system/boot.nix @@ -0,0 +1,44 @@ +{ + pkgs, + lib, + ... +}: { + boot = { + kernelPackages = pkgs.linuxPackages_latest; + + initrd = { + kernelModules = ["i915"]; + systemd.enable = true; + }; + + loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot"; + }; + grub = { + enable = lib.mkDefault true; + device = "nodev"; + useOSProber = lib.mkDefault false; + efiSupport = true; + }; + systemd-boot = { + enable = false; + consoleMode = "keep"; + configurationLimit = 5; + }; + }; + + plymouth = { + enable = false; + theme = "deus_ex"; + themePackages = [ + (pkgs.adi1090x-plymouth-themes.override { + selected_themes = ["deus_ex"]; + }) + ]; + }; + }; + + fileSystems."/boot".options = ["fmask=0077" "dmask=0077"]; +} diff --git a/system/default.nix b/system/default.nix new file mode 100644 index 0000000..638ae02 --- /dev/null +++ b/system/default.nix @@ -0,0 +1,18 @@ +{...}: { + imports = [ + ./nix.nix + ./boot.nix + ./audio.nix + ./bluetooth.nix + ./graphics.nix + ./networking.nix + ./packages.nix + ./programs.nix + ./services.nix + ./users.nix + ./desktop.nix + ./stylix.nix + ]; + + system.stateVersion = "25.11"; +} diff --git a/system/desktop.nix b/system/desktop.nix new file mode 100644 index 0000000..0337478 --- /dev/null +++ b/system/desktop.nix @@ -0,0 +1,16 @@ +{...}: { + # X server and window manager + services.xserver = { + enable = true; + windowManager.i3.enable = true; + + # Czech QWERTZ layout + xkb = { + layout = "cz"; + options = "eurosign:e,caps:escape"; + }; + }; + + # Compositor (system-level service) + services.picom.enable = true; +} diff --git a/system/graphics.nix b/system/graphics.nix new file mode 100644 index 0000000..e2d9629 --- /dev/null +++ b/system/graphics.nix @@ -0,0 +1,13 @@ +{pkgs, ...}: { + services.xserver.videoDrivers = ["intel"]; + + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + intel-vaapi-driver + intel-media-driver + intel-compute-runtime + mesa + ]; + }; +} diff --git a/system/networking.nix b/system/networking.nix new file mode 100644 index 0000000..e1e9450 --- /dev/null +++ b/system/networking.nix @@ -0,0 +1,3 @@ +{...}: { + networking.networkmanager.enable = true; +} diff --git a/system/nix.nix b/system/nix.nix new file mode 100644 index 0000000..ef92dc1 --- /dev/null +++ b/system/nix.nix @@ -0,0 +1,32 @@ +{pkgs, ...}: { + nix = { + package = pkgs.lixPackageSets.stable.lix; + + settings = { + substituters = [ + "https://cache.lix.systems" + "https://cache.nixos.org/" + ]; + + trusted-public-keys = [ + "cache.lix.systems-1:32QFpmvZsbQ8HhH3dBHDx1E8zFGbxqMNxjE2Rk5OGcQ=" + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + + experimental-features = ["nix-command" "flakes"]; + }; + }; + + # Fix nixpkgs.overlays for Lix compatibility + nixpkgs.overlays = [ + (final: prev: { + inherit + (prev.lixPackageSets.stable) + nixpkgs-review + nix-eval-jobs + nix-fast-build + colmena + ; + }) + ]; +} diff --git a/system/packages.nix b/system/packages.nix new file mode 100644 index 0000000..a27d59e --- /dev/null +++ b/system/packages.nix @@ -0,0 +1,69 @@ +{pkgs, ...}: { + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + # Core + neovim + wget + git + lazygit + + # CLI utilities + tree + ripgrep + fd + unzip + bzip2 + killall + acpi + + # System monitoring + btop + auto-cpufreq + + # Audio/Media + alsa-utils + helvum + playerctl + pipewire + + # Bluetooth & Wireless + blueman + bluez + wirelesstools + + # Display & Graphics + feh + flameshot + xss-lock + brightnessctl + imagemagick + ghostscript + + # Development + stdenv + tree-sitter + clang + libgcc + lua + lua53Packages.luarocks + lua-language-server + stylua + nil + python314 + pyright + ruff + vtsls + ]; + + fonts = { + enableDefaultPackages = true; + packages = with pkgs; [ + fira-code + noto-fonts + noto-fonts-color-emoji + blackout + beon + ]; + }; +} diff --git a/system/programs.nix b/system/programs.nix new file mode 100644 index 0000000..4fdffc3 --- /dev/null +++ b/system/programs.nix @@ -0,0 +1,13 @@ +{...}: { + programs.firefox.enable = true; + programs.zsh.enable = true; + + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + + programs.ssh.startAgent = true; +} diff --git a/system/services.nix b/system/services.nix new file mode 100644 index 0000000..b6aa377 --- /dev/null +++ b/system/services.nix @@ -0,0 +1,13 @@ +{...}: { + security.pam.sshAgentAuth.enable = true; + + time.timeZone = "Europe/Prague"; + + services = { + displayManager.ly.enable = true; + printing.enable = true; + libinput.enable = true; + openssh.enable = true; + tailscale.enable = true; + }; +} diff --git a/system/stylix.nix b/system/stylix.nix new file mode 100644 index 0000000..38cdc19 --- /dev/null +++ b/system/stylix.nix @@ -0,0 +1,75 @@ +{pkgs, ...}: { + stylix = { + enable = true; + autoEnable = true; + + # Base16 scheme - Nord Blue inspired + base16Scheme = { + base00 = "2D333F"; # background + base01 = "3B4252"; # lighter background + base02 = "434C5E"; # selection background + base03 = "4C566A"; # comments + base04 = "D8DEE9"; # dark foreground + base05 = "C6D0F5"; # foreground + base06 = "E5E9F0"; # light foreground + base07 = "ECEFF4"; # lightest foreground + base08 = "BF616A"; # red + base09 = "D5A18E"; # orange/tan + base0A = "EBCB8B"; # yellow + base0B = "A3BE8C"; # green + base0C = "88C0D0"; # cyan + base0D = "82A3C0"; # blue (accent) + base0E = "B48EAD"; # purple + base0F = "5E81AC"; # dark blue + }; + + # Wallpaper + image = pkgs.fetchurl { + url = "https://raw.githubusercontent.com/NixOS/nixos-artwork/master/wallpapers/nix-wallpaper-simple-blue.png"; + sha256 = "sha256-7l9bnGFwJE4hMl4xLsZvVLrFniIA0cXgg5XqKsuygas="; + }; + + # Fonts + fonts = { + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font"; + }; + sansSerif = { + package = pkgs.noto-fonts; + name = "Noto Sans"; + }; + serif = { + package = pkgs.noto-fonts; + name = "Noto Serif"; + }; + emoji = { + package = pkgs.noto-fonts-color-emoji; + name = "Noto Color Emoji"; + }; + sizes = { + terminal = 10; + applications = 11; + desktop = 11; + }; + }; + + # Cursor + cursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + }; + + # Opacity + opacity = { + terminal = 0.95; + applications = 1.0; + desktop = 1.0; + popups = 0.95; + }; + + # Polarity (dark or light theme) + polarity = "dark"; + }; +} diff --git a/system/users.nix b/system/users.nix new file mode 100644 index 0000000..3b589b8 --- /dev/null +++ b/system/users.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: { + users.users.mun = { + isNormalUser = true; + extraGroups = ["wheel" "bluetooth" "networkmanager" "kvm" "nixos"]; + shell = pkgs.zsh; + }; +} |
