Compare commits

...
21 Commits
Author SHA1 Message Date
leonhard ecbc53eeb5 chore: update flake 2026-11-29 18:15:28 +01:00
leonhard a7def16994 feat: swap zen-browser for firefox and update flake dependency following 2026-11-28 15:52:14 +01:00
leonhard 394f62c245 feat: configure niri + cursor pack 2026-11-23 14:03:25 +01:00
leonhard a0205f5e61 feat: swap firefox for zen-browser 2026-11-23 11:50:51 +01:00
leonhard 2aa6ef5688 chore: update flake 2026-11-23 11:17:34 +01:00
leonhard 0342d7da83 fix: change location of session log file to cache 2026-11-23 11:16:40 +01:00
leonhard 690766ac3f refactor: simplify options 2026-11-23 11:16:00 +01:00
leonhard 216f2cca81 feat: edit host settings for desktop 2026-11-22 15:04:23 +01:00
leonhard 5b75d9194f feat: add niri window manager 2026-11-22 12:26:45 +01:00
leonhard ae280f10b8 refactor: inline config values and remove hyprland 2026-11-19 22:44:20 +01:00
leonhard 82a6ecf8b3 fix: fix wrong option attributes 2026-11-18 15:27:43 +01:00
leonhard 1e725369b8 chore: update flake 2026-11-18 15:14:17 +01:00
leonhard 6091a6ee5c feat: allow unfree packages on user level (e. g. nix-shell) 2026-11-18 15:13:21 +01:00
leonhard 371b13e8b5 refactor: remove unused binding 2026-11-13 19:53:44 +01:00
leonhard 41da0762f2 feat: update stateVersion 2026-11-13 19:32:30 +01:00
leonhard 6c5a1371d7 feat(neovim): disable folding 2026-11-13 18:56:26 +01:00
leonhard 1472cfa6d1 feat(neovim): make treesitter auto_install work 2026-11-13 18:28:35 +01:00
leonhard 3fce314c34 fix(neovim): install sleuth with nixvim option instead of vimPlugins + remove which-key oneliner file 2026-11-13 18:28:15 +01:00
leonhard 1129b35f8c fix: tweak options 2026-11-13 16:18:32 +01:00
leonhard cad486346a fix: fix all the missed errors again 2026-11-13 14:33:33 +01:00
leonhard cf6f3772ab fix: fix all the missed errors 2026-11-12 14:46:53 +01:00
37 changed files with 838 additions and 495 deletions

No files matched your search

