fibe fixed my dude

This commit is contained in:
2026-01-15 18:31:30 +00:00
parent 0edd66d61a
commit b2504fde35
29 changed files with 483 additions and 717 deletions

80
CLAUDE.md Normal file
View File

@@ -0,0 +1,80 @@
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## Build Commands
```bash
# Rebuild and switch to main system (default specialization)
ns # alias for: nh os switch --specialisation 00-main-system
# Update flake inputs and commit lock file
nu # alias for: (cd ~/nixos-dots && nix flake update --commit-lock-file)
# Edit configuration in Emacs
ne # alias for: emacsclient -c ~/nixos-dots/configuration.nix
# Direct rebuild commands (if not using nh aliases)
sudo nixos-rebuild switch --flake .#mrfluffyPC
sudo nixos-rebuild switch --flake .#mrfluffyLaptop
```
## Architecture
### Multi-Host / Multi-User System
This is a NixOS flake configuration targeting two machines (`mrfluffyPC`, `mrfluffyLaptop`) with three users (`mrfluffy`, `work`, `game`). The `systemName` variable (`"pc"` or `"laptop"`) is passed through `specialArgs` to enable hardware-conditional configuration.
### Specializations
Two boot specializations exist in `configuration.nix`:
- **`00-main-system`**: Default desktop environment with Hyprland, full dev tooling
- **`01-steam`**: Gaming mode with Gamescope, Steam Big Picture, auto-login to `game` user
### Directory Structure
```
flake.nix # Flake inputs and nixosConfigurations
configuration.nix # Entry point: users, home-manager, specializations
hardware-configuration.nix
system/ # NixOS modules (boot, hardware, services, packages)
├── boot.nix # Bootloader, kernel config (laptop/pc conditional)
├── hardware.nix # GPU drivers (Intel for laptop, AMD for PC)
├── nixOSPkgs.nix # System packages (~2300 lines)
├── services.nix # System services (greetd, pipewire, etc.)
└── specialisation/ # Boot mode configs
home/ # Home Manager user configs
├── mrfluffy.nix # Main user (imports dots/, stylix, services)
├── work.nix # Work user
├── game.nix # Gaming user
├── homePkgs.nix # User packages
└── stylix.nix # Unified theming (base16, fonts, cursors)
dots/ # Application dotfiles as Nix modules
├── hyprland.nix # Primary window manager
├── waybar.nix # Status bar
├── foot.nix # Terminal
├── zsh.nix # Shell config with aliases
└── doom/ # Doom Emacs config (raw files)
assets/Wallpapers/ # Wallpaper images
```
### Window Manager Selection
Set in `flake.nix` via `window_manager` variable (options: `"hyprland"`, `"river"`, `"niri"`, `"all"`). Currently set to `"hyprland"`. This variable is passed to modules for conditional WM configuration.
### Theming
Stylix + nix-colors provide unified theming across all applications:
- Color scheme: `hardcore` (base00: `#141414`)
- Configured in `home/stylix.nix`
### Conditional Hardware Config
Use the `systemName` variable (`"laptop"` or `"pc"`) for hardware-specific code:
```nix
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
# ... use lib.mkIf for conditional values
```

View File

