1

Compare commits

..

42 Commits

Author SHA1 Message Date
db850552e3 Add nix-darwin screenshot 2026-03-21 16:19:47 +01:00
63afac3d04 Modules/Fish: Add nix-darwin homebrew environment setup 2026-03-21 15:50:27 +01:00
645fc64ead System/Darwinix: Set known network services 2026-03-21 15:41:48 +01:00
6561d4c979 Home/Darwinix: Set environment variables 2026-03-21 15:40:36 +01:00
f1ed339968 System/Darwinix: System settings 2026-03-21 15:39:01 +01:00
50d14ecf83 Home/Darwinix: Remove non-available packages 2026-03-21 15:03:34 +01:00
1cdc3f25e0 System/Darwinix: Add fonts 2026-03-21 15:00:32 +01:00
9e62f755bb Modules/Neovim: Don't hardcode home directory 2026-03-21 14:46:11 +01:00
d0e6fe072a Home/Darwinix: Disable keychain 2026-03-21 14:34:13 +01:00
86ea11c8e8 Modules/Fish: Add darwin rebuild abbr 2026-03-21 14:34:06 +01:00
1adacf5e1e Home/Darwinix: Add programs 2026-03-21 14:18:23 +01:00
e53787deae Modules/Fish: Update for nix-darwin 2026-03-21 14:18:10 +01:00
efce5c6293 Home/Darwinix: Add packages 2026-03-21 14:06:55 +01:00
6069a12e64 Modules/Neovim: Update for nix-darwin 2026-03-21 14:01:01 +01:00
91bd79a051 Modules/Kitty: Update for nix-darwin 2026-03-21 13:56:24 +01:00
9bec5f42b1 Modules/Fish: Update for nix-darwin 2026-03-21 13:44:12 +01:00
602aa4cd56 Initialize nix-darwin config for darwinix 2026-03-21 13:28:25 +01:00
3573a705af Home: Disable rofi 2026-03-21 11:49:04 +01:00
615d886a98 Update screenshots 2026-03-21 11:22:51 +01:00
4416f39f0c Modules/Niri: Enable dunst 2026-03-21 11:21:02 +01:00
0bb481c037 Modules/Niri: Use waypaper with swww backend instead of swaybg 2026-03-21 10:59:19 +01:00
98a3788f4f Modules/Niri: Add wallpaper switcher keybindings 2026-03-21 01:45:07 +01:00
ac4b005f9b Add wallpapers 2026-03-21 01:41:42 +01:00
901f58a527 Modules/Niri: Set wallpaper 2026-03-20 22:58:05 +01:00
9a5bc3e981 Modules/Niri: Add session command menu 2026-03-20 22:47:08 +01:00
fe69d39769 Lib/Rofi: Allow supplying a dmenu command for mkSimpleMenu 2026-03-20 22:46:58 +01:00
2f675e96f0 Modules/Niri: Theme walker 2026-03-20 22:24:00 +01:00
56512194ef Modules/Waybar: Update module configurations 2026-03-20 21:41:02 +01:00
d1a6aafed5 Modules/Waybar: Make option accept list of outputs instead of single 2026-03-20 20:00:12 +01:00
6305d9ca2e Modules/Niri: Replace kde polkit agent with gnome's + fix waybar rounded corner clipping 2026-03-20 19:52:35 +01:00
887f7db0c7 Modules/Waybar: Align waybar with current colorscheme 2026-03-20 19:51:18 +01:00
d8dbdbc5de Modules/Neovim: Add tombi toml formatter 2026-03-20 19:50:44 +01:00
4014ed0318 Modules/Niri: Disable DMS (slow af) 2026-03-20 19:25:28 +01:00
87fa954937 Modules/Firefox: Fix search engine typo 2026-03-20 17:10:53 +01:00
934644c5e2 Modules/Niri: Update gtk theme + fix flatpak themes 2026-03-20 17:10:43 +01:00
0bda035ccd Modules/Hyprland: Deprecate hyprland module 2026-03-20 14:08:51 +01:00
6e999ffa02 Modules/Fish: Update abbrs 2026-03-20 10:32:12 +01:00
807388d032 Home: Add exiftool 2026-03-20 09:35:06 +01:00
9b1a7c73e6 Modules/Niri: Update gtk theme 2026-03-19 23:57:52 +01:00
da729f8c22 Services/ComfyUI: Update root directory 2026-03-19 23:57:43 +01:00
d08d795adf System/Nixinator: Add two additional disks to system (disko, luks) 2026-03-19 23:57:32 +01:00
ffc2516353 Home/Nixinator: Add hytale + steam 2026-03-19 23:57:05 +01:00
58 changed files with 2214 additions and 1587 deletions

BIN
Btop.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 MiB

BIN
Darwin.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
Niri.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 777 KiB

View File

@ -1,16 +1,9 @@
# NixOS Configuration # NixOS Configuration
Modular NixOS configuration, using Hyprland (yikes) or Niri for a tiling/scrolling desktop. Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
![](FastFetch.png) ![](FastFetch.png)
![](Darwin.png)
<p float="left" align="middle">
<img src="/NeoVim.png" width="33%" />
<img src="/Rmpc.png" width="33%" />
<img src="/Btop.png" width="33%" />
</p>
![](Niri.png)
To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`. To install, run `nixos-rebuild` with the `--flake` parameter from the `NixFlake` directory: `nixos-rebuild switch --flake .#nixinator`.
Alternatively, use `nh os switch` or `nh os boot`. Alternatively, use `nh os switch` or `nh os boot`.

BIN
Rmpc.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB

883
flake.lock generated

File diff suppressed because it is too large Load Diff

104
flake.nix
View File