Generated
+16 -31
View File
@@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1794278858, "lastModified": 1795827905,
"narHash": "sha256-rkrJwLgLSHBnXfgoSKIDa+2LLGdTqynsV3GAxOTGhUU=", "narHash": "sha256-Udjs2j0EkvK+qGXKHRIQwXWRgzNBIl4oXSUktuOzbmQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "82ce401aa350502897c3f2e85f384d61cd3b0b6d", "rev": "5f5abf5eb8de62d954232f3797b5bf4505656b91",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -43,11 +43,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1794192123, "lastModified": 1795761588,
"narHash": "sha256-SvB8u5qaJAOwZZyZciqTVOg/rBoUs2w0sFTU6ED51AQ=", "narHash": "sha256-lyvlcjA/bJySrgwKiEoIYFNkDJM6aOck6/9gGRm9He4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "177d0540942fb205af6993b1d5fa0b57799e09f8", "rev": "78cc855faf4382e44b781c23bf9f456b924ef0e2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -77,14 +77,16 @@
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"systems": "systems" "systems": [
"systems"
]
}, },
"locked": { "locked": {
"lastModified": 1794408140, "lastModified": 1794943345,
"narHash": "sha256-vS4BTt6CkLn2BLcYA7kZUxFNnZpPgW0GJ73s/VoPhWc=", "narHash": "sha256-1d33ym1V/UxX9pcNbrpG0/P8riFHE8VuVAc3T8WN52I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "44849d3d24b28d59fa963bd832ec59c60c56a34c", "rev": "b67578f451bd779e79ec42f8153a403421a4b266",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -99,7 +101,7 @@
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixvim": "nixvim", "nixvim": "nixvim",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"systems": "systems_2" "systems": "systems"
} }
}, },
"sops-nix": { "sops-nix": {
@@ -109,11 +111,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1794261845, "lastModified": 1795471345,
"narHash": "sha256-Ivif/kuD68yEOKcZZG3zSwNMFUuIgzUgeJuzcHrQy+8=", "narHash": "sha256-2p8/wnENYHU2Z79Ir/rpq+V1sMI9mSD6xGAlvlbVBUY=",
"owner": "mic92", "owner": "mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "fe7b4228405aeac2ce7192c2049a6e2bc8637082", "rev": "d5abe5e53200ad48254e8e6bd95e6cef94e66577",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -123,23 +125,6 @@
} }
}, },
"systems": { "systems": {
"flake": false,
"locked": {
"lastModified": 1791244623,
"narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=",
"owner": "nix-systems",
"repo": "default",
"rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b",
"type": "github"
},
"original": {
"owner": "nix-systems",
"ref": "future-26.11",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": { "locked": {
"lastModified": 1791244623, "lastModified": 1791244623,
"narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=", "narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=",
+14 -2
View File
@@ -16,7 +16,10 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nixvim.url = "github:nix-community/nixvim"; nixvim = {
url = "github:nix-community/nixvim";
inputs.systems.follows = "systems";
};
}; };
outputs = outputs =
@@ -40,7 +43,16 @@
{ {
nixosConfigurations = import ./hosts { inherit self inputs; }; nixosConfigurations = import ./hosts { inherit self inputs; };
homeConfigurations = import ./standalone { inherit self inputs; }; # i. e. homeConfigurations.leonhard@x86_64-linux etc.
homeConfigurations = builtins.listToAttrs (
map (system: {
name = "leonhard@${system}";
value = import ./standalone {
pkgs = pkgsFor system;
inherit self inputs;
};
}) (import systems)
);
packages = forAllSystems ( packages = forAllSystems (
system: system:
+22 -2
View File
@@ -1,10 +1,22 @@
{
lib,
config,
osConfig ? null,
...
}:
let
mkDefaultSharedAttrs =
base: defaults: lib.mapAttrs (_: v: lib.mkDefault v) (lib.filterAttrs (k: _: base ? ${k}) defaults);
in
{ {
imports = [ imports = [
../options.nix
./git.nix ./git.nix
./firefox.nix
./fish.nix ./fish.nix
./firefox.nix
./nixvim.nix ./nixvim.nix
./hyprland.nix ./niri
./kitty.nix ./kitty.nix
./rofi ./rofi
]; ];
@@ -15,4 +27,12 @@
}; };
xdg.enable = true; xdg.enable = true;
xdg.configFile."nixpkgs/config.nix".text = "{ allowUnfree = true; }";
nix-leonhard = lib.mkIf (osConfig != null) (
mkDefaultSharedAttrs config.nix-leonhard (osConfig.nix-leonhard or { })
);
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "26.11";
} }
+2 -3
View File
@@ -1,10 +1,9 @@
{ {
config, config,
lib,
... ...
}: }:
{ {
config = lib.mkIf config.nix-leonhard.graphical { programs.firefox = {
programs.firefox.enable = true; enable = config.nix-leonhard.graphical.enable;
}; };
} }
-90
View File
@@ -1,90 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.nix-leonhard.graphical {
home.packages = with pkgs; [ nordzy-cursor-theme ];
programs.waybar.enable = true;
wayland.windowManager.hyprland =
let
# workspaces
# binds $mod/alt + [shift +] {1..9} to [move to] workspace {1..9}
workspaces = builtins.concatLists (
builtins.genList (
i:
let
ws = toString (i + 1);
in
[
"$mod,${ws},workspace,${ws}"
"ALT,${ws},workspace,${ws}"
"$mod SHIFT,${ws},movetoworkspace,${ws}"
"ALTSHIFT,${ws},movetoworkspace,${ws}"
]
) 9
);
in
{
enable = true;
package = pkgs.hyprland;
xwayland.enable = true;
settings = {
env = [
"HYPRCURSOR_THEME,Nordzy-cursors"
"HYPRCURSOR_SIZE,26"
];
monitor = [
",1920x1080@60,0x0,1"
];
"$mod" = "SUPER";
"$launcher" = "rofi -show drun";
bindr = [
"$mod,Super_L,exec,pkill rofi || $launcher"
];
bind = [
"ALTSHIFT,Q,killactive,"
"ALT,V,togglefloating,"
"ALT,F,fullscreen,1"
"ALTSHIFT,F,fullscreen,0"
"$mod,Return,exec,kitty"
"$mod,F,exec,firefox"
"ALT,H,movefocus,l"
"ALT,L,movefocus,r"
"ALT,K,movefocus,u"
"ALT,J,movefocus,d"
"ALTSHIFT,H,movewindow,l"
"ALTSHIFT,L,movewindow,r"
"ALTSHIFT,K,movewindow,u"
"ALTSHIFT,J,movewindow,d"
]
++ workspaces;
windowrule = "border_size 0, match:fullscreen_state_client 1";
general = {
gaps_in = 2;
gaps_out = 2;
"col.active_border" = "0xff888888";
};
animations.animation = [
"windows,1,4,default"
"border,1,5,default"
"fadeIn,1,5,default"
"workspaces,1,3,default"
];
dwindle.force_split = 2;
cursor.no_warps = true;
};
};
};
}
+13 -13
View File
@@ -1,22 +1,22 @@
{ {
config, config,
lib,
pkgs, pkgs,
... ...
}: }:
{ {
config = lib.mkIf config.nix-leonhard.graphical { programs.kitty = {
programs.kitty = { enable = config.nix-leonhard.graphical.enable;
enable = true; themeFile = "tokyo_night_night";
themeFile = "tokyo_night_night"; font = {
font = { package = pkgs.nerd-fonts.jetbrains-mono;
package = pkgs.nerd-fonts.jetbrains-mono; name = "JetBrainsMono NF";
name = "JetBrainsMono NF"; size = 14;
size = 14; };
}; keybindings = {
keybindings = { "ctrl+alt+enter" = "launch --cwd=current";
"ctrl+alt+enter" = "launch --cwd=current"; };
}; settings = {
hide_window_decorations = true;
}; };
}; };
} }
+384
View File
@@ -0,0 +1,384 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://niri-wm.github.io/niri/Configuration:-Introduction
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
// layout "us,ru"
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
// If this section is empty, niri will fetch xkb settings
// from org.freedesktop.locale1. You can control these using
// localectl set-x11-keymap.
}
// Enable numlock on startup, omitting this setting disables it.
numlock
}
}
output "DP-2" {
mode "1920x1080@199.997"
focus-at-startup
}
cursor {
xcursor-theme "Nordzy-cursors"
xcursor-size 16
hide-when-typing
}
gestures {
hot-corners {
off
}
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 5
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Ctrl+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
focus-ring {
// How many logical pixels the ring extends out from the windows.
width 2
// Color of the ring on the active monitor.
active-color "#7fc8ff"
// Color of the ring on inactive monitors.
//
// The focus ring only draws around the active window, so the only place
// where you can see its inactive-color is on other monitors.
inactive-color "#505050"
}
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
// See the binds section below for more spawn examples.
// This line starts waybar, a commonly used bar for Wayland compositors.
spawn-at-startup "waybar"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
hotkey-overlay {
skip-at-startup
}
prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://niri-wm.github.io/niri/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Super+Return hotkey-overlay-title="Open a Terminal: kitty" repeat=false { spawn "kitty"; }
Super+R hotkey-overlay-title="Open Launcher: rofi" { spawn-sh "pkill rofi || exec rofi -show drun"; }
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
// Using spawn-sh allows to pass multiple arguments together with the command.
// "-l 1.0" limits the volume to 100%.
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
// Example media keys mapping using playerctl.
// This will work with any MPRIS-enabled media player.
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
// Example brightness key mappings for brightnessctl.
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
// but you need to manually put each argument in separate "" quotes.
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
// Open/close the Overview: a zoomed-out view of workspaces and windows.
// You can also move the mouse into the top-left hot corner,
// or do a four-finger swipe up on a touchpad.
Mod+O repeat=false { toggle-overview; }
Mod+Q repeat=false { close-window; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
// Expel the bottom window from the focused column to the right.
Mod+Period { expel-window-from-column; }
// Cycle through widths set in preset-column-widths.
// Mod+R { switch-preset-column-width; }
// Cycling through the presets in reverse order is also possible.
// Mod+Shift+R { switch-preset-column-width-back; }
// Mod+Ctrl+Shift+R { switch-preset-window-height; }
// Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
// While maximize-column leaves gaps and borders around the window,
// maximize-window-to-edges doesn't: the window expands to the edges of the screen.
// This bind corresponds to normal window maximizing,
// e.g. by double-clicking on the titlebar.
Mod+M { maximize-window-to-edges; }
// Expand the focused column to space not taken up by other fully visible columns.
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
// Center all fully visible columns on screen.
Mod+Ctrl+C { center-visible-columns; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout.
Mod+V { toggle-window-floating; }
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other.
Mod+W { toggle-column-tabbed-display; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot; }
Ctrl+Print { screenshot-screen; }
Alt+Print { screenshot-window; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine.
// It's a good idea to bind an escape hatch to toggle the inhibitor,
// so a buggy application can't hold your session hostage.
//
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
}
+37
View File
@@ -0,0 +1,37 @@
{
config,
lib,
pkgs,
...
}:
{
config = lib.mkIf config.nix-leonhard.graphical.enable {
home.packages = [
(pkgs.stdenvNoCC.mkDerivation rec {
pname = "nordzy-cursors-default";
version = "2.4.0";
src = pkgs.fetchzip {
url = "https://github.com/guillaumeboehm/Nordzy-cursors/releases/download/v${version}/Nordzy-cursors.tar.gz";
hash = "sha256-9fVkYSU9twZoTgeRE/XSDP4Q/tQ6Ar+NnJ7jCxV16lw=";
stripRoot = false;
};
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/icons
cp -r Nordzy-cursors $out/share/icons
runHook postInstall
'';
})
];
xdg.configFile."niri/config.kdl".source = ./config.kdl;
wayland.windowManager.niri = {
enable = true;
};
};
}
+7 -3
View File
@@ -1,13 +1,17 @@
{ {
config, config,
lib, lib,
pkgs,
self, self,
... ...
}: }:
{ {
options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim"; home.packages = lib.mkIf config.nix-leonhard.neovim.enable [
self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim
];
config = lib.mkIf config.nix-leonhard.neovim.enable { home.sessionVariables = lib.mkIf config.nix-leonhard.neovim.enable {
home.packages = [ self.packages.nixvim ]; EDITOR = "nvim";
VISUAL = "nvim";
}; };
} }
+31 -34
View File
@@ -1,44 +1,41 @@
{ {
config, config,
lib,
... ...
}: }:
{ {
config = lib.mkIf config.nix-leonhard.graphical { programs.rofi = {
programs.rofi = { enable = config.nix-leonhard.graphical.enable;
enable = true; theme = ./tokyonight.rasi;
theme = ./tokyonight.rasi; settings = {
settings = { modi = [
modi = [ "drun"
"drun" "window"
"window" "run"
"run" ];
]; font = "JetBrainsMono Nerd Font 11";
font = "JetBrainsMono Nerd Font 11"; icon-theme = "Papirus-Dark";
icon-theme = "Papirus-Dark"; show-icons = true;
show-icons = true; terminal = "kitty";
terminal = "kitty"; drun-display-format = "{icon} {name}";
drun-display-format = "{icon} {name}"; location = 0;
location = 0; disable-history = false;
disable-history = false; sidebar-mode = false;
sidebar-mode = false; display-drun = " ";
display-drun = " "; display-run = " ";
display-run = " "; display-window = " ";
display-window = " ";
kb-row-up = "Up,Control+k"; kb-row-up = "Up,Control+k";
kb-row-left = "Left,Control+h"; kb-row-left = "Left,Control+h";
kb-row-right = "Right,Control+l"; kb-row-right = "Right,Control+l";
kb-row-down = "Down,Control+j"; kb-row-down = "Down,Control+j";
kb-accept-entry = "Return"; kb-accept-entry = "Return";
# remove clashing keybinds # remove clashing keybinds
kb-remove-to-eol = ""; kb-remove-to-eol = "";
kb-move-char-back = "Control+b"; kb-move-char-back = "Control+b";
kb-remove-char-back = "BackSpace"; kb-remove-char-back = "BackSpace";
kb-move-char-forward = "Control+f"; kb-move-char-forward = "Control+f";
kb-mode-complete = "Control+o"; kb-mode-complete = "Control+o";
};
}; };
}; };
} }
+6 -3
View File
@@ -14,17 +14,20 @@ let
inherit specialArgs; inherit specialArgs;
modules = modules ++ [ modules = modules ++ [
../system ../system
../options.nix
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.leonhard = ../home/default.nix; home-manager.users.leonhard = ../home;
home-manager.extraSpecialArgs = specialArgs;
} }
]; ];
}; };
in in
{ {
desktop = mkNixosSystem [ ./desktop ]; desktop = mkNixosSystem [ ./desktop ];
server = mkNixosSystem [ ./server ]; server = mkNixosSystem [
./server
inputs.sops-nix.nixosModules.sops
];
} }
+2 -17
View File
@@ -3,23 +3,8 @@
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# Enable CUPS to print documents. nix-leonhard.graphical.enable = true;
#services.printing.enable = true; nix-leonhard.neovim.enable = true;
# Enable firmware
#hardware.enableAllFirmware = true;
# Enable bluetooth
#hardware.bluetooth.enable = true;
# Enable sound with pipewire.
# security.rtkit.enable = true;
# services.pipewire = {
# enable = true;
# alsa.enable = true;
# alsa.support32Bit = true;
# pulse.enable = true;
# };
users.users = { users.users = {
leonhard = { leonhard = {
+13 -14
View File
@@ -1,17 +1,25 @@
{ {
config,
lib, lib,
pkgs,
modulesPath,
... ...
}: }:
{ {
imports = [ ]; imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod" "sd_mod"
"sr_mod"
]; ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
@@ -28,17 +36,8 @@
]; ];
}; };
swapDevices = [
{ device = "/dev/disk/by-label/swap"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
virtualisation.hypervGuest.enable = true; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }
+58 -51
View File
@@ -12,70 +12,77 @@
./vaultwarden.nix ./vaultwarden.nix
]; ];
options.nix-leonhard.domain = options.nix-leonhard = with lib.types; {
with lib.types; domain = lib.mkOption {
lib.mkOption {
type = str; type = str;
default = ""; default = "";
description = "Domain of the device."; description = "Domain of the device.";
}; };
publicKeys = lib.mkOption {
nix-leonhard.graphical = false; type = listOf str;
default = [ ];
users.users.leonhard = { description = "Public keys for ssh login.";
initialPassword = "leonhard"; };
isNormalUser = true;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
}; };
networking = { config = {
hostName = "server"; nix-leonhard.neovim.enable = true;
firewall.enable = false;
interfaces.eno1 = { users.users.leonhard = {
ipv4.addresses = [ initialPassword = "leonhard";
{ isNormalUser = true;
address = "192.168.178.210"; extraGroups = [ "wheel" ];
prefixLength = 24; openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
} };
networking = {
hostName = "server";
firewall.enable = false;
interfaces.eno1 = {
ipv4.addresses = [
{
address = "192.168.178.210";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "192.168.178.1";
interface = "eno1";
};
nameservers = [
"1.1.1.1"
"8.8.8.8"
]; ];
}; };
defaultGateway = {
address = "192.168.178.1"; services.openssh = {
interface = "eno1"; enable = true;
ports = [ 5432 ];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "no";
};
}; };
nameservers = [
"1.1.1.1"
"8.8.8.8"
];
};
services.openssh = { security.acme = {
enable = true; acceptTerms = true;
ports = [ 5432 ]; defaults.email = "admin@${config.nix-leonhard.domain}";
settings = { defaults.webroot = "/var/lib/acme/acme-challenge/";
PasswordAuthentication = false; certs.${config.nix-leonhard.domain} = {
KbdInteractiveAuthentication = false; group = config.services.nginx.group;
PermitRootLogin = "no"; };
}; };
};
security.acme = { services.nginx = {
acceptTerms = true; enable = true;
defaults.email = "admin@${config.nix-leonhard.domain}";
defaults.webroot = "/var/lib/acme/acme-challenge/";
certs.${config.nix-leonhard.domain} = {
group = config.services.nginx.group;
};
};
services.nginx = { virtualHosts.${config.nix-leonhard.domain} = {
enable = true; forceSSL = true;
useACMEHost = config.nix-leonhard.domain;
virtualHosts.${config.nix-leonhard.domain} = { locations."/.well-known/".root = config.security.acme.defaults.webroot;
forceSSL = true; };
useACMEHost = config.nix-leonhard.domain;
locations."/.well-known/".root = config.security.acme.defaults.webroot;
}; };
}; };
} }
-1
View File
@@ -11,7 +11,6 @@ in
enable = true; enable = true;
settings.server.ROOT_URL = "https://${gitDomain}"; settings.server.ROOT_URL = "https://${gitDomain}";
settings.server.SSH_PORT = builtins.elemAt config.services.openssh.ports 0; settings.server.SSH_PORT = builtins.elemAt config.services.openssh.ports 0;
settings.service.DISABLE_REGISTRATION = true;
settings.log.LEVEL = "Critical"; settings.log.LEVEL = "Critical";
}; };
+3 -6
View File
@@ -3,11 +3,8 @@
... ...
}: }:
{ {
options.nix-leonhard = with lib.types; { options.nix-leonhard = {
graphical = lib.mkOption { graphical.enable = lib.mkEnableOption "GUI features and programs";
type = bool; neovim.enable = lib.mkEnableOption "neovim";
default = true;
description = "Whether to enable GUI features and programs.";
};
}; };
} }
+5 -4
View File
@@ -4,8 +4,9 @@
... ...
}: }:
{ {
nixvim = inputs.nixvim.lib.buildNixvimWith { nixvim =
inherit (pkgs) system; (inputs.nixvim.lib.evalNixvim {
modules = [ ./nixvim ]; inherit (pkgs) system;
}; modules = [ ./nixvim ];
}).config.build.package;
} }
+5 -10
View File
@@ -5,17 +5,12 @@
./plugins ./plugins
]; ];
programs.nixvim = { viAlias = true;
enable = true; vimAlias = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
colorschemes.tokyonight.enable = true; colorschemes.tokyonight.enable = true;
clipboard.providers.wl-copy.enable = true; clipboard.providers.wl-copy.enable = true;
globals.mapleader = " "; globals.mapleader = " ";
};
} }
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.keymaps = [ keymaps = [
{ {
mode = "n"; mode = "n";
key = "<Esc>"; key = "<Esc>";
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.opts = { opts = {
number = true; number = true;
relativenumber = true; relativenumber = true;
showmode = false; showmode = false;
+13 -15
View File
@@ -1,19 +1,17 @@
{ {
programs.nixvim = { plugins = {
plugins = { blink-indent.enable = true;
blink-indent.enable = true; blink-pairs.enable = true;
blink-pairs.enable = true; blink-cmp = {
blink-cmp = { enable = true;
enable = true; settings = {
settings = { signature.enabled = true;
signature.enabled = true; keymap = {
keymap = { preset = "default";
preset = "default"; "<CR>" = [
"<CR>" = [ "accept"
"accept" "fallback"
"fallback" ];
];
};
}; };
}; };
}; };
+48 -50
View File
@@ -1,53 +1,51 @@
{ {
programs.nixvim = { plugins.dap = {
plugins.dap = { enable = true;
enable = true; luaConfig.content = ''
luaConfig.content = '' local dap = require 'dap'
local dap = require 'dap' local dapui = require 'dapui'
local dapui = require 'dapui' dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close '';
'';
};
plugins.dap-ui.enable = true;
plugins.dap-python.enable = true;
keymaps = [
{
mode = "n";
key = "<F5>";
action = "<cmd>DapContinue<CR>";
options.desc = "Debug: Start/Continue";
options.silent = true;
}
{
mode = "n";
key = "<F1>";
action = "<cmd>DapStepInto<CR>";
options.desc = "Debug: Step Into";
options.silent = true;
}
{
mode = "n";
key = "<F2>";
action = "<cmd>DapStepOver<CR>";
options.desc = "Debug: Step Over";
options.silent = true;
}
{
mode = "n";
key = "<F3>";
action = "<cmd>DapStepOut<CR>";
options.desc = "Debug: Step Out";
options.silent = true;
}
{
mode = "n";
key = "<leader>b";
action = "<cmd>DapToggleBreakpoint<CR>";
options.desc = "Debug: Toggle Breakpoint";
options.silent = true;
}
];
}; };
plugins.dap-ui.enable = true;
plugins.dap-python.enable = true;
keymaps = [
{
mode = "n";
key = "<F5>";
action = "<cmd>DapContinue<CR>";
options.desc = "Debug: Start/Continue";
options.silent = true;
}
{
mode = "n";
key = "<F1>";
action = "<cmd>DapStepInto<CR>";
options.desc = "Debug: Step Into";
options.silent = true;
}
{
mode = "n";
key = "<F2>";
action = "<cmd>DapStepOver<CR>";
options.desc = "Debug: Step Over";
options.silent = true;
}
{
mode = "n";
key = "<F3>";
action = "<cmd>DapStepOut<CR>";
options.desc = "Debug: Step Out";
options.silent = true;
}
{
mode = "n";
key = "<leader>b";
action = "<cmd>DapToggleBreakpoint<CR>";
options.desc = "Debug: Toggle Breakpoint";
options.silent = true;
}
];
} }
+3 -6
View File
@@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
imports = [ imports = [
./blink.nix ./blink.nix
@@ -8,12 +7,10 @@
./treesitter.nix ./treesitter.nix
./telescope.nix ./telescope.nix
./lualine.nix ./lualine.nix
./which-key.nix
]; ];
programs.nixvim = { plugins = {
extraPlugins = with pkgs.vimPlugins; [ sleuth.enable = true;
vim-sleuth which-key.enable = true;
];
}; };
} }
+35 -37
View File
@@ -1,45 +1,43 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.nixvim = { opts.formatexpr = "v:lua.require'conform'.formatexpr()";
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
keymaps = [ keymaps = [
{ {
key = "<leader>f"; key = "<leader>f";
action.__raw = '' action.__raw = ''
function() require 'conform'.format { async = true } end function() require 'conform'.format { async = true } end
''; '';
options.desc = "Format Buffer"; options.desc = "Format Buffer";
} }
]; ];
plugins.conform-nvim = { plugins.conform-nvim = {
enable = true; enable = true;
settings = { settings = {
default_format_opts.lsp_format = "fallback"; default_format_opts.lsp_format = "fallback";
format_on_save = { format_on_save = {
lsp_format = "fallback"; lsp_format = "fallback";
timeout_ms = 500; timeout_ms = 500;
};
formatters_by_ft = {
c = [ "clang-format" ];
lua = [ "stylua" ];
nix = [ "nixfmt" ];
python = [ "ruff_format" ];
};
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
}; };
};
extraPackages = with pkgs; [ formatters_by_ft = {
stylua c = [ "clang-format" ];
nixfmt lua = [ "stylua" ];
ruff nix = [ "nixfmt" ];
]; python = [ "ruff_format" ];
};
formatters.clang-format.prepend_args = [
"--style=file"
"--fallback-style=LLVM"
];
};
}; };
extraPackages = with pkgs; [
stylua
nixfmt
ruff
];
} }
+37 -39
View File
@@ -3,60 +3,58 @@
./typst.nix ./typst.nix
]; ];
programs.nixvim = { diagnostic.settings = {
diagnostic.settings = { severity_sort = true;
severity_sort = true; float = {
float = { border = "rounded";
border = "rounded"; source = "if_many";
source = "if_many"; };
}; signs.text.__raw = "{
signs.text.__raw = "{
[vim.diagnostic.severity.ERROR] = '󰅚 ', [vim.diagnostic.severity.ERROR] = '󰅚 ',
[vim.diagnostic.severity.WARN] = '󰀪 ', [vim.diagnostic.severity.WARN] = '󰀪 ',
[vim.diagnostic.severity.INFO] = '󰋽 ', [vim.diagnostic.severity.INFO] = '󰋽 ',
[vim.diagnostic.severity.HINT] = '󰌶 ', [vim.diagnostic.severity.HINT] = '󰌶 ',
}"; }";
virtual_text = { virtual_text = {
source = "if_many"; source = "if_many";
spacing = 2; spacing = 2;
format.__raw = " format.__raw = "
function(diagnostic) function(diagnostic)
return diagnostic.message return diagnostic.message
end end
"; ";
};
}; };
};
plugins = { plugins = {
lsp = { lsp = {
enable = true; enable = true;
keymaps = { keymaps = {
silent = true; silent = true;
lspBuf = { lspBuf = {
"gd" = "definition"; "gd" = "definition";
"gD" = "declaration"; "gD" = "declaration";
"gr" = "references"; "gr" = "references";
"gI" = "implementation"; "gI" = "implementation";
"<leader>ca" = "code_action"; "<leader>ca" = "code_action";
"<leader>D" = "type_definition"; "<leader>D" = "type_definition";
"<leader>rn" = "rename"; "<leader>rn" = "rename";
};
}; };
};
servers = { servers = {
lua_ls.enable = true; lua_ls.enable = true;
nil_ls.enable = true; nil_ls.enable = true;
basedpyright.enable = true; basedpyright.enable = true;
ts_ls.enable = true; ts_ls.enable = true;
vue_ls.enable = true; vue_ls.enable = true;
rust_analyzer = { rust_analyzer = {
enable = true; enable = true;
installCargo = false; installCargo = false;
installRustc = false; installRustc = false;
};
clangd.enable = true;
}; };
clangd.enable = true;
}; };
}; };
}; };
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
programs.nixvim.plugins.lualine = { plugins.lualine = {
enable = true; enable = true;
settings = { settings = {
options = { options = {
+4 -5
View File
@@ -1,10 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
home.packages = with pkgs; [ plugins.telescope = {
ripgrep
];
programs.nixvim.plugins.telescope = {
enable = true; enable = true;
extensions.fzf-native.enable = true; extensions.fzf-native.enable = true;
keymaps = { keymaps = {
@@ -43,4 +39,7 @@
"%.ipynb" "%.ipynb"
]; ];
}; };
extraPackages = with pkgs; [
ripgrep
];
} }
+37 -10
View File
@@ -1,14 +1,41 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.nixvim = { plugins.treesitter = {
plugins.treesitter = { enable = true;
enable = true; nixGrammars = false;
highlight.enable = true;
indent.enable = true;
};
extraPackages = with pkgs; [
gcc
];
}; };
extraConfigLua = ''
local function start(buf, lang)
if not vim.api.nvim_buf_is_valid(buf) then return end
if not pcall(vim.treesitter.start, buf, lang) then return end
-- indent (nvim-treesitter's indents.scm, experimental on main)
vim.bo[buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
-- folds (built into Neovim, uses folds.scm)
-- vim.api.nvim_buf_call(buf, function()
-- vim.wo[0][0].foldmethod = "expr"
-- vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
-- end)
end
vim.api.nvim_create_autocmd("FileType", {
callback = function(args)
local lang = vim.treesitter.language.get_lang(args.match)
if not lang then return end
local ts = require("nvim-treesitter")
if vim.tbl_contains(ts.get_installed(), lang) then
start(args.buf, lang)
elseif vim.tbl_contains(ts.get_available(), lang) then
ts.install(lang):await(function() start(args.buf, lang) end)
end
end,
})
'';
extraPackages = with pkgs; [
gcc
tree-sitter
];
} }
+4 -6
View File
@@ -1,10 +1,8 @@
{ {
programs.nixvim = { dependencies.tinymist.enable = true;
dependencies.tinymist.enable = true; dependencies.websocat.enable = true;
dependencies.websocat.enable = true;
plugins.typst-preview.enable = true; plugins.typst-preview.enable = true;
plugins.lsp.servers.tinymist.enable = true; plugins.lsp.servers.tinymist.enable = true;
};
} }
-3
View File
@@ -1,3 +0,0 @@
{
programs.nixvim.plugins.which-key.enable = true;
}
+3 -5
View File
@@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
inputs, inputs,
... ...
}: }:
@@ -10,6 +11,8 @@
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs; flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in in
{ {
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs; registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
@@ -17,12 +20,7 @@
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings.experimental-features = "nix-command flakes"; settings.experimental-features = "nix-command flakes";
channels.enable = false;
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
} }
+11 -15
View File
@@ -1,25 +1,21 @@
{ {
pkgs, pkgs,
self,
inputs, inputs,
... ...
}: }:
let let
inherit (inputs.home-manager.lib) homeManagerConfiguration; inherit (inputs.home-manager.lib) homeManagerConfiguration;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit self inputs; };
in in
{ homeManagerConfiguration {
leonhard = homeManagerConfiguration { inherit pkgs extraSpecialArgs;
inherit pkgs extraSpecialArgs; modules = [
modules = [ ./base.nix
./base.nix ../home
../home {
../options.nix nix-leonhard.neovim.enable = true;
{ }
nix-leonhard.graphical = false; ];
nix-leonhard.neovim.enable = true;
nix-leonhard.neovim.typst.enable = true;
}
];
};
} }
+8 -3
View File
@@ -4,21 +4,26 @@
}: }:
{ {
imports = [ imports = [
../options.nix
./fish.nix ./fish.nix
./hyprland.nix ./niri.nix
./ly.nix ./ly.nix
./nix.nix ./nix.nix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim
wget wget
]; ];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 10;
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
# Set your time zone. # Set your time zone.
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
@@ -38,5 +43,5 @@
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.11"; system.stateVersion = "26.11";
} }
-10
View File
@@ -1,10 +0,0 @@
{
config,
lib,
...
}:
{
config = lib.mkIf config.nix-leonhard.graphical {
programs.hyprland.enable = true;
};
}
+3 -3
View File
@@ -1,10 +1,10 @@
{ {
config, config,
lib,
... ...
}: }:
{ {
config = lib.mkIf config.nix-leonhard.graphical { services.displayManager.ly = {
services.displayManager.ly.enable = true; enable = config.nix-leonhard.graphical.enable;
settings.session_log = ".cache/ly-lession.log";
}; };
} }
+7
View File
@@ -0,0 +1,7 @@
{
config,
...
}:
{
programs.niri.enable = config.nix-leonhard.graphical.enable;
}
+4 -1
View File
@@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
inputs, inputs,
... ...
}: }:
@@ -10,6 +11,8 @@
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs; flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in in
{ {
package = pkgs.nix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs; registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
@@ -21,6 +24,6 @@
"flakes" "flakes"
]; ];
channels.enable = false; channel.enable = false;
}; };
} }