Compare commits
1
Commits
master
..
6b2bc536f7
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b2bc536f7 |
No files matched your search
Generated
+31
-16
@@ -28,11 +28,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1795827905,
|
"lastModified": 1794278858,
|
||||||
"narHash": "sha256-Udjs2j0EkvK+qGXKHRIQwXWRgzNBIl4oXSUktuOzbmQ=",
|
"narHash": "sha256-rkrJwLgLSHBnXfgoSKIDa+2LLGdTqynsV3GAxOTGhUU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "5f5abf5eb8de62d954232f3797b5bf4505656b91",
|
"rev": "82ce401aa350502897c3f2e85f384d61cd3b0b6d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -43,11 +43,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1795761588,
|
"lastModified": 1794192123,
|
||||||
"narHash": "sha256-lyvlcjA/bJySrgwKiEoIYFNkDJM6aOck6/9gGRm9He4=",
|
"narHash": "sha256-SvB8u5qaJAOwZZyZciqTVOg/rBoUs2w0sFTU6ED51AQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "78cc855faf4382e44b781c23bf9f456b924ef0e2",
|
"rev": "177d0540942fb205af6993b1d5fa0b57799e09f8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -77,16 +77,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"systems": [
|
"systems": "systems"
|
||||||
"systems"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1794943345,
|
"lastModified": 1794408140,
|
||||||
"narHash": "sha256-1d33ym1V/UxX9pcNbrpG0/P8riFHE8VuVAc3T8WN52I=",
|
"narHash": "sha256-vS4BTt6CkLn2BLcYA7kZUxFNnZpPgW0GJ73s/VoPhWc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "b67578f451bd779e79ec42f8153a403421a4b266",
|
"rev": "44849d3d24b28d59fa963bd832ec59c60c56a34c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -101,7 +99,7 @@
|
|||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"systems": "systems"
|
"systems": "systems_2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"sops-nix": {
|
"sops-nix": {
|
||||||
@@ -111,11 +109,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1795471345,
|
"lastModified": 1794261845,
|
||||||
"narHash": "sha256-2p8/wnENYHU2Z79Ir/rpq+V1sMI9mSD6xGAlvlbVBUY=",
|
"narHash": "sha256-Ivif/kuD68yEOKcZZG3zSwNMFUuIgzUgeJuzcHrQy+8=",
|
||||||
"owner": "mic92",
|
"owner": "mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "d5abe5e53200ad48254e8e6bd95e6cef94e66577",
|
"rev": "fe7b4228405aeac2ce7192c2049a6e2bc8637082",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -125,6 +123,23 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"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=",
|
||||||
|
|||||||
@@ -16,10 +16,7 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixvim = {
|
nixvim.url = "github:nix-community/nixvim";
|
||||||
url = "github:nix-community/nixvim";
|
|
||||||
inputs.systems.follows = "systems";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
|
|||||||
+2
-22
@@ -1,22 +1,10 @@
|
|||||||
{
|
|
||||||
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
|
||||||
./fish.nix
|
|
||||||
./firefox.nix
|
./firefox.nix
|
||||||
|
./fish.nix
|
||||||
./nixvim.nix
|
./nixvim.nix
|
||||||
./niri
|
./hyprland.nix
|
||||||
./kitty.nix
|
./kitty.nix
|
||||||
./rofi
|
./rofi
|
||||||
];
|
];
|
||||||
@@ -27,12 +15,4 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
+3
-2
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
programs.firefox = {
|
config = lib.mkIf config.nix-leonhard.graphical {
|
||||||
enable = config.nix-leonhard.graphical.enable;
|
programs.firefox.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
+3
-3
@@ -1,11 +1,13 @@
|
|||||||
{
|
{
|
||||||
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;
|
||||||
@@ -15,8 +17,6 @@
|
|||||||
keybindings = {
|
keybindings = {
|
||||||
"ctrl+alt+enter" = "launch --cwd=current";
|
"ctrl+alt+enter" = "launch --cwd=current";
|
||||||
};
|
};
|
||||||
settings = {
|
|
||||||
hide_window_decorations = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,384 +0,0 @@
|
|||||||
// 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; }
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
+3
-6
@@ -6,12 +6,9 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
home.packages = lib.mkIf config.nix-leonhard.neovim.enable [
|
options.nix-leonhard.neovim.enable = lib.mkEnableOption "neovim";
|
||||||
self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = lib.mkIf config.nix-leonhard.neovim.enable {
|
config = lib.mkIf config.nix-leonhard.neovim.enable {
|
||||||
EDITOR = "nvim";
|
home.packages = [ self.packages.${pkgs.system}.nixvim ];
|
||||||
VISUAL = "nvim";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
{
|
{
|
||||||
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 = [
|
||||||
@@ -38,4 +40,5 @@
|
|||||||
kb-mode-complete = "Control+o";
|
kb-mode-complete = "Control+o";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
+3
-6
@@ -14,20 +14,17 @@ 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;
|
home-manager.users.leonhard = ../home/default.nix;
|
||||||
home-manager.extraSpecialArgs = specialArgs;
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
desktop = mkNixosSystem [ ./desktop ];
|
desktop = mkNixosSystem [ ./desktop ];
|
||||||
server = mkNixosSystem [
|
server = mkNixosSystem [ ./server ];
|
||||||
./server
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
@@ -3,8 +3,23 @@
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix-leonhard.graphical.enable = true;
|
# Enable CUPS to print documents.
|
||||||
nix-leonhard.neovim.enable = true;
|
#services.printing.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 = {
|
||||||
|
|||||||
@@ -1,25 +1,17 @@
|
|||||||
{
|
{
|
||||||
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 = [ "kvm-amd" ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
@@ -36,8 +28,17 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
virtualisation.hypervGuest.enable = true;
|
||||||
}
|
}
|
||||||
@@ -12,21 +12,15 @@
|
|||||||
./vaultwarden.nix
|
./vaultwarden.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
options.nix-leonhard = with lib.types; {
|
options.nix-leonhard.domain =
|
||||||
domain = lib.mkOption {
|
with lib.types;
|
||||||
|
lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "";
|
default = "";
|
||||||
description = "Domain of the device.";
|
description = "Domain of the device.";
|
||||||
};
|
};
|
||||||
publicKeys = lib.mkOption {
|
|
||||||
type = listOf str;
|
|
||||||
default = [ ];
|
|
||||||
description = "Public keys for ssh login.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
nix-leonhard.graphical = false;
|
||||||
nix-leonhard.neovim.enable = true;
|
|
||||||
|
|
||||||
users.users.leonhard = {
|
users.users.leonhard = {
|
||||||
initialPassword = "leonhard";
|
initialPassword = "leonhard";
|
||||||
@@ -84,5 +78,4 @@
|
|||||||
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -11,6 +11,7 @@ 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";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+6
-3
@@ -3,8 +3,11 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
options.nix-leonhard = {
|
options.nix-leonhard = with lib.types; {
|
||||||
graphical.enable = lib.mkEnableOption "GUI features and programs";
|
graphical = lib.mkOption {
|
||||||
neovim.enable = lib.mkEnableOption "neovim";
|
type = bool;
|
||||||
|
default = true;
|
||||||
|
description = "Whether to enable GUI features and programs.";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./blink.nix
|
./blink.nix
|
||||||
@@ -7,10 +8,10 @@
|
|||||||
./treesitter.nix
|
./treesitter.nix
|
||||||
./telescope.nix
|
./telescope.nix
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
|
./which-key.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
plugins = {
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
sleuth.enable = true;
|
vim-sleuth
|
||||||
which-key.enable = true;
|
];
|
||||||
};
|
|
||||||
}
|
}
|
||||||
@@ -2,40 +2,11 @@
|
|||||||
{
|
{
|
||||||
plugins.treesitter = {
|
plugins.treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nixGrammars = false;
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
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; [
|
extraPackages = with pkgs; [
|
||||||
gcc
|
gcc
|
||||||
tree-sitter
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
plugins.which-key.enable = true;
|
||||||
|
}
|
||||||
@@ -23,4 +23,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
|
home.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,9 @@ homeManagerConfiguration {
|
|||||||
modules = [
|
modules = [
|
||||||
./base.nix
|
./base.nix
|
||||||
../home
|
../home
|
||||||
|
../options.nix
|
||||||
{
|
{
|
||||||
|
nix-leonhard.graphical = false;
|
||||||
nix-leonhard.neovim.enable = true;
|
nix-leonhard.neovim.enable = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
+3
-8
@@ -4,26 +4,21 @@
|
|||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../options.nix
|
|
||||||
|
|
||||||
./fish.nix
|
./fish.nix
|
||||||
./niri.nix
|
./hyprland.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";
|
||||||
|
|
||||||
@@ -43,5 +38,5 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = "26.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
config = lib.mkIf config.nix-leonhard.graphical {
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
+3
-3
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
services.displayManager.ly = {
|
config = lib.mkIf config.nix-leonhard.graphical {
|
||||||
enable = config.nix-leonhard.graphical.enable;
|
services.displayManager.ly.enable = true;
|
||||||
settings.session_log = ".cache/ly-lession.log";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.niri.enable = config.nix-leonhard.graphical.enable;
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user