@ -12,8 +12,12 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware"; hardware.url = "github:nixos/nixos-hardware";
# Darwin
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
# NOTE: Update this after May and November # NOTE: Update this after May and November
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
# Home Manager # Home Manager
home-manager.url = "github:nix-community/home-manager"; home-manager.url = "github:nix-community/home-manager";
@ -53,50 +57,10 @@
niri.url = "github:sodiboo/niri-flake"; niri.url = "github:sodiboo/niri-flake";
niri.inputs.nixpkgs.follows = "nixpkgs"; niri.inputs.nixpkgs.follows = "nixpkgs";
# Quickshell # Walker
quickshell.url = "github:quickshell-mirror/quickshell"; elephant.url = "github:abenz1267/elephant";
quickshell.inputs.nixpkgs.follows = "nixpkgs"; walker.url = "github:abenz1267/walker";
walker.inputs.elephant.follows = "elephant";
# Noctalia shell
noctalia.url = "github:noctalia-dev/noctalia-shell";
noctalia.inputs.nixpkgs.follows = "nixpkgs";
# noctalia.inputs.quickshell.follows = "quickshell";
# Lol
waifu-cursors.url = "github:kagurazakei/waifu-cursors";
# Caelestia shell
caelestia.url = "github:caelestia-dots/shell";
caelestia.inputs.nixpkgs.follows = "nixpkgs";
caelestia.inputs.quickshell.follows = "quickshell";
# caelestia-cli.url = "github:caelestia-dots/cli";
# caelestia-cli.inputs.nixpkgs.follows = "nixpkgs";
# DankMaterialShell
# dgop.url = "github:AvengeMedia/dgop";
# dgop.inputs.nixpkgs.follows = "nixpkgs";
# dms-cli.url = "github:AvengeMedia/danklinux";
# dms-cli.inputs.nixpkgs.follows = "nixpkgs";
dank-material-shell.url = "github:AvengeMedia/DankMaterialShell";
dank-material-shell.inputs.nixpkgs.follows = "nixpkgs";
# dank-material-shell.inputs.dgop.follows = "dgop";
danksearch.url = "github:AvengeMedia/danksearch";
danksearch.inputs.nixpkgs.follows = "nixpkgs";
# Hyprland (use flake so plugins are not built from source)
hyprland.url = "github:hyprwm/Hyprland";
hyprland.inputs.nixpkgs.follows = "nixpkgs";
# HyprPlugins
hyprland-plugins.url = "github:hyprwm/hyprland-plugins";
hyprland-plugins.inputs.nixpkgs.follows = "nixpkgs";
hyprland-plugins.inputs.hyprland.follows = "hyprland";
hypr-dynamic-cursors.url = "github:VirtCode/hypr-dynamic-cursors";
hypr-dynamic-cursors.inputs.nixpkgs.follows = "nixpkgs";
hypr-dynamic-cursors.inputs.hyprland.follows = "hyprland";
hyprspace.url = "github:KZDKM/Hyprspace";
# hyprspace.inputs.nixpkgs.follows = "nixpkgs";
hyprspace.inputs.hyprland.follows = "hyprland";
# NeoVim <3 # NeoVim <3
nixvim.url = "github:nix-community/nixvim"; nixvim.url = "github:nix-community/nixvim";
@ -118,9 +82,8 @@
# musnix.url = "github:musnix/musnix"; # musnix.url = "github:musnix/musnix";
# musnix.inputs.nixpkgs.follows = "nixpkgs"; # musnix.inputs.nixpkgs.follows = "nixpkgs";
# ComfyUI # HyTale
# nixified-ai.url = "github:nixified-ai/flake"; hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
# comfyui-nix.url = "github:utensils/comfyui-nix";
masssprings.url = "git+https://gitea.local.chriphost.de/christoph/cpp-masssprings"; masssprings.url = "git+https://gitea.local.chriphost.de/christoph/cpp-masssprings";
masssprings.inputs.nixpkgs.follows = "nixpkgs"; masssprings.inputs.nixpkgs.follows = "nixpkgs";
@ -132,12 +95,14 @@
outputs = { outputs = {
self, self,
nixpkgs, nixpkgs,
nix-darwin,
... ...
} @ inputs: let } @ inputs: let
# Our configuration is buildable on the following system/platform. # Our configuration is buildable on the following system/platform.
# Configs can support more than a single system simultaneously, # Configs can support more than a single system simultaneously,
# e.g. NixOS (linux) and MacOS (darwin) or Arm. # e.g. NixOS (linux) and MacOS (darwin) or Arm.
system = "x86_64-linux"; system = "x86_64-linux";
darwinSystem = "aarch64-darwin";
# We configure our global packages here. # We configure our global packages here.
# Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient), # Usually, "nixpkgs.legacyPackages.${system}" is used (and more efficient),
@ -180,6 +145,26 @@
]; ];
}; };
darwinPkgs = import nixpkgs {
system = darwinSystem;
hostPlatform = darwinSystem;
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: true;
overlays = let
pkgs-stable = import inputs.nixpkgs-stable {
system = darwinSystem;
config.allowUnfree = true;
config.allowUnfreePredicate = pkg: true;
};
in [
# All my own overlays (derivations + modifications)
(import ./overlays {inherit inputs nixpkgs pkgs-stable;})
];
};
# My own library functions are imported here. # My own library functions are imported here.
# They are made available to the system and HM configs by inheriting mylib. # They are made available to the system and HM configs by inheriting mylib.
mylib = import ./lib { mylib = import ./lib {
@ -194,8 +179,15 @@
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
}; };
# NOTE: Keep public keys here so they're easy to rotate darwinMylib = import ./lib {
inherit inputs darwinPkgs;
inherit (nixpkgs) lib;
pkgs = darwinPkgs;
};
# NOTE: Keep public keys here so they're easy to rotate
publicKeys.christoph = { publicKeys.christoph = {
# /home/christoph/.ssh/id_ed25519.pub # /home/christoph/.ssh/id_ed25519.pub
ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com"; ssh = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJAoJac+GdGtzblCMA0lBfMdSR6aQ4YyovrNglCFGIny christoph.urlacher@protonmail.com";
@ -219,6 +211,20 @@
# Local shell for NixFlake directory # Local shell for NixFlake directory
devShells.${system}.default = import ./shell.nix {inherit pkgs;}; devShells.${system}.default = import ./shell.nix {inherit pkgs;};
# Usage: sudo darwin-rebuild switch --flake .#darwinix
darwinConfigurations = {
darwinix = darwinMylib.nixos.mkDarwinConfigWithHomeManagerModule {
inherit publicKeys;
system = darwinSystem;
mylib = darwinMylib;
hostname = "darwinix";
username = "christoph";
headless = false;
extraModules = [];
};
};
# We give each configuration a (host)name to choose a configuration when rebuilding. # We give each configuration a (host)name to choose a configuration when rebuilding.
# This makes it easy to add different configurations (e.g. for a laptop). # This makes it easy to add different configurations (e.g. for a laptop).
# Usage: sudo nixos-rebuild switch --flake .#nixinator # Usage: sudo nixos-rebuild switch --flake .#nixinator

View File

@ -0,0 +1,402 @@
{
pkgs,
nixosConfig,
config,
lib,
mylib,
username,
inputs,
...
}: {
config = let
inherit (config.homemodules) color;
in {
paths = rec {
nixflake = "${config.home.homeDirectory}/NixFlake";
dotfiles = "${nixflake}/config";
};
homemodules = {
color = {
scheme = "catppuccin-mocha";
accent = "mauve";
accentHl = "pink";
accentDim = "lavender";
accentText = "base";
font = "MonoLisa Alt Script";
};
fish.enable = true;
git = {
enable = true;
userName = "Christoph Urlacher";
userEmail = "christoph.urlacher@protonmail.com";
signCommits = true;
};
kitty.enable = true;
lazygit.enable = true;
neovim = {
enable = true;
alias = true;
neovide = true;
};
yazi.enable = true;
};
home = {
inherit username;
homeDirectory = "/Users/${config.home.username}";
enableNixpkgsReleaseCheck = true;
sessionVariables = {
LANG = "en_US.UTF-8";
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
TERMINAL = "kitty";
};
packages = with pkgs; [
(ripgrep.override {withPCRE2 = true;})
gdu
duf
sd
fclones
tealdeer
killall
atool
exiftool
ouch
ffmpegthumbnailer
mediainfo
file
unrar
p7zip
unzip
progress
tokei
nix-search-tv
nix-tree
just
ffmpeg-full
imagemagick
poppler-utils
pdf2svg
pandoc
dig
tcpdump
gping
curlie
wget
doggo
rsync
rclone
httpie
inputs.nps.packages.${pkgs.stdenv.hostPlatform.system}.default
cachix
# GUI
ripdrag
jellyfin-tui
];
stateVersion = "25.11";
};
# TODO: Deduplicate with other configs
programs = {
home-manager.enable = true;
bat = {
enable = true;
themes = {
catppuccin-latte = {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "sha256-6WVKQErGdaqb++oaXnY3i6/GuH2FhTgK0v4TN4Y0Wbw=";
};
file = "Catppuccin-latte.tmTheme";
};
};
config = {
theme = "catppuccin-latte";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
fastfetch = {
enable = true;
settings = {
logo = {
padding = {
top = 4;
left = 1;
right = 2;
};
};
display = {
separator = "";
key.width = 17;
};
# Box Drawing: ╭ ─ ╮ ╰ ╯ │
modules = [
# Title
{
type = "title";
format = "{#1} {#}{user-name-colored}";
}
# System Information
{
type = "custom";
format = "{#1} {#}System Information";
}
{
type = "os";
key = "{#separator} {#keys}󰍹 OS";
}
{
type = "kernel";
key = "{#separator} {#keys}󰒋 Kernel";
}
{
type = "bootmgr";
key = "{#separator} {#keys}󰒋 BootMGR";
}
{
type = "uptime";
key = "{#separator} {#keys}󰅐 Uptime";
}
{
type = "packages";
key = "{#separator} {#keys}󰏖 Packages";
# format = "{all}";
}
{
type = "custom";
format = "{#1}";
}
# Desktop Environment
{
type = "custom";
format = "{#1} {#}Desktop Environment";
}
{
type = "de";
key = "{#separator} {#keys}󰧨 DE";
}
{
type = "wm";
key = "{#separator} {#keys}󱂬 WM";
}
{
type = "wmtheme";
key = "{#separator} {#keys}󰉼 Theme";
}
{
type = "display";
key = "{#separator} {#keys}󰹑 Resolution";
}
{
type = "shell";
key = "{#separator} {#keys}󰞷 Shell";
}
{
type = "terminalfont";
key = "{#separator} {#keys}󰛖 Font";
}
{
type = "icons";
key = "{#separator} {#keys} Icons";
}
{
type = "cursor";
key = "{#separator} {#keys}󰆽 Cursor";
}
{
type = "custom";
format = "{#1}";
}
# Hardware Information
{
type = "custom";
format = "{#1} {#}Hardware Information";
}
{
type = "board";
key = "{#separator} {#keys} Board";
}
{
type = "cpu";
key = "{#separator} {#keys}󰻠 CPU";
}
{
type = "gpu";
key = "{#separator} {#keys}󰢮 GPU";
}
{
type = "memory";
key = "{#separator} {#keys}󰍛 Memory";
}
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (/)";
# folders = "/";
# }
# {
# type = "disk";
# key = "{#separator}│ {#keys}󰋊 Disk (~/Games)";
# folders = "/home/christoph/Games";
# }
{
type = "btrfs";
key = "{#separator} {#keys}󰋊 BTRFS";
}
{
type = "custom";
format = "{#1}";
}
# Colors Footer
{
type = "colors";
key = "{#separator} {#1}";
keyWidth = 6;
symbol = "circle";
}
];
};
};
fd.enable = true;
fzf = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
navi = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks = {
"*" = {
forwardAgent = false;
addKeysToAgent = "yes";
compression = true;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
"nixinator" = {
user = "christoph";
hostname = "192.168.86.50";
};
"servenix" = {
user = "christoph";
hostname = "local.chriphost.de";
};
"thinknix" = {
user = "christoph";
hostname = "think.chriphost.de";
};
"vps" = {
user = "root";
hostname = "vps.chriphost.de";
};
"mars" = {
user = "smchurla";
hostname = "mars.cs.tu-dortmund.de";
serverAliveInterval = 60;
localForwards = [
{
# Resultbrowser
bind.port = 22941;
host.address = "127.0.0.1";
host.port = 22941;
}
{
# Mysql
bind.port = 3306;
host.address = "127.0.0.1";
host.port = 3306;
}
];
};
};
};
tmux = {
enable = true;
clock24 = true;
escapeTime = 0; # Delay after pressing escape
# keyMode = "vi";
terminal = "xterm-256color";
plugins = with pkgs; [
{
plugin = tmuxPlugins.catppuccin;
extraConfig = ''
set -g @plugin 'catppuccin/tmux'
set -g @catppuccin_flavour 'latte' # or frappe, macchiato, mocha
'';
}
];
extraConfig = ''
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"
'';
};
yt-dlp.enable = true;
zoxide = {
enable = true;
enableFishIntegration = config.homemodules.fish.enable;
};
};
services = {
};
};
}

View File

@ -47,7 +47,8 @@ in
extraPackages = with pkgs; [ extraPackages = with pkgs; [
papirus-icon-theme papirus-icon-theme
bibata-cursors bibata-cursors
inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all # Lol
# inputs.waifu-cursors.packages.${pkgs.stdenv.hostPlatform.system}.all
]; ];
cursor = "Bibata-Modern-Classic"; cursor = "Bibata-Modern-Classic";
@ -87,190 +88,6 @@ in
signCommits = true; signCommits = true;
}; };
hyprland = {
enable = nixosConfig.programs.hyprland.enable;
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
bars.enable = false;
dynamicCursor.enable = false;
trails.enable = true;
hyprspace.enable = false; # Always broken
hyprpanel.enable = true;
caelestia.enable = false;
keybindings = {
main-mod = "SUPER";
bindings = lib.mergeAttrsList [
# Use Rofi if we don't have caelestia
(lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
})
# Caelestia
(lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
# "$mainMod, c" = ["exec, caelestia clipboard"];
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
})
{
# Applications
"$mainMod, t" = ["exec, kitty"];
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
"$mainMod, n" = ["exec, neovide"];
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
# "ALT, tab" = ["exec, rofi -show window"];
# Screenshots
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
# Audio
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
", XF86AudioPlay" = ["exec, playerctl play-pause"];
", XF86AudioPrev" = ["exec, playerctl previous"];
", XF86AudioNext" = ["exec, playerctl next"];
# Brightness
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
"CTRL ALT, f" = let
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
grep = "${pkgs.gnugrep}/bin/grep";
awk = "${pkgs.gawk}/bin/gawk";
notify = "${pkgs.libnotify}/bin/notify-send";
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
if [[ "$CURRENT" == "1" ]]; then
${hyprctl} keyword input:follow_mouse 0
${notify} "Disabled Mouse Focus!"
else
${hyprctl} keyword input:follow_mouse 1
${notify} "Enabled Mouse Focus!"
fi
'';
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
}
];
ws-bindings = {
# "<Workspace>" = "<Key>";
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "0";
};
special-ws-bindings = {
"ferdium" = "x";
"msty" = "z";
"btop" = "b";
"rmpc" = "r";
};
};
autostart = {
immediate = [
"kitty --hold fastfetch"
"zeal"
"nextcloud --background"
"protonvpn-app"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
"keepassxc" # The tray doesn't work when started too early
];
special-silent = {
"ferdium" = ["ferdium"];
"msty" = ["msty"];
"btop" = ["kitty --title=Btop btop"];
"rmpc" = ["kitty --title=Rmpc rmpc"];
};
};
windowrules = [
# Fix jetbrains tooltip flicker
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
];
workspacerules = {
"1" = [];
"2" = ["Zotero" "neovide" "code-url-handler"];
"3" = ["obsidian"];
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
"5" = ["steam"];
"6" = ["steam_app_(.+)"];
"7" = ["signal"];
"8" = ["tidal-hifi"];
"9" = ["discord"];
"10" = ["python3"];
};
floating = [
{class = "org.kde.polkit-kde-authentication-agent-1";}
{
class = "thunar";
title = "File Operation Progress";
}
{class = "ffplay";}
{class = "Unity";}
];
transparent-opacity = "0.75";
transparent = [
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"tidal-hifi"
"obsidian"
"firefox"
"org.qutebrowser.qutebrowser"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"jetbrains-webstorm"
"code-url-handler"
"neovide"
"steam"
"ferdium"
"Msty"
];
};
# hyprpanel.enable = !headless; # Enabled by hyprland module
kitty.enable = !headless; kitty.enable = !headless;
lazygit.enable = true; lazygit.enable = true;
mpd.enable = !headless; mpd.enable = !headless;
@ -287,10 +104,10 @@ in
rmpc.enable = !headless; rmpc.enable = !headless;
rofi = { rofi = {
enable = !headless; enable = false;
}; };
waybar.enable = false; # Use hyprpanel waybar.enable = !headless;
yazi.enable = true; yazi.enable = true;
zathura.enable = !headless; zathura.enable = !headless;
}; };
@ -466,6 +283,7 @@ in
tealdeer # Very fast tldr (so readable man) tealdeer # Very fast tldr (so readable man)
killall killall
atool # Archive preview atool # Archive preview
exiftool
ouch # Unified compression/decompression ouch # Unified compression/decompression
ffmpegthumbnailer # Video thumbnails ffmpegthumbnailer # Video thumbnails
mediainfo # Media meta information mediainfo # Media meta information
@ -482,7 +300,6 @@ in
nix-tree # Browse the nix store sorted by size (gdu for closures) nix-tree # Browse the nix store sorted by size (gdu for closures)
nurl # Generate nix fetcher sections based on URLs nurl # Generate nix fetcher sections based on URLs
python313 # Nicer scripting than bash python313 # Nicer scripting than bash
binsider # Analyze binaries
lazyjournal # Journalctl viewer lazyjournal # Journalctl viewer
systemctl-tui systemctl-tui
restic # Backups restic # Backups
@ -671,7 +488,7 @@ in
settings = { settings = {
logo = { logo = {
padding = { padding = {
top = 3; top = 4;
left = 1; left = 1;
right = 2; right = 2;
}; };
@ -939,7 +756,7 @@ in
}; };
tmux = { tmux = {
enable = false; enable = true;
clock24 = true; clock24 = true;
escapeTime = 0; # Delay after pressing escape escapeTime = 0; # Delay after pressing escape
@ -1018,14 +835,18 @@ in
# Force Wayland by default # Force Wayland by default
# Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash # Context.sockets = ["wayland" "!x11" "!fallback-x11"]; # NOTE: Makes discord + steam crash
Context.filesystems = ["/nix/store:ro"]; Context.filesystems = [
"/nix/store:ro"
"${config.home.homeDirectory}/.themes:ro"
"${config.home.homeDirectory}/.config/gtk-4.0:ro"
];
Environment = { Environment = {
# Fix un-themed cursor in some Wayland apps # Fix un-themed cursor in some Wayland apps
XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons"; XCURSOR_PATH = "/run/host/user-share/icons:/run/host/share/icons";
# Force correct theme for some GTK apps # Force correct theme for some GTK apps
GTK_THEME = "Adwaita:light"; GTK_THEME = config.gtk.theme.name;
}; };
}; };

View File

@ -6,6 +6,7 @@
lib, lib,
mylib, mylib,
username, username,
inputs,
... ...
}: { }: {
config = { config = {
@ -16,52 +17,7 @@
# because it forces en-US keyboard layout. # because it forces en-US keyboard layout.
fcitx.enable = true; fcitx.enable = true;
hyprland = { waybar.monitors = ["DP-1" "DP-2"];
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
monitors = {
"DP-1" = {
width = 3440;
height = 1440;
rate = 165;
x = 1920;
y = 0;
scale = 1;
};
"DP-2" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
workspaces = {
"DP-1" = [1 2 3 4 5 6 7 8 9];
"DP-2" = [10];
};
autostart = {
delayed = [
"fcitx5"
];
};
floating = [
{
class = "fcitx";
}
];
};
waybar.monitor = "DP-1";
}; };
home = let home = let
@ -123,9 +79,6 @@
vscode vscode
# ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra) # ghidra # launch with _JAVA_AWT_WM_NONREPARENTING=1 (use programs.ghidra)
# AI stuff
# comfy-ui-cuda # Use module
# Unity Stuff # Unity Stuff
# unityhub # unityhub
# rider-unity # rider-unity
@ -133,6 +86,7 @@
# mono # mono
# steam-run-free # nix-alien doesn't seem to run unity apps, this does... # steam-run-free # nix-alien doesn't seem to run unity apps, this does...
inputs.hytale-launcher.packages.${pkgs.stdenv.hostPlatform.system}.default
(blender.override {cudaSupport = true;}) (blender.override {cudaSupport = true;})
godot_4 godot_4
(obs-studio.override {cudaSupport = true;}) (obs-studio.override {cudaSupport = true;})
@ -156,7 +110,7 @@
]; ];
file = lib.mkMerge [ file = lib.mkMerge [
# { {
# ".local/share/applications/jetbrains-rider.desktop".source = let # ".local/share/applications/jetbrains-rider.desktop".source = let
# desktopFile = pkgs.makeDesktopItem { # desktopFile = pkgs.makeDesktopItem {
# name = "jetbrains-rider"; # name = "jetbrains-rider";
@ -168,10 +122,10 @@
# extraConfig.NoDisplay = "true"; # extraConfig.NoDisplay = "true";
# }; # };
# in "${desktopFile}/share/applications/jetbrains-rider.desktop"; # in "${desktopFile}/share/applications/jetbrains-rider.desktop";
#
# ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source = ".var/app/com.valvesoftware.Steam/config/MangoHud/MangoHud.conf".source =
# ../../../config/mangohud/MangoHud.conf; ../../../config/mangohud/MangoHud.conf;
# } }
(lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) { (lib.optionalAttrs (mylib.modules.contains config.home.packages pkgs.makemkv) {
".MakeMKV/settings.conf".source = ".MakeMKV/settings.conf".source =
config.lib.file.mkOutOfStoreSymlink config.lib.file.mkOutOfStoreSymlink
@ -187,15 +141,17 @@
services = { services = {
flatpak = { flatpak = {
packages = [ packages = [
# "com.valvesoftware.Steam" "com.valvesoftware.Steam"
# "com.valvesoftware.Steam.Utility.steamtinkerlaunch" "com.valvesoftware.Steam.Utility.steamtinkerlaunch"
"org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
"org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
"io.github.Foldex.AdwSteamGtk"
"com.vysp3r.ProtonPlus"
# "net.davidotek.pupgui2" # "net.davidotek.pupgui2"
# "org.freedesktop.Platform.VulkanLayer.gamescope/x86_64/24.08"
# "org.freedesktop.Platform.VulkanLayer.MangoHud/x86_64/24.08"
"org.prismlauncher.PrismLauncher" "org.prismlauncher.PrismLauncher"
"com.usebottles.bottles" "com.usebottles.bottles"
# "io.github.lawstorant.boxflat" "io.github.lawstorant.boxflat"
# "com.unity.UnityHub" # "com.unity.UnityHub"
]; ];
@ -225,6 +181,13 @@
]; ];
}; };
"com.vysp3r.ProtonPlus".Context = {
filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"
"${config.home.homeDirectory}/Games"
];
};
"com.usebottles.bottles".Context = { "com.usebottles.bottles".Context = {
filesystems = [ filesystems = [
"${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam" "${config.home.homeDirectory}/.var/app/com.valvesoftware.Steam"

View File

@ -0,0 +1,44 @@
{
keyboard = {
layout = "us";
variant = "altgr-intl";
option = "nodeadkeys";
};
monitors = {
"DP-1" = {
width = 3440;
height = 1440;
rate = 165;
x = 1920;
y = 0;
scale = 1;
};
"DP-2" = {
width = 1920;
height = 1080;
rate = 60;
x = 0;
y = 0;
scale = 1;
};
};
workspaces = {
"DP-1" = [1 2 3 4 5 6 7 8 9];
"DP-2" = [10];
};
autostart = {
delayed = [
"fcitx5"
];
};
floating = [
{
class = "fcitx";
}
];
}

View File

@ -0,0 +1,186 @@
{
nixosConfig,
config,
lib,
pkgs,
}: {
enable = nixosConfig.programs.hyprland.enable;
dunst.enable = !config.homemodules.hyprpanel.enable; # Disable for hyprpanel
bars.enable = false;
dynamicCursor.enable = false;
trails.enable = true;
hyprspace.enable = false; # Always broken
hyprpanel.enable = true;
caelestia.enable = false;
keybindings = {
main-mod = "SUPER";
bindings = lib.mergeAttrsList [
# Use Rofi if we don't have caelestia
(lib.optionalAttrs (!config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, rofi -drun-show-actions -show drun"];
"$mainMod, c" = ["exec, clipman pick --tool=rofi"];
"$mainMod SHIFT, l" = ["exec, loginctl lock-session"];
})
# Caelestia
(lib.optionalAttrs (config.homemodules.hyprland.caelestia.enable) {
"$mainMod, a" = ["exec, caelestia shell drawers toggle launcher"];
# "$mainMod, c" = ["exec, caelestia clipboard"];
"$mainMod SHIFT, l" = ["exec, caelestia shell lock lock"];
"$mainMod, escape" = ["exec, caelestia shell drawers toggle session"];
})
{
# Applications
"$mainMod, t" = ["exec, kitty"];
"$mainMod, e" = ["exec, kitty --title=Yazi yazi"];
"$mainMod, n" = ["exec, neovide"];
# "$mainMod, r" = ["exec, kitty --title=Rmpc rmpc"];
"$mainMod CTRL, n" = ["exec, kitty --title=Navi navi"];
"$mainMod SHIFT, n" = ["exec, neovide ${config.paths.dotfiles}/navi/christoph.cheat"];
"$mainMod SHIFT, f" = ["exec, neovide ${config.paths.dotfiles}/flake.nix"];
# "ALT, tab" = ["exec, rofi -show window"];
# Screenshots
"$mainMod, p" = ["exec, hyprpicker --autocopy --format=hex"];
"$mainMod, s" = ["exec, grim -g \"$(slurp)\""];
"$mainMod SHIFT, s" = ["exec, grim -g \"$(slurp)\" - | wl-copy"];
# Audio
", XF86AudioRaiseVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"];
", XF86AudioLowerVolume" = ["exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%-"];
", XF86AudioPlay" = ["exec, playerctl play-pause"];
", XF86AudioPrev" = ["exec, playerctl previous"];
", XF86AudioNext" = ["exec, playerctl next"];
# Brightness
", XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset gamma -10"];
", XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset gamma +10"];
"$mainMod, XF86MonBrightnessDown" = ["exec, hyprctl hyprsunset temperature 5750"];
"$mainMod, XF86MonBrightnessUp" = ["exec, hyprctl hyprsunset identity"];
"CTRL ALT, f" = let
hyprctl = "${config.wayland.windowManager.hyprland.package}/bin/hyprctl";
grep = "${pkgs.gnugrep}/bin/grep";
awk = "${pkgs.gawk}/bin/gawk";
notify = "${pkgs.libnotify}/bin/notify-send";
toggleMouseFocus = pkgs.writeScriptBin "hypr-toggle-mouse-focus" ''
CURRENT=$(${hyprctl} getoption input:follow_mouse | ${grep} int | ${awk} -F' ' '{print $2}')
if [[ "$CURRENT" == "1" ]]; then
${hyprctl} keyword input:follow_mouse 0
${notify} "Disabled Mouse Focus!"
else
${hyprctl} keyword input:follow_mouse 1
${notify} "Enabled Mouse Focus!"
fi
'';
in ["exec, ${toggleMouseFocus}/bin/hypr-toggle-mouse-focus"];
# "CTRL ALT, t" = ["exec, bash -c 'systemctl --user restart hyprpanel.service'"];
}
];
ws-bindings = {
# "<Workspace>" = "<Key>";
"1" = "1";
"2" = "2";
"3" = "3";
"4" = "4";
"5" = "5";
"6" = "6";
"7" = "7";
"8" = "8";
"9" = "9";
"10" = "0";
};
special-ws-bindings = {
"ferdium" = "x";
"msty" = "z";
"btop" = "b";
"rmpc" = "r";
};
};
autostart = {
immediate = [
"kitty --hold fastfetch"
"zeal"
"nextcloud --background"
"protonvpn-app"
# "kdeconnect-indicator" # started by services.kdeconnect.indicator
];
delayed = [
"keepassxc" # The tray doesn't work when started too early
];
special-silent = {
"ferdium" = ["ferdium"];
"msty" = ["msty"];
"btop" = ["kitty --title=Btop btop"];
"rmpc" = ["kitty --title=Rmpc rmpc"];
};
};
windowrules = [
# Fix jetbrains tooltip flicker
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, float 1"
"match:class ^(jetbrains-.*)$, match:title ^(win[0-9]+)$, no_initial_focus 1"
];
workspacerules = {
"1" = [];
"2" = ["Zotero" "neovide" "code-url-handler"];
"3" = ["obsidian"];
"4" = ["firefox" "Google-chrome" "chromium-browser" "org.qutebrowser.qutebrowser"];
"5" = ["steam"];
"6" = ["steam_app_(.+)"];
"7" = ["signal"];
"8" = ["tidal-hifi"];
"9" = ["discord"];
"10" = ["python3"];
};
floating = [
{class = "org.kde.polkit-kde-authentication-agent-1";}
{
class = "thunar";
title = "File Operation Progress";
}
{class = "ffplay";}
{class = "Unity";}
];
transparent-opacity = "0.75";
transparent = [
"kitty"
"Alacritty"
"discord"
"signal"
"vesktop"
"Spotify"
"tidal-hifi"
"obsidian"
"firefox"
"org.qutebrowser.qutebrowser"
"jetbrains-clion"
"jetbrains-idea"
"jetbrains-pycharm"
"jetbrains-rustrover"
"jetbrains-rider"
"jetbrains-webstorm"
"code-url-handler"
"neovide"
"steam"
"ferdium"
"Msty"
];
}

View File

@ -0,0 +1,17 @@
{inputs, ...}: {
imports = [
# My own HM modules
./color
./fish
./git
./kitty
./lazygit
./neovim
./paths
./yazi
# HM modules imported from the flake inputs
inputs.nixvim.homeModules.nixvim
inputs.textfox.homeManagerModules.default
];
}

View File

@ -12,8 +12,6 @@
./firefox ./firefox
./fish ./fish
./git ./git
./hyprland
./hyprpanel
./kitty ./kitty
./lazygit ./lazygit
./mpd ./mpd
@ -32,12 +30,13 @@
inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.nixvim.homeModules.nixvim inputs.nixvim.homeModules.nixvim
inputs.textfox.homeManagerModules.default inputs.textfox.homeManagerModules.default
inputs.walker.homeManagerModules.default
# inputs.niri.homeModules.niri # Imported by system module # inputs.niri.homeModules.niri # Imported by system module
inputs.noctalia.homeModules.default # inputs.noctalia.homeModules.default
inputs.caelestia.homeManagerModules.default # inputs.caelestia.homeManagerModules.default
inputs.dank-material-shell.homeModules.dank-material-shell # inputs.dank-material-shell.homeModules.dank-material-shell
inputs.dank-material-shell.homeModules.niri # inputs.dank-material-shell.homeModules.niri
inputs.danksearch.homeModules.default # inputs.danksearch.homeModules.default
# NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse) # NOTE: Do NOT use this, use the system module (the HM module has to rely on fuse)
# inputs.impermanence.homeManagerModules.impermanence # inputs.impermanence.homeManagerModules.impermanence

View File

@ -194,14 +194,14 @@ in {
nixos-packages = { nixos-packages = {
name = "Nix Packages"; name = "Nix Packages";
urls = [{template = "https://search.nixos.org/packages?channel=unstable?query={searchTerms}";}]; urls = [{template = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico"; iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@np"]; definedAliases = ["@np"];
}; };
nixos-options = { nixos-options = {
name = "NixOS Options"; name = "NixOS Options";
urls = [{template = "https://search.nixos.org/options?channel=unstable?query={searchTerms}";}]; urls = [{template = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";}];
iconMapObj."16" = "https://nixos.org/favicon.ico"; iconMapObj."16" = "https://nixos.org/favicon.ico";
definedAliases = ["@no"]; definedAliases = ["@no"];
}; };

View File

@ -42,10 +42,47 @@ in {
fish_pager_color_description ${color.hex.overlay0} fish_pager_color_description ${color.hex.overlay0}
''; '';
programs.fish = { programs.fish = lib.mkMerge [
enable = true; # Darwin exclusive config
(lib.mkIf pkgs.stdenv.isDarwin {
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
'';
shellAbbrs = let
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
{
rebuild = "sudo darwin-rebuild switch --flake .#darwinix";
}
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'darwin,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
];
})
# Linux exclusive config
(lib.mkIf pkgs.stdenv.isLinux {
generateCompletions = nixosConfig.programs.fish.generateCompletions; generateCompletions = nixosConfig.programs.fish.generateCompletions;
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
functions = lib.mergeAttrsList [ functions = lib.mergeAttrsList [
(lib.optionalAttrs config.homemodules.nnn.enable { (lib.optionalAttrs config.homemodules.nnn.enable {
nnncd = { nnncd = {
@ -87,13 +124,6 @@ in {
}) })
]; ];
plugins = [];
shellInit = ''
set fish_greeting
yes | fish_config theme save "system-theme"
'';
shellAbbrs = let shellAbbrs = let
# Only add " | bat" if bat is installed # Only add " | bat" if bat is installed
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat"); batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
@ -111,36 +141,77 @@ in {
lib.mkMerge [ lib.mkMerge [
# Abbrs that are always available are defined here. # Abbrs that are always available are defined here.
{ {
# Shell basics
c = "clear";
q = "exit";
# Fish # Fish
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
abbrs = batifyWithArgs "abbr" "-l fish"; abbrs = batifyWithArgs "abbr" "-l fish";
# Tools # Tools
cd = "z"; # zoxide for quickjump to previously visited locations
cdd = "zi";
b = "z -"; # jump to previous dir
mkdir = "mkdir -p"; # also create parents (-p)
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT"; blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID"; blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
watch = "watch -d -c -n 0.5";
nps = "nps -e";
nd = "nix develop"; nd = "nix develop";
nb = "nix build -L"; nb = "nix build -L";
ns = "nix shell nixpkgs#"; ns = "nix shell nixpkgs#";
nr = "nix run"; nr = "nix run";
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
}
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
# Doesn't work with abbrify because I have nnn.override...
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
# (abbrify pkgs.sd {sed = "sd";})
];
})
# Common config
{
enable = true;
shellAbbrs = let
# These can be used for my config.homemodules and for HM config.programs,
# as both of these add the package to home.packages
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
# Only add fish abbr if package is installed
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
in
lib.mkMerge [
{
# Shell basics
c = "clear";
q = "exit";
mkdir = "mkdir -p"; # also create parents (-p)
watch = "watch -d -c -n 0.5";
sy = "sudo -u ${username} yazi";
cd = "z"; # zoxide for quickjump to previously visited locations
cdd = "zi";
b = "z -"; # jump to previous dir
nps = "nps -e";
} }
# Abbrs only available if package is installed # Abbrs only available if package is installed
(abbrify pkgs.rsync rec {
rsync = "rsync -ahv --inplace --partial --info=progress2";
copy = rsync;
})
(abbrify pkgs.duf { (abbrify pkgs.duf {
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'"; disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
alldisks = "duf"; alldisks = "duf";
}) })
(abbrify pkgs.ripgrep {
rg = "rg --trim --pretty";
# grep = rg;
})
(abbrify pkgs.eza { (abbrify pkgs.eza {
ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions"; ls = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions";
lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l"; lsl = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l";
@ -157,10 +228,6 @@ in {
storage = "gdu"; storage = "gdu";
}) })
(abbrify pkgs.ghidra {
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra";
})
(abbrify pkgs.git { (abbrify pkgs.git {
gs = "git status"; gs = "git status";
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '"; gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
@ -175,30 +242,11 @@ in {
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";}) (lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
(abbrify pkgs.lazygit {lg = "lazygit";}) (abbrify pkgs.lazygit {lg = "lazygit";})
(abbrify pkgs.nix-search-tv {search = "nix-search-tv print --indexes 'nixos,home-manager,nixpkgs,nur' | fzf --preview 'nix-search-tv preview {}' --scheme history";})
# Doesn't work with abbrify because I have nnn.override...
(lib.optionalAttrs config.homemodules.nnn.enable {n = "nnncd -a";})
(lib.optionalAttrs config.homemodules.nnn.enable {np = "nnncd -a -P p";})
(abbrify pkgs.ranger {r = "ranger --choosedir=$HOME/.rangerdir; set LASTDIR (cat $HOME/.rangerdir); cd $LASTDIR";})
(abbrify pkgs.ripgrep rec {
rg = "rg --trim --pretty";
# grep = rg;
})
(lib.optionalAttrs config.homemodules.rmpc.enable {r = "rcmp";})
(abbrify pkgs.rsync rec {
rsync = "rsync -ahv --inplace --partial --info=progress2";
copy = rsync;
})
# (abbrify pkgs.sd {sed = "sd";})
]; ];
};
plugins = [];
}
];
programs.starship = { programs.starship = {
enable = true; enable = true;

View File

@ -3,6 +3,7 @@
config, config,
lib, lib,
mylib, mylib,
pkgs,
... ...
}: let }: let
inherit (config.homemodules) kitty color; inherit (config.homemodules) kitty color;
@ -27,16 +28,21 @@ in {
"kitty_mod+l" = "next_layout"; "kitty_mod+l" = "next_layout";
}; };
settings = { settings = lib.mkMerge [
# Linux config
(lib.mkIf pkgs.stdenv.isLinux {
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
})
# Common config
{
editor = config.home.sessionVariables.EDITOR; editor = config.home.sessionVariables.EDITOR;
scrollback_lines = 10000; scrollback_lines = 10000;
window_padding_width = 10; # Looks stupid with editors if bg doesn't match window_padding_width = 10; # Looks stupid with editors if bg doesn't match
# hide_window_decorations = "yes"; # hide_window_decorations = "yes";
enabled_layouts = "grid,vertical,horizontal"; enabled_layouts = "grid,vertical,horizontal";
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
listen_on = "unix:@mykitty";
tab_bar_min_tabs = 2; # Don't show a single tab tab_bar_min_tabs = 2; # Don't show a single tab
tab_bar_edge = "bottom"; tab_bar_edge = "bottom";
tab_bar_style = "powerline"; tab_bar_style = "powerline";
@ -116,7 +122,8 @@ in {
# white # white
color7 = color.hexS.surface2; color7 = color.hexS.surface2;
color15 = color.hexS.surface1; color15 = color.hexS.surface1;
}; }
];
}; };
}; };
} }

View File

@ -77,6 +77,7 @@ in {
typstyle typstyle
mbake mbake
just-formatter just-formatter
tombi
]) ])
[ [
@ -125,7 +126,7 @@ in {
maplocalleader = ","; maplocalleader = ",";
}; };
opts = import ./vim_opts.nix {inherit lib mylib;}; opts = import ./vim_opts.nix {inherit config lib mylib;};
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua; extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
extraConfigLua = builtins.readFile ./extraConfigLua.lua; extraConfigLua = builtins.readFile ./extraConfigLua.lua;
@ -526,6 +527,7 @@ in {
qml = ["qmlformat"]; qml = ["qmlformat"];
rust = ["rustfmt"]; rust = ["rustfmt"];
svelte = ["prettierd" "prettier"]; svelte = ["prettierd" "prettier"];
toml = ["tombi"];
typescript = ["prettierd" "prettier"]; typescript = ["prettierd" "prettier"];
typst = ["typstyle"]; typst = ["typstyle"];
}; };

View File

@ -1,5 +1,5 @@
fork = true # Start neovide detached fork = true # Start neovide detached
frame = "none" # full, buttonless, none frame = "full" # full, buttonless, none
idle = true # Don't render frames without changes idle = true # Don't render frames without changes
title-hidden = true title-hidden = true
tabs = false tabs = false

View File

@ -1,4 +1,4 @@
_: { {config, ...}: {
showmode = false; # Status line already shows this showmode = false; # Status line already shows this
backspace = ["indent" "eol" "start"]; backspace = ["indent" "eol" "start"];
termguicolors = true; # Required by multiple plugins termguicolors = true; # Required by multiple plugins
@ -37,7 +37,7 @@ _: {
# swapfile = true; # swapfile = true;
# backup = false; # backup = false;
undofile = true; undofile = true;
undodir = "/home/christoph/.vim/undo"; undodir = "${config.home.homeDirectory}/.vim/undo";
undolevels = 10000; undolevels = 10000;
# autochdir = true; # autochdir = true;
confirm = true; confirm = true;

View File

@ -17,26 +17,101 @@ in {
assertion = nixosConfig.programs.niri.enable; assertion = nixosConfig.programs.niri.enable;
message = "Can't enable Niri config with Niri disabled!"; message = "Can't enable Niri config with Niri disabled!";
} }
{
assertion = !(programs.noctalia-shell.enable && programs.dank-material-shell.enable);
message = "Can't enable Noctalia and DankMaterialShell at the same time!";
}
]; ];
gtk = { gtk = {
enable = true; enable = true;
iconTheme.package = color.iconPackage; iconTheme.package = color.iconPackage;
iconTheme.name = color.iconTheme; iconTheme.name = color.iconTheme;
colorScheme = "dark";
gtk3.colorScheme = "dark";
gtk4.colorScheme = "dark";
theme = {
# name = "adw-gtk3-dark";
# package = pkgs.adw-gtk3;
name = "catppuccin-mocha-mauve-standard";
package = pkgs.catppuccin-gtk.override {
variant = "mocha";
accents = ["mauve"];
size = "standard";
};
}; };
# Disable niri polkit if we use DMS, as it has its own gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
};
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
# Disable Niri's kde auth agent and start gnome auth agent instead
systemd.user.services.niri-flake-polkit = lib.mkForce {}; systemd.user.services.niri-flake-polkit = lib.mkForce {};
systemd.user.services.polkit-gnome-authentication-agent-1 = {
Unit = {
Description = "polkit-gnome-authentication-agent-1";
Wants = ["graphical-session.target"];
After = ["graphical-session.target"];
};
Install = {
WantedBy = ["graphical-session.target"];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
home = { home = {
# Mute the stupid DMS popups file = {
# TODO: Is there a DMS option to disable those? # Link theme for flatpak
file.".config/DankMaterialShell/.firstlaunch".text = ""; ".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
file.".config/DankMaterialShell/.changelog-1.4".text = "";
".config/waypaper/config.ini".text = lib.generators.toINI {} {
Settings = {
use_xdg_state = true;
# Those are contained in the statefile (.local/state/waypaper/state.ini):
# backend = "swww";
# folder = "~/NixFlake/wallpapers";
# monitors = "All";
# wallpaper =
language = "en";
show_path_in_tooltip = true;
fill = "fill";
sort = "name";
color = "#ffffff";
subfolders = false;
all_subfolders = false;
show_hidden = false;
show_gifs_only = false;
zen_mode = false;
number_of_columns = 3;
swww_transition_type = "wipe";
swww_transition_step = 90;
swww_transition_angle = 30;
swww_transition_duration = 1;
swww_transition_fps = 60;
mpvpaper_sound = false;
# mpvpaper_options = "";
# post_command =
# stylesheet = /home/christoph/.config/waypaper/style.css
# keybindings = ~/.config/waypaper/keybindings.ini
};
};
};
sessionVariables = { sessionVariables = {
QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia QT_QPA_PLATFORMTHEME = "gtk3"; # For Noctalia
@ -53,21 +128,275 @@ in {
packages = with pkgs; [ packages = with pkgs; [
xwayland-satellite xwayland-satellite
ncpamixer # Audio control # ncpamixer # Audio control
wiremix # Audio control
swww
waypaper
# GTK apps (look good and work well with xdg portals)
nautilus # Fallback file chooser used by xdg-desktop-portal-gnome nautilus # Fallback file chooser used by xdg-desktop-portal-gnome
# In case we fallback to the default config # Catppuccin-GTK theme
sassc
gtk-engine-murrine
gnome-themes-extra
# In case we fallback to the default niri config/keybindings
alacritty alacritty
fuzzel fuzzel
]; ];
}; };
services = {
dunst = {
enable = true;
iconTheme.package = color.iconPackage;
iconTheme.name = color.iconTheme;
settings = {
global = {
# monitor = config.homemodules.waybar.monitor;
follow = "keyboard";
font = "${color.font} 11";
offset = "9x11";
background = color.hexS.base;
foreground = color.hexS.text;
frame_width = 2;
corner_radius = 8;
separator_color = "frame";
};
urgency_low = {
frame_color = color.hexS.green;
};
urgency_normal = {
frame_color = color.hexS.green;
};
urgency_critical = {
frame_color = color.hexS.red;
};
};
};
};
programs = { programs = {
# TODO: Those should be modules with their own options walker = {
noctalia-shell = import ./noctalia.nix {inherit color;}; enable = true;
dank-material-shell = import ./dankMaterialShell.nix {inherit config color;}; runAsService = true;
dsearch.enable = false;
# https://github.com/abenz1267/walker/blob/master/resources/config.toml
config = {
theme = "cattpuccin-mocha";
providers = {
default = ["desktopapplications"];
};
empty = ["desktopapplications"];
};
themes."cattpuccin-mocha" = let
border-radius = "8px";
in {
style = ''
@define-color rosewater #${color.hex.rosewater};
@define-color flamingo #${color.hex.flamingo};
@define-color pink #${color.hex.pink};
@define-color mauve #${color.hex.mauve};
@define-color red #${color.hex.red};
@define-color maroon #${color.hex.maroon};
@define-color peach #${color.hex.peach};
@define-color yellow #${color.hex.yellow};
@define-color green #${color.hex.green};
@define-color teal #${color.hex.teal};
@define-color sky #${color.hex.sky};
@define-color sapphire #${color.hex.sapphire};
@define-color blue #${color.hex.blue};
@define-color lavender #${color.hex.lavender};
@define-color text #${color.hex.text};
@define-color subtext1 #${color.hex.subtext1};
@define-color subtext0 #${color.hex.subtext0};
@define-color overlay2 #${color.hex.overlay2};
@define-color overlay1 #${color.hex.overlay1};
@define-color overlay0 #${color.hex.overlay0};
@define-color surface2 #${color.hex.surface2};
@define-color surface1 #${color.hex.surface1};
@define-color surface0 #${color.hex.surface0};
@define-color base #${color.hex.base};
@define-color mantle #${color.hex.mantle};
@define-color crust #${color.hex.crust};
@define-color accent #${color.hex.accent};
* {
all: unset;
font-family: ${color.font};
}
.normal-icons {
-gtk-icon-size: 16px;
}
.large-icons {
-gtk-icon-size: 32px;
}
scrollbar {
opacity: 0;
}
.box-wrapper {
box-shadow:
0 19px 38px rgba(0, 0, 0, 0.3),
0 15px 12px rgba(0, 0, 0, 0.22);
background: @base;
padding: 20px;
border-radius: ${border-radius};
border: 2px solid @accent;
}
.preview-box,
.elephant-hint,
.placeholder {
color: @text;
}
.search-container {
border-radius: ${border-radius};
background: @mantle;
padding: 8px;
}
.input placeholder {
opacity: 0.5;
}
.input selection {
background: @surface1;
}
.input {
caret-color: @text;
background: none;
padding: 10px;
color: @text;
}
.list {
color: @text;
}
.item-box {
border-radius: ${border-radius};
padding: 10px;
}
.item-quick-activation {
background: alpha(@mauve, 0.25);
border-radius: ${border-radius};
padding: 10px;
}
child:selected .item-box,
row:selected .item-box {
background: alpha(@surface0, 0.6);
}
.item-subtext {
font-size: 12px;
opacity: 0.5;
}
.providerlist .item-subtext {
font-size: unset;
opacity: 0.75;
}
.item-image-text {
font-size: 28px;
}
.preview {
border: 1px solid alpha(@mauve, 0.25);
border-radius: ${border-radius};
color: @text;
}
.calc .item-text {
font-size: 24px;
}
.symbols .item-image {
font-size: 24px;
}
.todo.done .item-text-box {
opacity: 0.25;
}
.todo.urgent {
font-size: 24px;
}
.todo.active {
font-weight: bold;
}
.bluetooth.disconnected {
opacity: 0.5;
}
.preview .large-icons {
-gtk-icon-size: 64px;
}
.keybinds {
padding-top: 10px;
border-top: 1px solid @surface0;
font-size: 12px;
color: @text;
}
.keybind-button {
opacity: 0.5;
}
.keybind-button:hover {
opacity: 0.75;
}
.keybind-bind {
text-transform: lowercase;
opacity: 0.35;
}
.keybind-label {
padding: 2px 4px;
border-radius: ${border-radius};
border: 1px solid @text;
}
.error {
padding: 10px;
background: @red;
color: @base;
}
:not(.calc).current {
font-style: italic;
}
.preview-content.archlinuxpkgs,
.preview-content.dnfpackages {
font-family: monospace;
}
'';
# layouts = {};
};
};
# TODO: Extract options # TODO: Extract options
niri = { niri = {
@ -106,9 +435,8 @@ in {
prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars) prefer-no-csd = true; # Disable client-side decorations (e.g. window titlebars)
spawn-at-startup = [ spawn-at-startup = [
# TODO: Depend on options {argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];}
# {argv = ["noctalia-shell"];} {argv = ["waypaper" "--restore"];}
{argv = ["dms" "run"];}
{argv = ["kitty" "--hold" "fastfetch"];} {argv = ["kitty" "--hold" "fastfetch"];}
{argv = ["fcitx5"];} {argv = ["fcitx5"];}
@ -198,6 +526,11 @@ in {
top = 4; # Somehow the bar eclusivity doesn't work as expected top = 4; # Somehow the bar eclusivity doesn't work as expected
bottom = 2; bottom = 2;
}; };
shadow = {
enable = true;
draw-behind-window = true;
};
}; };
gestures = { gestures = {
@ -295,14 +628,13 @@ in {
layer-rules = [ layer-rules = [
{ {
# Set the overview wallpaper on the backdrop (Noctalia). # Waybar rounded corners background clipping fix
matches = [{namespace = "^noctalia-overview*";}]; matches = [{namespace = "waybar";}];
place-within-backdrop = true; opacity = 0.99;
} shadow = {
{ enable = true;
# Set the overview wallpaper on the backdrop (DMS). draw-behind-window = true;
matches = [{namespace = "^dms:blurwallpaper$";}]; };
place-within-backdrop = true;
} }
]; ];
@ -311,8 +643,6 @@ in {
honor-xdg-activation-with-invalid-serial = []; honor-xdg-activation-with-invalid-serial = [];
}; };
# TODO: Only start hypr... stuff with hyprland, not systemd (hypridle, hyprpaper currently)
# TODO: Move values to config option and set in home/christoph/niri.nix # TODO: Move values to config option and set in home/christoph/niri.nix
binds = with config.lib.niri.actions; { binds = with config.lib.niri.actions; {
# Applications # Applications
@ -348,42 +678,42 @@ in {
action = spawn "neovide" "${config.paths.dotfiles}/flake.nix"; action = spawn "neovide" "${config.paths.dotfiles}/flake.nix";
hotkey-overlay = {title = "Edit the NixFlake.";}; hotkey-overlay = {title = "Edit the NixFlake.";};
}; };
"Mod+W" = {
action = spawn "waypaper";
hotkey-overlay = {title = "Open wallpaper chooser.";};
};
"Mod+Shift+W" = {
action = spawn "waypaper" "--random";
hotkey-overlay = {title = "Select random wallpaper.";};
};
# TODO: Enable with Noctalia option
# Noctalia
# "Mod+A" = {
# action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
# hotkey-overlay = {title = "Toggle the application launcher.";};
# };
# "Mod+Ctrl+L" = {
# action = spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock";
# hotkey-overlay = {title = "Lock the screen.";};
# };
# "Mod+W" = {
# action = spawn "noctalia-shell" "ipc" "call" "wallpaper" "toggle";
# hotkey-overlay = {title = "Toggle the wallpaper chooser.";};
# };
# "Mod+Escape" = {
# action = spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle";
# hotkey-overlay = {title = "Toggle the session menu.";};
# };
# TODO: Enable with DMS option
# DankMaterialShell
"Mod+A" = { "Mod+A" = {
action = spawn "dms" "ipc" "call" "spotlight" "toggle"; action = spawn "walker" "-m" "desktopapplications";
hotkey-overlay = {title = "Toggle the application launcher.";}; hotkey-overlay = {title = "Toggle the application launcher.";};
}; };
"Mod+Ctrl+L" = { "Mod+Shift+A" = {
action = spawn "dms" "ipc" "call" "lock" "lock"; action = spawn "walker" "-m" "providerlist";
hotkey-overlay = {title = "Lock the screen.";}; hotkey-overlay = {title = "Toggle the launcher.";};
}; };
"Mod+Escape" = { "Mod+Escape" = let
action = spawn "dms" "ipc" "call" "powermenu" "toggle"; powerMenu = mylib.rofi.mkSimpleMenu rec {
prompt = "Session";
attrs = {
"󰤂 Poweroff" = "poweroff";
"󰜉 Reboot" = "reboot";
"󰌾 Lock" = "loginctl lock-session";
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
# " Reload Hyprland" = "hyprctl reload";
# " Exit Hyprland" = "hyprctl dispatch exit";
};
command = "walker -d -p ${prompt}";
};
in {
action = spawn "${powerMenu}/bin/rofi-menu-Session";
hotkey-overlay = {title = "Toggle the session menu.";}; hotkey-overlay = {title = "Toggle the session menu.";};
}; };
"Mod+C" = { "Mod+C" = {
action = spawn "dms" "ipc" "call" "clipboard" "toggle"; action = spawn "walker" "-m" "clipboard";
hotkey-overlay = {title = "Show clipboard history.";}; hotkey-overlay = {title = "Show clipboard history.";};
}; };

View File

@ -35,168 +35,72 @@ in {
sidebar-mode = false; sidebar-mode = false;
}; };
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
theme = let theme = let
inherit (config.lib.formats.rasi) mkLiteral; mkLiteral = config.lib.formats.rasi.mkLiteral;
trans = "rgba(0, 0, 0, 0)";
in {
"element-text,element-icon,mode-switcher" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"window" = {
height = mkLiteral "50%";
width = mkLiteral "33%";
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 6;
border-color = mkLiteral color.hexS.accent;
# This is not opacity but translucency
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
};
"mainbox" = {
background-color = mkLiteral trans;
};
# TOP INPUT BAR START
"inputbar" = {
children = builtins.map mkLiteral ["prompt" "entry"];
background-color = mkLiteral trans;
};
"prompt" = {
background-color = mkLiteral color.hexS.accentHl;
padding = 6;
text-color = mkLiteral color.hexS.accentText;
border-radius = 3;
margin = mkLiteral "10px 0px 0px 10px";
};
"entry" = {
padding = 6;
margin = mkLiteral "10px 10px 0px 5px";
text-color = mkLiteral color.hexS.text;
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral color.hexS.accentHl;
};
# MESSAGEBOX (usually not visible)
"message" = {
background-color = mkLiteral trans;
};
"error-message" = {
background-color = mkLiteral trans;
margin = mkLiteral "0px 0px 10px 0px";
};
"textbox" = {
background-color = mkLiteral trans;
padding = 6;
margin = mkLiteral "10px 10px 0px 10px";
border-radius = 3;
};
# LISTVIEW
"listview" = {
# border = mkLiteral "0px 0px 0px";
padding = 0;
margin = mkLiteral "5px 10px 10px 10px";
columns = 1;
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral color.hexS.accentDim;
};
"element" = {
padding = 5;
margin = 0;
background-color = mkLiteral trans;
text-color = mkLiteral color.hexS.text;
# border-radius = 3;
};
"element-icon" = {
size = 25;
};
"element selected" = {
background-color = mkLiteral color.hexS.accentDim;
text-color = mkLiteral color.hexS.accentText;
};
};
};
homemodules.hyprland.keybindings = let
vpn-menu =
pkgs.writeScriptBin
"rofi-menu-vpn"
(builtins.readFile ./menus/vpn.fish);
keybinds-menu =
pkgs.writeScriptBin
"rofi-menu-keybinds"
(builtins.readFile ./menus/keybinds.fish);
lectures-menu =
pkgs.writeScriptBin
"rofi-menu-lectures"
(builtins.readFile ./menus/lectures.fish);
power-menu =
mylib.rofi.mkSimpleMenu
"power"
{
"󰤂 Poweroff" = "poweroff";
"󰜉 Reboot" = "reboot";
"󰌾 Lock" = "loginctl lock-session";
" Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
" Reload Hyprland" = "hyprctl reload";
" Exit Hyprland" = "hyprctl dispatch exit";
};
wallpaper-menu = let
setWallpaperOnMonitor = name: monitor:
"hyprctl hyprpaper wallpaper "
+ "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
setWallpaperOnMonitors = monitors: name: {
${name} =
monitors
|> builtins.map (setWallpaperOnMonitor name)
|> builtins.concatStringsSep " && ";
};
monitors = builtins.attrNames config.homemodules.hyprland.monitors;
in in
mylib.rofi.mkSimpleMenu import ./theme.nix {inherit color mkLiteral;};
"wall"
(color.wallpapers
|> builtins.map (setWallpaperOnMonitors monitors)
|> lib.mergeAttrsList);
in
lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
bindings = lib.mergeAttrsList [
{
"$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
"$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
"$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
# "$mainMod, o" = ["exec, \"${lectures-menu}\""];
}
(lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
"$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
})
];
}; };
# homemodules.hyprland.keybindings = let
# vpn-menu =
# pkgs.writeScriptBin
# "rofi-menu-vpn"
# (builtins.readFile ./menus/vpn.fish);
#
# keybinds-menu =
# pkgs.writeScriptBin
# "rofi-menu-keybinds"
# (builtins.readFile ./menus/keybinds.fish);
#
# lectures-menu =
# pkgs.writeScriptBin
# "rofi-menu-lectures"
# (builtins.readFile ./menus/lectures.fish);
#
# power-menu =
# mylib.rofi.mkSimpleMenu
# "power"
# {
# "󰤂 Poweroff" = "poweroff";
# "󰜉 Reboot" = "reboot";
# "󰌾 Lock" = "loginctl lock-session";
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
# " Reload Hyprland" = "hyprctl reload";
# " Exit Hyprland" = "hyprctl dispatch exit";
# };
#
# wallpaper-menu = let
# setWallpaperOnMonitor = name: monitor:
# "hyprctl hyprpaper wallpaper "
# + "${monitor},${config.paths.nixflake}/wallpapers/${name}.jpg";
#
# setWallpaperOnMonitors = monitors: name: {
# ${name} =
# monitors
# |> builtins.map (setWallpaperOnMonitor name)
# |> builtins.concatStringsSep " && ";
# };
#
# monitors = builtins.attrNames config.homemodules.hyprland.monitors;
# in
# mylib.rofi.mkSimpleMenu
# "wall"
# (color.wallpapers
# |> builtins.map (setWallpaperOnMonitors monitors)
# |> lib.mergeAttrsList);
# in
# lib.mkIf (!config.homemodules.hyprland.caelestia.enable) {
# bindings = lib.mergeAttrsList [
# {
# "$mainMod, escape" = ["exec, \"${power-menu}/bin/rofi-menu-power\""];
# "$mainMod, m" = ["exec, \"${keybinds-menu}/bin/rofi-menu-keybinds\""];
# "$mainMod, w" = ["exec, \"${wallpaper-menu}/bin/rofi-menu-wall\""];
# # "$mainMod, o" = ["exec, \"${lectures-menu}\""];
# }
# (lib.optionalAttrs (!nixosConfig.systemmodules.network.useNetworkManager) {
# "$mainMod, U" = ["exec, \"${vpn-menu}/rofi-menu-vpn\""];
# })
# ];
# };
}; };
} }

View File

@ -0,0 +1,101 @@
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#basic-layout-structure
# https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#base-widgets
{
color,
mkLiteral,
}: let
trans = "rgba(0, 0, 0, 0)";
in {
"element-text,element-icon,mode-switcher" = {
background-color = mkLiteral "inherit";
text-color = mkLiteral "inherit";
};
"window" = {
height = mkLiteral "50%";
width = mkLiteral "33%";
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 6;
border-color = mkLiteral color.hexS.accent;
# This is not opacity but translucency
background-color = mkLiteral "rgba(${color.rgbS.base}, 0.25)";
};
"mainbox" = {
background-color = mkLiteral trans;
};
# TOP INPUT BAR START
"inputbar" = {
children = builtins.map mkLiteral ["prompt" "entry"];
background-color = mkLiteral trans;
};
"prompt" = {
background-color = mkLiteral color.hexS.accentHl;
padding = 6;
text-color = mkLiteral color.hexS.accentText;
border-radius = 3;
margin = mkLiteral "10px 0px 0px 10px";
};
"entry" = {
padding = 6;
margin = mkLiteral "10px 10px 0px 5px";
text-color = mkLiteral color.hexS.text;
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral color.hexS.accentHl;
};
# MESSAGEBOX (usually not visible)
"message" = {
background-color = mkLiteral trans;
};
"error-message" = {
background-color = mkLiteral trans;
margin = mkLiteral "0px 0px 10px 0px";
};
"textbox" = {
background-color = mkLiteral trans;
padding = 6;
margin = mkLiteral "10px 10px 0px 10px";
border-radius = 3;
};
# LISTVIEW
"listview" = {
# border = mkLiteral "0px 0px 0px";
padding = 0;
margin = mkLiteral "5px 10px 10px 10px";
columns = 1;
background-color = mkLiteral trans;
border = mkLiteral "2 solid 2 solid 2 solid 2 solid";
border-radius = 3;
border-color = mkLiteral color.hexS.accentDim;
};
"element" = {
padding = 5;
margin = 0;
background-color = mkLiteral trans;
text-color = mkLiteral color.hexS.text;
# border-radius = 3;
};
"element-icon" = {
size = 25;
};
"element selected" = {
background-color = mkLiteral color.hexS.accentDim;
text-color = mkLiteral color.hexS.accentText;
};
}

View File

@ -21,126 +21,229 @@ in {
spacing = 0; spacing = 0;
margin = "10px 10px 0px 10px"; margin = "10px 10px 0px 10px";
fixed-center = true; fixed-center = true;
output = ["${waybar.monitor}"]; output = waybar.monitors;
modules-left = ["custom/launcher" "user" "hyprland/window"]; modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
modules-center = ["hyprland/workspaces"]; modules-center = ["systemd-failed-units" "mpris"];
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"]; modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
"custom/launcher" = { "custom/launcher" = {
format = "<span></span>"; format = "<span></span>";
interval = "once"; interval = "once";
on-click = "rofi -drun-show-actions -show drun"; on-click = "walker -m desktopapplications";
}; };
"hyprland/workspaces" = { systemd-failed-units = {
hide-on-ok = true;
format = " {nr_failed}";
format-ok = "";
system = true;
user = true;
};
"niri/workspaces" = {
all-outputs = false; all-outputs = false;
format = "{name}"; format = "{icon}";
on-click = "activate"; format-icons = {
sort-by-coordinates = false; default = "";
sort-by-name = true; focused = "";
sort-by-number = false; active = "";
};
}; };
"pulseaudio" = { "niri/window" = {
format = "<span></span> {volume}%"; format = "{title}";
format-muted = "<span></span> "; separate-outputs = false;
on-click = "kitty ncpamixer -t o"; icon = true;
icon-size = 22;
}; };
"network" = { mpris = {
format = "<span></span> {ipaddr}"; format = "<span>󰎇</span> {dynamic}";
format-paused = "<span>{status_icon}</span> <i>{dynamic}</i>";
dynamic-order = ["artist" "title"];
status-icons = {
paused = "󰏤";
};
};
privacy = {
icon-spacing = 4;
icon-size = 16;
transition-duration = 250;
modules = [
{
type = "screenshare";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-out";
tooltip = true;
tooltip-icon-size = 24;
}
{
type = "audio-in";
tooltip = true;
tooltip-icon-size = 24;
}
];
ignore-monitor = true;
};
pulseaudio = {
format = "<span>󰕾</span> {volume}%";
format-muted = "<span>󰝟</span> ";
on-click = "kitty --title=WireMix wiremix";
};
network = {
format = "<span>󰌀</span> {ipaddr}";
format-disconnected = "<span></span> "; format-disconnected = "<span></span> ";
interface = "enp8s0"; interface = "enp8s0";
tooltip-format = "{ifname} via {gwaddr}"; tooltip = false;
};
disk = {
format = "<span>󰋊</span> {percentage_used}%";
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
}; };
cpu = { cpu = {
format = "<span></span> {load}%"; states = {
"warning" = 65;
"critical" = 85;
};
format = "<span></span> {load}%";
format-warning = "<span color='#${color.hex.yellow}'><span></span> {load}%</span>";
format-critical = "<span color='#${color.hex.red}'><span></span> {load}%</span>";
on-click = "kitty --title=Btop btop";
tooltip = false;
}; };
memory = { memory = {
format = "<span></span> {percentage}%"; states = {
"warning" = 65;
"critical" = 85;
}; };
format = "<span></span> {percentage}%";
temperature = { format-warning = "<span color='#${color.hex.yellow}'><span></span> {percentage}%</span>";
format = "<span></span> {temperatureC}°C"; format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
thermal-zone = 3; on-click = "kitty --title=Btop btop";
tooltip = true;
tooltip-format = "RAM: {used}GiB / {total}GiB\nSwap: {swapUsed}GiB / {swapTotal}GiB";
}; };
clock = { clock = {
format = "<span></span> {:%H:%M}"; format = "<span>󰥔</span> {:%H:%M}";
timezone = "Europe/Berlin"; timezone = "Europe/Berlin";
tooltip-format = "<tt><small>{calendar}</small></tt>"; tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
weeks-pos = "right";
mode-mon-col = 3;
on-scroll = -1;
format = {
months = "<span color='#${color.hex.yellow}'><b>{}</b></span>";
days = "<span color='#${color.hex.flamingo}'><b>{}</b></span>";
weeks = "<span color='#${color.hex.teal}'><b>W{}</b></span>";
weekdays = "<span color='#${color.hex.lavender}'><b>{}</b></span>";
today = "<span color='#${color.hex.accent}'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
}; };
tray = { tray = {
icon-size = 20; icon-size = 22;
show-passive-items = true; show-passive-items = true;
spacing = 5; spacing = 5;
}; };
}; };
}; };
style = '' style = let
border-width = "2px";
border-radius = "10px";
in ''
/* Order is Top-Right-Bottom-Left for combined properties */ /* Order is Top-Right-Bottom-Left for combined properties */
* { * {
color: #${color.hex.dark.base};
font-family: ${color.font}; font-family: ${color.font};
font-weight: bold;
} }
window#waybar { window#waybar {
border-style: solid; border-style: solid;
border-width: 2px; border-width: ${border-width};
border-radius: 6px; border-radius: ${border-radius};
border-color: #${color.hex.dark.lavender}; border-color: #${color.hex.accent};
background-color: rgba(${color.rgbString.light.base}, 0.3); background-color: rgba(${color.rgbS.mantle}, 1.0);
} }
tooltip { tooltip {
border-style: solid; color: #${color.hex.text};
border-width: 2px;
border-radius: 6px;
border-color: #${color.hex.dark.lavender};
background-color: rgba(${color.rgbString.light.base}, 0.7);
font-weight: normal; font-weight: normal;
border-style: solid;
border-width: ${border-width};
border-radius: ${border-radius};
border-color: #${color.hex.accent};
background-color: rgba(${color.rgbS.mantle}, 1.0);
} }
/* Background colors */ /* Background colors */
#custom-launcher {background-color: #${color.hex.dark.lavender};} #custom-launcher {background-color: #${color.hex.accent};}
#user {background-color: #${color.hex.dark.pink};} #workspaces button {background-color: #${color.hex.lavender};}
#window {background-color: #${color.hex.dark.mauve};} #workspaces button.active {background-color: #${color.hex.pink};}
#workspaces button {background-color: #${color.hex.dark.lavender};} #window {background-color: #${color.hex.maroon};}
#workspaces button.active {background-color: #${color.hex.dark.pink};} #systemd-failed-units {background-color: #${color.hex.red};}
#pulseaudio {background-color: #${color.hex.dark.maroon};} #mpris {background-color: #${color.hex.accent};}
#network {background-color: #${color.hex.dark.peach};} #privacy {background-color: #${color.hex.red};}
#cpu {background-color: #${color.hex.dark.yellow};} #pulseaudio {background-color: #${color.hex.maroon};}
#memory {background-color: #${color.hex.dark.green};} #network {background-color: #${color.hex.peach};}
#temperature {background-color: #${color.hex.dark.teal};} #disk {background-color: #${color.hex.yellow};}
#clock {background-color: #${color.hex.dark.sky};} #cpu {background-color: #${color.hex.green};}
#tray {background-color: #${color.hex.dark.lavender};} #memory {background-color: #${color.hex.teal};}
#clock {background-color: #${color.hex.sky};}
#tray {background-color: #${color.hex.accent};}
/* Square Widgets */ /* Square Widgets */
#custom-launcher, #custom-launcher,
#workspaces button, #systemd-failed-units,
#mpris,
#tray { #tray {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
border-radius: 6px; border-radius: ${border-radius};
}
/* Workspaces */
#workspaces button {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 2px 0px 2px;
margin: 8px 2px 8px 2px;
border-radius: ${border-radius};
} }
/* Rectangle Widgets */ /* Rectangle Widgets */
#user, #user,
#window, #window,
#pulseaudio, #pulseaudio,
#privacy,
#network, #network,
#disk,
#cpu, #cpu,
#memory, #memory,
#temperature,
#clock { #clock {
color: #${color.hex.mantle};
font-weight: bold;
padding: 0px 10px 0px 10px; padding: 0px 10px 0px 10px;
margin: 8px 5px 8px 5px; margin: 8px 5px 8px 5px;
border-radius: 6px; border-radius: ${border-radius};
} }
/* Make window module transparent when no windows present */ /* Make window module transparent when no windows present */
@ -153,12 +256,12 @@ in {
/* Tux Icon */ /* Tux Icon */
#custom-launcher { #custom-launcher {
font-size: 26px; font-size: 26px;
padding-right: 10px; padding-right: 13px;
margin: 0px 5px 0px 0px; margin: 0px 5px 0px 0px;
} }
#workspaces button { #systemd-failed-units {
margin: 0px 5px 0px 5px; margin: 0px 5px 0px 0px;
} }
#tray { #tray {

