Compare commits

...

13 commits

Author SHA1 Message Date
653938a61f
niri: config: many changes 2025-06-04 08:32:11 +02:00
24f35c4ccd
shell: stop fish from having to be built every time
Drop the patch to fish source code, instead opting
to employ fish's inbuilt share/fish/vendor_conf.d
to add custom code to fish.

This is both a bit simpler, and makes it so fish does not
have to be compiled on every update to it's source / to my configuration.
2025-06-04 08:32:09 +02:00
2c8ed668ca
wayland: niri: add xdg portal 2025-06-04 08:29:40 +02:00
a64bc12cf1
loki: stalwart: formatting 2025-06-04 08:29:24 +02:00
ef8c6854f4
zellij: config: formatting, fix keybindings 2025-06-04 08:29:04 +02:00
45d2f35c64
hosts: hermit: programs: remove element-desktop, add ghostty 2025-06-04 08:28:44 +02:00
33c4a5b297
hosts: hermit: switch to niri 2025-06-04 08:28:32 +02:00
41b72ce92c
flake: employ pipes! 2025-06-04 08:28:21 +02:00
2239e0e983
helix: rework 2025-06-04 08:27:35 +02:00
4267ca1d9e
flake.lock: bump inputs 2025-06-04 08:26:46 +02:00
b98c824f87
nix: module: set max-jobs to "auto" and cores to 0 2025-06-04 08:26:40 +02:00
7d45992c07
system: nixpkgs: update 2025-06-04 08:26:40 +02:00
a951911578
progress dump 2025-06-04 08:26:35 +02:00
22 changed files with 517 additions and 318 deletions

73
flake.lock generated
View file

@ -248,25 +248,6 @@
"type": "github"
}
},
"helix": {
"inputs": {
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1748359092,
"narHash": "sha256-bfQVlnTe1PZ3DfulcHUwJzh6qcir0n1F8B0xYUV+Vu0=",
"owner": "helix-editor",
"repo": "helix",
"rev": "2bd7452fe0309e273d06280d15caad6943034377",
"type": "github"
},
"original": {
"owner": "helix-editor",
"repo": "helix",
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": [
@ -602,7 +583,7 @@
"nixpkgs"
],
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay_2"
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1747056319,
@ -681,15 +662,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1740560979,
"narHash": "sha256-Vr3Qi346M+8CjedtbyUevIGDZW8LcA1fTG0ugPY/Hic=",
"owner": "nixos",
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5135c59491985879812717f4c9fea69604e7f26f",
"rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
@ -708,22 +689,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1748190013,
"narHash": "sha256-R5HJFflOfsP5FBtk+zE8FpL8uqE7n62jqOsADvVshhE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "62b852f6c6742134ade1abdd2a21685fd617a291",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736429638,
"narHash": "sha256-dDWqQqSgMQXw5eFtcyoVijv7HbYJZOIo+jWQdJtsxn4=",
@ -810,12 +775,11 @@
},
"root": {
"inputs": {
"helix": "helix",
"hyprland": "hyprland",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"lix-module": "lix-module",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs",
"quickshell": "quickshell",
"schizofox": "schizofox",
"superfreq": "superfreq",
@ -823,27 +787,6 @@
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"helix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1740623427,
"narHash": "sha256-3SdPQrZoa4odlScFDUHd4CUPQ/R1gtH4Mq9u8CBiK8M=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "d342e8b5fd88421ff982f383c853f0fc78a847ab",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"rust-overlay_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
@ -870,7 +813,7 @@
"flake-parts": "flake-parts_2",
"home-manager": "home-manager",
"nixpak": "nixpak",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_2",
"searx-randomizer": "searx-randomizer",
"systems": "systems_2"
},

View file

@ -21,10 +21,9 @@
inherit
(import ./packages {
inherit pkgs;
helix = inputs.helix.packages.${system}.default;
})
fish
wrapped-helix
helix
kakoune
;
}
@ -32,7 +31,7 @@
pkgsFor;
apps = eachSystem (system: let
inherit (inputs.self.packages.${system}) fish wrapped-helix;
inherit (inputs.self.packages.${system}) fish helix;
in {
default = {
type = "app";
@ -40,7 +39,7 @@
};
helix = {
type = "app";
program = "${wrapped-helix}/bin/hx";
program = "${helix}/bin/hx";
};
});
};
@ -71,8 +70,6 @@
inputs.systems.follows = "systems";
};
helix.url = "github:helix-editor/helix";
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
# THIS IS IMPORTANT

