Compare commits
1 Commits
master
...
3b6d3b4fd3
| Author | SHA1 | Date | |
|---|---|---|---|
|
3b6d3b4fd3
|
BIN
Darwin.png
|
Before Width: | Height: | Size: 2.9 MiB |
BIN
FastFetch.png
|
Before Width: | Height: | Size: 2.6 MiB After Width: | Height: | Size: 2.0 MiB |
BIN
NeoVim.png
Normal file
|
After Width: | Height: | Size: 2.0 MiB |
11
README.md
@ -1,9 +1,16 @@
|
|||||||
# NixOS Configuration
|
# NixOS Configuration
|
||||||
|
|
||||||
Modular NixOS configuration, using [Niri](https://github.com/niri-wm/niri) and [Waybar](https://github.com/Alexays/Waybar) for a light desktop.
|
Modular NixOS configuration, using Hyprland (yikes) or Niri for a tiling/scrolling desktop.
|
||||||
|
|
||||||

|

|
||||||

|
|
||||||
|
<p float="left" align="middle">
|
||||||
|
<img src="/NeoVim.png" width="33%" />
|
||||||
|
<img src="/Rmpc.png" width="33%" />
|
||||||
|
<img src="/Btop.png" width="33%" />
|
||||||
|
</p>
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
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`.
|
||||||
|
|||||||
30
flake.lock
generated
@ -522,27 +522,6 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nix-darwin": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1773000227,
|
|
||||||
"narHash": "sha256-zm3ftUQw0MPumYi91HovoGhgyZBlM4o3Zy0LhPNwzXE=",
|
|
||||||
"owner": "nix-darwin",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"rev": "da529ac9e46f25ed5616fd634079a5f3c579135f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-darwin",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nix-darwin",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nix-flatpak": {
|
"nix-flatpak": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767983141,
|
"lastModified": 1767983141,
|
||||||
@ -614,16 +593,16 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773814637,
|
"lastModified": 1767313136,
|
||||||
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
|
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
|
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.11",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@ -845,7 +824,6 @@
|
|||||||
"masssprings": "masssprings",
|
"masssprings": "masssprings",
|
||||||
"niri": "niri",
|
"niri": "niri",
|
||||||
"nix-alien": "nix-alien",
|
"nix-alien": "nix-alien",
|
||||||
"nix-darwin": "nix-darwin",
|
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
"nixpkgs": "nixpkgs_6",
|
"nixpkgs": "nixpkgs_6",
|
||||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||||
|
|||||||
100
flake.nix
@ -12,12 +12,8 @@
|
|||||||
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.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
|
|
||||||
# Home Manager
|
# Home Manager
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
@ -62,6 +58,51 @@
|
|||||||
walker.url = "github:abenz1267/walker";
|
walker.url = "github:abenz1267/walker";
|
||||||
walker.inputs.elephant.follows = "elephant";
|
walker.inputs.elephant.follows = "elephant";
|
||||||
|
|
||||||
|
# Quickshell
|
||||||
|
# quickshell.url = "github:quickshell-mirror/quickshell";
|
||||||
|
# quickshell.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# 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";
|
||||||
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -82,6 +123,10 @@
|
|||||||
# musnix.url = "github:musnix/musnix";
|
# musnix.url = "github:musnix/musnix";
|
||||||
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
# musnix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# ComfyUI
|
||||||
|
# nixified-ai.url = "github:nixified-ai/flake";
|
||||||
|
# comfyui-nix.url = "github:utensils/comfyui-nix";
|
||||||
|
|
||||||
# HyTale
|
# HyTale
|
||||||
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
|
hytale-launcher.url = "github:JPyke3/hytale-launcher-nix";
|
||||||
|
|
||||||
@ -95,14 +140,12 @@
|
|||||||
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),
|
||||||
@ -145,26 +188,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
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 {
|
||||||
@ -179,15 +202,8 @@
|
|||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
darwinMylib = import ./lib {
|
|
||||||
inherit inputs darwinPkgs;
|
|
||||||
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
|
|
||||||
pkgs = darwinPkgs;
|
|
||||||
};
|
|
||||||
|
|
||||||
# NOTE: Keep public keys here so they're easy to rotate
|
# 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";
|
||||||
@ -211,20 +227,6 @@
|
|||||||
# 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
|
||||||
|
|||||||
@ -1,402 +0,0 @@
|
|||||||
{
|
|
||||||
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 = {
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@ -104,10 +104,10 @@ in
|
|||||||
rmpc.enable = !headless;
|
rmpc.enable = !headless;
|
||||||
|
|
||||||
rofi = {
|
rofi = {
|
||||||
enable = false;
|
enable = !headless;
|
||||||
};
|
};
|
||||||
|
|
||||||
waybar.enable = !headless;
|
waybar.enable = false;
|
||||||
yazi.enable = true;
|
yazi.enable = true;
|
||||||
zathura.enable = !headless;
|
zathura.enable = !headless;
|
||||||
};
|
};
|
||||||
@ -300,6 +300,7 @@ 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
|
||||||
@ -488,7 +489,7 @@ in
|
|||||||
settings = {
|
settings = {
|
||||||
logo = {
|
logo = {
|
||||||
padding = {
|
padding = {
|
||||||
top = 4;
|
top = 3;
|
||||||
left = 1;
|
left = 1;
|
||||||
right = 2;
|
right = 2;
|
||||||
};
|
};
|
||||||
@ -756,7 +757,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
tmux = {
|
tmux = {
|
||||||
enable = true;
|
enable = false;
|
||||||
|
|
||||||
clock24 = true;
|
clock24 = true;
|
||||||
escapeTime = 0; # Delay after pressing escape
|
escapeTime = 0; # Delay after pressing escape
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
# because it forces en-US keyboard layout.
|
# because it forces en-US keyboard layout.
|
||||||
fcitx.enable = true;
|
fcitx.enable = true;
|
||||||
|
|
||||||
waybar.monitors = ["DP-1" "DP-2"];
|
waybar.monitor = "DP-1";
|
||||||
};
|
};
|
||||||
|
|
||||||
home = let
|
home = let
|
||||||
|
|||||||
@ -1,17 +0,0 @@
|
|||||||
{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
|
|
||||||
];
|
|
||||||
}
|
|
||||||
@ -42,211 +42,162 @@ in {
|
|||||||
fish_pager_color_description ${color.hex.overlay0}
|
fish_pager_color_description ${color.hex.overlay0}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
programs.fish = lib.mkMerge [
|
programs.fish = {
|
||||||
# Darwin exclusive config
|
enable = true;
|
||||||
(lib.mkIf pkgs.stdenv.isDarwin {
|
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
||||||
shellInit = ''
|
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
|
|
||||||
set --global --export HOMEBREW_PREFIX "/opt/homebrew"
|
functions = lib.mergeAttrsList [
|
||||||
set --global --export HOMEBREW_CELLAR "/opt/homebrew/Cellar"
|
(lib.optionalAttrs config.homemodules.nnn.enable {
|
||||||
set --global --export HOMEBREW_REPOSITORY "/opt/homebrew"
|
nnncd = {
|
||||||
fish_add_path --global --move --path "/opt/homebrew/bin" "/opt/homebrew/sbin"
|
wraps = "nnn";
|
||||||
if test -n "$MANPATH[1]"; set --global --export MANPATH ''' $MANPATH; end;
|
description = "support nnn quit and change directory";
|
||||||
if not contains "/opt/homebrew/share/info" $INFOPATH; set --global --export INFOPATH "/opt/homebrew/share/info" $INFOPATH; end;
|
body = ''
|
||||||
'';
|
# Block nesting of nnn in subshells
|
||||||
|
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
||||||
|
echo "nnn is already running"
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
shellAbbrs = let
|
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||||
# These can be used for my config.homemodules and for HM config.programs,
|
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
||||||
# as both of these add the package to home.packages
|
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
||||||
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
# without changing the paths.
|
||||||
|
if test -n "$XDG_CONFIG_HOME"
|
||||||
|
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
||||||
|
else
|
||||||
|
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
||||||
|
end
|
||||||
|
|
||||||
# Only add fish abbr if package is installed
|
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
||||||
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
# stty start undef
|
||||||
in
|
# stty stop undef
|
||||||
lib.mkMerge [
|
# stty lwrap undef
|
||||||
{
|
# stty lnext undef
|
||||||
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";})
|
# The command function allows one to alias this function to `nnn` without
|
||||||
];
|
# making an infinitely recursive alias
|
||||||
})
|
command nnn $argv
|
||||||
|
|
||||||
# Linux exclusive config
|
if test -e $NNN_TMPFILE
|
||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
source $NNN_TMPFILE
|
||||||
generateCompletions = nixosConfig.programs.fish.generateCompletions;
|
rm $NNN_TMPFILE
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
shellInit = ''
|
plugins = [];
|
||||||
set fish_greeting
|
|
||||||
yes | fish_config theme save "system-theme"
|
|
||||||
'';
|
|
||||||
|
|
||||||
functions = lib.mergeAttrsList [
|
shellInit = ''
|
||||||
(lib.optionalAttrs config.homemodules.nnn.enable {
|
set fish_greeting
|
||||||
nnncd = {
|
yes | fish_config theme save "system-theme"
|
||||||
wraps = "nnn";
|
'';
|
||||||
description = "support nnn quit and change directory";
|
|
||||||
body = ''
|
|
||||||
# Block nesting of nnn in subshells
|
|
||||||
if test -n "$NNNLVL" -a "$NNNLVL" -ge 1
|
|
||||||
echo "nnn is already running"
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
shellAbbrs = let
|
||||||
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
|
# Only add " | bat" if bat is installed
|
||||||
# see. To cd on quit only on ^G, remove the "-x" from both lines below,
|
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
||||||
# without changing the paths.
|
|
||||||
if test -n "$XDG_CONFIG_HOME"
|
|
||||||
set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd"
|
|
||||||
else
|
|
||||||
set -x NNN_TMPFILE "$HOME/.config/nnn/.lastd"
|
|
||||||
end
|
|
||||||
|
|
||||||
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
|
# Same as above but with args for bat
|
||||||
# stty start undef
|
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
||||||
# stty stop undef
|
|
||||||
# stty lwrap undef
|
|
||||||
# stty lnext undef
|
|
||||||
|
|
||||||
# The command function allows one to alias this function to `nnn` without
|
# These can be used for my config.homemodules and for HM config.programs,
|
||||||
# making an infinitely recursive alias
|
# as both of these add the package to home.packages
|
||||||
command nnn $argv
|
hasHomePackage = package: (mylib.modules.contains config.home.packages package);
|
||||||
|
|
||||||
if test -e $NNN_TMPFILE
|
# Only add fish abbr if package is installed
|
||||||
source $NNN_TMPFILE
|
abbrify = package: abbr: (lib.optionalAttrs (hasHomePackage package) abbr);
|
||||||
rm $NNN_TMPFILE
|
in
|
||||||
end
|
lib.mkMerge [
|
||||||
'';
|
# Abbrs that are always available are defined here.
|
||||||
};
|
{
|
||||||
|
# Shell basics
|
||||||
|
c = "clear";
|
||||||
|
q = "exit";
|
||||||
|
|
||||||
|
# Fish
|
||||||
|
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
||||||
|
abbrs = batifyWithArgs "abbr" "-l fish";
|
||||||
|
|
||||||
|
# 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";
|
||||||
|
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";
|
||||||
|
nb = "nix build -L";
|
||||||
|
ns = "nix shell nixpkgs#";
|
||||||
|
nr = "nix run";
|
||||||
|
|
||||||
|
ghidra = "_JAVA_AWT_WM_NONREPARENTING=1 ghidra"; # env var for wayland
|
||||||
|
sy = "sudo -E -u ${username} yazi";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Abbrs only available if package is installed
|
||||||
|
|
||||||
|
(abbrify pkgs.duf {
|
||||||
|
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*'";
|
||||||
|
alldisks = "duf";
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.eza {
|
||||||
|
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";
|
||||||
|
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
||||||
|
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.fd {find = "fd";})
|
||||||
|
|
||||||
|
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
||||||
|
|
||||||
|
(abbrify pkgs.gdu {
|
||||||
|
# du = "gdu";
|
||||||
|
storage = "gdu";
|
||||||
|
})
|
||||||
|
|
||||||
|
(abbrify pkgs.git {
|
||||||
|
gs = "git status";
|
||||||
|
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
||||||
|
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
||||||
|
ga = "git add";
|
||||||
|
gap = "git add --patch";
|
||||||
|
gc = "git commit --verbose";
|
||||||
|
gcm = "git commit -m";
|
||||||
|
gcl = "git clone";
|
||||||
|
})
|
||||||
|
|
||||||
|
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
||||||
|
|
||||||
|
(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";})
|
||||||
];
|
];
|
||||||
|
};
|
||||||
shellAbbrs = let
|
|
||||||
# Only add " | bat" if bat is installed
|
|
||||||
batify = command: command + (lib.optionalString config.programs.bat.enable " | bat");
|
|
||||||
|
|
||||||
# Same as above but with args for bat
|
|
||||||
batifyWithArgs = command: args: command + (lib.optionalString config.programs.bat.enable (" | bat " + args));
|
|
||||||
|
|
||||||
# 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 [
|
|
||||||
# Abbrs that are always available are defined here.
|
|
||||||
{
|
|
||||||
# Fish
|
|
||||||
h = batifyWithArgs "history" "-l fish"; # -l fish sets syntax highlighting to fish
|
|
||||||
abbrs = batifyWithArgs "abbr" "-l fish";
|
|
||||||
|
|
||||||
# Tools
|
|
||||||
blk = batify "lsblk -o NAME,LABEL,PARTLABEL,FSTYPE,SIZE,FSUSE%,MOUNTPOINT";
|
|
||||||
blkids = batify "lsblk -o NAME,LABEL,FSTYPE,SIZE,PARTLABEL,MODEL,ID,UUID";
|
|
||||||
nd = "nix develop";
|
|
||||||
nb = "nix build -L";
|
|
||||||
ns = "nix shell nixpkgs#";
|
|
||||||
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
|
|
||||||
(abbrify pkgs.rsync rec {
|
|
||||||
rsync = "rsync -ahv --inplace --partial --info=progress2";
|
|
||||||
copy = rsync;
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.duf {
|
|
||||||
disks = "duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
|
||||||
alldisks = "duf";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.ripgrep {
|
|
||||||
rg = "rg --trim --pretty";
|
|
||||||
# grep = rg;
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.eza {
|
|
||||||
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";
|
|
||||||
lsa = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -l -a";
|
|
||||||
tre = "eza --color=always --group-directories-first -F --git --icons=always --octal-permissions -T -L 2";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.fd {find = "fd";})
|
|
||||||
|
|
||||||
(abbrify pkgs.fzf {fuzzy = "fzf --preview 'bat --color=always --style=numbers --line-range=:500 {}'";})
|
|
||||||
|
|
||||||
(abbrify pkgs.gdu {
|
|
||||||
# du = "gdu";
|
|
||||||
storage = "gdu";
|
|
||||||
})
|
|
||||||
|
|
||||||
(abbrify pkgs.git {
|
|
||||||
gs = "git status";
|
|
||||||
gd = "git diff --output-indicator-new=' ' --output-indicator-old=' '";
|
|
||||||
gl = "git log --all --graph --pretty=format:'%C(magenta)%h %C(white) %an %ar%C(auto) %D%n%s%n'";
|
|
||||||
ga = "git add";
|
|
||||||
gap = "git add --patch";
|
|
||||||
gc = "git commit --verbose";
|
|
||||||
gcm = "git commit -m";
|
|
||||||
gcl = "git clone";
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.optionalAttrs config.homemodules.kitty.enable {ssh = "kitty +kitten ssh";})
|
|
||||||
|
|
||||||
(abbrify pkgs.lazygit {lg = "lazygit";})
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = [];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.starship = {
|
programs.starship = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
mylib,
|
mylib,
|
||||||
pkgs,
|
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (config.homemodules) kitty color;
|
inherit (config.homemodules) kitty color;
|
||||||
@ -28,102 +27,96 @@ in {
|
|||||||
"kitty_mod+l" = "next_layout";
|
"kitty_mod+l" = "next_layout";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = lib.mkMerge [
|
settings = {
|
||||||
# Linux config
|
editor = config.home.sessionVariables.EDITOR;
|
||||||
(lib.mkIf pkgs.stdenv.isLinux {
|
scrollback_lines = 10000;
|
||||||
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
||||||
listen_on = "unix:@mykitty";
|
# hide_window_decorations = "yes";
|
||||||
})
|
enabled_layouts = "grid,vertical,horizontal";
|
||||||
|
|
||||||
# Common config
|
allow_remote_control = "yes"; # For nnn file preview or nvim scrollback
|
||||||
{
|
listen_on = "unix:@mykitty";
|
||||||
editor = config.home.sessionVariables.EDITOR;
|
|
||||||
scrollback_lines = 10000;
|
|
||||||
window_padding_width = 10; # Looks stupid with editors if bg doesn't match
|
|
||||||
# hide_window_decorations = "yes";
|
|
||||||
enabled_layouts = "grid,vertical,horizontal";
|
|
||||||
|
|
||||||
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";
|
||||||
tab_powerline_style = "round";
|
tab_powerline_style = "round";
|
||||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||||
|
|
||||||
#
|
#
|
||||||
# Color Theme
|
# Color Theme
|
||||||
#
|
#
|
||||||
|
|
||||||
# The basic colors
|
# The basic colors
|
||||||
background = color.hexS.base;
|
background = color.hexS.base;
|
||||||
foreground = color.hexS.text;
|
foreground = color.hexS.text;
|
||||||
selection_foreground = color.hexS.base;
|
selection_foreground = color.hexS.base;
|
||||||
selection_background = color.hexS.rosewater;
|
selection_background = color.hexS.rosewater;
|
||||||
|
|
||||||
# Cursor colors
|
# Cursor colors
|
||||||
cursor = color.hexS.rosewater;
|
cursor = color.hexS.rosewater;
|
||||||
cursor_text_color = color.hexS.base;
|
cursor_text_color = color.hexS.base;
|
||||||
|
|
||||||
# URL underline color when hovering with mouse
|
# URL underline color when hovering with mouse
|
||||||
url_color = color.hexS.rosewater;
|
url_color = color.hexS.rosewater;
|
||||||
|
|
||||||
# Kitty window border colors
|
# Kitty window border colors
|
||||||
active_border_color = color.hexS.lavender;
|
active_border_color = color.hexS.lavender;
|
||||||
inactive_border_color = color.hexS.overlay0;
|
inactive_border_color = color.hexS.overlay0;
|
||||||
bell_border_color = color.hexS.yellow;
|
bell_border_color = color.hexS.yellow;
|
||||||
|
|
||||||
# OS Window titlebar colors
|
# OS Window titlebar colors
|
||||||
wayland_titlebar_color = "system";
|
wayland_titlebar_color = "system";
|
||||||
macos_titlebar_color = "system";
|
macos_titlebar_color = "system";
|
||||||
|
|
||||||
# Tab bar colors
|
# Tab bar colors
|
||||||
active_tab_foreground = color.hexS.base;
|
active_tab_foreground = color.hexS.base;
|
||||||
active_tab_background = color.hexS.lavender;
|
active_tab_background = color.hexS.lavender;
|
||||||
inactive_tab_foreground = color.hexS.text;
|
inactive_tab_foreground = color.hexS.text;
|
||||||
inactive_tab_background = color.hexS.crust;
|
inactive_tab_background = color.hexS.crust;
|
||||||
tab_bar_background = color.hexS.base;
|
tab_bar_background = color.hexS.base;
|
||||||
|
|
||||||
# Color for marks (marked text in the terminal)
|
# Color for marks (marked text in the terminal)
|
||||||
mark1_foreground = color.hexS.base;
|
mark1_foreground = color.hexS.base;
|
||||||
mark1_background = color.hexS.lavender;
|
mark1_background = color.hexS.lavender;
|
||||||
mark2_foreground = color.hexS.base;
|
mark2_foreground = color.hexS.base;
|
||||||
mark2_background = color.hexS.mauve;
|
mark2_background = color.hexS.mauve;
|
||||||
mark3_foreground = color.hexS.base;
|
mark3_foreground = color.hexS.base;
|
||||||
mark3_background = color.hexS.sapphire;
|
mark3_background = color.hexS.sapphire;
|
||||||
|
|
||||||
# The 16 terminal colors
|
# The 16 terminal colors
|
||||||
# black
|
# black
|
||||||
color0 = color.hexS.subtext1;
|
color0 = color.hexS.subtext1;
|
||||||
color8 = color.hexS.subtext0;
|
color8 = color.hexS.subtext0;
|
||||||
|
|
||||||
# red
|
# red
|
||||||
color1 = color.hexS.red;
|
color1 = color.hexS.red;
|
||||||
color9 = color.hexS.red;
|
color9 = color.hexS.red;
|
||||||
|
|
||||||
# green
|
# green
|
||||||
color2 = color.hexS.green;
|
color2 = color.hexS.green;
|
||||||
color10 = color.hexS.green;
|
color10 = color.hexS.green;
|
||||||
|
|
||||||
# yellow
|
# yellow
|
||||||
color3 = color.hexS.yellow;
|
color3 = color.hexS.yellow;
|
||||||
color11 = color.hexS.yellow;
|
color11 = color.hexS.yellow;
|
||||||
|
|
||||||
# blue
|
# blue
|
||||||
color4 = color.hexS.blue;
|
color4 = color.hexS.blue;
|
||||||
color12 = color.hexS.blue;
|
color12 = color.hexS.blue;
|
||||||
|
|
||||||
# magenta
|
# magenta
|
||||||
color5 = color.hexS.pink;
|
color5 = color.hexS.pink;
|
||||||
color13 = color.hexS.pink;
|
color13 = color.hexS.pink;
|
||||||
|
|
||||||
# cyan
|
# cyan
|
||||||
color6 = color.hexS.teal;
|
color6 = color.hexS.teal;
|
||||||
color14 = color.hexS.teal;
|
color14 = color.hexS.teal;
|
||||||
|
|
||||||
# white
|
# white
|
||||||
color7 = color.hexS.surface2;
|
color7 = color.hexS.surface2;
|
||||||
color15 = color.hexS.surface1;
|
color15 = color.hexS.surface1;
|
||||||
}
|
};
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -77,7 +77,6 @@ in {
|
|||||||
typstyle
|
typstyle
|
||||||
mbake
|
mbake
|
||||||
just-formatter
|
just-formatter
|
||||||
tombi
|
|
||||||
])
|
])
|
||||||
|
|
||||||
[
|
[
|
||||||
@ -126,7 +125,7 @@ in {
|
|||||||
maplocalleader = ",";
|
maplocalleader = ",";
|
||||||
};
|
};
|
||||||
|
|
||||||
opts = import ./vim_opts.nix {inherit config lib mylib;};
|
opts = import ./vim_opts.nix {inherit lib mylib;};
|
||||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||||
|
|
||||||
@ -527,7 +526,6 @@ 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"];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
fork = true # Start neovide detached
|
fork = true # Start neovide detached
|
||||||
frame = "full" # full, buttonless, none
|
frame = "none" # 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
|
||||||
|
|||||||
@ -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 = "${config.home.homeDirectory}/.vim/undo";
|
undodir = "/home/christoph/.vim/undo";
|
||||||
undolevels = 10000;
|
undolevels = 10000;
|
||||||
# autochdir = true;
|
# autochdir = true;
|
||||||
confirm = true;
|
confirm = true;
|
||||||
|
|||||||
@ -53,64 +53,12 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Disable Niri's kde auth agent and start gnome auth agent instead
|
|
||||||
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 = {
|
||||||
file = {
|
file = {
|
||||||
# Link theme for flatpak
|
# Link theme for flatpak
|
||||||
".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
|
".themes/${config.gtk.theme.name}".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}";
|
||||||
|
|
||||||
".config/waypaper/config.ini".text = lib.generators.toINI {} {
|
".config/ashell/config.toml".source = config.lib.file.mkOutOfStoreSymlink "${config.paths.dotfiles}/ashell/config.toml";
|
||||||
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 = {
|
||||||
@ -130,8 +78,8 @@ in {
|
|||||||
xwayland-satellite
|
xwayland-satellite
|
||||||
# ncpamixer # Audio control
|
# ncpamixer # Audio control
|
||||||
wiremix # Audio control
|
wiremix # Audio control
|
||||||
swww
|
|
||||||
waypaper
|
ashell # Wayland bar
|
||||||
|
|
||||||
# GTK apps (look good and work well with xdg portals)
|
# 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
|
||||||
@ -147,255 +95,10 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
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 = {
|
||||||
walker = {
|
walker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
runAsService = true;
|
runAsService = true;
|
||||||
|
|
||||||
# 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
|
||||||
@ -435,8 +138,9 @@ 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 = [
|
||||||
{argv = ["ashell" "-c" "${config.paths.dotfiles}/ashell/config.toml"];}
|
# TODO: Depend on options
|
||||||
{argv = ["waypaper" "--restore"];}
|
# {argv = ["noctalia-shell"];}
|
||||||
|
{argv = ["dms" "run"];}
|
||||||
|
|
||||||
{argv = ["kitty" "--hold" "fastfetch"];}
|
{argv = ["kitty" "--hold" "fastfetch"];}
|
||||||
{argv = ["fcitx5"];}
|
{argv = ["fcitx5"];}
|
||||||
@ -526,11 +230,6 @@ 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 = {
|
||||||
@ -628,13 +327,14 @@ in {
|
|||||||
|
|
||||||
layer-rules = [
|
layer-rules = [
|
||||||
{
|
{
|
||||||
# Waybar rounded corners background clipping fix
|
# Set the overview wallpaper on the backdrop (Noctalia).
|
||||||
matches = [{namespace = "waybar";}];
|
matches = [{namespace = "^noctalia-overview*";}];
|
||||||
opacity = 0.99;
|
place-within-backdrop = true;
|
||||||
shadow = {
|
}
|
||||||
enable = true;
|
{
|
||||||
draw-behind-window = true;
|
# Set the overview wallpaper on the backdrop (DMS).
|
||||||
};
|
matches = [{namespace = "^dms:blurwallpaper$";}];
|
||||||
|
place-within-backdrop = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -643,6 +343,8 @@ 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
|
||||||
@ -678,44 +380,29 @@ 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.";};
|
|
||||||
};
|
|
||||||
|
|
||||||
"Mod+A" = {
|
"Mod+A" = {
|
||||||
action = spawn "walker" "-m" "desktopapplications";
|
action = spawn "walker";
|
||||||
hotkey-overlay = {title = "Toggle the application launcher.";};
|
hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||||
};
|
};
|
||||||
"Mod+Shift+A" = {
|
|
||||||
action = spawn "walker" "-m" "providerlist";
|
# DankMaterialShell
|
||||||
hotkey-overlay = {title = "Toggle the launcher.";};
|
# "Mod+A" = {
|
||||||
};
|
# action = spawn "dms" "ipc" "call" "spotlight" "toggle";
|
||||||
"Mod+Escape" = let
|
# hotkey-overlay = {title = "Toggle the application launcher.";};
|
||||||
powerMenu = mylib.rofi.mkSimpleMenu rec {
|
# };
|
||||||
prompt = "Session";
|
# "Mod+Ctrl+L" = {
|
||||||
attrs = {
|
# action = spawn "dms" "ipc" "call" "lock" "lock";
|
||||||
" Poweroff" = "poweroff";
|
# hotkey-overlay = {title = "Lock the screen.";};
|
||||||
" Reboot" = "reboot";
|
# };
|
||||||
" Lock" = "loginctl lock-session";
|
# "Mod+Escape" = {
|
||||||
# " Reload Hyprpanel" = "systemctl --user restart hyprpanel.service";
|
# action = spawn "dms" "ipc" "call" "powermenu" "toggle";
|
||||||
# " Reload Hyprland" = "hyprctl reload";
|
# hotkey-overlay = {title = "Toggle the session menu.";};
|
||||||
# " Exit Hyprland" = "hyprctl dispatch exit";
|
# };
|
||||||
};
|
# "Mod+C" = {
|
||||||
command = "walker -d -p ${prompt}";
|
# action = spawn "dms" "ipc" "call" "clipboard" "toggle";
|
||||||
};
|
# hotkey-overlay = {title = "Show clipboard history.";};
|
||||||
in {
|
# };
|
||||||
action = spawn "${powerMenu}/bin/rofi-menu-Session";
|
|
||||||
hotkey-overlay = {title = "Toggle the session menu.";};
|
|
||||||
};
|
|
||||||
"Mod+C" = {
|
|
||||||
action = spawn "walker" "-m" "clipboard";
|
|
||||||
hotkey-overlay = {title = "Show clipboard history.";};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Screenshots
|
# Screenshots
|
||||||
"Mod+S" = {
|
"Mod+S" = {
|
||||||
|
|||||||
@ -21,229 +21,126 @@ in {
|
|||||||
spacing = 0;
|
spacing = 0;
|
||||||
margin = "10px 10px 0px 10px";
|
margin = "10px 10px 0px 10px";
|
||||||
fixed-center = true;
|
fixed-center = true;
|
||||||
output = waybar.monitors;
|
output = ["${waybar.monitor}"];
|
||||||
|
|
||||||
modules-left = ["custom/launcher" "niri/workspaces" "niri/window"]; # "user"
|
modules-left = ["custom/launcher" "user" "hyprland/window"];
|
||||||
modules-center = ["systemd-failed-units" "mpris"];
|
modules-center = ["hyprland/workspaces"];
|
||||||
modules-right = ["privacy" "pulseaudio" "network" "disk" "cpu" "memory" "clock" "tray"];
|
modules-right = ["pulseaudio" "network" "cpu" "memory" "temperature" "clock" "tray"];
|
||||||
|
|
||||||
"custom/launcher" = {
|
"custom/launcher" = {
|
||||||
format = "<span></span>";
|
format = "<span></span>";
|
||||||
interval = "once";
|
interval = "once";
|
||||||
on-click = "walker -m desktopapplications";
|
on-click = "rofi -drun-show-actions -show drun";
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd-failed-units = {
|
"hyprland/workspaces" = {
|
||||||
hide-on-ok = true;
|
|
||||||
format = " {nr_failed}";
|
|
||||||
format-ok = "✔️";
|
|
||||||
system = true;
|
|
||||||
user = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"niri/workspaces" = {
|
|
||||||
all-outputs = false;
|
all-outputs = false;
|
||||||
format = "{icon}";
|
format = "{name}";
|
||||||
format-icons = {
|
on-click = "activate";
|
||||||
default = "";
|
sort-by-coordinates = false;
|
||||||
focused = "";
|
sort-by-name = true;
|
||||||
active = "";
|
sort-by-number = false;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"niri/window" = {
|
"pulseaudio" = {
|
||||||
format = "{title}";
|
format = "<span></span> {volume}%";
|
||||||
separate-outputs = false;
|
format-muted = "<span></span> ";
|
||||||
icon = true;
|
on-click = "kitty ncpamixer -t o";
|
||||||
icon-size = 22;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
mpris = {
|
"network" = {
|
||||||
format = "<span></span> {dynamic}";
|
format = "<span></span> {ipaddr}";
|
||||||
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 = false;
|
tooltip-format = "{ifname} via {gwaddr}";
|
||||||
};
|
|
||||||
|
|
||||||
disk = {
|
|
||||||
format = "<span></span> {percentage_used}%";
|
|
||||||
on-click = "kitty --hold --title=Duf duf --hide-mp '/var/*,/etc/*,/usr/*,/home/christoph/.*' -width 120";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
cpu = {
|
cpu = {
|
||||||
states = {
|
format = "<span></span> {load}%";
|
||||||
"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 = {
|
||||||
states = {
|
format = "<span></span> {percentage}%";
|
||||||
"warning" = 65;
|
};
|
||||||
"critical" = 85;
|
|
||||||
};
|
temperature = {
|
||||||
format = "<span></span> {percentage}%";
|
format = "<span></span> {temperatureC}°C";
|
||||||
format-warning = "<span color='#${color.hex.yellow}'><span></span> {percentage}%</span>";
|
thermal-zone = 3;
|
||||||
format-critical = "<span color='#${color.hex.red}'><span></span> {percentage}%</span>";
|
|
||||||
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 = 22;
|
icon-size = 20;
|
||||||
show-passive-items = true;
|
show-passive-items = true;
|
||||||
spacing = 5;
|
spacing = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
style = let
|
style = ''
|
||||||
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: ${border-width};
|
border-width: 2px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
border-color: #${color.hex.accent};
|
border-color: #${color.hex.dark.lavender};
|
||||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
background-color: rgba(${color.rgbString.light.base}, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
color: #${color.hex.text};
|
|
||||||
font-weight: normal;
|
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
border-width: ${border-width};
|
border-width: 2px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
border-color: #${color.hex.accent};
|
border-color: #${color.hex.dark.lavender};
|
||||||
background-color: rgba(${color.rgbS.mantle}, 1.0);
|
background-color: rgba(${color.rgbString.light.base}, 0.7);
|
||||||
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Background colors */
|
/* Background colors */
|
||||||
#custom-launcher {background-color: #${color.hex.accent};}
|
#custom-launcher {background-color: #${color.hex.dark.lavender};}
|
||||||
#workspaces button {background-color: #${color.hex.lavender};}
|
#user {background-color: #${color.hex.dark.pink};}
|
||||||
#workspaces button.active {background-color: #${color.hex.pink};}
|
#window {background-color: #${color.hex.dark.mauve};}
|
||||||
#window {background-color: #${color.hex.maroon};}
|
#workspaces button {background-color: #${color.hex.dark.lavender};}
|
||||||
#systemd-failed-units {background-color: #${color.hex.red};}
|
#workspaces button.active {background-color: #${color.hex.dark.pink};}
|
||||||
#mpris {background-color: #${color.hex.accent};}
|
#pulseaudio {background-color: #${color.hex.dark.maroon};}
|
||||||
#privacy {background-color: #${color.hex.red};}
|
#network {background-color: #${color.hex.dark.peach};}
|
||||||
#pulseaudio {background-color: #${color.hex.maroon};}
|
#cpu {background-color: #${color.hex.dark.yellow};}
|
||||||
#network {background-color: #${color.hex.peach};}
|
#memory {background-color: #${color.hex.dark.green};}
|
||||||
#disk {background-color: #${color.hex.yellow};}
|
#temperature {background-color: #${color.hex.dark.teal};}
|
||||||
#cpu {background-color: #${color.hex.green};}
|
#clock {background-color: #${color.hex.dark.sky};}
|
||||||
#memory {background-color: #${color.hex.teal};}
|
#tray {background-color: #${color.hex.dark.lavender};}
|
||||||
#clock {background-color: #${color.hex.sky};}
|
|
||||||
#tray {background-color: #${color.hex.accent};}
|
|
||||||
|
|
||||||
/* Square Widgets */
|
/* Square Widgets */
|
||||||
#custom-launcher,
|
#custom-launcher,
|
||||||
#systemd-failed-units,
|
#workspaces button,
|
||||||
#mpris,
|
|
||||||
#tray {
|
#tray {
|
||||||
color: #${color.hex.mantle};
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0px 10px 0px 10px;
|
padding: 0px 10px 0px 10px;
|
||||||
border-radius: ${border-radius};
|
border-radius: 6px;
|
||||||
}
|
|
||||||
|
|
||||||
/* 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: ${border-radius};
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Make window module transparent when no windows present */
|
/* Make window module transparent when no windows present */
|
||||||
@ -256,12 +153,12 @@ in {
|
|||||||
/* Tux Icon */
|
/* Tux Icon */
|
||||||
#custom-launcher {
|
#custom-launcher {
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
padding-right: 13px;
|
padding-right: 10px;
|
||||||
margin: 0px 5px 0px 0px;
|
margin: 0px 5px 0px 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#systemd-failed-units {
|
#workspaces button {
|
||||||
margin: 0px 5px 0px 0px;
|
margin: 0px 5px 0px 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#tray {
|
#tray {
|
||||||
|
|||||||
@ -7,9 +7,9 @@ with lib;
|
|||||||
with mylib.modules; {
|
with mylib.modules; {
|
||||||
enable = mkEnableOption "Waybar";
|
enable = mkEnableOption "Waybar";
|
||||||
|
|
||||||
monitors = mkOption {
|
monitor = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.str;
|
||||||
example = ''["HDMI-A-1", "DP-1"]'';
|
example = "HDMI-A-1";
|
||||||
description = "What monitor to display the Waybar on";
|
description = "What monitor to display the Waybar on";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -80,75 +80,6 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
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,
|
||||||
|
|||||||
@ -21,11 +21,7 @@
|
|||||||
|> 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
|
||||||
|
|
||||||
@ -33,7 +29,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) | ${command})
|
set OPTION (echo -e (string join "\n" $OPTIONS) | rofi -dmenu -p " ${prompt} " -i)
|
||||||
|
|
||||||
# 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
|
||||||
|
|||||||
@ -1,147 +0,0 @@
|
|||||||
{
|
|
||||||
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;
|
|
||||||
}
|
|
||||||
@ -276,7 +276,7 @@ with mylib.networking; {
|
|||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
publicKeys.${username}.ssh
|
publicKeys.christoph.ssh
|
||||||
];
|
];
|
||||||
|
|
||||||
# We do this with HomeManager
|
# We do this with HomeManager
|
||||||
|
|||||||
@ -97,7 +97,6 @@ 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)
|
||||||
@ -203,7 +202,6 @@ 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)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 1.7 MiB |
BIN
wallpapers/Bow.jpg
(Stored with Git LFS)
|
Before Width: | Height: | Size: 9.6 MiB |
|
Before Width: | Height: | Size: 8.3 MiB |
|
Before Width: | Height: | Size: 13 MiB |
|
Before Width: | Height: | Size: 266 KiB |