View File

@ -7,9 +7,9 @@ with lib;
with mylib.modules; { with mylib.modules; {
enable = mkEnableOption "Waybar"; enable = mkEnableOption "Waybar";
monitor = mkOption { monitors = mkOption {
type = types.str; type = types.listOf types.str;
example = "HDMI-A-1"; example = ''["HDMI-A-1", "DP-1"]'';
description = "What monitor to display the Waybar on"; description = "What monitor to display the Waybar on";
}; };
} }

View File

@ -18,6 +18,7 @@ in [
(mkIcon "Public" "󰒗") (mkIcon "Public" "󰒗")
(mkIcon "Restic" "󰁯") (mkIcon "Restic" "󰁯")
(mkIcon "Shows" "󰿎") (mkIcon "Shows" "󰿎")
(mkIcon "SSD" "󰉉")
(mkIcon "Unity" "󰚯") (mkIcon "Unity" "󰚯")
(mkIcon "Videos" "") (mkIcon "Videos" "")
] ]

View File

@ -80,6 +80,75 @@
]; ];
}; };
mkDarwinConfigWithHomeManagerModule = {
system,
mylib,
hostname,
username,
publicKeys,
extraModules ? [],
headless ? false,
}:
inputs.nix-darwin.lib.darwinSystem {
inherit system;
# Values in "specialArgs" are propagated to all system modules.
specialArgs = {
inherit inputs system hostname mylib username publicKeys headless;
};
modules = builtins.concatLists [
[
# Replace the default "pkgs" with my configured version
# to allow installation of unfree software and my own overlays.
{nixpkgs.pkgs = pkgs;}
# Import the toplevel system configuration module.
../system/cachix.nix
# Host specific configuration
../system/${hostname}
# Import all of my custom system modules
# ../system/systemmodules # TODO:
]
extraModules
# HM is installed as a system module when using mkNixosConfigWithHomeManagerModule.
[
inputs.home-manager.darwinModules.home-manager
{
home-manager = {
# Values in "extraSpecialArgs" are propagated to all HM modules.
extraSpecialArgs = {
inherit inputs system hostname mylib username publicKeys headless;
};
# Use the "pkgs" from the system configuration.
# This disables "nixpkgs.*" options in HM modules.
useGlobalPkgs = true;
# Packages in "users.${username}.packages" will be installed
# to /etc/profiles instead of ~/.nix-profile.
useUserPackages = true;
users.${username}.imports = [
# Host specific configuration
../home/${username}/${hostname}
];
sharedModules = [
# Import all of my custom HM modules.
# Putting them into sharedModules enables correct nixd completions.
../home/homemodules/darwin.nix
];
};
}
]
];
};
mkNixosSystemConfig = { mkNixosSystemConfig = {
system, system,
mylib, mylib,

View File

@ -21,7 +21,11 @@
|> builtins.attrValues |> builtins.attrValues
|> builtins.concatStringsSep "\n"; |> builtins.concatStringsSep "\n";
in in
prompt: attrs: {
prompt,
attrs,
command ? ''rofi -dmenu -p " ${prompt} " -i'',
}:
pkgs.writeScriptBin "rofi-menu-${prompt}" '' pkgs.writeScriptBin "rofi-menu-${prompt}" ''
#! ${pkgs.fish}/bin/fish #! ${pkgs.fish}/bin/fish
@ -29,7 +33,7 @@
set OPTIONS ${unpack-options attrs} set OPTIONS ${unpack-options attrs}
# We choose a single OPTION using Rofi # We choose a single OPTION using Rofi
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i) set OPTION (echo -e (string join "\n" $OPTIONS) | ${command})
# Check if the chosen OPTION is a valid choice from OPTIONS # Check if the chosen OPTION is a valid choice from OPTIONS
if not contains $OPTION $OPTIONS if not contains $OPTION $OPTIONS

147
system/darwinix/default.nix Normal file
View File

@ -0,0 +1,147 @@
{
self,
lib,
mylib,
pkgs,
username,
config,
inputs,
publicKeys,
hostname,
...
}: {
nix = {
enable = true;
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes pipe-operators
'';
settings.trusted-users = ["root" "${username}"];
gc.automatic = false;
gc.options = "--delete-older-than 5d";
settings.auto-optimise-store = true;
optimise.automatic = true;
registry = lib.mapAttrs' (n: v: lib.nameValuePair n {flake = v;}) inputs;
nixPath = [
"nixpkgs=${inputs.nixpkgs.outPath}"
"home-manager=${inputs.home-manager.outPath}"
];
};
networking = {
hostName = "${hostname}";
localHostName = "${hostname}";
computerName = "${hostname}";
applicationFirewall = {
enable = true;
enableStealthMode = false;
allowSigned = true;
allowSignedApp = true;
blockAllIncoming = false;
};
knownNetworkServices = [
"Wi-Fi"
"Thunderbold Bridge"
];
dns = [
"192.168.86.26"
"8.8.8.8"
"8.8.4.4"
];
# wg-quick = {};
};
power = {
# restartAfterFreeze = false;
# restartAfterPowerFailure = false;
sleep = {
computer = 10; # 10 minutes until sleep
display = 5;
harddisk = 5;
};
};
system = {
primaryUser = "${username}";
# TODO:
defaults = {
# dock = {};
trackpad = {
ActuateDetents = true; # Haptic feedback
ActuationStrength = 1;
Clicking = true; # Tap to click
Dragging = true; # Double tap to drag
TrackpadRightClick = true;
};
};
keyboard = {
enableKeyMapping = true;
swapLeftCtrlAndFn = true;
swapLeftCommandAndLeftAlt = true;
};
};
users.users.${username} = {
isHidden = false;
description = "Christoph";
home = "/Users/${username}";
createHome = false;
# NOTE: Not set if the user already exists on darwin, so use chsh for the root user
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
publicKeys.${username}.ssh
];
# packages = with pkgs; [];
};
environment.shells = with pkgs; [pkgs.fish];
environment.systemPackages = with pkgs; [
alejandra
neovim
wget
];
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
monolisa
];
programs = {
fish.enable = true;
};
services = {
# aerospace = {};
};
# NOTE: Not installed automatically
homebrew = {
enable = true;
enableFishIntegration = true;
# brews = [];
};
# Set Git commit hash for darwin-version.
# system.configurationRevision = self.rev or self.dirtyRev or null;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 6;
}