View file

@ -9,7 +9,7 @@
...
}: let
inherit (lib.meta) hiPrioSet;
inherit (self.packages.${pkgs.stdenv.system}) wrapped-helix fish;
inherit (self.packages.${pkgs.stdenv.system}) helix fish;
in {
environment.systemPackages =
builtins.attrValues {
@ -46,7 +46,7 @@ in {
;
}
++ builtins.attrValues (hiPrioSet {
inherit wrapped-helix fish;
inherit helix fish;
});
# helix as the only editor, a reasonable choice.
environment.sessionVariables.EDITOR = "hx";

View file

@ -31,7 +31,7 @@ inputs: let
networking.hostName = hostname;
nixpkgs.hostPlatform = system;
})
(flatten (
(
concatLists [
# configuration for the host, passed as an argument.
(singleton ./${hostname}/default.nix)
@ -39,12 +39,12 @@ inputs: let
(singleton ./common.nix)
# Import all files called module.nix from my modules directory.
(
filter (hasSuffix "module.nix") (
map toString (listFilesRecursive ../modules)
)
|> filter (hasSuffix "module.nix")
)
]
))
|> flatten
)
];
};
in {
@ -61,8 +61,8 @@ in {
system = "aarch64-linux";
hostname = "tower";
};
world = mkSystem {
system = "x86_64-linux";
hostname = "world";
};
# world = mkSystem {
# system = "x86_64-linux";
# hostname = "world";
# };
}

View file