@@ -3,14 +3,38 @@
{ {
config, config,
pkgs,
lib, lib,
pkgs,
inputs, inputs,
window_manager, window_manager,
systemName, systemName,
... ...
}: }:
let
# Common groups for main users (mrfluffy, work)
defaultUserGroups = [
"wheel"
"networkmanager"
"video"
"render"
"docker"
"libvirt"
"input"
"seat"
"dialout"
];
# Groups for game user (no wheel for security - has empty password)
gameUserGroups = [
"video"
"render"
"input"
"seat"
"networkmanager"
"dialout"
];
in
{ {
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
@@ -24,9 +48,7 @@
#inputs.niri.nixosModules.niri #inputs.niri.nixosModules.niri
]; ];
############################################################################## # ─── Nix settings ───────────────────────────────────────────────────────────
# Nix settings
##############################################################################
nix.settings = { nix.settings = {
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
@@ -36,9 +58,7 @@
auto-optimise-store = true; auto-optimise-store = true;
}; };
############################################################################## # ─── Users ──────────────────────────────────────────────────────────────────
# Users
##############################################################################
programs.zsh.enable = true; programs.zsh.enable = true;
users = { users = {
users = { users = {
@@ -56,17 +76,7 @@
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
createHome = true; createHome = true;
extraGroups = [ extraGroups = defaultUserGroups;
"wheel"
"networkmanager"
"video"
"render"
"docker"
"libvirt"
"input"
"seat"
"dialout"
];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
@@ -74,34 +84,17 @@
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
createHome = true; createHome = true;
extraGroups = [ extraGroups = defaultUserGroups;
"wheel"
"networkmanager"
"video"
"render"
"docker"
"libvirt"
"input"
"seat"
"dialout"
];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
game = { game = {
isNormalUser = true; isNormalUser = true;
description = "Dedicated gaming user (auto-login in Steam specialisation)"; description = "Dedicated gaming user (auto-login in Steam specialisation)";
shell = pkgs.bash; shell = pkgs.bash;
createHome = true; createHome = true;
password = ""; # no password hashedPassword = ""; # no password - removed wheel group for security
extraGroups = [ extraGroups = gameUserGroups;
"wheel"
"video"
"render"
"input"
"seat"
"networkmanager"
"dialout"
];
home = "/home/game"; home = "/home/game";
}; };
}; };
@@ -111,9 +104,7 @@
]; ];
}; };
############################################################################## # ─── Home-Manager ───────────────────────────────────────────────────────────
# Home-Manager
##############################################################################
home-manager = { home-manager = {
extraSpecialArgs = { inherit inputs window_manager systemName; }; extraSpecialArgs = { inherit inputs window_manager systemName; };
users = { users = {
@@ -123,9 +114,7 @@
}; };
}; };
############################################################################## # ─── Environment ────────────────────────────────────────────────────────────
# Environment
##############################################################################
environment = { environment = {
sessionVariables = { sessionVariables = {
ZDOTDIR = "$HOME/.config/zsh"; ZDOTDIR = "$HOME/.config/zsh";
@@ -150,17 +139,13 @@
]; ];
}; };
############################################################################## # ─── Nixpkgs policy ─────────────────────────────────────────────────────────
# Nixpkgs policy
##############################################################################
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ ]; permittedInsecurePackages = [ ];
}; };
############################################################################## # ─── Decky ──────────────────────────────────────────────────────────────────
# decky
##############################################################################
nixpkgs.overlays = [ nixpkgs.overlays = [
inputs.jovian.overlays.default inputs.jovian.overlays.default
]; ];
@@ -173,9 +158,7 @@
# extraPythonPackages = ps: with ps; [ some-python-package ]; # extraPythonPackages = ps: with ps; [ some-python-package ];
}; };
############################################################################## # ─── State version ──────────────────────────────────────────────────────────
# State version
##############################################################################
system.stateVersion = "24.11"; # Did you read the comment? system.stateVersion = "24.11"; # Did you read the comment?
specialisation = { specialisation = {
@@ -190,9 +173,7 @@
"00-main-system" = { "00-main-system" = {
configuration = { configuration = {
#boot.loader.systemd-boot.sortKey = lib.mkDefault "00000000000-main"; #boot.loader.systemd-boot.sortKey = lib.mkDefault "00000000000-main";
############################################################################## # ─── Imports ─────────────────────────────────────────────────────────────────
# Imports
##############################################################################
imports = [ imports = [
./system/services.nix ./system/services.nix
./system/nixOSPkgs.nix ./system/nixOSPkgs.nix

View File

@@ -1,4 +1,5 @@
{ config, {
config,
lib, lib,
pkgs, pkgs,
inputs, inputs,

View File

@@ -1,7 +1,7 @@
{ {
pkgs,
config, config,
lib, lib,
pkgs,
... ...
}: }:
{ {

View File

@@ -8,6 +8,9 @@
... ...
}: }:
let let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
hypr-package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; hypr-package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
hypr-portal = hypr-portal =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
@@ -35,9 +38,7 @@ in
]; ];
settings = { settings = {
########################################################################## # ─── Monitors ────────────────────────────────────────────────────────────────
# Monitors
##########################################################################
source = [ source = [
"./dms/outputs.conf" "./dms/outputs.conf"
#"./dms/cursor.conf" #"./dms/cursor.conf"
@@ -86,9 +87,7 @@ in
# transform = 0; # transform = 0;
# }; # };
########################################################################## # ─── Autostart ───────────────────────────────────────────────────────────────
# Autostart
##########################################################################
# Autostart necessary processes (like notifications daemons, status bars, etc.) # Autostart necessary processes (like notifications daemons, status bars, etc.)
# Or execute your favorite apps at launch like this: # Or execute your favorite apps at launch like this:
@@ -113,9 +112,7 @@ in
# ++ lib.optional (systemName == "pc") # ++ lib.optional (systemName == "pc")
# "swaybg -o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}"; # "swaybg -o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}";
########################################################################## # ─── Plugins ─────────────────────────────────────────────────────────────────
# Plugins
##########################################################################
plugin = { plugin = {
split-monitor-workspaces = { split-monitor-workspaces = {
@@ -129,18 +126,14 @@ in
}; };
}; };
########################################################################## # ─── Environment ─────────────────────────────────────────────────────────────
# Environment
##########################################################################
env = [ env = [
"XCURSOR_SIZE, 24" "XCURSOR_SIZE, 24"
"HYPRCURSOR_SIZE, 24" "HYPRCURSOR_SIZE, 24"
]; ];
########################################################################## # ─── General / Render / Decoration / Animations ─────────────────────────────
# General / Render / Decoration / Animations
##########################################################################
# https://wiki.hyprland.org/Configuring/Variables/ # https://wiki.hyprland.org/Configuring/Variables/
# https://wiki.hyprland.org/Configuring/Variables/#general # https://wiki.hyprland.org/Configuring/Variables/#general
@@ -218,9 +211,7 @@ in
]; ];
}; };
########################################################################## # ─── Layouts ─────────────────────────────────────────────────────────────────
# Layouts
##########################################################################
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more # See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
dwindle = { dwindle = {
@@ -236,9 +227,7 @@ in
new_on_top = true; new_on_top = true;
}; };
########################################################################## # ─── Misc / Input / Gestures / Devices ───────────────────────────────────────
# Misc / Input / Gestures / Devices
##########################################################################
# https://wiki.hyprland.org/Configuring/Variables/#misc # https://wiki.hyprland.org/Configuring/Variables/#misc
misc = { misc = {
@@ -251,8 +240,8 @@ in
# https://wiki.hyprland.org/Configuring/Variables/#input # https://wiki.hyprland.org/Configuring/Variables/#input
input = { input = {
kb_layout = lib.mkMerge [ kb_layout = lib.mkMerge [
(lib.mkIf (systemName == "laptop") "ie") (lib.mkIf isLaptop "ie")
(lib.mkIf (systemName == "pc") "us") (lib.mkIf isPc "us")
]; ];
repeat_rate = 40; repeat_rate = 40;
repeat_delay = 500; repeat_delay = 500;
@@ -281,9 +270,7 @@ in
sensitivity = -0.5; sensitivity = -0.5;
}; };
########################################################################## # ─── Binds ───────────────────────────────────────────────────────────────────
# Binds
##########################################################################
bind = [ bind = [
# Launcher / apps # Launcher / apps
@@ -394,9 +381,7 @@ in
binds = [ ]; binds = [ ];
########################################################################## # ─── Rules (windows / workspaces) ────────────────────────────────────────────
# Rules (windows / workspaces)
##########################################################################
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules # See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules

View File

@@ -7,6 +7,10 @@
... ...
}: }:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{ {
services = { services = {
hypridle = { hypridle = {
@@ -24,19 +28,19 @@
on-timeout = "loginctl lock-session"; on-timeout = "loginctl lock-session";
} }
] ]
++ lib.optional (systemName == "laptop") { ++ lib.optional isLaptop {
timeout = 700; timeout = 700;
on-timeout = "hyprctl dispatch dpms off"; # Turns off all displays on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on"; # Turns displays back on on-resume = "hyprctl dispatch dpms on";
} }
++ lib.optional (systemName == "laptop") { ++ lib.optional isLaptop {
timeout = 800; timeout = 800;
on-timeout = "systemctl suspend-then-hibernate"; on-timeout = "systemctl suspend-then-hibernate";
} }
++ lib.optional (systemName == "pc") { ++ lib.optional isPc {
timeout = 700; # Adjust timeout as needed (in seconds) timeout = 700;
on-timeout = "hyprctl dispatch dpms off"; # Turns off all displays on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on"; # Turns displays back on on-resume = "hyprctl dispatch dpms on";
}; };
}; };
}; };

View File

@@ -162,7 +162,7 @@
# You can change how the focus ring looks. # You can change how the focus ring looks.
focus-ring = { focus-ring = {
#omment this line to disable the focus ring. # Uncomment this line to disable the focus ring.
# off # off
# How many logical pixels the ring extends out from the windows. # How many logical pixels the ring extends out from the windows.

View File

@@ -1,11 +1,16 @@
{ {
pkgs,
lib,
config, config,
lib,
pkgs,
window_manager, window_manager,
systemName, systemName,
... ...
}: }:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{ {
wayland.windowManager.river = { wayland.windowManager.river = {
enable = window_manager == "river" || window_manager == "all"; enable = window_manager == "river" || window_manager == "all";
@@ -27,20 +32,18 @@
riverctl input "pointer-2362-8197-ASUP1204:00_093A:2005_Touchpad" tap enabled riverctl input "pointer-2362-8197-ASUP1204:00_093A:2005_Touchpad" tap enabled
riverctl keyboard-layout -options "grp:ctrl_space_toggle" ${ riverctl keyboard-layout -options "grp:ctrl_space_toggle" ${
if systemName == "laptop" then "ie,us" else "us" if isLaptop
then "ie,us"
else "us"
} }
#riverctl spawn 'export XDG_CURRENT_DESKTOP=river' #riverctl spawn 'export XDG_CURRENT_DESKTOP=river'
#riverctl spawn 'systemctl --user restart xdg-desktop-portal' #riverctl spawn 'systemctl --user restart xdg-desktop-portal'
riverctl spawn 'dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP' riverctl spawn 'dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP'
riverctl spawn 'swaybg ${ riverctl spawn 'swaybg ${
# Handle laptop case lib.optionalString isLaptop "-o eDP-1 -i ${../assets/Wallpapers/138.png}"
lib.optionalString (systemName == "laptop") "-o eDP-1 -i ${../assets/Wallpapers/138.png}"
}${ }${
# Handle PC case (appends to laptop case if needed, but conditions should be mutually exclusive) lib.optionalString isPc "-o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}"
lib.optionalString (
systemName == "pc"
) "-o HDMI-A-1 -i ${../assets/Wallpapers/138.png} -o DP-1 -i ${../assets/Wallpapers/138.png}"
}' }'
#riverctl spawn '/home/mrfluffy/.config/script/mic-gain-fix.sh' #riverctl spawn '/home/mrfluffy/.config/script/mic-gain-fix.sh'
riverctl spawn 'waybar &' riverctl spawn 'waybar &'
@@ -57,12 +60,9 @@
riverctl set-cursor-warp on-focus-change riverctl set-cursor-warp on-focus-change
#riverctl xcursor-theme oreo_spark_pink_cursors #riverctl xcursor-theme oreo_spark_pink_cursors
riverctl spawn '${ riverctl spawn '${
# Handle laptop case lib.optionalString isLaptop "wlr-randr --output eDP-1 --mode 1920x1080@60"
lib.optionalString (systemName == "laptop") "wlr-randr --output eDP-1 --mode 1920x1080@60"
}${ }${
# Handle PC case (appends to laptop case if needed, but conditions should be mutually exclusive) lib.optionalString isPc "wlr-randr --output DP-1 --mode 2560x1440@144 --pos 1920,0 --output HDMI-A-1 --mode 1920x1080@60 --pos 0,0"
lib.optionalString (systemName == "pc")
"wlr-randr --output DP-1 --mode 2560x1440@144 --pos 1920,0 --output HDMI-A-1 --mode 1920x1080@60 --pos 0,0"
}' }'
# This is the example configuration file for river. # This is the example configuration file for river.

View File

@@ -1,5 +1,6 @@
{ {
config, config,
lib,
pkgs, pkgs,
inputs, inputs,
window_manager, window_manager,
@@ -16,14 +17,12 @@
#tags button.occupied { #tags button.occupied {
color: inherit; color: inherit;
background-color: #6a548d background-color: #6a548d;
} }
#tags button.focused { #tags button.focused {
color: #f8f8f2; color: #f8f8f2;
background-color: #aa86e1 ; background-color: #aa86e1;
} }
#tags button.urgent { #tags button.urgent {
@@ -119,17 +118,16 @@
spacing = 4; # Gaps between modules (4px) spacing = 4; # Gaps between modules (4px)
# Choose the order of the modules # Choose the order of the modules
modules-left = modules-left =
if window_manager == "river" then if window_manager == "river"
[ then [
"river/tags" "river/tags"
"custom/media" "custom/media"
] ]
else if window_manager == "hyprland" then else if window_manager == "hyprland"
[ then [
"hyprland/workspaces" "hyprland/workspaces"
] ]
else else [ ];
[ ];
modules-center = [ modules-center = [
]; ];

View File

@@ -1,7 +1,7 @@
{ {
pkgs,
lib,
config, config,
lib,
pkgs,
... ...
}: }:
{ {

View File

@@ -61,9 +61,8 @@
}; };
vicinae = { vicinae = {
url = "github:vicinaehq/vicinae"; url = "github:vicinaehq/vicinae";
#inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# ... your existing inputs ...
jovian = { jovian = {
url = "github:Jovian-Experiments/Jovian-NixOS"; url = "github:Jovian-Experiments/Jovian-NixOS";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";

View File

@@ -10,33 +10,40 @@
... ...
}: }:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{ {
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = assertions = [{
[ ] assertion = builtins.elem systemName [ "laptop" "pc" ];
++ (lib.optionals (systemName == "pc") [ message = "systemName must be either 'laptop' or 'pc', got: ${systemName}";
}];
boot.initrd.availableKernelModules = [ ]
++ lib.optionals isPc [
"xhci_pci" "xhci_pci"
"ahci" "ahci"
"nvme" "nvme"
"usb_storage" "usb_storage"
"usbhid" "usbhid"
"sd_mod" "sd_mod"
]) ]
++ (lib.optionals (systemName == "laptop") [ ++ lib.optionals isLaptop [
"vmd" "vmd"
"xhci_pci" "xhci_pci"
"nvme" "nvme"
"usb_storage" "usb_storage"
"sd_mod" "sd_mod"
]); ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = boot.kernelModules = [ ]
[ ] ++ lib.optionals isPc [ "kvm-amd" "btusb" ]
++ (lib.optionals (systemName == "pc") [ "kvm-amd" "btusb"]) ++ lib.optionals isLaptop [ "kvm-intel" ];
++ (lib.optionals (systemName == "laptop") [ "kvm-intel" ]);
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
boot.kernelParams = [ boot.kernelParams = [
# Most common working combination in 2024/2025 # Most common working combination in 2024/2025
@@ -45,22 +52,22 @@
]; ];
fileSystems."/" = lib.mkMerge [ fileSystems."/" = lib.mkMerge [
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
device = "/dev/disk/by-uuid/fdcbb840-4b35-4023-a048-599b0c5161d6"; device = "/dev/disk/by-uuid/fdcbb840-4b35-4023-a048-599b0c5161d6";
fsType = "btrfs"; fsType = "btrfs";
}) })
(lib.mkIf (systemName == "laptop") { (lib.mkIf isLaptop {
device = "/dev/disk/by-uuid/6aa7c67d-a0a5-4928-b16b-9c7991fee7ab"; device = "/dev/disk/by-uuid/6aa7c67d-a0a5-4928-b16b-9c7991fee7ab";
fsType = "ext4"; fsType = "ext4";
}) })
]; ];
fileSystems."/boot" = lib.mkMerge [ fileSystems."/boot" = lib.mkMerge [
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
device = "/dev/disk/by-uuid/E1B6-9089"; device = "/dev/disk/by-uuid/E1B6-9089";
fsType = "vfat"; fsType = "vfat";
}) })
(lib.mkIf (systemName == "laptop") { (lib.mkIf isLaptop {
device = "/dev/disk/by-uuid/FF4B-819D"; device = "/dev/disk/by-uuid/FF4B-819D";
fsType = "vfat"; fsType = "vfat";
options = [ options = [
@@ -71,20 +78,21 @@
]; ];
fileSystems."/home" = lib.mkMerge [ fileSystems."/home" = lib.mkMerge [
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
device = "/dev/disk/by-uuid/d226a8ed-10eb-452e-9284-1ff994a7f179"; device = "/dev/disk/by-uuid/d226a8ed-10eb-452e-9284-1ff994a7f179";
fsType = "btrfs"; fsType = "btrfs";
}) })
]; ];
fileSystems."/home/game/Games" = lib.mkMerge [ fileSystems."/home/game/Games" = lib.mkMerge [
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
device = "/dev/disk/by-uuid/54188f21-d525-4681-a9d4-b798363eef17"; device = "/dev/disk/by-uuid/54188f21-d525-4681-a9d4-b798363eef17";
fsType = "ext4"; fsType = "ext4";
}) })
]; ];
#fileSystems."/server" = lib.mkIf (systemName == "pc") { # or remove the mkIf if you want it on both #fileSystems."/server" = lib.mkIf isPc { # or remove the mkIf if you want it on both
# device = "//192.168.1.8/mrfluffy"; # adjust the share name if its not the home share # device = "//192.168.1.8/mrfluffy"; # adjust the share name if its not the home share
# fsType = "cifs"; # fsType = "cifs";
# options = let # options = let
@@ -107,18 +115,13 @@
# ]; # ];
#}; #};
swapDevices = swapDevices = [ ]
[ ] ++ lib.optionals isPc [
++ (lib.optionals (systemName == "pc") [ { device = "/dev/disk/by-uuid/ccf41b96-c45f-47e0-8541-cd865f5d2ec6"; }
{ ]
device = "/dev/disk/by-uuid/ccf41b96-c45f-47e0-8541-cd865f5d2ec6"; ++ lib.optionals isLaptop [
} { device = "/dev/disk/by-uuid/b416c3bd-861b-4b0c-aa84-6962b2e6a47d"; }
]) ];
++ (lib.optionals (systemName == "laptop") [
{
device = "/dev/disk/by-uuid/b416c3bd-861b-4b0c-aa84-6962b2e6a47d";
}
]);
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@@ -130,10 +133,10 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = lib.mkMerge [ hardware = lib.mkMerge [
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}) })
(lib.mkIf (systemName == "laptop") { (lib.mkIf isLaptop {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}) })
]; ];

66
home/common.nix Normal file
View File

@@ -0,0 +1,66 @@
{
config,
lib,
pkgs,
inputs,
window_manager,
...
}:
{
imports = [
# Core theming & integrations
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
# Local modules
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/waybar.nix
../dots/zsh.nix
../dots/nixcord.nix
../dots/xdg.nix
../dots/river.nix
../dots/hyprland.nix
../dots/hyprpaper.nix
../dots/caelestia.nix
../dots/dankMeterialShell.nix
];
# Common state version
home.stateVersion = "23.11";
# Common GTK settings
gtk = {
enable = true;
iconTheme = {
name = "Reversal-black-dark";
package = pkgs.reversal-icon-theme.override { allColorVariants = true; };
};
};
# Common packages for all users
home.packages = with pkgs; [
lswt
swaybg
wlr-randr
];
# Common dotfiles
home.file = {
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
};
# Let Home Manager install and manage itself
programs.home-manager.enable = true;
}

View File

@@ -1,101 +1,19 @@
{ {
config, config,
lib,
pkgs, pkgs,
inputs, inputs,
lib,
window_manager,
... ...
}: }:
let
in
{ {
imports = [ imports = [ ./common.nix ];
# Core theming & integrations
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
# inputs.niri.homeModules.niri
# Local modules # User-specific color scheme
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/zsh.nix
../dots/xdg.nix
../dots/hyprland.nix
../dots/caelestia.nix
];
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.hardcore; colorScheme = inputs.nix-colors.colorSchemes.hardcore;
stylix.base16Scheme.base00 = "141414"; stylix.base16Scheme.base00 = "141414";
# Home Manager needs a bit of information about you and the paths it should manage. # User identity
home.username = "game"; home.username = "game";
home.homeDirectory = "/home/game"; home.homeDirectory = "/home/game";
# This determines compatibility with a specific Home Manager release.
home.stateVersion = "23.11"; # Please read the comment before changing.
# Example GTK block (disabled)
gtk = {
enable = true;
iconTheme = {
name = "Reversal-black-dark";
package = pkgs.reversal-icon-theme.override { allColorVariants = true; };
};
};
home.packages = with pkgs; [
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
############################
# Experimental (inputs)
############################
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# ##########################
# Examples (disabled)
# ##########################
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Dotfiles & static files managed by Home Manager
home.file = {
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
} }

View File

@@ -125,20 +125,14 @@ in
services.kdeconnect.enable = true; services.kdeconnect.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
############################ # ─── Shells & Terminals ──────────────────────────────────────────────────────
# Shells & Terminals
############################
alacritty alacritty
zsh zsh
############################ # ─── CLI Shit ────────────────────────────────────────────────────────────────
# CLI Shit
############################
atuin atuin
############################ # ─── System Utilities ──────────────────────────────────────────────────────────
# System Utilities
############################
app2unit app2unit
brightnessctl brightnessctl
ddcutil ddcutil
@@ -150,15 +144,11 @@ in
xarchiver xarchiver
xdg-user-dirs xdg-user-dirs
############################ # ─── Monitoring & TUI Apps ───────────────────────────────────────────────────
# Monitoring & TUI Apps
############################
btop btop
cava cava
############################ # ─── Wayland / Desktop Tools ─────────────────────────────────────────────────
# Wayland / Desktop Tools
############################
grim grim
hyprpaper hyprpaper
hyprpicker hyprpicker
@@ -168,48 +158,35 @@ in
swappy swappy
wf-recorder wf-recorder
############################ # ─── Audio / Media Tools ─────────────────────────────────────────────────────
# Audio / Media Tools
############################
openai-whisper openai-whisper
pamixer pamixer
playerctl playerctl
alsa-utils alsa-utils
############################ # ─── Browsers & Web ────────────────────────────────────────────────────────────
# Browsers & Web
############################
brave brave
firefox firefox
ladybird ladybird
wgnord wgnord
############################ # ─── Communication & Sharing ─────────────────────────────────────────────────
# Communication & Sharing
############################
#element-desktop #element-desktop
localsend localsend
thunderbird thunderbird
############################ # ─── Documents & Viewers ─────────────────────────────────────────────────────
# Documents & Viewers
############################
libreoffice
libreoffice-fresh libreoffice-fresh
zathura zathura
############################ # ─── Media Players & Imaging ─────────────────────────────────────────────────
# Media Players & Imaging
############################
imv imv
mpv mpv
#upscaler #upscaler
pear-desktop pear-desktop
libsixel libsixel
############################ # ─── Development Toolchains ──────────────────────────────────────────────────
# Development Toolchains
############################
gdb gdb
nodejs_20 nodejs_20
platformio platformio
@@ -222,29 +199,21 @@ in
#inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.qml-ts-mode #inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.qml-ts-mode
#inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.tree-sitter-qmljs #inputs.qs-qml.packages.${pkgs.stdenv.hostPlatform.system}.tree-sitter-qmljs
############################ # ─── Game Dev / Engines / Creative ──────────────────────────────────────────
# Game Dev / Engines / Creative
############################
blender blender
godot_4 godot_4
freecad freecad
############################ # ─── Emulation ────────────────────────────────────────────────────────────────
# Emulation
############################
fuse fuse
fuse-emulator fuse-emulator
fuse3 fuse3
############################ # ─── Android Tools ───────────────────────────────────────────────────────────
# Android Tools
############################
android-tools android-tools
scrcpy scrcpy
############################ # ─── Gaming & Launchers ──────────────────────────────────────────────────────
# Gaming & Launchers
############################
dualsensectl dualsensectl
gamemode gamemode
goverlay goverlay
@@ -260,9 +229,7 @@ in
abaddon abaddon
############################ # ─── KDE / File Management ───────────────────────────────────────────────────
# KDE / File Management
############################
kdePackages.qt6ct kdePackages.qt6ct
kdePackages.baloo # new kdePackages.baloo # new
kdePackages.baloo-widgets # new kdePackages.baloo-widgets # new
@@ -285,15 +252,11 @@ in
adw-gtk3 adw-gtk3
pywalfox-native pywalfox-native
############################ # ─── Experimental (inputs) ───────────────────────────────────────────────────
# Experimental (inputs)
############################
#inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird #inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
#inputs.hyprlauncher.packages.${pkgs.stdenv.hostPlatform.system}.default #inputs.hyprlauncher.packages.${pkgs.stdenv.hostPlatform.system}.default
############################ # ─── Blockchain (inputs) ─────────────────────────────────────────────────────
# Blockchain (inputs)
############################
#inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-cli #inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-cli
#inputs.caelestia.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell #inputs.caelestia.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell
]; ];

View File

@@ -1,120 +1,27 @@
{ {
config, config,
lib,
pkgs, pkgs,
inputs, inputs,
lib,
window_manager,
... ...
}: }:
let
in
{ {
imports = [ imports = [ ./common.nix ];
# Core theming & integrations
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
# inputs.niri.homeModules.niri
# Local modules # User-specific color scheme
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/waybar.nix
../dots/zsh.nix
../dots/nixcord.nix
#../dots/hyprlock.nix
../dots/xdg.nix
../dots/river.nix
#../dots/niri.nix
../dots/hyprland.nix
../dots/hyprpaper.nix
../dots/caelestia.nix
../dots/dankMeterialShell.nix
];
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.hardcore; colorScheme = inputs.nix-colors.colorSchemes.hardcore;
stylix.base16Scheme.base00 = "141414"; stylix.base16Scheme.base00 = "141414";
# Home Manager needs a bit of information about you and the paths it should manage. # User identity
home.username = "mrfluffy"; home.username = "mrfluffy";
home.homeDirectory = "/home/mrfluffy"; home.homeDirectory = "/home/mrfluffy";
# This determines compatibility with a specific Home Manager release. # User-specific GTK theme
home.stateVersion = "23.11"; # Please read the comment before changing. gtk.gtk3 = {
# Example GTK block (disabled)
gtk = {
enable = true;
gtk3 = {
theme = { theme = {
name = "adw-gtk3"; name = "adw-gtk3";
package = pkgs.adw-gtk3; package = pkgs.adw-gtk3;
}; };
}; };
#gtk4 = {
# theme = {
# name = "adw-gtk3";
# package = pkgs.adw-gtk3;
# };
#};
iconTheme = {
name = "Reversal-black-dark";
package = pkgs.reversal-icon-theme.override { allColorVariants = true; };
};
};
home.packages = with pkgs; [
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
############################
# Experimental (inputs)
############################
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# ##########################
# Examples (disabled)
# ##########################
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Dotfiles & static files managed by Home Manager
home.file = {
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
} }

View File

@@ -6,27 +6,7 @@
window_manager, window_manager,
... ...
}: }:
let
#quickshellPackage = inputs.caelestia.packages.${pkgs.stdenv.hostPlatform.system}.caelestia-shell;
in
{ {
#systemd.user.services.quickshell = lib.mkIf (window_manager == "hyprland") { # User services can be added here
# Unit = {
# Description = "QuickShell Application";
# After = [ "graphical-session.target" ];
# Requires = [ "graphical-session.target" ];
# };
# Service = {
# Type = "simple";
# ExecStart = "${quickshellPackage}/bin/caelestia-shell";
# ExecStartPre = "/bin/sh -c 'test -n \"$WAYLAND_DISPLAY\"'";
# Restart = "always";
# RestartSec = "5s";
# };
# Install = {
# WantedBy = [ "graphical-session.target" ];
# };
#};
} }

View File

@@ -17,7 +17,7 @@
WLR_DRM_NO_ATOMIC = 1; WLR_DRM_NO_ATOMIC = 1;
VDPAU_DRIVER = "radeonsi"; VDPAU_DRIVER = "radeonsi";
LIBVA_DRIVER_NAME = "radeonsi"; LIBVA_DRIVER_NAME = "radeonsi";
OLLAMA_HOST = "0.0.0.0"; OLLAMA_HOST = "127.0.0.1";
PATH = "$HOME/.config/emacs/bin:$PATH"; PATH = "$HOME/.config/emacs/bin:$PATH";
FZF_DEFAULT_COMMAND = "${lib.getExe pkgs.ripgrep} ~ --files --hidden"; FZF_DEFAULT_COMMAND = "${lib.getExe pkgs.ripgrep} ~ --files --hidden";
FZF_DEFAULT_OPTS = "--height 30% --reverse"; FZF_DEFAULT_OPTS = "--height 30% --reverse";
@@ -29,7 +29,7 @@
GNUPGHOME = "$XDG_DATA_HOME/gnupg"; GNUPGHOME = "$XDG_DATA_HOME/gnupg";
GOPATH = "$XDG_DATA_HOME/go"; GOPATH = "$XDG_DATA_HOME/go";
GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle"; GRADLE_USER_HOME = "$XDG_DATA_HOME/gradle";
IPYTHONDIR = "$XDG_CONFIG_HOMEipython"; IPYTHONDIR = "$XDG_CONFIG_HOME/ipython";
JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter"; JUPYTER_CONFIG_DIR = "$XDG_CONFIG_HOME/jupyter";
LESSHISTFILE = "$XDG_CACHE_HOME/less/history"; LESSHISTFILE = "$XDG_CACHE_HOME/less/history";
NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages"; NUGET_PACKAGES = "$XDG_CACHE_HOME/NuGetPackages";

View File

@@ -1,7 +1,7 @@
{ {
pkgs,
lib,
config, config,
lib,
pkgs,
... ...
}: }:
let let

View File

@@ -1,114 +1,19 @@
{ {
config, config,
lib,
pkgs, pkgs,
inputs, inputs,
lib,
window_manager,
... ...
}: }:
let
in
{ {
imports = [ imports = [ ./common.nix ];
# Core theming & apps
inputs.nix-colors.homeManagerModules.default
inputs.stylix.homeModules.stylix
inputs.nixcord.homeModules.nixcord
# inputs.niri.homeModules.niri
# Local modules # User-specific color scheme (different from mrfluffy)
./sessionVars.nix
./stylix.nix
./homePkgs.nix
./services.nix
# Dots
../dots/foot.nix
../dots/waybar.nix
../dots/zsh.nix
../dots/nixcord.nix
#../dots/hyprlock.nix
../dots/xdg.nix
../dots/river.nix
#../dots/niri.nix
../dots/hyprland.nix
../dots/hyprpaper.nix
../dots/caelestia.nix
../dots/dankMeterialShell.nix
];
# You can find color schemes at: https://github.com/tinted-theming/schemes
colorScheme = inputs.nix-colors.colorSchemes.blueish; colorScheme = inputs.nix-colors.colorSchemes.blueish;
stylix.base16Scheme.base00 = "0F1417"; stylix.base16Scheme.base00 = "0F1417";
# Home Manager user information # User identity
home.username = "work"; home.username = "work";
home.homeDirectory = "/home/work"; home.homeDirectory = "/home/work";
# This determines compatibility with a specific Home Manager release.
home.stateVersion = "23.11"; # Please read the comment before changing.
# Example GTK block (disabled)
gtk = {
enable = true;
iconTheme = {
name = "Reversal-black-dark";
package = pkgs.reversal-icon-theme.override { allColorVariants = true; };
};
};
home.packages = with pkgs; [
############################
# Wayland / Desktop tools
############################
lswt
swaybg
wlr-randr
############################
# Browsers
############################
############################
# work stuff
############################
#awscli2
# swaynotificationcenter
# inputs.ladybird.packages."${pkgs.stdenv.hostPlatform.system}".ladybird
# pkgs.hello
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Dotfiles & static files managed by Home Manager
home.file = {
".config/nixpkgs/config.nix".text = ''
{ allowUnfree = true; }
'';
".config/doom".source = ../dots/doom;
# ".config/quickshell".source = ../dots/shell;
# ".config/kitty".source = ../../universal/dots/kitty;
# ".config/nvim".source = ../../universal/dots/nvim;
"Pictures/Wallpapers".source = ../assets/Wallpapers;
# ".screenrc".source = dotfiles/screenrc;
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# If you don't manage your shell with Home Manager, remember to source:
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
# /etc/profiles/per-user/mrfluffy/etc/profile.d/hm-session-vars.sh
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
} }

View File

@@ -25,7 +25,7 @@ in
loader = { loader = {
systemd-boot = { systemd-boot = {
enable = true; enable = true;
extraInstallCommands = '' extraInstallCommands = ''
${lib.getExe pkgs.gnused} -i 's/default .*/default *-specialisation-00-main-system.conf/' /boot/loader/loader.conf ${lib.getExe pkgs.gnused} -i 's/default .*/default *-specialisation-00-main-system.conf/' /boot/loader/loader.conf
''; '';
#sortKey = "z-normal"; #sortKey = "z-normal";

View File

@@ -7,6 +7,9 @@
}: }:
let let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
# Shared VA-API / VDPAU bits across both machines # Shared VA-API / VDPAU bits across both machines
commonVA = with pkgs; [ commonVA = with pkgs; [
libva libva
@@ -18,7 +21,7 @@ in
# ── Graphics ───────────────────────────────────────────────────────────────── # ── Graphics ─────────────────────────────────────────────────────────────────
hardware.graphics = lib.mkMerge [ hardware.graphics = lib.mkMerge [
# Laptop: Intel stack # Laptop: Intel stack
(lib.mkIf (systemName == "laptop") { (lib.mkIf isLaptop {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [
@@ -29,7 +32,7 @@ in
}) })
# PC: AMD/ROCm stack # PC: AMD/ROCm stack
(lib.mkIf (systemName == "pc") { (lib.mkIf isPc {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [ extraPackages = with pkgs; [

View File

@@ -1,17 +1,34 @@
{ config, lib, pkgs, systemName, ... }: {
config,
lib,
pkgs,
systemName,
...
}:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{ {
# Set console keymap based on systemName # Set console keymap based on systemName
console.keyMap = if systemName == "laptop" then "ie" else "us"; console.keyMap =
if isLaptop
then "ie"
else "us";
# Locale settings # Locale settings
i18n.defaultLocale = i18n.defaultLocale =
if systemName == "laptop" if isLaptop
then "en_IE.UTF-8" then "en_IE.UTF-8"
else "en_US.UTF-8"; else "en_US.UTF-8";
i18n.extraLocaleSettings = let i18n.extraLocaleSettings =
locale = if systemName == "laptop" then "en_IE.UTF-8" else "en_US.UTF-8"; let
locale =
if isLaptop
then "en_IE.UTF-8"
else "en_US.UTF-8";
in { in {
LC_ADDRESS = locale; LC_ADDRESS = locale;
LC_IDENTIFICATION = locale; LC_IDENTIFICATION = locale;

View File

@@ -1,8 +1,8 @@
{ {
config, config,
lib, lib,
inputs,
pkgs, pkgs,
inputs,
pkgs-stable, pkgs-stable,
... ...
}: }:

View File

@@ -6,10 +6,12 @@
... ...
}: }:
let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
in
{ {
############################################### # ─── Desktop & Input ───────────────────────────────────────────────────────
# Desktop & Input
###############################################
services.xserver.windowManager.fvwm2.gestures = true; services.xserver.windowManager.fvwm2.gestures = true;
# Enable touchpad support (enabled by default in most desktop managers). # Enable touchpad support (enabled by default in most desktop managers).
@@ -31,49 +33,26 @@
# services.xserver.displayManager.gdm.enable = true; # services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true; # services.xserver.desktopManager.gnome.enable = true;
############################################### # ─── Audio / Bluetooth ──────────────────────────────────────────────────────
# Audio / Bluetooth services.pipewire = {
###############################################
services.pipewire = lib.mkMerge [
(lib.mkIf (systemName == "laptop") {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
extraConfig.pipewire = { extraConfig.pipewire."92-low-latency"."context.properties" =
"92-low-latency" = { if isLaptop
"context.properties" = { then {
"default.clock.rate" = 48000; "default.clock.rate" = 48000;
"default.clock.allowed-rates" = [ 48000 ]; "default.clock.allowed-rates" = [ 48000 ];
}; }
}; else {
};
})
(lib.mkIf (systemName == "pc") {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
extraConfig.pipewire = {
"92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 96000; "default.clock.rate" = 96000;
"default.clock.allowed-rates" = [ "default.clock.allowed-rates" = [ 44100 48000 96000 ];
44100
48000
96000
];
}; };
}; };
};
})
];
############################################### # ─── Nice Shit ──────────────────────────────────────────────────────────────
# nice shit
###############################################
services.ananicy = { services.ananicy = {
enable = true; enable = true;
package = pkgs.ananicy-cpp; package = pkgs.ananicy-cpp;
@@ -88,18 +67,14 @@
services.blueman.enable = true; services.blueman.enable = true;
############################################### # ─── Printing & Files ───────────────────────────────────────────────────────
# Printing & Files
###############################################
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
services.gvfs.enable = true; services.gvfs.enable = true;
services.tumbler.enable = true; services.tumbler.enable = true;
############################################### # ─── Time & Power ───────────────────────────────────────────────────────────
# Time & Power
###############################################
services.automatic-timezoned.enable = true; services.automatic-timezoned.enable = true;
# Power management # Power management
@@ -109,20 +84,18 @@
}; };
# Laptop-specific lid and sleep behavior # Laptop-specific lid and sleep behavior
services.logind.settings.Login = lib.mkIf (systemName == "laptop") { services.logind.settings.Login = lib.mkIf isLaptop {
HandleLidSwitch = "suspend-then-hibernate"; HandleLidSwitch = "suspend-then-hibernate";
HandleLidSwitchExternalPower = "suspend-then-hibernate"; HandleLidSwitchExternalPower = "suspend-then-hibernate";
HandleLidSwitchDocked = "suspend-then-hibernate"; HandleLidSwitchDocked = "suspend-then-hibernate";
}; };
systemd.sleep.extraConfig = lib.mkIf (systemName == "laptop") '' systemd.sleep.extraConfig = lib.mkIf isLaptop ''
HibernateDelaySec=120min HibernateDelaySec=120min
SuspendState=mem SuspendState=mem
''; '';
############################################### # ─── Developer Tools & Services ─────────────────────────────────────────────
# Developer Tools & Services
###############################################
# direnv speedup # direnv speedup
services.lorri.enable = true; services.lorri.enable = true;
@@ -135,7 +108,7 @@
#services.flatpak.enable = true; #services.flatpak.enable = true;
# Sunshine (only on PC) # Sunshine (only on PC)
services.sunshine = lib.mkIf (systemName == "pc") { services.sunshine = lib.mkIf isPc {
enable = false; enable = false;
settings = { settings = {
sunshine_name = "nixos"; sunshine_name = "nixos";
@@ -168,11 +141,11 @@
}; };
# Ollama (only on PC) # Ollama (only on PC)
services.ollama = lib.mkIf (systemName == "pc") { services.ollama = lib.mkIf isPc {
enable = true; enable = true;
package = pkgs.ollama-rocm; package = pkgs.ollama-rocm;
port = 11434; port = 11434;
host = "0.0.0.0"; host = "127.0.0.1"; # Bind to localhost only for security
rocmOverrideGfx = "11.0.0"; rocmOverrideGfx = "11.0.0";
environmentVariables = { environmentVariables = {
OLLAMA_DEBUG = "1"; OLLAMA_DEBUG = "1";
@@ -180,14 +153,11 @@
OLLAMA_NUM_CTX = "40000"; OLLAMA_NUM_CTX = "40000";
OLLAMA_NUM_GPU = "20"; OLLAMA_NUM_GPU = "20";
OLLAMA_FLASH_ATTENTION = "true"; OLLAMA_FLASH_ATTENTION = "true";
# HSA_OVERRIDE_GFX_VERSION = "11.0.0";
OLLAMA_KV_CACHE_TYPE = "f16"; OLLAMA_KV_CACHE_TYPE = "f16";
}; };
}; };
############################################### # ─── Systemd User Services ──────────────────────────────────────────────────
# Systemd User Services
###############################################
systemd.user.services.steam-run-url-service = { systemd.user.services.steam-run-url-service = {
description = "Service to launch Steam URLs via FIFO"; description = "Service to launch Steam URLs via FIFO";
wantedBy = [ "default.target" ]; wantedBy = [ "default.target" ];
@@ -217,9 +187,7 @@
path = [ pkgs.steam ]; path = [ pkgs.steam ];
}; };
############################################### # ─── Networking & Remote ────────────────────────────────────────────────────
# Networking & Remote
###############################################
# services.resolved = { # services.resolved = {
# enable = true; # enable = true;
# dnssec = "true"; # dnssec = "true";
@@ -231,14 +199,10 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh.enable = true;
############################################### # ─── Virtualization ─────────────────────────────────────────────────────────
# Virtualization
###############################################
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
############################################### # ─── Udev Rules ─────────────────────────────────────────────────────────────
# Udev Rules
###############################################
services.udev.packages = [ services.udev.packages = [
pkgs.platformio-core pkgs.platformio-core
pkgs.platformio pkgs.platformio

View File

@@ -9,6 +9,9 @@
}: }:
let let
isLaptop = systemName == "laptop";
isPc = systemName == "pc";
oreo = pkgs.callPackage ./personalPKGS/oreo.nix { }; oreo = pkgs.callPackage ./personalPKGS/oreo.nix { };
# Window manager toggles # Window manager toggles
@@ -36,9 +39,7 @@ in
#}; #};
#services.displayManager.cosmic-greeter.enable = true; #services.displayManager.cosmic-greeter.enable = true;
############################################################################## # ─── Desktop / WM ───────────────────────────────────────────────────────────
# Desktop / WM
##############################################################################
programs.river-classic.enable = useRiver; programs.river-classic.enable = useRiver;
qt = { qt = {
@@ -89,9 +90,7 @@ in
# }; # };
}; };
############################################################################## # ─── Security / PolicyKit / PAM ─────────────────────────────────────────────
# Security / PolicyKit / PAM
##############################################################################
security = { security = {
rtkit.enable = true; rtkit.enable = true;
polkit.enable = true; polkit.enable = true;
@@ -102,13 +101,11 @@ in
}; };
}; };
############################################################################## # ─── Virtualisation ─────────────────────────────────────────────────────────
# Virtualisation
##############################################################################
virtualisation = { virtualisation = {
docker = { docker = {
enable = true; enable = true;
storageDriver = lib.mkIf (systemName == "pc") "btrfs"; storageDriver = lib.mkIf isPc "btrfs";
}; };
libvirtd.enable = true; libvirtd.enable = true;
}; };

View File

@@ -1,5 +0,0 @@
{ config, lib, pkgs, ... }:
{
}