View File

@ -276,7 +276,7 @@ with mylib.networking; {
shell = pkgs.fish; shell = pkgs.fish;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
publicKeys.christoph.ssh publicKeys.${username}.ssh
]; ];
# We do this with HomeManager # We do this with HomeManager

View File

@ -91,6 +91,102 @@
}; };
}; };
}; };
games = {
type = "disk";
device = "/dev/disk/by-id/nvme-WD_BLACK_SN850X_2000GB_231623802252";
content = {
type = "gpt";
partitions = {
luks = {
label = "LUKS_GAMES";
size = "100%";
content = {
type = "luks";
name = "crypted_games";
extraOpenArgs = [
"--perf-no_read_workqueue"
"--perf-no_write_workqueue"
];
settings = {
allowDiscards = true;
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
# Disable for interactive password entry
# This is contained on the main disk, so by unlocking the main disk with the password,
# the second disk can unlock automatically
keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
fallbackToPassword = false;
};
content = {
type = "btrfs";
extraArgs = ["-L" "GAMES" "-f"];
subvolumes = {
"data" = {
mountpoint = "/home/christoph/Games";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
ssd = {
type = "disk";
device = "/dev/disk/by-id/nvme-eui.00253857019ebd67";
content = {
type = "gpt";
partitions = {
luks = {
label = "LUKS_SSD";
size = "100%";
content = {
type = "luks";
name = "crypted_ssd";
extraOpenArgs = [
"--perf-no_read_workqueue"
"--perf-no_write_workqueue"
];
settings = {
allowDiscards = true;
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10" "tries=5"];
# Disable for interactive password entry
# This is contained on the main disk, so by unlocking the main disk with the password,
# the second disk can unlock automatically
keyFile = "/persist/home/christoph/.secrets/luks.keyfile";
fallbackToPassword = false;
};
content = {
type = "btrfs";
extraArgs = ["-L" "SSD" "-f"];
subvolumes = {
"data" = {
mountpoint = "/home/christoph/SSD";
mountOptions = [
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
}; };
}; };

View File

@ -27,7 +27,7 @@ in {
]; ];
volumes = let volumes = let
rootDir = "/home/christoph/Downloads/Comfy"; rootDir = "/home/christoph/Games/ComfyUI";
in [ in [
"${rootDir}/storage:/root" "${rootDir}/storage:/root"
"${rootDir}/storage-models/models:/root/ComfyUI/models" "${rootDir}/storage-models/models:/root/ComfyUI/models"

View File

@ -97,6 +97,7 @@ in {
# which leads to /home not being unmounted correctly during shutdown... # which leads to /home not being unmounted correctly during shutdown...
]; ];
# TODO: I need something that lists stale folders in /persist (folders that are no longer mounted into the system)
directories = [ directories = [
# Home directory # Home directory
(mkUDir "Downloads" m755) (mkUDir "Downloads" m755)
@ -178,6 +179,8 @@ in {
(mkUDir ".local/share/fish" m755) (mkUDir ".local/share/fish" m755)
(mkUDir ".local/share/flatpak" m755) (mkUDir ".local/share/flatpak" m755)
(mkUDir ".local/share/hyprland" m755) (mkUDir ".local/share/hyprland" m755)
(mkUDir ".local/share/hytale-launcher" m755)
(mkUDir ".local/share/Hytale" m755)
(mkUDir ".local/share/jellyfin-desktop" m755) (mkUDir ".local/share/jellyfin-desktop" m755)
(mkUDir ".local/share/jellyfin-tui" m755) (mkUDir ".local/share/jellyfin-tui" m755)
(mkUDir ".local/share/JetBrains" m755) # Unity (mkUDir ".local/share/JetBrains" m755) # Unity
@ -200,6 +203,7 @@ in {
(mkUDir ".local/state/lazygit" m755) (mkUDir ".local/state/lazygit" m755)
(mkUDir ".local/state/nix" m755) (mkUDir ".local/state/nix" m755)
(mkUDir ".local/state/nvim" m755) (mkUDir ".local/state/nvim" m755)
(mkUDir ".local/state/waypaper" m755)
(mkUDir ".local/state/wireplumber" m755) (mkUDir ".local/state/wireplumber" m755)
]; ];
}; };

BIN
wallpapers/Blue.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

BIN
wallpapers/Bow.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
wallpapers/Bridge.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 MiB

BIN
wallpapers/Click.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 MiB

BIN
wallpapers/Concrete.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

BIN
wallpapers/Lachs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

BIN
wallpapers/Peak.jpg (Stored with Git LFS) Normal file

Binary file not shown.

BIN
wallpapers/Windows_1.jpg (Stored with Git LFS) Normal file

Binary file not shown.