Compare commits
19 commits
2fd299eaf8
...
9770d0fe95
| Author | SHA1 | Date | |
|---|---|---|---|
| 9770d0fe95 | |||
| 1c0ed95ad8 | |||
| 7835fa3af0 | |||
| cbe7a4a6ad | |||
| 04407a5726 | |||
| 707cbcca9e | |||
| c6968d57dc | |||
| baa7a7eabb | |||
| e05684c279 | |||
| 5077fd6a2b | |||
| 4f0d0de4d6 | |||
| 1008e6035f | |||
| 39a5189c0d | |||
| 021a7dae5b | |||
| bf7928d3cc | |||
| d774279c50 | |||
| d3ce1b22c4 | |||
| 8cde6f4ea7 | |||
| 0e4408a3fd |
37 changed files with 1065 additions and 438 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -4,3 +4,5 @@
|
||||||
tmp/
|
tmp/
|
||||||
.direnv/
|
.direnv/
|
||||||
.pre-commit-config.yaml
|
.pre-commit-config.yaml
|
||||||
|
.aider*
|
||||||
|
.env
|
||||||
|
|
|
||||||
743
flake.lock
generated
743
flake.lock
generated
File diff suppressed because it is too large
Load diff
84
flake.nix
84
flake.nix
|
|
@ -5,25 +5,36 @@
|
||||||
# Nix
|
# Nix
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
devshell.url = "github:numtide/devshell";
|
devshell.url = "github:numtide/devshell";
|
||||||
|
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
|
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
master.url = "github:nixos/nixpkgs";
|
master.url = "github:nixos/nixpkgs";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
||||||
stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
|
||||||
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||||
|
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
|
|
||||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Programs
|
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
||||||
nix-super.url = "github:privatevoid-net/nix-super";
|
|
||||||
nix-monitored.url = "github:ners/nix-monitored";
|
nix-monitored.url = "github:ners/nix-monitored";
|
||||||
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
|
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
# Programs
|
||||||
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
||||||
|
|
||||||
# Neovim
|
# Neovim
|
||||||
|
|
@ -46,6 +57,10 @@
|
||||||
submodules = true;
|
submodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Niri
|
||||||
|
niri.url = "github:sodiboo/niri-flake";
|
||||||
|
niri.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# Laptop
|
# Laptop
|
||||||
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
|
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
|
||||||
asus-touchpad-numpad-driver.flake = false;
|
asus-touchpad-numpad-driver.flake = false;
|
||||||
|
|
@ -54,10 +69,9 @@
|
||||||
arkenfox-userjs.url = "github:arkenfox/user.js";
|
arkenfox-userjs.url = "github:arkenfox/user.js";
|
||||||
arkenfox-userjs.flake = false;
|
arkenfox-userjs.flake = false;
|
||||||
|
|
||||||
ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty";
|
search.url = "github:NuschtOS/search";
|
||||||
# ghostty.url = "/home/moritz/Documents/ghostty";
|
|
||||||
|
|
||||||
nixos-facter-modules.url = "github:numtide/nixos-facter-modules";
|
ghostty.url = "git+ssh://git@github.com/ghostty-org/ghostty";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{ self, flake-parts, ... }:
|
outputs = inputs@{ self, flake-parts, ... }:
|
||||||
|
|
@ -80,29 +94,6 @@
|
||||||
sudo EDITOR="${pkgs.lib.getExe pkgs.vim}" ${pkgs.lib.getExe' inputs'.agenix.packages.default "agenix"} --identity /etc/ssh/ssh_host_ed25519_key "$@"
|
sudo EDITOR="${pkgs.lib.getExe pkgs.vim}" ${pkgs.lib.getExe' inputs'.agenix.packages.default "agenix"} --identity /etc/ssh/ssh_host_ed25519_key "$@"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
{
|
|
||||||
name = "build";
|
|
||||||
help = "use nom to build system";
|
|
||||||
command =
|
|
||||||
''
|
|
||||||
nom build --no-link ".#nixosConfigurations.$(hostname).config.system.build.toplevel" $@
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "apply";
|
|
||||||
help = "wrapper for nixos-rebuild switch";
|
|
||||||
command = "sudo nixos-rebuild switch --flake . $@";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "test";
|
|
||||||
help = "wrapper for nixos-rebuild switch";
|
|
||||||
command = "sudo nixos-rebuild test --flake . $@";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "boot";
|
|
||||||
help = "wrapper for nixos-rebuild switch";
|
|
||||||
command = "sudo nixos-rebuild boot --flake . $@";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
name = "vim-startuptime";
|
name = "vim-startuptime";
|
||||||
help = "test vim startup time";
|
help = "test vim startup time";
|
||||||
|
|
@ -113,6 +104,7 @@
|
||||||
stylua
|
stylua
|
||||||
sumneko-lua-language-server
|
sumneko-lua-language-server
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
|
nh
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -129,7 +121,28 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
legacyPackages = pkgs;
|
legacyPackages = pkgs;
|
||||||
|
packages =
|
||||||
|
let
|
||||||
|
modules = [
|
||||||
|
{ name = "My stuff"; }
|
||||||
|
];
|
||||||
|
mkName = name: "${name} Search";
|
||||||
|
mkSearch = name: value: inputs'.search.packages.mkSearch {
|
||||||
|
urlPrefix = "file://${self}/flake.nix";
|
||||||
|
title = mkName name;
|
||||||
|
optionsJSON = "${(pkgs.nixosOptionsDoc { inherit (value) options; warningsAreErrors = false; }).optionsJSON}/share/doc/nixos/options.json";
|
||||||
|
};
|
||||||
|
serveSearch = name: value:
|
||||||
|
pkgs.writeShellApplication {
|
||||||
|
name = mkName name;
|
||||||
|
text = ''
|
||||||
|
xdg-open http://127.0.0.1:8080
|
||||||
|
static-web-server -p 8080 -d ${mkSearch name value}
|
||||||
|
'';
|
||||||
|
runtimeInputs = with pkgs; [ static-web-server xdg-utils ];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
pkgs.lib.mapAttrs serveSearch self.nixosConfigurations;
|
||||||
};
|
};
|
||||||
|
|
||||||
flake = {
|
flake = {
|
||||||
|
|
@ -161,6 +174,7 @@
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
inputs.nix-index-database.nixosModules.nix-index
|
inputs.nix-index-database.nixosModules.nix-index
|
||||||
inputs.nixos-facter-modules.nixosModules.facter
|
inputs.nixos-facter-modules.nixosModules.facter
|
||||||
|
inputs.niri.nixosModules.niri
|
||||||
path
|
path
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
|
|
@ -181,16 +195,18 @@
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = [
|
extra-substituters = [
|
||||||
"https://hyprland.cachix.org"
|
# "https://hyprland.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://pre-commit-hooks.cachix.org"
|
"https://pre-commit-hooks.cachix.org"
|
||||||
"https://ghostty.cachix.org"
|
# "https://ghostty.cachix.org"
|
||||||
|
"https://cache.lix.systems"
|
||||||
];
|
];
|
||||||
extra-trusted-public-keys = [
|
extra-trusted-public-keys = [
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
# "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
||||||
"ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
|
# "ghostty.cachix.org-1:QB389yTa6gTyneehvqG58y0WnHjQOqgnA+wBnpWWxns="
|
||||||
|
"cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@
|
||||||
facter.reportPath = ./facter.json;
|
facter.reportPath = ./facter.json;
|
||||||
|
|
||||||
my = {
|
my = {
|
||||||
|
ai.enable = true;
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
yubikey.luksSupport.enable = false;
|
yubikey.luksSupport.enable = false;
|
||||||
profiles = {
|
profiles = {
|
||||||
|
|
@ -20,12 +21,14 @@
|
||||||
webis.enable = true;
|
webis.enable = true;
|
||||||
impermanence.enable = true;
|
impermanence.enable = true;
|
||||||
};
|
};
|
||||||
terminal.package = pkgs.kitty;
|
|
||||||
programs.exercism.enable = true;
|
programs.exercism.enable = true;
|
||||||
services.mullvad.enable = true;
|
services.mullvad.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.moritz.packages = [ pkgs.poetry ];
|
users.users.moritz.packages = with pkgs; [
|
||||||
|
poetry
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.moritz.services.kanshi.settings = [
|
home-manager.users.moritz.services.kanshi.settings = [
|
||||||
{
|
{
|
||||||
|
|
@ -37,14 +40,14 @@
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
profile.name = "docked";
|
profile.name = "docked-scads";
|
||||||
profile.outputs = [
|
profile.outputs = [
|
||||||
{
|
{
|
||||||
criteria = "eDP-1";
|
criteria = "eDP-1";
|
||||||
position = "640,1800"; # NOTE: 2160 / 1.2 = 1800
|
position = "640,1800"; # NOTE: 2160 / 1.2 = 1800
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
criteria = "DP-3";
|
criteria = "Dell Inc. DELL S2721QS DWTC513";
|
||||||
scale = 1.2;
|
scale = 1.2;
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ with lib;
|
||||||
{
|
{
|
||||||
options.my.terminal = {
|
options.my.terminal = {
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
|
description = "Terminal emulator package to use. Gets converted to path of bin automatically.";
|
||||||
type = types.package;
|
type = types.package;
|
||||||
apply = lib.getExe;
|
apply = lib.getExe;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -35,9 +35,7 @@ in
|
||||||
font-size = "20";
|
font-size = "20";
|
||||||
font =
|
font =
|
||||||
let
|
let
|
||||||
fontBasePath = pkgs.nerdfonts.override {
|
fontBasePath = pkgs.nerd-fonts.fira-code;
|
||||||
fonts = [ "FiraCode" ];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
"${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
|
"${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
|
||||||
height = "360";
|
height = "360";
|
||||||
|
|
|
||||||
|
|
@ -255,9 +255,7 @@ in
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
packages = [
|
packages = [
|
||||||
(pkgs.nerdfonts.override {
|
pkgs.nerd-fonts.fira-code
|
||||||
fonts = [ "FiraCode" ];
|
|
||||||
})
|
|
||||||
pkgs.master.intel-one-mono
|
pkgs.master.intel-one-mono
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
@ -311,10 +309,4 @@ in
|
||||||
};
|
};
|
||||||
xdg.userDirs.enable = true;
|
xdg.userDirs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.diff = ''
|
|
||||||
if [ -e /run/current-system ]; then
|
|
||||||
${pkgs.nvd}/bin/nvd --nix-bin-dir ${pkgs.nix}/bin diff /run/current-system/ "$systemConfig"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
my = {
|
my = {
|
||||||
programs = {
|
programs = {
|
||||||
spotify-player.enable = false;
|
spotify-player.enable = true;
|
||||||
ssh.enable = mkForce false;
|
ssh.enable = mkForce false;
|
||||||
git.identity.email = mkDefault "moritz.boehme@l.de";
|
git.identity.email = mkDefault "moritz.boehme@l.de";
|
||||||
miracast.enable = mkDefault true;
|
miracast.enable = mkDefault true;
|
||||||
|
|
@ -44,10 +44,10 @@ in
|
||||||
gnumake
|
gnumake
|
||||||
pavucontrol
|
pavucontrol
|
||||||
poetry
|
poetry
|
||||||
|
podman-compose
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.networkmanager.enableStrongSwan = true;
|
networking.networkmanager.enableStrongSwan = true;
|
||||||
virtualisation.podman.dockerSocket.enable = true;
|
|
||||||
systemd.user.tmpfiles.rules = [ "L /run/user/1000/docker.sock - - - - /run/user/1000/podman/podman.sock" ];
|
systemd.user.tmpfiles.rules = [ "L /run/user/1000/docker.sock - - - - /run/user/1000/podman/podman.sock" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
258
modules/programs/niri.nix
Normal file
258
modules/programs/niri.nix
Normal file
|
|
@ -0,0 +1,258 @@
|
||||||
|
{ config
|
||||||
|
, lib
|
||||||
|
, pkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.my.programs.niri;
|
||||||
|
inherit (config.home-manager.users.moritz.lib.niri) actions;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.my.programs.niri.enable = mkEnableOption "niri";
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
users.users.moritz.packages = with pkgs; [
|
||||||
|
brightnessctl # control brightness
|
||||||
|
grimblast # screenshot tool
|
||||||
|
pamixer # pulse audio cli
|
||||||
|
playerctl # control media playback
|
||||||
|
slurp # region select for wayland (for screensharing)
|
||||||
|
wdisplays # manage monitors
|
||||||
|
wl-clipboard # clipboard tool for wayland
|
||||||
|
];
|
||||||
|
|
||||||
|
# adds pam module for swaylock
|
||||||
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
|
programs.niri.enable = true;
|
||||||
|
|
||||||
|
my = {
|
||||||
|
programs = {
|
||||||
|
wallpaper.enable = true;
|
||||||
|
kitty.enable = true;
|
||||||
|
tofi.enable = true;
|
||||||
|
};
|
||||||
|
wallpapers.enable = true;
|
||||||
|
services = {
|
||||||
|
dunst.enable = true;
|
||||||
|
wallpaper = {
|
||||||
|
enable = true;
|
||||||
|
target = "niri-session.target";
|
||||||
|
};
|
||||||
|
spotify-player.target = "niri-session.target";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager.users.moritz = {
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
# start using systemd service
|
||||||
|
systemd = {
|
||||||
|
enable = true;
|
||||||
|
target = "river-session.target";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
start_hidden = true;
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 20;
|
||||||
|
modules-left = [ "niri/workspaces" ];
|
||||||
|
modules-center = [ "niri/window" ];
|
||||||
|
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# lock screen after timeout
|
||||||
|
programs.swaylock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
color = "000000";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "${lib.getExe pkgs.swaylock} -fF";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
event = "lock";
|
||||||
|
command = "${lib.getExe pkgs.swaylock} -fF";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
timeouts =
|
||||||
|
let
|
||||||
|
lockTimeout = 10;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
timeout = lockTimeout * 60 - 10;
|
||||||
|
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = lockTimeout * 60 + 10;
|
||||||
|
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
systemdTarget = "river-session.target";
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wlr-randr
|
||||||
|
jq
|
||||||
|
];
|
||||||
|
services.kanshi = {
|
||||||
|
enable = true;
|
||||||
|
systemdTarget = "niri-session.target";
|
||||||
|
};
|
||||||
|
programs.niri = {
|
||||||
|
settings = {
|
||||||
|
environment = {
|
||||||
|
"NIXOS_OZONE_WL" = "1";
|
||||||
|
"QT_QPA_PLATFORM" = "wayland";
|
||||||
|
};
|
||||||
|
binds = {
|
||||||
|
# spawn different programs
|
||||||
|
"Mod+Return".action.spawn = config.my.terminal.package;
|
||||||
|
"Mod+Shift+escape".action.spawn = [ "loginctl" "lock-session" ];
|
||||||
|
"Mod+D".action.spawn = "tofi";
|
||||||
|
|
||||||
|
# keyboard layout
|
||||||
|
"Mod+Space".action = actions.switch-layout "next";
|
||||||
|
|
||||||
|
"Mod+I".action = actions.show-hotkey-overlay;
|
||||||
|
"Mod+Q".action = actions.close-window;
|
||||||
|
"Mod+Shift+Q".action = actions.quit;
|
||||||
|
"Mod+Shift+C".action = actions.screenshot;
|
||||||
|
|
||||||
|
# resizing / swapping / switching
|
||||||
|
"Mod+F".action = actions.fullscreen-window;
|
||||||
|
|
||||||
|
"Mod+Shift+H".action.set-column-width = "-5%";
|
||||||
|
"Mod+Shift+L".action.set-column-width = "+5%";
|
||||||
|
|
||||||
|
"Mod+J".action = actions.focus-window-down-or-column-right;
|
||||||
|
"Mod+K".action = actions.focus-window-up-or-column-left;
|
||||||
|
|
||||||
|
"Mod+H".action = actions.move-column-left-or-to-monitor-left;
|
||||||
|
"Mod+L".action = actions.move-column-right-or-to-monitor-right;
|
||||||
|
|
||||||
|
"Mod+W".action.spawn = [ "pkill" "-USR1" "waybar" ];
|
||||||
|
|
||||||
|
# "Mod+comma".action = actions.consume-window-into-column;
|
||||||
|
# "Mod+period".action = actions.expel-window-from-column;
|
||||||
|
|
||||||
|
"Mod+comma".action = actions.focus-monitor-up;
|
||||||
|
"Mod+period".action = actions.focus-monitor-down;
|
||||||
|
|
||||||
|
"Mod+Shift+comma".action = actions.move-workspace-to-monitor-up;
|
||||||
|
"Mod+Shift+period".action = actions.move-workspace-to-monitor-down;
|
||||||
|
"Mod+T".action = actions.switch-preset-column-width;
|
||||||
|
|
||||||
|
"Mod+Shift+1".action.move-window-to-workspace = 1;
|
||||||
|
"Mod+Shift+2".action.move-window-to-workspace = 2;
|
||||||
|
"Mod+Shift+3".action.move-window-to-workspace = 3;
|
||||||
|
"Mod+Shift+4".action.move-window-to-workspace = 4;
|
||||||
|
"Mod+Shift+5".action.move-window-to-workspace = 5;
|
||||||
|
"Mod+Shift+6".action.move-window-to-workspace = 6;
|
||||||
|
"Mod+Shift+7".action.move-window-to-workspace = 7;
|
||||||
|
"Mod+Shift+8".action.move-window-to-workspace = 8;
|
||||||
|
"Mod+Shift+9".action.move-window-to-workspace = 9;
|
||||||
|
"Mod+Shift+0".action.move-window-to-workspace = 10;
|
||||||
|
|
||||||
|
"Mod+1".action.focus-workspace = 1;
|
||||||
|
"Mod+2".action.focus-workspace = 2;
|
||||||
|
"Mod+3".action.focus-workspace = 3;
|
||||||
|
"Mod+4".action.focus-workspace = 4;
|
||||||
|
"Mod+5".action.focus-workspace = 5;
|
||||||
|
"Mod+6".action.focus-workspace = 6;
|
||||||
|
"Mod+7".action.focus-workspace = 7;
|
||||||
|
"Mod+8".action.focus-workspace = 8;
|
||||||
|
"Mod+9".action.focus-workspace = 9;
|
||||||
|
"Mod+0".action.focus-workspace = 10;
|
||||||
|
|
||||||
|
# audio
|
||||||
|
"XF86_AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ];
|
||||||
|
"XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%+" "-l" "1.0" ];
|
||||||
|
"XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "5%-" ];
|
||||||
|
# TODO(mangoiv): mic mute toggle
|
||||||
|
};
|
||||||
|
|
||||||
|
layout = {
|
||||||
|
border.enable = false;
|
||||||
|
focus-ring.enable = false;
|
||||||
|
default-column-width.proportion = 2.0 / 3.0;
|
||||||
|
preset-column-widths = [
|
||||||
|
{ proportion = 1.0 / 3.0; }
|
||||||
|
{ proportion = 2.0 / 3.0; }
|
||||||
|
];
|
||||||
|
gaps = 3;
|
||||||
|
};
|
||||||
|
animations = {
|
||||||
|
enable = true;
|
||||||
|
slowdown = 0.5;
|
||||||
|
};
|
||||||
|
prefer-no-csd = true;
|
||||||
|
hotkey-overlay.skip-at-startup = true;
|
||||||
|
window-rules = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
{ title = "^.*1Password.*$"; }
|
||||||
|
{ title = "^.*Bitwarden.*$"; }
|
||||||
|
{ title = "^.*Keepass.*$"; }
|
||||||
|
];
|
||||||
|
block-out-from = "screen-capture";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
clip-to-geometry = true;
|
||||||
|
geometry-corner-radius = {
|
||||||
|
bottom-left = 5.0;
|
||||||
|
bottom-right = 5.0;
|
||||||
|
top-left = 5.0;
|
||||||
|
top-right = 5.0;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
switch-events = {
|
||||||
|
lid-close.action.spawn = [ "loginctl" "lock-session" ];
|
||||||
|
};
|
||||||
|
input = {
|
||||||
|
touchpad.natural-scroll = false;
|
||||||
|
focus-follows-mouse.enable = true;
|
||||||
|
warp-mouse-to-focus = true;
|
||||||
|
keyboard = {
|
||||||
|
xkb.layout = "us, de";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
dbus.enable = true;
|
||||||
|
# use pipewire (needed for screensharing)
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
displayManager = {
|
||||||
|
autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "moritz";
|
||||||
|
};
|
||||||
|
defaultSession = "niri";
|
||||||
|
};
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.lightdm.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/comment.nix
Normal file
10
modules/programs/nvim/new_plugins/comment.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.comment.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -66,7 +66,7 @@ in
|
||||||
"conform.nvim"
|
"conform.nvim"
|
||||||
];
|
];
|
||||||
keymaps = [
|
keymaps = [
|
||||||
{ key = "<leader>cf"; action.__raw = ''function() require("conform").format() end''; options.desc = "Format current file"; }
|
{ key = "="; action.__raw = ''function() require("conform").format() end''; options.desc = "Format current file"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
10
modules/programs/nvim/new_plugins/crates-nvim.nix
Normal file
10
modules/programs/nvim/new_plugins/crates-nvim.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.crates-nvim.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/direnv.nix
Normal file
10
modules/programs/nvim/new_plugins/direnv.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/friendly-snippets.nix
Normal file
10
modules/programs/nvim/new_plugins/friendly-snippets.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.friendly-snippets.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/fugitive.nix
Normal file
10
modules/programs/nvim/new_plugins/fugitive.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.fugitive.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/gitsigns.nix
Normal file
10
modules/programs/nvim/new_plugins/gitsigns.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.gitsigns.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/programs/nvim/new_plugins/helpview.nix
Normal file
11
modules/programs/nvim/new_plugins/helpview.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.helpview.enable = true;
|
||||||
|
performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/programs/nvim/new_plugins/hmts.nix
Normal file
11
modules/programs/nvim/new_plugins/hmts.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.hmts.enable = true;
|
||||||
|
performance.combinePlugins.standalonePlugins = [ "hmts.nvim" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
15
modules/programs/nvim/new_plugins/keymaps.nix
Normal file
15
modules/programs/nvim/new_plugins/keymaps.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
keymaps = [
|
||||||
|
{ key = "<esc>"; action = "<cmd>noh<cr><esc>"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; }
|
||||||
|
{ key = "<"; action = "<gv"; options.desc = "Shift left"; mode = [ "v" ]; }
|
||||||
|
{ key = ">"; action = ">gv"; options.desc = "Shift right"; mode = [ "v" ]; }
|
||||||
|
{ key = "y"; action = "ygv<esc>"; options.desc = "Yank"; mode = [ "v" ]; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/lastplace.nix
Normal file
10
modules/programs/nvim/new_plugins/lastplace.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.lastplace.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -16,9 +16,9 @@ in
|
||||||
keymapsOnEvents = {
|
keymapsOnEvents = {
|
||||||
LspAttach = [
|
LspAttach = [
|
||||||
{
|
{
|
||||||
key = "<leader>cc";
|
key = "<leader>q";
|
||||||
action = "<cmd>Lspsaga code_action<cr>";
|
action = "<cmd>Lspsaga code_action<cr>";
|
||||||
options.desc = "Code Action";
|
options.desc = "Quickfix";
|
||||||
options.buffer = true;
|
options.buffer = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -28,7 +28,7 @@ in
|
||||||
options.buffer = true;
|
options.buffer = true;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
key = "<leader>cr";
|
key = "<leader>r";
|
||||||
action = "<cmd>Lspsaga rename<cr>";
|
action = "<cmd>Lspsaga rename<cr>";
|
||||||
options.desc = "Rename";
|
options.desc = "Rename";
|
||||||
options.buffer = true;
|
options.buffer = true;
|
||||||
|
|
|
||||||
10
modules/programs/nvim/new_plugins/markdown-preview.nix
Normal file
10
modules/programs/nvim/new_plugins/markdown-preview.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.markdown-preview.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/programs/nvim/new_plugins/marks.nix
Normal file
13
modules/programs/nvim/new_plugins/marks.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.marks = {
|
||||||
|
enable = true;
|
||||||
|
defaultMappings = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/programs/nvim/new_plugins/mini.nix
Normal file
16
modules/programs/nvim/new_plugins/mini.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.mini = {
|
||||||
|
enable = true;
|
||||||
|
modules = {
|
||||||
|
align = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
performance.combinePlugins.standalonePlugins = [ "mini.nvim" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/nvim-autopairs.nix
Normal file
10
modules/programs/nvim/new_plugins/nvim-autopairs.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.nvim-autopairs.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
36
modules/programs/nvim/new_plugins/obsidian.nix
Normal file
36
modules/programs/nvim/new_plugins/obsidian.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
_:
|
||||||
|
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.obsidian = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
ui.enable = false;
|
||||||
|
dir = "~/Documents/Nextcloud/Notes/zettelkasten/";
|
||||||
|
note_id_func.__raw = ''
|
||||||
|
function(title)
|
||||||
|
if title ~= nil then
|
||||||
|
return title
|
||||||
|
else
|
||||||
|
suffix = ""
|
||||||
|
for _ = 1, 4 do
|
||||||
|
suffix = suffix .. string.char(math.random(65, 90))
|
||||||
|
end
|
||||||
|
return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
|
mappings = {
|
||||||
|
"<localleader>n" = { action.__raw = ''function() return vim.cmd("ObsidianNew") end''; opts.desc = "New Note"; opts.buffer = true; };
|
||||||
|
"<localleader>q" = { action.__raw = ''function() return vim.cmd("ObsidianQuickSwitch") end''; opts.desc = "Quick Switch"; opts.buffer = true; };
|
||||||
|
"<localleader>b" = { action.__raw = ''function() return vim.cmd("ObsidianBacklinks") end''; opts.desc = "Backlinks"; opts.buffer = true; };
|
||||||
|
"<localleader>l" = { action.__raw = ''function() return vim.cmd("ObsidianLink") end''; opts.desc = "Link"; opts.buffer = true; };
|
||||||
|
"<localleader>e" = { action.__raw = ''function() return vim.cmd("ObsidianExtractNote") end''; opts.desc = "Extract Note"; opts.buffer = true; };
|
||||||
|
"<localleader>r" = { action.__raw = ''function() return vim.cmd("ObsidianRename") end''; opts.desc = "Rename"; opts.buffer = true; };
|
||||||
|
"<cr>" = { action.__raw = ''function() return require("obsidian").util.smart_action() end''; opts.buffer = true; opts.expr = true; };
|
||||||
|
"gf" = { action.__raw = ''function() return require("obsidian").util.gf_passthrough() end''; opts = { noremap = false; expr = true; buffer = true; }; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/oil.nix
Normal file
10
modules/programs/nvim/new_plugins/oil.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.oil.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
inherit (lib) mkEnableOption mkIf readFile;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.users.moritz = {
|
|
||||||
programs.nixvim = lib.mkMerge [
|
|
||||||
{ plugins.which-key.enable = true; }
|
|
||||||
{ plugins.lastplace.enable = true; }
|
|
||||||
{ plugins.comment.enable = true; }
|
|
||||||
{ plugins.ts-context-commentstring.enable = true; }
|
|
||||||
{
|
|
||||||
plugins.vimtex = {
|
|
||||||
enable = true;
|
|
||||||
settings.view_method = "zathura";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugins.todo-comments = {
|
|
||||||
enable = true;
|
|
||||||
keymaps.todoTelescope.key = "<leader>fc";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
keymaps = [
|
|
||||||
{ key = "<esc>"; action = "<cmd>noh<cr><esc>"; options.desc = "Escape and clear hlsearch"; mode = [ "i" "n" ]; }
|
|
||||||
{ key = "<"; action = "<gv"; options.desc = "Shift left"; mode = [ "v" ]; }
|
|
||||||
{ key = ">"; action = ">gv"; options.desc = "Shift right"; mode = [ "v" ]; }
|
|
||||||
{ key = "y"; action = "ygv<esc>"; options.desc = "Yank"; mode = [ "v" ]; }
|
|
||||||
];
|
|
||||||
}
|
|
||||||
{ plugins.oil.enable = true; }
|
|
||||||
{ plugins.nvim-autopairs.enable = true; }
|
|
||||||
{ plugins.vim-surround.enable = true; }
|
|
||||||
|
|
||||||
# TODO: add linters
|
|
||||||
# {
|
|
||||||
# plugins.lint.enable = true;
|
|
||||||
# plugins.lint.lintersByFt = { };
|
|
||||||
# }
|
|
||||||
|
|
||||||
{
|
|
||||||
plugins.marks.enable = true;
|
|
||||||
plugins.marks.defaultMappings = false;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugins.hmts.enable = true;
|
|
||||||
performance.combinePlugins.standalonePlugins = [ "hmts.nvim" ];
|
|
||||||
}
|
|
||||||
{ plugins.gitsigns.enable = true; }
|
|
||||||
{ plugins.fugitive.enable = true; }
|
|
||||||
{ plugins.friendly-snippets.enable = true; }
|
|
||||||
{ plugins.direnv.enable = true; }
|
|
||||||
{ plugins.crates-nvim.enable = true; }
|
|
||||||
{
|
|
||||||
plugins.helpview.enable = true;
|
|
||||||
performance.combinePlugins.standalonePlugins = [ "helpview.nvim" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugins.obsidian.enable = true;
|
|
||||||
plugins.obsidian.settings = {
|
|
||||||
dir = "~/Documents/Nextcloud/Notes/zettelkasten/";
|
|
||||||
note_id_func.__raw = ''
|
|
||||||
function(title)
|
|
||||||
if title ~= nil then
|
|
||||||
return title
|
|
||||||
else
|
|
||||||
suffix = ""
|
|
||||||
for _ = 1, 4 do
|
|
||||||
suffix = suffix .. string.char(math.random(65, 90))
|
|
||||||
end
|
|
||||||
return tostring(os.date("%Y-%m-%d")) .. "-" .. suffix
|
|
||||||
end
|
|
||||||
end
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
plugins.mini = {
|
|
||||||
enable = true;
|
|
||||||
modules = {
|
|
||||||
align = { };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
performance.combinePlugins.standalonePlugins = [ "mini.nvim" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
13
modules/programs/nvim/new_plugins/render-markdown.nix
Normal file
13
modules/programs/nvim/new_plugins/render-markdown.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.render-markdown = {
|
||||||
|
enable = true;
|
||||||
|
settings.latex.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -31,6 +31,10 @@ _:
|
||||||
action = "oldfiles";
|
action = "oldfiles";
|
||||||
options.desc = "Recent files";
|
options.desc = "Recent files";
|
||||||
};
|
};
|
||||||
|
"<leader>fc" = {
|
||||||
|
action = "commands";
|
||||||
|
options.desc = "Commands";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
web-devicons.enable = true;
|
web-devicons.enable = true;
|
||||||
|
|
|
||||||
13
modules/programs/nvim/new_plugins/todo-comments.nix
Normal file
13
modules/programs/nvim/new_plugins/todo-comments.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.todo-comments = {
|
||||||
|
enable = true;
|
||||||
|
keymaps.todoTelescope.key = "<leader>ft";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.ts-context-commentstring.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/vim-surround.nix
Normal file
10
modules/programs/nvim/new_plugins/vim-surround.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.vim-surround.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
13
modules/programs/nvim/new_plugins/vimtex.nix
Normal file
13
modules/programs/nvim/new_plugins/vimtex.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.vimtex = {
|
||||||
|
enable = true;
|
||||||
|
settings.view_method = "zathura";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
10
modules/programs/nvim/new_plugins/which-key.nix
Normal file
10
modules/programs/nvim/new_plugins/which-key.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkIf readFile;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home-manager.users.moritz.programs.nixvim = {
|
||||||
|
plugins.which-key.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -10,7 +10,7 @@ let
|
||||||
|
|
||||||
cfg = config.my.programs.python;
|
cfg = config.my.programs.python;
|
||||||
|
|
||||||
pythonVersions = map (version: "3${toString version}") (range 8 13);
|
pythonVersions = map (version: "3${toString version}") (range 9 13);
|
||||||
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
|
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
|
||||||
|
|
||||||
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ in
|
||||||
enable = mkEnableOption "river";
|
enable = mkEnableOption "river";
|
||||||
keyboardLayouts = mkOption {
|
keyboardLayouts = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = "list of keyboard layouts";
|
description = "List of keyboard layouts.";
|
||||||
default = [ "us" "de" ];
|
default = [ "us" "de" ];
|
||||||
};
|
};
|
||||||
nvidiaSupport = mkEnableOption "nvidiaSupport";
|
nvidiaSupport = mkEnableOption "nvidia gpu support";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
@ -66,6 +66,9 @@ in
|
||||||
open = "spawn 'wlr-randr --output eDP-1 --on'";
|
open = "spawn 'wlr-randr --output eDP-1 --on'";
|
||||||
};
|
};
|
||||||
map = {
|
map = {
|
||||||
|
passthrough = {
|
||||||
|
"Super F11" = "enter-mode normal";
|
||||||
|
};
|
||||||
normal = {
|
normal = {
|
||||||
"Super Q" = "close";
|
"Super Q" = "close";
|
||||||
"Super Return" = "spawn '${config.my.terminal.package}'";
|
"Super Return" = "spawn '${config.my.terminal.package}'";
|
||||||
|
|
@ -103,6 +106,8 @@ in
|
||||||
"None XF86AudioNext" = "spawn 'playerctl -p spotifyd,firefox next'";
|
"None XF86AudioNext" = "spawn 'playerctl -p spotifyd,firefox next'";
|
||||||
"None XF86AudioPlay" = "spawn 'playerctl -p spotifyd,firefox play-pause'";
|
"None XF86AudioPlay" = "spawn 'playerctl -p spotifyd,firefox play-pause'";
|
||||||
"None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'";
|
"None XF86AudioPrev" = "spawn 'playerctl -p spotifyd,firefox previous'";
|
||||||
|
|
||||||
|
"Super F11" = "enter-mode passthrough";
|
||||||
} //
|
} //
|
||||||
# tags
|
# tags
|
||||||
(
|
(
|
||||||
|
|
@ -257,7 +262,6 @@ in
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
displayManager = {
|
displayManager = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue