Skip to content

Neurarian/NixOS-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My NixOS config

Work in progress 🚧.

Currently running on three hosts: Medion (Intel Notebook; Nvidia GPU), Loki (AMD Workstation; AMD GPU), and WSL


⚙️ Structure

Inspired by Misterio77

  • flake.nix: Entrypoint for all hosts.
  • hosts: NixOS Configurations, rebuild via nh os switch -H <hostname> after bootstrapping.
    • common: Shared configurations imported by the host configurations.
      • core: Core configurations that every host requires.
      • optional: Optional configurations that only some hosts require
        • Optional modules are all implemented via toggleable options. These can easily be set for each host.
    • Loki: Gaming PC / Workstation - 32GB RAM, R7 5800X3D , RX 6800XT.
    • Medion: Notebook: Medion Erazer X7853 - 16GB RAM, i7-7700HQ, GTX 1070M.
    • Fujitsu: Homelab: Fujitsu Esprimo 556/2 - 32GB RAM, G4560T (Not running NixOS yet).
    • Wsl: Windows subsystem for Linux: Contains all core modules and mostly work related extras.
  • home: Home Manager configuration. Via the Home Manager NixOS module.
    • Liqyid: Currently the only user I need. Sudoer.
      • common: Shared configurations imported by the user-specific host configurations.
        • core: Core configurations that every host running that user requires.
        • optional: Optional configurations that only some hosts running that user require.
          • Optional modules are all implemented via toggleable options. These can easily be set in each host-specific file in the user directory.
  • packages: Place for patched binaries / packages not available in nixpkgs or dedicated flakes.
    • image-hct: Self made rust CLI utility to efficiently get main hue, chroma and tone from a wallpaper for theming
    • saint: Patched binary to perform "Significance Analysis of INTeractome" PMID: 24513533

🖥️ Compositor & GUI

Uses the hyprland window management ecosystem. Uses a modified AGS setup from fufexan's config. Wallpaper-based color scheme generation using Material colors via matugen and a custom rust cli utility to set light/dark theme and scheme based on main color HCT space. AGS, GTK, fuzzel, wlogout, hyprland and hyprlock are dynamically themed in a wallpaper-matched light or dark theme.

📷 Screenshots

🌚 Host: Medion - With dark colorscheme (single monitor)

2024-11-02T21:11:34,395432515+01:00

🌞 Host: Loki - With light colorscheme (dual monitor)

2024-11-02T21:53:43,163376928+01:00

🧑‍💻 Neovim

Custom neovim based on kickstart.nvim. Uses nixCats for plugin and dependency management and lz.n for plugin lazy-loading. Integrated with tmux. If you want to check out just this nvim distribution run:

nix run github:Neurarian/NixOS-config#nixCats

But be aware that it ships all tools necessary for C, Rust, JS, and R development by default which do take up a lot of space. If you would like to test a more stripped down version for use with nix, lua, bash, and markdown only: try #nixCatsStripped instead.

✨ Main Features

  • 🐱 nixCats-nvim as an interface for managing installation of plugins and dependencies the Nix way, all while staying with lua for configuration.
  • 🦥 Nix friendly, dead simple plugin lazy-loading with lz.n.
  • 💬 Modern and fast autocompletion with care.nvim & LuaSnip.
  • 🌎 Navigation to everywhere in the project with just a couple of keypresses using telescope.nvim, harpoon, & the occasional Neo-tree.nvim.
  • 🦦 Nix friendly syntax highlighting of nix-embedded code with otter.nvim & nvim-treesitter.
  • ♻️ Integration with git via lazygit.nvim & gitsigns.nvim.
  • 🔌 Running the amazing nixd LSP via lspconfig making configuration a breeze.
  • 🐞 Integrated debugger via nvim-dap.
  • 🎨 Harmonizing pastel aesthetics across the entire terminal via Catppuccin Dark Mocha and a pretty alpha-nvim splash screen.

🔒 Secret Provisioning

Seamless setup for management of secrets within NixOS with sops-nix. Storing secrets such as wifi creds, github tokens, SSH keys, etc. in an age encrypted .yaml file decrypted during activation time.

🔌 Plug & Play VFIO GPU Passthrough

Includes a custom NixOS module that generates a single-file qemu hook making (single) GPU passthrough via detaching and reattaching of the respective kernel drivers on NixOS dead simple, e.g.:

#hosts/<hostname>/default.nix
{
  inputs,
  ...
}:
#...
{
  imports = [
    #...
    ../common/optional
    #...
  ];
  #...
  # VFIO: single GPU passthrough for 6800XT
  libvirt = {
    enable = true;
    qemuHook = {
      enable = true;
      vmName = "win10";
      pciDevices = [
        "pci_0000_0b_00_0"
        "pci_0000_0b_00_1"
        "pci_0000_0b_00_2"
      ];
      gpuModule = "amdgpu";
      vfioModule = "vfio-pci";
    };
  };
}

💿 Software List

Type Software
Window Manager hyprland + hyprspace
Bar AGS v1
App Launcher fuzzel
Resource Monitor Mission Center + CoolerControl
File Manager nautilus
Lockscreen hyprlock
Logout Menu wlogout
Browser custom hardened Firefox + Zen
Media Player mpd + CAVA + AGS v1 + YouTube Music
Gaming Steam / Gamescope
Screenshot Software grimblast
Clipboard wl-clipboard + cliphist
Terminal Emulator WezTerm
Terminal Multiplexer tmux
Shell zsh + Starship
Editor neovim
Secret Provisioning sops-nix
Fonts Jetbrains Mono + FiraCode
Color Scheme Catppuccin Mocha + matugen
Cursor Catppuccin-Macchiato-Dark
Show planned
Type Software
Ephemeral Root Storage Impermanence
Notes Obsidian
Bar & Widgets Migrate to AGS v2
VFIO Does not work on Notebook Nvidia GPU yet