@ -23,7 +23,9 @@
pinentryPackage = pkgs.pinentry-qt;
};
modules = {
desktops.hyprland.enable = true;
wms.wayland.enable = true;
desktops.hyprland.enable = false;
desktops.niri.enable = true;
theming = {
gtk.enable = true;
@ -62,8 +64,8 @@
services = {
locate.enable = true;
kanata.enable = true;
uwsm.enable = true;
greetd.enable = true;
uwsm.enable = false;
greetd.enable = false;
media.mpd = {
enable = true;

View file

@ -18,13 +18,12 @@
comma
difftastic
dua
element
element-desktop
evince
eza
fselect
gcc
gh
ghostty
grc
gparted
git
@ -48,7 +47,6 @@
mprocs
mpv
networkmanagerapplet
nil
nitch
obsidian
swww

View file

@ -36,6 +36,7 @@
forgejo.enable = true;
grafana.enable = true;
prometheus.enable = true;
plausible.enable = true;
};
programs = {
editors = {

View file

@ -1,161 +1,327 @@
// taken from https://lobste.rs/s/ft797a/why_zellij#c_4g7k3x
// Make the default layout compact and non-disturbing
default_layout "compact"
// do not pane frames
pane_frames false
// do not show startup tips
show_startup_tips false
// Choose the mode that zellij uses when starting up.
// Default: normal
//
default_mode "locked"
default_shell "fish"
theme "catppuccin-frappe"
// Toggle enabling the mouse mode. On certain configurations, or terminals this
// could potentially interfere with copying text.
// Default: true
//
mouse_mode true
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true {
scroll {
bind "Esc" "Ctrl s" { SwitchToMode "Locked"; }
bind "e" { EditScrollback; SwitchToMode "Locked"; }
bind "/" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "Ctrl c" { ScrollToBottom; SwitchToMode "Locked"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "g" { ScrollToTop; }
bind "G" { ScrollToBottom; }
bind "Esc" "Ctrl s" {
SwitchToMode "Locked"
}
bind "e" {
EditScrollback
SwitchToMode "Locked"
}
bind "/" {
SwitchToMode "EnterSearch"
SearchInput 0
}
bind "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
bind "j" "Down" {
ScrollDown
}
bind "k" "Up" {
ScrollUp
}
bind "Ctrl f" "PageDown" "Right" "l" {
PageScrollDown
}
bind "Ctrl b" "PageUp" "Left" "h" {
PageScrollUp
}
bind "d" {
HalfPageScrollDown
}
bind "u" {
HalfPageScrollUp
}
bind "g" {
ScrollToTop
}
bind "G" {
ScrollToBottom
}
}
search {
bind "Ctrl s" { SwitchToMode "Locked"; }
bind "Esc" "Ctrl c" { ScrollToBottom; SwitchToMode "Locked"; }
bind "j" "Down" { ScrollDown; }
bind "k" "Up" { ScrollUp; }
bind "Ctrl f" "PageDown" "Right" "l" { PageScrollDown; }
bind "Ctrl b" "PageUp" "Left" "h" { PageScrollUp; }
bind "d" { HalfPageScrollDown; }
bind "u" { HalfPageScrollUp; }
bind "n" { Search "down"; }
bind "p" { Search "up"; }
bind "c" { SearchToggleOption "CaseSensitivity"; }
bind "w" { SearchToggleOption "Wrap"; }
bind "o" { SearchToggleOption "WholeWord"; }
bind "Ctrl s" {
SwitchToMode "Locked"
}
bind "Esc" "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
bind "j" "Down" {
ScrollDown
}
bind "k" "Up" {
ScrollUp
}
bind "Ctrl f" "PageDown" "Right" "l" {
PageScrollDown
}
bind "Ctrl b" "PageUp" "Left" "h" {
PageScrollUp
}
bind "d" {
HalfPageScrollDown
}
bind "u" {
HalfPageScrollUp
}
bind "n" {
Search "down"
}
bind "p" {
Search "up"
}
bind "c" {
SearchToggleOption "CaseSensitivity"
}
bind "w" {
SearchToggleOption "Wrap"
}
bind "o" {
SearchToggleOption "WholeWord"
}
}
entersearch {
bind "Ctrl c" "Esc" { SwitchToMode "Scroll"; }
bind "Enter" { SwitchToMode "Search"; }
bind "Ctrl c" "Esc" {
SwitchToMode "Scroll"
}
bind "Enter" {
SwitchToMode "Search"
}
}
renametab {
bind "Ctrl c" { SwitchToMode "Locked"; }
bind "Esc" { UndoRenameTab; SwitchToMode "Tmux"; }
bind "Ctrl c" {
SwitchToMode "Locked"
}
bind "Esc" {
UndoRenameTab
SwitchToMode "Tmux"
}
}
renamepane {
bind "Ctrl c" { SwitchToMode "Locked"; }
bind "Esc" { UndoRenamePane; SwitchToMode "Tmux"; }
bind "Ctrl c" {
SwitchToMode "Locked"
}
bind "Esc" {
UndoRenamePane
SwitchToMode "Tmux"
}
}
tmux {
bind "[" { SwitchToMode "Scroll"; }
bind "Ctrl Space" { Write 1; SwitchToMode "Locked"; }
bind "z" { ToggleFocusFullscreen; SwitchToMode "Locked"; }
bind "[" {
SwitchToMode "Scroll"
}
bind "Ctrl Space" {
Write 1
SwitchToMode "Locked"
}
bind "z" {
ToggleFocusFullscreen
SwitchToMode "Locked"
}
// manipulate tabs
bind "c" { NewTab; SwitchToMode "Locked"; }
bind "K" { CloseTab; SwitchToMode "Locked"; }
bind "R" { SwitchToMode "RenameTab"; }
bind "c" {
NewTab
SwitchToMode "Locked"
}
bind "K" {
CloseTab
SwitchToMode "Locked"
}
bind "R" {
SwitchToMode "RenameTab"
}
// switch modes
bind "/" { SwitchToMode "EnterSearch"; SearchInput 0; }
bind "/" {
SwitchToMode "EnterSearch"
SearchInput 0
}
// miscellaneous
bind "s" { ToggleActiveSyncTab; SwitchToMode "Locked"; }
bind "m" { ToggleMouseMode; SwitchToMode "Locked"; }
bind "y" { Run "yazi"; SwitchToMode "Locked"; }
bind "s" {
ToggleActiveSyncTab
SwitchToMode "Locked"
}
bind "m" {
ToggleMouseMode
SwitchToMode "Locked"
}
bind "y" {
Run "yazi"
SwitchToMode "Locked"
}
// create new pane
bind "Space" { NewPane; SwitchToMode "Locked"; }
bind "-" "_" { NewPane "Down"; SwitchToMode "Locked"; }
bind "|" "\\" { NewPane "Right"; SwitchToMode "Locked"; }
bind "r" { SwitchToMode "RenamePane"; }
bind "Space" {
NewPane
SwitchToMode "Locked"
}
bind "-" "_" {
NewPane "Down"
SwitchToMode "Locked"
}
bind "|" "\\" {
NewPane "Right"
SwitchToMode "Locked"
}
bind "r" {
SwitchToMode "RenamePane"
}
// switch between tabs
bind "h" { GoToPreviousTab; SwitchToMode "Locked"; }
bind "l" { GoToNextTab; SwitchToMode "Locked"; }
bind "1" { GoToTab 1; SwitchToMode "Locked"; }
bind "2" { GoToTab 2; SwitchToMode "Locked"; }
bind "3" { GoToTab 3; SwitchToMode "Locked"; }
bind "4" { GoToTab 4; SwitchToMode "Locked"; }
bind "5" { GoToTab 5; SwitchToMode "Locked"; }
bind "6" { GoToTab 6; SwitchToMode "Locked"; }
bind "7" { GoToTab 7; SwitchToMode "Locked"; }
bind "8" { GoToTab 8; SwitchToMode "Locked"; }
bind "9" { GoToTab 9; SwitchToMode "Locked"; }
bind "h" {
GoToPreviousTab
SwitchToMode "Locked"
}
bind "l" {
GoToNextTab
SwitchToMode "Locked"
}
bind "1" {
GoToTab 1
SwitchToMode "Locked"
}
bind "2" {
GoToTab 2
SwitchToMode "Locked"
}
bind "3" {
GoToTab 3
SwitchToMode "Locked"
}
bind "4" {
GoToTab 4
SwitchToMode "Locked"
}
bind "5" {
GoToTab 5
SwitchToMode "Locked"
}
bind "6" {
GoToTab 6
SwitchToMode "Locked"
}
bind "7" {
GoToTab 7
SwitchToMode "Locked"
}
bind "8" {
GoToTab 8
SwitchToMode "Locked"
}
bind "9" {
GoToTab 9
SwitchToMode "Locked"
}
// switch between panes
bind "Left" { MoveFocus "Left"; }
bind "Right" { MoveFocus "Right"; }
bind "Down" { MoveFocus "Down"; }
bind "Up" { MoveFocus "Up"; }
bind "Tab" { FocusNextPane; }
bind "Left" {
MoveFocus "Left"
}
bind "Right" {
MoveFocus "Right"
}
bind "Down" {
MoveFocus "Down"
}
bind "Up" {
MoveFocus "Up"
}
bind "Tab" {
FocusNextPane
}
// move panes
bind "H" { MovePane "Left"; }
bind "J" { MovePane "Down"; }
bind "K" { MovePane "Up"; }
bind "L" { MovePane "Right"; }
bind "H" {
MovePane "Left"
}
bind "J" {
MovePane "Down"
}
bind "K" {
MovePane "Up"
}
bind "L" {
MovePane "Right"
}
// manipulate panes
bind "W" { CloseFocus; SwitchToMode "Locked"; }
bind "W" {
CloseFocus
SwitchToMode "Locked"
}
// exit etc
bind "Enter" "Esc" { SwitchToMode "Locked"; }
bind "d" { Detach; SwitchToMode "Locked"; }
bind "Q" { Quit; }
bind "Enter" "Esc" {
SwitchToMode "Locked"
}
bind "d" {
Detach
SwitchToMode "Locked"
}
bind "Q" {
Quit
}
// resizing
bind "Ctrl h" { Resize "Increase Left"; }
bind "Ctrl j" { Resize "Increase Down"; }
bind "Ctrl k" { Resize "Increase Up"; }
bind "Ctrl l" { Resize "Increase Right"; }
bind "Ctrl h" {
Resize "Increase Left"
}
bind "Ctrl j" {
Resize "Increase Down"
}
bind "Ctrl k" {
Resize "Increase Up"
}
bind "Ctrl l" {
Resize "Increase Right"
}
}
shared {
bind "Alt n" { NewPane; }
bind "Alt h" { MoveFocus "Left"; }
bind "Alt j" { MoveFocus "Down"; }
bind "Alt l" { MoveFocus "Right"; }
bind "Alt k" { MoveFocus "Up"; }
bind "Ctrl h" { MoveFocus "Left"; }
bind "Ctrl j" { MoveFocus "Down"; }
bind "Ctrl l" { MoveFocus "Right"; }
bind "Ctrl k" { MoveFocus "Up"; }
bind "Alt [" { PreviousSwapLayout; }
bind "Alt ]" { NextSwapLayout; }
bind "Alt =" "Alt +" { Resize "Increase"; }
bind "Alt -" "Alt _" { Resize "Decrease"; }
bind "Alt n" {
NewPane
}
bind "Alt Ctrl h" {
MoveFocus "Left"
}
bind "Alt Ctrl j" {
MoveFocus "Down"
}
bind "Alt Ctrl l" {
MoveFocus "Right"
}
bind "Alt Ctrl k" {
MoveFocus "Up"
}
bind "Alt [" {
PreviousSwapLayout
}
bind "Alt ]" {
NextSwapLayout
}
bind "Alt =" "Alt +" {
Resize "Increase"
}
bind "Alt -" "Alt _" {
Resize "Decrease"
}
}
shared_except "tmux" {
bind "Ctrl Space" { SwitchToMode "Tmux"; }
bind "Ctrl Space" {
SwitchToMode "Tmux"
}
}
}

View file

@ -19,7 +19,6 @@ in {
package = pkgs.loki;
configuration = {
};
};
};

View file

@ -55,32 +55,25 @@ in {
# This is the standard port for SMTP, and is used by mail servers to send email to each other.
smtp = {
protocol = "smtp";
bind = ["localhost::25" "[::]:25"];
bind = ["[::]:25"];
tls.implicit = true;
};
# SMTP submissions with implicit TLS are received on port 465 by default.
# This is the standard port for SMTP submissions with native implicit TLS,
# and is used by mail clients to send email to mail servers.
submissions = {
bind = ["localhost:465" "[::]:465"];
bind = ["[::]:465"];
protocol = "smtp";
tls.implicit = true;
};
imaps = {
bind = ["localhost:993" "[::]:993"];
bind = ["[::]:993"];
protocol = "imap";
tls.implicit = true;
};
jmap = {
bind = ["localhost:8080" "[::]:8080"];
url = "https://mail.${domain}";
protocol = "jmap";
tls.implicit = true;
};
management = {
bind = ["localhost:8080"];
bind = ["127.0.0.1:8080"];
protocol = "http";
tls.implicit = true;
};
@ -90,40 +83,40 @@ in {
inherit domain;
};
};
storage = {
data = "postgresql";
blob = "postgresql";
fts = "postgresql";
lookup = "postgresql";
full-text = {
default-language = "en";
};
};
store = {
postgresql = {
# Specifies the database type, set to "postgresql" for PostgreSQL.
type = "postgresql";
# storage = {
# data = "postgresql";
# blob = "postgresql";
# fts = "postgresql";
# lookup = "postgresql";
# full-text = {
# default-language = "en";
# };
# };
# store = {
# postgresql = {
# # Specifies the database type, set to "postgresql" for PostgreSQL.
# type = "postgresql";
# The hostname or IP address of the PostgreSQL server.
host = "localhost";
# # The hostname or IP address of the PostgreSQL server.
# host = "localhost";
# Port PostgreSQL runs on. Defaults to 5432.
port = "5432";
# # Port PostgreSQL runs on. Defaults to 5432.
# port = "5432";
# Name of the database to connect to.
# TODO: add this to PostgreSQL.
database = "stalwart";
# # Name of the database to connect to.
# # TODO: add this to PostgreSQL.
# database = "stalwart";
# The username used for authentication with the PostgreSQL server.
# TODO: add this to PostgreSQL.
user = "stalwart";
# # The username used for authentication with the PostgreSQL server.
# # TODO: add this to PostgreSQL.
# user = "stalwart";
password = "";
# password = "";
# Enable TLS
tls.enable = true;
};
};
# # Enable TLS
# tls.enable = true;
# };
# };
};
};
services.nginx = {

View file

@ -38,6 +38,16 @@ in {
governor = "performance";
# Turbo boost setting: "always", "auto", or "never"
turbo = "auto";
# Enable or disable automatic turbo management (when turbo = "auto")
enable_auto_turbo = true;
# Custom thresholds for auto turbo management
turbo_auto_settings = {
load_threshold_high = 70.0;
load_threshold_low = 30.0;
temp_threshold_high = 75.0;
initial_turbo_state = false; # whether turbo should be initially enabled (false = disabled)
};
# Energy Performance Preference
epp = "performance";
# Energy Performance Bias (0-15 scale or named value)
@ -54,9 +64,24 @@ in {
battery = {
governor = "powersave";
turbo = "auto";
# More conservative auto turbo settings on battery
enable_auto_turbo = true;
turbo_auto_settings = {
load_threshold_high = 80.0;
load_threshold_low = 40.0;
temp_threshold_high = 70.0;
# start with turbo disabled on battery for power savings
initial_turbo_state = false;
};
epp = "power";
epb = "balance_power";
platform_profile = "low-power";
# Global battery charging thresholds (applied to both profiles unless overridden)
# Start charging at 40%, stop at 80% - extends battery lifespan
# take precedence over this global setting
battery_charge_thresholds = [40 90];
min_freq_mhz = 800;
max_freq_mhz = 2500;
};

View file

@ -51,6 +51,9 @@ in {
dates = ["21:00"];
};
# NOTE:
# Writes the settings to /etc/nix/nix.conf.
# See `man nix.conf` for more detailed descriptions of these settings.
settings = {
# Tell nix to use the xdg spec for base directories
# while transitioning, any state must be carried over
@ -69,7 +72,14 @@ in {
# Let the system decide the number of max jobs
# based on available system specs. Usually this is
# the same as the number of cores your CPU has.
max-jobs = 2;
max-jobs = "auto";
# This option defines the maximum number of concurrent tasks during one build.
# It affects, e.g., -j option for make. The special value 0 means that the builder
# should use all available CPU cores in the system. Some builds may become
# non-deterministic with this option; use with care!
# Packages will only be affected if enableParallelBuilding is set for them.
cores = 0;
# If set, Nix will perform builds in a sandboxed environment
# that it will set up automatically for each build.

View file

@ -1,34 +1,39 @@
# taken from raf
{
# Global nixpkgs configuration. This is ignored if nixpkgs.pkgs is set
# which is a case that should be avoided. Everything that is set to configure
# nixpkgs must go here.
# Global nixpkgs configuration.
# This is ignored if nixpkgs.pkgs is set, which should be avoided.
nixpkgs = {
# Configuration reference:
# <https://nixos.org/manual/nixpkgs/unstable/#chap-packageconfig>
config = {
# Disallow broken packages to be built. allowBroken = false;
# Disallow broken packages to be built.
allowBroken = false;
allowUnsupportedSystem = true;
# Warn when config contains an unrecognized attribute.
# This might be useful for getting a better configuration.
warnUndeclaredOptions = true;
# Allow unfree packages
allowUnfree = true;
# Default to none, add more as necessary. This is usually where
# electron packages go when they reach EOL.
permittedInsecurePackages = ["olm-3.2.16"];
# Permitted insecure packages in a system.
# Default to none, add more as necessary.
# Matrix also likes using deprecated libraries, which tend to go into this list.
# permittedInsecurePackages = [];
# Nixpkgs sets internal package aliases to ease migration from other
# distributions easier, or for convenience's sake. Even though the manual
# and the description for this option recommends this to be true, I prefer
# explicit naming conventions, i.e., no aliases.
# Whether to set enableParallelBuilding to true by default while
# building nixpkgs packages. Changing the default causes a mass rebuild.
enableParallelBuildingByDefault = false;
# Whether to expose old attribute names for compatibility.
# This improves backwards compatibility,
# which I could not care less about in my configuration.
allowAliases = false;
# List of derivation warnings to display while rebuilding.
# See: <https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/check-meta.nix>
# NOTE: "maintainerless" can be added to emit warnings
# about packages without maintainers but it seems to me
# like there are more packages without maintainers than
# with maintainers, so it's disabled for the time being.
showDerivationWarnings = [];
};
};

View file

@ -16,10 +16,8 @@ in {
# To be able to use this for a varying amount of monitors we do some nasty trickery.
# This was inspired by jacekpoz, whose configuration is linked in this project's README.md.
workspace =
# We're creating several lists of workspace assignments, one for each monitor,
# and have to merge them into one big list.
(flatten
# We then use imap0 insted of map because imap0 starts indexing at zero as oppsed to one with map.
(
# We use imap0 insted of map because imap0 starts indexing at zero as oppsed to one with map.
(imap0 (monitorIndex: monitorName: (
map (
i: let
@ -35,7 +33,11 @@ in {
(genList (i: i + 1 + (10 * monitorIndex)) 10)
))
# our attrSet of different monitors
(attrNames monitors)))
(attrNames monitors))
# We're creating several lists of workspace assignments, one for each monitor,
# and have to merge them into one big list.
|> flatten
)
# These are my two special workspaces
++ [
"special:nixos, decorate:false"

View file

@ -1,9 +1,9 @@
input {
keyboard {
xkb {
layout "us,de"
variant ",phonetic_winkeys,,dvorak"
options "grp:rctrl_rshift_toggle,caps:escape"
layout "us,ru"
variant "phonetic_winkeys,"
options "grp:rctrl_rshift_toggle,compose:104"
}
repeat-rate 60
repeat-delay 200
@ -68,8 +68,8 @@ layout {
}
}
// xwayland stuff
spawn-at-startup ", xwayland-satellite"
spawn-at-startup ", avizo-service"
spawn-at-startup "xwayland-satellite"
spawn-at-startup "avizo-service"
spawn-at-startup "keepassxc"
spawn-at-startup "startxfce4"
spawn-at-startup "quickshell"
@ -124,11 +124,14 @@ binds {
Mod+Shift+Slash {
show-hotkey-overlay
}
// Mod+Return {
// spawn "foot"
// }
Mod+Return {
spawn "foot"
spawn "ghostty"
}
Mod+D {
spawn "quickshell msg launcher open"
spawn "bash" "-c" "quickshell msg launcher open"
}
Mod+Alt+L {
spawn "swaylock"

View file

@ -8,11 +8,6 @@
inherit (lib.options) mkEnableOption;
cfg = config.modules.desktops.niri;
niri-config = {
};
toKDL = import ./toKDL.nix lib;
in {
options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor";
config = mkIf cfg.enable {
@ -26,5 +21,21 @@ in {
# set niri's config location to /etc/niri/config.kdl.
environment.etc."niri/config.kdl".source = ./config.kdl;
environment.systemPackages = builtins.attrValues {
inherit (pkgs) xwayland-satellite avizo;
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
config = {
common.default = ["*"];
hyprland.default = ["gtk"];
};
};
};
}

View file

@ -1,10 +1,9 @@
{
pkgs,
helix,
}: let
wrapped-helix = pkgs.callPackage ./helix {inherit helix;};
{pkgs}: let
inherit (pkgs) lib;
wrapped-helix = pkgs.callPackage ./helix {};
kakoune = pkgs.callPackage ./kakoune.nix {};
fish = pkgs.callPackage ./shell {};
fish = pkgs.callPackage ./shell {inherit lib;};
in {
inherit wrapped-helix kakoune fish;
inherit kakoune fish;
helix = wrapped-helix;
}

View file

@ -2,6 +2,8 @@
symlinkJoin,
makeWrapper,
callPackage,
fetchzip,
rustPlatform,
alejandra,
basedpyright,
bash-language-server,
@ -21,7 +23,6 @@
lazygit,
lib,
lldb_19,
nil,
nixd,
ruff,
rust-analyzer,
@ -40,6 +41,21 @@
}: let
inherit (lib.meta) getExe;
custom-helix = helix.overrideAttrs (_: rec {
version = "25.06.1";
src = fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${version}/helix-${version}-source.tar.xz";
hash = "sha256-941moaBUF+aGsbFapK1cp5+NFdecSfRCTdnVUtkDQps=";
stripRoot = false;
};
doInstallCheck = false;
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (custom-helix) src;
hash = "sha256-w07ZV1tR3lzYz4N+hI9alvFp0AHCcsItPRhVt9Sluo8=";
};
});
toml = formats.toml {};
helix-languages = callPackage ./languages.nix {inherit lib;};
@ -116,7 +132,7 @@
wrapped-helix = symlinkJoin {
name = "helix-wrapped";
paths = [
helix
custom-helix
# Bash
bash-language-server
@ -128,13 +144,15 @@
lldb_19
# Markdown
taplo
# Nix
nil
nixd
rust-analyzer
rustfmt
# Shell
shellcheck
kdlfmt
superhtml
# toml
taplo

View file

@ -1,22 +1,25 @@
{
fetchFromGitHub,
rustPlatform,
alejandra,
basedpyright,
bash-language-server,
clang-tools,
cmake-format,
cmake-language-server,
deadnix,
deno,
dprint,
formats,
gdb,
kdePackages,
lib,
nil,
ruff,
shfmt,
kdePackages,
simple-completion-language-server,
typescript-language-server,
vscode-langservers-extracted,
simple-completion-language-server,
zls,
...
}: let
@ -24,6 +27,22 @@
toml = formats.toml {};
# a newer nil version, for pipes support.
newer-nil = nil.overrideAttrs (_: {
version = "unstable-02-06-2025";
src = fetchFromGitHub {
owner = "oxalica";
repo = "nil";
rev = "577d160da311cc7f5042038456a0713e9863d09e";
hash = "sha256-ggXU3RHv6NgWw+vc+HO4/9n0GPufhTIUjVuLci8Za8c=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (newer-nil) src;
hash = "sha256-uZsLlFU9GKLvFllF7Kf5Q7HfN26KQojf4rvOb9p7Rjs=";
};
});
helix-languages = {
language = let
mark = lang: {
@ -186,10 +205,13 @@
};
nil = {
command = getExe nil;
command = getExe newer-nil;
# alejandro
config.nil.formatting.command = ["${getExe alejandra}" "-q"];
};
deadnix = {
command = getExe deadnix;
};
scls = {
command = getExe simple-completion-language-server;

View file

@ -1,33 +1,42 @@
# This shell setup was inspired by sioodmy. Check out his setup!
# This shell setup was originally inspired by sioodmy.
# Some further cool tricks, like using vendor_conf.d to avoid having
# to build fish myself, are taken from viperml's setup.
{pkgs, ...}: let
inherit (pkgs) lib;
inherit (lib.strings) concatStringsSep;
inherit (lib.attrsets) mapAttrsToList;
toml = pkgs.formats.toml {};
starship-config = import ./starship.nix;
aliases = import ./aliases.nix {inherit pkgs;};
vendorConf = "share/fish/vendor_conf.d";
fishinit = import ./fishinit.nix {inherit pkgs aliasesStr;};
fishinit = import ./fishinit.nix {
inherit
pkgs
aliasesStr
vendorConf
;
};
aliasesStr =
pkgs.lib.concatStringsSep "\n"
(pkgs.lib.mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases);
packages = import ./packages.nix pkgs;
mapAttrsToList (k: v: "alias ${k}=\"${v}\"") aliases
|> concatStringsSep "\n";
# this was taken from viperml, check out his config for this!
custom-fish = pkgs.fish.overrideAttrs (old: {
patches = [./fish-on-tmpfs.patch];
doCheck = false;
postInstall =
old.postInstall
+ ''
echo "source ${fishinit}" >> $out/etc/fish/config.fish
'';
});
packages = import ./packages.nix pkgs;
in
(pkgs.symlinkJoin {
name = "fish";
paths = [custom-fish] ++ packages;
paths = [pkgs.fish] ++ packages;
nativeBuildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/fish --set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
wrapProgram $out/bin/fish \
--set STARSHIP_CONFIG "${toml.generate "starship.toml" starship-config}" \
--prefix XDG_DATA_DIRS : "${
lib.makeSearchPathOutput "out" "share" [
fishinit
]
}"
'';
})
.overrideAttrs (_: {

View file

@ -1,10 +0,0 @@
--- a/src/path.rs
+++ b/src/path.rs
@@ -781,7 +781,7 @@ fn get_cache_directory() -> &'static BaseDirectory {
fn get_config_directory() -> &'static BaseDirectory {
static DIR: Lazy<BaseDirectory> =
- Lazy::new(|| make_base_directory(L!("XDG_CONFIG_HOME"), L!("/.config/fish")));
+ Lazy::new(|| make_base_directory(L!("XDG_RUNTIME_DIR"), L!("/.config/fish")));
&DIR
}

View file

@ -1,9 +1,11 @@
{
pkgs,
aliasesStr,
vendorConf,
}:
pkgs.writeText "config.fish" ''
pkgs.writeTextDir "${vendorConf}/blox_config.fish"
# fish
''
# source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh
${pkgs.atuin}/bin/atuin init fish | source
${pkgs.zoxide}/bin/zoxide init fish | source
@ -11,6 +13,10 @@ pkgs.writeText "config.fish" ''
${pkgs.direnv}/bin/direnv hook fish | source
${pkgs.pay-respects}/bin/pay-respects fish --alias f --nocnf | source
# I need to source /etc/profile using foreign-env, to get stuff set by nixos, e.g. environment.systemVariables.
# set -p fish_function_path ${pkgs.fishPlugins.foreign-env}/share/fish/vendor_functions.d
# fenv source /etc/profile
source ${./config.fish}