Compare commits
118 Commits
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | 101ab079ac | |
Moritz Böhme | 6dde791fb7 | |
Moritz Böhme | 6487394f14 | |
Moritz Böhme | f72096b717 | |
Moritz Böhme | ea07a73d07 | |
Moritz Böhme | 6cbe647af7 | |
Moritz Böhme | 781d06f3de | |
Moritz Böhme | c249fab5cb | |
Moritz Böhme | 02473b02f3 | |
Moritz Böhme | 7fb108df31 | |
Moritz Böhme | 56505a065f | |
Moritz Böhme | a4cb8f2dfd | |
Moritz Böhme | f08c343ddf | |
Moritz Böhme | fc4dcbeeec | |
Moritz Böhme | f19d50407e | |
Moritz Böhme | 5c666feefb | |
Moritz Böhme | 82e64e198f | |
Moritz Böhme | 928f8b77fa | |
Moritz Böhme | 6bcccc1ff9 | |
Moritz Böhme | 9e2c4205d9 | |
Moritz Böhme | 667b7a9db3 | |
Moritz Böhme | cb8597a97a | |
Moritz Böhme | 1cae5d144a | |
Moritz Böhme | 7472b94108 | |
Moritz Böhme | e94c6ea4d7 | |
Moritz Böhme | b8ec445560 | |
Moritz Böhme | 9f931b563f | |
Moritz Böhme | a11717c8ce | |
Moritz Böhme | 55325053ec | |
Moritz Böhme | 9bd0870f1d | |
Moritz Böhme | 189036f2c8 | |
Moritz Böhme | 72def5c785 | |
Moritz Böhme | 891283aa43 | |
Moritz Böhme | 17ab5faf24 | |
Moritz Böhme | 2e38c56c93 | |
Moritz Böhme | fe78e6c206 | |
Moritz Böhme | 331c34b147 | |
Moritz Böhme | 9bbe4516f4 | |
Moritz Böhme | 1dee671b98 | |
Moritz Böhme | 4328c77625 | |
Moritz Böhme | 2381db697d | |
Moritz Böhme | 4762f6f196 | |
Moritz Böhme | b03934b4a3 | |
Moritz Böhme | 1a2369c8db | |
Moritz Böhme | d4db0cec27 | |
Moritz Böhme | b5b54eb0e7 | |
Moritz Böhme | 053f516175 | |
Moritz Böhme | 5c73524196 | |
Moritz Böhme | f837b84892 | |
Moritz Böhme | c3bec6a16d | |
Moritz Böhme | 4dd2b63b9a | |
Moritz Böhme | 57d91555a0 | |
Moritz Böhme | 3b4b7b6657 | |
Moritz Böhme | 73689d50bf | |
Moritz Böhme | ca9f07d950 | |
Moritz Böhme | fad19c6a58 | |
Moritz Böhme | ed9c5111e4 | |
Moritz Böhme | 8ce8af36de | |
Moritz Böhme | fcfc548717 | |
Moritz Böhme | c11a2c5596 | |
Moritz Böhme | e45b2241fa | |
Moritz Böhme | a5a784b2d5 | |
Moritz Böhme | 11d13544c1 | |
Moritz Böhme | e83ce10ad7 | |
Moritz Böhme | bdc849205e | |
Moritz Böhme | bee307ae9c | |
Moritz Böhme | f6174bc0ba | |
Moritz Böhme | b526cfc6f8 | |
Moritz Böhme | f851cd63f6 | |
Moritz Böhme | f417d8b819 | |
Moritz Böhme | 946cb89900 | |
Moritz Böhme | 462cb1d851 | |
Moritz Böhme | f1b86275da | |
Moritz Böhme | 5aba3a032c | |
Moritz Böhme | 31cd3f9957 | |
Moritz Böhme | 05e7391cb4 | |
Moritz Böhme | 7ddd60e36c | |
Moritz Böhme | 1b5659ac6c | |
Moritz Böhme | 42edc5bd2f | |
Moritz Böhme | b1ecc723cc | |
Moritz Böhme | 2f4f58a68c | |
Moritz Böhme | 54e55f4b6d | |
Moritz Böhme | b09d30959b | |
Moritz Böhme | 6a1b81565a | |
Moritz Böhme | a2a624d534 | |
Moritz Böhme | 9acdfd5e4b | |
Moritz Böhme | e1a1c5060f | |
Moritz Böhme | 67a019f76b | |
Moritz Böhme | c02b5c01e5 | |
Moritz Böhme | 006c4394f3 | |
Moritz Böhme | ac9b136e6c | |
Moritz Böhme | 4ff3bfbf50 | |
Moritz Böhme | 10f9389319 | |
Moritz Böhme | e714349fe1 | |
Moritz Böhme | 09caae2e4e | |
Moritz Böhme | ad8ff7d016 | |
Moritz Böhme | e07c55d902 | |
Moritz Böhme | 8dab093deb | |
Moritz Böhme | 43d2bd3645 | |
Moritz Böhme | 71fe796589 | |
Moritz Böhme | 66cbbaa4ba | |
Moritz Böhme | d098a8f907 | |
Moritz Böhme | 591f981e71 | |
Moritz Böhme | 8a9d67a3d5 | |
Moritz Böhme | 5559e9291e | |
Moritz Böhme | 73f597b1c0 | |
Moritz Böhme | 298aa410eb | |
Moritz Böhme | 33df89b381 | |
Moritz Böhme | 2b8335ffb0 | |
Moritz Böhme | 386da4ccb9 | |
Moritz Böhme | 1166a87fcb | |
Moritz Böhme | 4cf72f2a09 | |
Moritz Böhme | 2be2adcaab | |
Moritz Böhme | 9e4fdb00e3 | |
Moritz Böhme | a14f999ab9 | |
Moritz Böhme | 96697c684c | |
Moritz Böhme | e87d0c7ec3 | |
Moritz Böhme | 59c843d452 |
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"options": {
|
||||
"enable": true,
|
||||
"target": {
|
||||
"args": [],
|
||||
"installable": ".#nixosConfigurations.nixos-desktop.options"
|
||||
}
|
||||
}
|
||||
}
|
884
flake.lock
884
flake.lock
File diff suppressed because it is too large
Load Diff
78
flake.nix
78
flake.nix
|
@ -10,18 +10,20 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
home-manager.url = "github:nix-community/home-manager/bf4b576f84e1ce54ec886836bae7695738aa5a6c"; # FIXME:
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
master.url = "github:nixos/nixpkgs";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
stable.url = "github:nixos/nixpkgs/nixos-23.05";
|
||||
stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
nix-index-database.url = "github:Mic92/nix-index-database";
|
||||
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# Programs
|
||||
nix-super.url = "github:privatevoid-net/nix-super";
|
||||
nix-monitored.url = "github:ners/nix-monitored";
|
||||
nix-monitored.inputs.nixpkgs.follows = "nixpkgs";
|
||||
timers.url = "git+https://gitea.moritzboeh.me/moritz/timers.git";
|
||||
|
||||
# Neovim
|
||||
|
@ -31,26 +33,32 @@
|
|||
nix-lazy-nvim.url = "git+https://git.moritzboeh.me/moritz/NixLazy.nvim";
|
||||
nvim-lspconfig.flake = false;
|
||||
nvim-lspconfig.url = "github:neovim/nvim-lspconfig";
|
||||
nvim-puppeteer.flake = false;
|
||||
nvim-puppeteer.url = "github:chrisgrieser/nvim-puppeteer";
|
||||
nvim-treesitter.flake = false;
|
||||
nvim-treesitter.url = "github:nvim-treesitter/nvim-treesitter";
|
||||
smartcolumn-nvim.flake = false;
|
||||
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
||||
telekasten-nvim.flake = false;
|
||||
telekasten-nvim.url = "github:renerocksai/telekasten.nvim";
|
||||
none-ls-nvim.flake = false;
|
||||
none-ls-nvim.url = "github:nvimtools/none-ls.nvim";
|
||||
neotest-python.flake = false;
|
||||
neotest-python.url = "github:MoritzBoehme/neotest-python/fix-runtimepath-search";
|
||||
statuscol-nvim.flake = false;
|
||||
statuscol-nvim.url = "github:luukvbaal/statuscol.nvim/0.10"; # HACK: fix for neovim-nightly
|
||||
gen-nvim.flake = false;
|
||||
gen-nvim.url = "github:David-Kunz/gen.nvim";
|
||||
hawtkeys-nvim.flake = false;
|
||||
hawtkeys-nvim.url = "github:tris203/hawtkeys.nvim";
|
||||
none-ls-shellcheck-nvim.flake = false;
|
||||
none-ls-shellcheck-nvim.url = "github:gbprod/none-ls-shellcheck.nvim";
|
||||
cmp-vimtex.flake = false;
|
||||
cmp-vimtex.url = "github:micangl/cmp-vimtex";
|
||||
|
||||
# river
|
||||
river.url = "git+https://github.com/riverwm/river?submodules=1";
|
||||
river.flake = false;
|
||||
|
||||
# Hyprland
|
||||
hypr-contrib.url = "github:hyprwm/contrib";
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland = {
|
||||
type = "git";
|
||||
url = "https://github.com/hyprwm/Hyprland";
|
||||
submodules = true;
|
||||
};
|
||||
|
||||
# Laptop
|
||||
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
|
||||
|
@ -62,32 +70,8 @@
|
|||
};
|
||||
|
||||
outputs = inputs@{ self, flake-parts, ... }:
|
||||
let
|
||||
defaultOverlays = [
|
||||
inputs.hypr-contrib.overlays.default
|
||||
self.overlays.default
|
||||
];
|
||||
|
||||
finalOverlays = defaultOverlays ++ [
|
||||
(
|
||||
_: prev: {
|
||||
master = import inputs.master {
|
||||
inherit (prev) system;
|
||||
overlays = defaultOverlays;
|
||||
};
|
||||
stable = import inputs.stable {
|
||||
inherit (prev) system;
|
||||
overlays = defaultOverlays;
|
||||
};
|
||||
nur = import inputs.nur {
|
||||
pkgs = prev;
|
||||
nurpkgs = prev;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
debug = true; # NOTE: for nixd
|
||||
imports = [
|
||||
inputs.pre-commit-hooks.flakeModule
|
||||
inputs.devshell.flakeModule
|
||||
|
@ -95,12 +79,6 @@
|
|||
|
||||
systems = [ "x86_64-linux" ];
|
||||
perSystem = { config, self', inputs', pkgs, system, ... }: {
|
||||
_module.args.pkgs =
|
||||
import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = finalOverlays;
|
||||
};
|
||||
|
||||
devshells.default = {
|
||||
devshell.startup.pre-commit-hook.text = config.pre-commit.installationScript;
|
||||
commands = [
|
||||
|
@ -155,20 +133,12 @@
|
|||
|
||||
legacyPackages = pkgs;
|
||||
|
||||
packages =
|
||||
self.lib.filterAttrs (_: self.lib.isDerivation)
|
||||
(self.overlays.default pkgs pkgs);
|
||||
};
|
||||
|
||||
flake = {
|
||||
lib = inputs.nixpkgs.lib.extend
|
||||
(self: _: { my = import ./lib { lib = self; }; });
|
||||
|
||||
overlays.default = import ./overlays {
|
||||
inherit inputs;
|
||||
inherit (self) lib;
|
||||
};
|
||||
|
||||
nixosConfigurations = self.lib.my.mapModules
|
||||
(path: self.lib.nixosSystem {
|
||||
inherit (self) lib;
|
||||
|
@ -178,12 +148,6 @@
|
|||
modules =
|
||||
[
|
||||
./modules
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = finalOverlays;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
|
@ -220,10 +184,8 @@
|
|||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://pre-commit-hooks.cachix.org"
|
||||
"https://cache.privatevoid.net"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
||||
|
|
|
@ -19,21 +19,21 @@
|
|||
gaming.enable = true;
|
||||
personal.enable = true;
|
||||
impermanence.enable = true;
|
||||
webis.enable = true;
|
||||
};
|
||||
programs.hyprland = {
|
||||
nvidiaSupport = true;
|
||||
monitors = [ "HDMI-A-1,3840x2160,auto,1.2" ",preferred,auto,1" ];
|
||||
extraConfig = "exec=hyprctl keyword monitor HDMI-A-1,3840x2160@120,auto,1.2";
|
||||
keyboardLayouts = [ "us" "de" ];
|
||||
};
|
||||
programs.hyprland.enable = true;
|
||||
programs.hyprland.nvidiaSupport = true;
|
||||
programs.hyprland.keyboardLayouts = [ "us" "de" ];
|
||||
programs.hyprland.monitors."HDMI-A-2" = { scale = 1.2; };
|
||||
programs.exercism.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
services.ollama.enable = true;
|
||||
programs.ledger.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.containers.cdi.dynamic.nvidia.enable = true;
|
||||
|
||||
home-manager.users.moritz.home.packages = with pkgs; [
|
||||
anki
|
||||
calibre
|
||||
stable.calibre # NOTE: breaks often in unstable
|
||||
];
|
||||
|
||||
hardware = {
|
||||
|
@ -42,7 +42,6 @@
|
|||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
driSupport = true;
|
||||
};
|
||||
|
||||
# sensors
|
||||
|
@ -69,7 +68,7 @@
|
|||
defaultGateway = "192.168.0.1";
|
||||
nameservers = [ "192.168.0.4" ];
|
||||
useDHCP = false;
|
||||
interfaces.enp42s0 = {
|
||||
interfaces.enp6s0 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.14";
|
||||
|
|
|
@ -1,23 +1,27 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config
|
||||
, lib
|
||||
, modulesPath
|
||||
, ...
|
||||
}: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
kernelModules = [ ];
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# 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.interfaces.enp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,117 @@
|
|||
webis.enable = true;
|
||||
impermanence.enable = true;
|
||||
};
|
||||
programs.hyprland.monitors = [ "HDMI-A-1,3840x2160,auto,1.2" ",preferred,auto,1" ];
|
||||
programs.river.enable = true;
|
||||
programs.hyprland.enable = false;
|
||||
programs.exercism.enable = true;
|
||||
};
|
||||
|
||||
users.users.moritz.packages = [ pkgs.poetry ];
|
||||
|
||||
home-manager.users.moritz.services.kanshi.profiles = {
|
||||
undocked = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
}
|
||||
];
|
||||
};
|
||||
docked = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "640,1800"; # NOTE: 2160 / 1.2 = 1800
|
||||
}
|
||||
{
|
||||
criteria = "DP-3";
|
||||
scale = 1.2;
|
||||
position = "0,0";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
laptop = {
|
||||
devices = [
|
||||
"/dev/input/by-path/platform-i8042-serio-0-event-kbd"
|
||||
];
|
||||
config = "
|
||||
(defsrc
|
||||
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||
tab q w e r t y u i o p [ ] \
|
||||
caps a s d f g h j k l ; ' ret
|
||||
lsft z x c v b n m , . / rsft
|
||||
lctl lmet lalt spc ralt rctl
|
||||
)
|
||||
|
||||
(deflayermap (default)
|
||||
;; tarmak 1a
|
||||
j n
|
||||
n k
|
||||
k e
|
||||
|
||||
;; tarmak 1b
|
||||
h m
|
||||
m h
|
||||
|
||||
;; tarmak 2a
|
||||
b z
|
||||
z x
|
||||
x c
|
||||
|
||||
;; tarmak 2b
|
||||
e f
|
||||
f t
|
||||
t b
|
||||
|
||||
;; tarmak 3
|
||||
c d
|
||||
d s
|
||||
s r
|
||||
|
||||
;; tarmak 4
|
||||
r p
|
||||
p ;
|
||||
; o
|
||||
o y
|
||||
y j
|
||||
|
||||
;; tarmak 5
|
||||
u l
|
||||
l i
|
||||
i u
|
||||
|
||||
;; caps-word tap-dance
|
||||
lsft (tap-dance 200 (_ (caps-word 2000) _ _))
|
||||
|
||||
;; change ctrl alt and meta
|
||||
lctl lalt
|
||||
lmet lctl
|
||||
lalt (tap-dance 200 (lmet (multi lmet alt) lmet lmet))
|
||||
|
||||
;; hjkl layer
|
||||
ralt (tap-hold 200 200 (layer-switch hjkl) (layer-while-held hjkl)) ;; tap: switch hold: switch while held
|
||||
|
||||
;; switch to normal keyboard layout
|
||||
rctl (layer-switch normal)
|
||||
)
|
||||
|
||||
(deflayermap (normal)
|
||||
rctl (layer-switch default))
|
||||
|
||||
(deflayermap (hjkl)
|
||||
h left
|
||||
j down
|
||||
k up
|
||||
l right
|
||||
|
||||
ralt (layer-switch default))
|
||||
";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# BOOT
|
||||
|
@ -31,8 +141,8 @@
|
|||
|
||||
# SERVICES
|
||||
services = {
|
||||
xserver.libinput.enable = true;
|
||||
xserver.libinput.touchpad.disableWhileTyping = true;
|
||||
libinput.enable = true;
|
||||
libinput.touchpad.disableWhileTyping = true;
|
||||
printing.enable = true;
|
||||
logind.lidSwitch = "hybrid-sleep";
|
||||
};
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
age.secrets = {
|
||||
root-password.file = ../../secrets/root-password.age;
|
||||
moritz-password.file = ../../secrets/moritz-password.age;
|
||||
};
|
||||
users.users = {
|
||||
root.hashedPasswordFile = config.age.secrets.root-password.path;
|
||||
moritz.hashedPasswordFile = config.age.secrets.moritz-password.path;
|
||||
};
|
||||
users.mutableUsers = false;
|
||||
environment.persistence."/persist" = {
|
||||
hideMounts = true;
|
||||
directories = [
|
||||
"/etc/NetworkManager/system-connections"
|
||||
"/var/db/dhcpcd/"
|
||||
"/var/lib/NetworkManager/"
|
||||
"/var/lib/bluetooth"
|
||||
"/var/lib/nixos"
|
||||
"/var/lib/systemd/coredump"
|
||||
"/var/log"
|
||||
];
|
||||
files = [
|
||||
"/etc/machine-id"
|
||||
"/etc/nix/id_rsa"
|
||||
"/etc/ssh/ssh_host_ed25519_key"
|
||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||
"/etc/ssh/ssh_host_rsa_key"
|
||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||
];
|
||||
users.moritz = {
|
||||
directories = [
|
||||
".SynologyDrive/data"
|
||||
".SynologyDrive/log"
|
||||
".cache/keepassxc"
|
||||
".cache/nvim/luac"
|
||||
".config/Nextcloud"
|
||||
".config/keepassxc"
|
||||
".local/share/direnv"
|
||||
".local/share/nvim"
|
||||
".local/share/zoxide"
|
||||
".local/share/JetBrains"
|
||||
".config/JetBrains"
|
||||
".local/state/nvim"
|
||||
".config/kdeconnect"
|
||||
".cat_installer" # eduroam
|
||||
".mozilla"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
"Music"
|
||||
"Pictures"
|
||||
"Videos"
|
||||
{ directory = ".gnupg"; mode = "0700"; }
|
||||
{ directory = ".local/share/keyrings"; mode = "0700"; }
|
||||
{ directory = ".ssh"; mode = "0700"; }
|
||||
];
|
||||
files = [
|
||||
".local/share/fish/fish_history"
|
||||
".local/share/nix/trusted-settings.json"
|
||||
".parallel/will-cite"
|
||||
];
|
||||
};
|
||||
users.root = {
|
||||
home = "/root";
|
||||
directories = [
|
||||
{ directory = ".gnupg"; mode = "0700"; }
|
||||
{ directory = ".ssh"; mode = "0700"; }
|
||||
];
|
||||
files = [
|
||||
".local/share/nix/trusted-settings.json"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -31,6 +31,12 @@
|
|||
}:
|
||||
|
||||
{
|
||||
my.programs.tofi.settings = {
|
||||
text-color = "#${text}";
|
||||
prompt-color = "#${red}";
|
||||
selection-color = "#${yellow}";
|
||||
background-color = "#${base}";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
fzf.colors = {
|
||||
|
@ -47,6 +53,26 @@
|
|||
prompt = "#${mauve}";
|
||||
spinner = "#${rosewater}";
|
||||
};
|
||||
foot.settings.colors = {
|
||||
foreground = text; # Text
|
||||
background = base; # Base
|
||||
regular0 = surface1; # Surface 1
|
||||
regular1 = red; # red
|
||||
regular2 = green; # green
|
||||
regular3 = yellow; # yellow
|
||||
regular4 = blue;
|
||||
regular5 = pink;
|
||||
regular6 = teal;
|
||||
regular7 = subtext1;
|
||||
bright0 = surface2;
|
||||
bright1 = red;
|
||||
bright2 = green;
|
||||
bright3 = yellow;
|
||||
bright4 = blue;
|
||||
bright5 = pink;
|
||||
bright6 = teal;
|
||||
bright7 = subtext0;
|
||||
};
|
||||
kitty.extraConfig = ''
|
||||
# vim:ft=kitty
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ in
|
|||
(import ./_catppuccin.nix
|
||||
{
|
||||
inherit config lib pkgs;
|
||||
flavor = "mocha";
|
||||
flavor = "macchiato";
|
||||
rosewater = "f4dbd6";
|
||||
flamingo = "f0c6c6";
|
||||
pink = "f5bde6";
|
||||
|
|
|
@ -31,6 +31,20 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.programs.tofi.settings = {
|
||||
font-size = "20";
|
||||
font =
|
||||
let
|
||||
fontBasePath = pkgs.nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
};
|
||||
in
|
||||
"${fontBasePath}/share/fonts/truetype/NerdFonts/FiraCodeNerdFont-Regular.ttf";
|
||||
height = "360";
|
||||
width = "720";
|
||||
outline-width = "0";
|
||||
border-width = "0";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
services.polybar = {
|
||||
config = {
|
||||
|
@ -39,7 +53,7 @@ in
|
|||
monitor = "\${env:MONITOR}";
|
||||
bottom = true;
|
||||
width = "100%";
|
||||
heigth = 15;
|
||||
height = 15;
|
||||
|
||||
border-size = 2;
|
||||
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.nixpkgs;
|
||||
|
||||
overlayType = mkOptionType {
|
||||
name = "nixpkgs-overlay";
|
||||
description = "nixpkgs overlay";
|
||||
check = lib.isFunction;
|
||||
merge = lib.mergeOneOption;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.nixpkgs = {
|
||||
overlays = mkOption {
|
||||
default = [ ];
|
||||
type = types.listOf overlayType;
|
||||
example = literalExpression
|
||||
''
|
||||
[
|
||||
(self: super: {
|
||||
openssh = super.openssh.override {
|
||||
hpnSupport = true;
|
||||
kerberos = self.libkrb5;
|
||||
};
|
||||
})
|
||||
]
|
||||
'';
|
||||
};
|
||||
channels = mkOption {
|
||||
default = { };
|
||||
example = literalExpression ''
|
||||
{
|
||||
stable = inputs.nixpkgs-stable;
|
||||
}
|
||||
'';
|
||||
type = with types; attrsOf package;
|
||||
};
|
||||
overlaysForAllChannels = mkEnableOption "apply overlays for all channels";
|
||||
};
|
||||
|
||||
config.nixpkgs = {
|
||||
overlays =
|
||||
let
|
||||
channelOverlays = _: prev:
|
||||
mapAttrs
|
||||
(_: value:
|
||||
import value {
|
||||
inherit (prev) system;
|
||||
overlays = optional cfg.overlaysForAllChannels cfg.overlays;
|
||||
}
|
||||
)
|
||||
cfg.channels;
|
||||
in
|
||||
cfg.overlays ++ [ channelOverlays ];
|
||||
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
|
@ -43,7 +44,7 @@ let
|
|||
|
||||
gi = pkgs.writeFishApplication {
|
||||
name = "gi";
|
||||
runtimeInputs = with pkgs; [ fzf gum curl ];
|
||||
runtimeInputs = with pkgs; [ fzf gum curl coreutils-full ];
|
||||
text = /* fish */ ''
|
||||
set url https://www.gitignore.io/api
|
||||
|
||||
|
@ -56,10 +57,12 @@ let
|
|||
set choice (string join "," $argv[1..])
|
||||
end
|
||||
|
||||
set contents "$(curl -sL $url/$choice | head -n -2 | tail -n +4)"
|
||||
|
||||
if gum confirm "Overwrite current .gitignore?"
|
||||
curl -sL $url/$choice > .gitignore
|
||||
echo "$contents" > .gitignore
|
||||
else
|
||||
curl -sL $url/$choice >> .gitignore
|
||||
echo "$contents" >> .gitignore
|
||||
end
|
||||
'';
|
||||
completions = /* fish */ ''
|
||||
|
@ -76,7 +79,7 @@ in
|
|||
isNormalUser = true;
|
||||
home = "/home/moritz";
|
||||
extraGroups = [ "wheel" "networkmanager" "video" ];
|
||||
initialPassword = "password"; # CHANGE ME PLEASE
|
||||
# initialPassword = "password"; # CHANGE ME PLEASE
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO" # Laptop
|
||||
|
@ -88,6 +91,95 @@ in
|
|||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
my = {
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(_: prev:
|
||||
{
|
||||
nur = import inputs.nur {
|
||||
pkgs = prev;
|
||||
nurpkgs = prev;
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
final: _:
|
||||
|
||||
with final.lib;
|
||||
rec {
|
||||
fishFile =
|
||||
{ name
|
||||
, destination
|
||||
, content
|
||||
, checkPhase ? null
|
||||
}:
|
||||
final.writeTextFile {
|
||||
inherit name destination;
|
||||
executable = true;
|
||||
allowSubstitutes = true;
|
||||
preferLocalBuild = false;
|
||||
text = ''
|
||||
#!${getExe final.fish}
|
||||
|
||||
${content}
|
||||
'';
|
||||
|
||||
checkPhase =
|
||||
if checkPhase == null then ''
|
||||
runHook preCheck
|
||||
${getExe final.fish} -n "$target"
|
||||
runHook postCheck
|
||||
''
|
||||
else checkPhase;
|
||||
};
|
||||
|
||||
writeFishApplication =
|
||||
{ name
|
||||
, text
|
||||
, completions ? null
|
||||
, runtimeInputs ? [ ]
|
||||
, checkPhase ? null
|
||||
}:
|
||||
let
|
||||
runtimeHeader = optionalString (runtimeInputs != [ ])
|
||||
''export PATH="${makeBinPath runtimeInputs}:$PATH"'';
|
||||
|
||||
script = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_script";
|
||||
destination = "/bin/${name}";
|
||||
content = concatLines [ runtimeHeader text ];
|
||||
};
|
||||
completions_file = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_completions";
|
||||
destination = "/share/fish/vendor_completions.d/${name}.fish";
|
||||
content = concatLines [ runtimeHeader completions ];
|
||||
};
|
||||
in
|
||||
final.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [
|
||||
script
|
||||
] ++ optional (completions != null) completions_file;
|
||||
};
|
||||
}
|
||||
)
|
||||
(
|
||||
_: prev: {
|
||||
xorg = prev.xorg // {
|
||||
lndir = prev.xorg.lndir.overrideAttrs (_: {
|
||||
meta.mainProgram = "lndir";
|
||||
});
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
channels = {
|
||||
master = inputs.master;
|
||||
stable = inputs.stable;
|
||||
};
|
||||
};
|
||||
|
||||
bin.enable = true;
|
||||
shell = {
|
||||
abbreviations = {
|
||||
|
@ -157,16 +249,17 @@ in
|
|||
parallel
|
||||
ripgrep
|
||||
vim
|
||||
viu
|
||||
(viu.override { withSixel = true; })
|
||||
wget
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
packages = [
|
||||
(pkgs.nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
pkgs.master.intel-one-mono
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkDefault;
|
||||
cfg = config.my.profiles.desktop;
|
||||
in
|
||||
{
|
||||
|
@ -90,6 +90,15 @@ in
|
|||
stable.texlive.combined.scheme-full # NOTE breaks often
|
||||
thunderbird
|
||||
vlc
|
||||
(symlinkJoin {
|
||||
name = "obsidian-wayland";
|
||||
paths = [ obsidian ];
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/obsidian \
|
||||
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
|
|
@ -42,18 +42,19 @@ in
|
|||
".SynologyDrive/log"
|
||||
".cache/keepassxc"
|
||||
".cache/nvim/luac"
|
||||
".cat_installer" # eduroam
|
||||
".config/JetBrains"
|
||||
".config/Nextcloud"
|
||||
".config/calibre"
|
||||
".config/github-copilot"
|
||||
".config/kdeconnect"
|
||||
".config/keepassxc"
|
||||
".java/.userPrefs/jetbrains/"
|
||||
".local/share/JetBrains"
|
||||
".local/share/direnv"
|
||||
".local/share/nvim"
|
||||
".local/share/zoxide"
|
||||
".local/share/JetBrains"
|
||||
".config/JetBrains"
|
||||
".config/calibre"
|
||||
".local/state/nvim"
|
||||
".config/kdeconnect"
|
||||
".config/github-copilot"
|
||||
".cat_installer" # eduroam
|
||||
".mozilla"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
|
@ -68,6 +69,7 @@ in
|
|||
".local/share/fish/fish_history"
|
||||
".local/share/nix/trusted-settings.json"
|
||||
".parallel/will-cite"
|
||||
".local/state/tofi-history"
|
||||
];
|
||||
};
|
||||
users.root = {
|
||||
|
|
|
@ -4,16 +4,23 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.profiles.webis;
|
||||
inherit (lib) mkEnableOption mkIf;
|
||||
in
|
||||
|
||||
{
|
||||
options.my.profiles.webis.enable = mkEnableOption "webis profile";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.programs.ssh.includeSecrets = [ ../../secrets/webis-ssh.age ];
|
||||
my.programs = {
|
||||
ssh.includeSecrets = [ ../../secrets/webis-ssh.age ];
|
||||
jetbrains = {
|
||||
pycharm.enable = true;
|
||||
pycharm.package = pkgs.jetbrains.pycharm-professional;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.webis = {
|
||||
file = ../../secrets/webis.age;
|
||||
name = "webis.ovpn";
|
||||
|
@ -25,9 +32,6 @@ in
|
|||
updateResolvConf = true;
|
||||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
jetbrains.pycharm-professional
|
||||
];
|
||||
programs.dconf.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.exercism;
|
||||
in
|
||||
{
|
||||
options.my.programs.exercism.enable = mkEnableOption "Exercism";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [ exercism ];
|
||||
|
||||
age.secrets.exercism = {
|
||||
path = "/home/moritz/.config/exercism/user.json";
|
||||
file = ../../secrets/exercism.age;
|
||||
owner = "1000";
|
||||
mode = "500";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -29,19 +29,36 @@ in
|
|||
);
|
||||
};
|
||||
};
|
||||
setSearchEngines = mkEnableOption "firefox search engines";
|
||||
package = mkOption {
|
||||
type = types.package;
|
||||
default = pkgs.firefox;
|
||||
example = pkgs.firefox-esr;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.firefox = {
|
||||
enable = true;
|
||||
policies = mkIf cfg.setSearchEngines {
|
||||
SearchEngines = {
|
||||
policies =
|
||||
let
|
||||
removeExtensions = [ "Google" "Amazon.de" "Bing" "Amazon" "Wikipedia (en)" "Wikipedia (de)" ];
|
||||
convertName = name:
|
||||
let
|
||||
lower = toLower name;
|
||||
escaped = replaceStrings [ "." ] [ "dot" ] lower;
|
||||
sanitized = head (splitString " " escaped);
|
||||
in
|
||||
"${sanitized}@search.mozilla.org";
|
||||
in
|
||||
{
|
||||
SearchEngines = mkIf (hasInfix "esr" cfg.package) {
|
||||
Default = "Kagi";
|
||||
Remove = [ "Google" "Amazon.de" "Bing" ];
|
||||
Remove = removeExtensions;
|
||||
};
|
||||
ExtensionSettings = genAttrs
|
||||
(map convertName removeExtensions)
|
||||
(_: { installation_mode = "blocked"; });
|
||||
};
|
||||
package = if cfg.setSearchEngines then pkgs.firefox-esr else pkgs.firefox;
|
||||
profiles."default" = {
|
||||
extraConfig = mkIf cfg.arkenfox.enable ''
|
||||
// Arkenfox user.js
|
||||
|
|
|
@ -31,7 +31,7 @@ in
|
|||
enable = true;
|
||||
shellAbbrs = shellConfig.abbreviations;
|
||||
shellAliases = shellConfig.aliases;
|
||||
shellInit = ''
|
||||
shellInit = /* fish */ ''
|
||||
# Vi Mode
|
||||
fish_vi_key_bindings
|
||||
|
||||
|
@ -62,7 +62,7 @@ in
|
|||
end
|
||||
abbr --add dotdot --regex '^\.\.+$' --function multicd
|
||||
|
||||
abbr -a P --position anywhere --set-cursor "% | $PAGER"
|
||||
abbr -a .P --position anywhere --set-cursor "% | $PAGER"
|
||||
|
||||
function editor_edit
|
||||
echo $EDITOR $argv
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.foot;
|
||||
in
|
||||
{
|
||||
options.my.programs.foot.enable = mkEnableOption "foot";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "FiraCode Nerd Font:size=10";
|
||||
};
|
||||
colors = {
|
||||
alpha = 0.98;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
|
@ -30,18 +29,24 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
my.shell.abbreviations = {
|
||||
g = "git";
|
||||
gC = "git clone";
|
||||
gF = "git pull";
|
||||
gS = "git switch";
|
||||
ga = "git add";
|
||||
gap = "git add --patch";
|
||||
gr = "git restore";
|
||||
grp = "git restore --patch";
|
||||
gb = "git branch";
|
||||
gc = "git commit";
|
||||
gco = "git checkout";
|
||||
gd = "git diff";
|
||||
gds = "git diff --staged";
|
||||
gp = "git push";
|
||||
gf = "git fetch";
|
||||
gF = "git pull";
|
||||
gp = "git push";
|
||||
gr = "git restore";
|
||||
grm = "git rm --cached";
|
||||
grp = "git restore --patch";
|
||||
grps = "git restore --patch --staged";
|
||||
grs = "git restore --staged";
|
||||
gs = "git status";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
|
@ -50,21 +55,23 @@ in
|
|||
userName = cfg.identity.name;
|
||||
userEmail = cfg.identity.email;
|
||||
extraConfig = {
|
||||
commit.verbose = true;
|
||||
diff.algorithm = "histogram";
|
||||
fetch.fsckobjects = true;
|
||||
init.defaultBranch = "main";
|
||||
merge.conflictstyle = "zdiff3";
|
||||
diff.external = getExe pkgs.difftastic;
|
||||
push.autoSetupRemote = true;
|
||||
receive.fsckObjects = true;
|
||||
transfer.fsckobjects = true;
|
||||
};
|
||||
signing = mkIf cfg.signing {
|
||||
key = "0x970C6E89EB0547A9";
|
||||
signByDefault = true;
|
||||
};
|
||||
lfs.enable = true;
|
||||
delta.enable = true;
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config.safe.directory = "/home/moritz/.dotfiles";
|
||||
};
|
||||
programs.git.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, lib
|
||||
, ...
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
|
||||
cfg = config.my.programs.gitbutler;
|
||||
in
|
||||
{
|
||||
options.my.programs.gitbutler = {
|
||||
enable = mkEnableOption "gitbutler";
|
||||
package = mkOption {
|
||||
default = pkgs.callPackage ./package.nix { };
|
||||
type = types.package;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [ cfg.package ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{ fetchzip, appimageTools }:
|
||||
|
||||
let
|
||||
pname = "git-butler";
|
||||
version = "0.12.4";
|
||||
buildNum = "994";
|
||||
|
||||
srcZipped = fetchzip {
|
||||
url = "https://releases.gitbutler.com/releases/release/${version}-${buildNum}/linux/x86_64/git-butler_${version}_amd64.AppImage.tar.gz";
|
||||
hash = "sha256-+QP+H0bVSLbobv/W6lFBbl08RnwKvG8BVo68bwMrAzM=";
|
||||
};
|
||||
in
|
||||
appimageTools.wrapType2 {
|
||||
inherit pname version;
|
||||
src = "${srcZipped}/git-butler_${version}_amd64.AppImage";
|
||||
}
|
|
@ -20,10 +20,7 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware = {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
opengl.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
};
|
||||
services.xserver = {
|
||||
|
|
|
@ -3,10 +3,18 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) concatStringsSep flip boolToString mapAttrsToList;
|
||||
cfg = config.my.programs.hyprland;
|
||||
|
||||
mkMonitor = { name, resolution, position, scale, disabled, extra }:
|
||||
if disabled
|
||||
then "monitor=${name},disabled"
|
||||
else "monitor=${name},${resolution},${position},${scale},${extra}";
|
||||
|
||||
monitorsList = mapAttrsToList (name: value: { name = name; } // value) cfg.monitors;
|
||||
monitors = map mkMonitor monitorsList;
|
||||
|
||||
mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}";
|
||||
mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules);
|
||||
in
|
||||
|
@ -17,17 +25,14 @@ in
|
|||
#
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
${concatLines (map (x: "monitor=${x}") cfg.monitors)}
|
||||
${concatStringsSep "\n" monitors}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
|
||||
input {
|
||||
kb_layout = ${concatStringsSep "," cfg.keyboardLayouts}
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options = grp:win_space_toggle,caps:escape
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
|
@ -47,11 +52,13 @@ in
|
|||
col.active_border = rgba(1affffee)
|
||||
col.inactive_border = rgba(595959aa)
|
||||
|
||||
cursor_inactive_timeout = 1
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
cursor {
|
||||
inactive_timeout = 1
|
||||
}
|
||||
|
||||
decoration {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
|
@ -102,7 +109,7 @@ in
|
|||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
no_gaps_when_only = true
|
||||
new_is_master = false
|
||||
new_on_top = false
|
||||
}
|
||||
|
||||
gestures {
|
||||
|
@ -117,15 +124,22 @@ in
|
|||
force_default_wallpaper = 0
|
||||
}
|
||||
|
||||
xwayland {
|
||||
force_zero_scaling = true
|
||||
}
|
||||
|
||||
# scale non native wayland gtk applications
|
||||
env = GDK_SCALE,1.2
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# Firefox Sharing Indicator
|
||||
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator.*)$"]}
|
||||
${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator.*)$"]}
|
||||
|
||||
# Emacs
|
||||
windowrulev2 = opaque, class:^(emacs)$
|
||||
|
||||
# Fullscreen Applications
|
||||
${mkRules ["opaque" "noblur" "noborder" "noshadow" "forceinput"] ["fullscreen:1"]}
|
||||
${mkRules ["opaque" "noblur" "noborder" "noshadow" "allowsinput"] ["fullscreen:1"]}
|
||||
|
||||
${mkRules ["tile" "opaque"] ["class:^(neovide)$"]}
|
||||
|
||||
|
@ -133,7 +147,7 @@ in
|
|||
windowrulev2 = rounding 0, xwayland:1, floating:1
|
||||
windowrulev2 = center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$
|
||||
windowrulev2 = size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$
|
||||
${mkRules ["opaque" "noshadow" "noblur" "noanim" "move cursor 5 5"] ["class:^(.*jetbrains-.*)$"]}
|
||||
windowrulev2 = nofocus, class:^jetbrains-(?!toolbox), floating:1, title:^win\d+$
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
$mainMod = SUPER
|
||||
|
@ -154,8 +168,8 @@ in
|
|||
bind = $mainMod , D , exec , hyprctl keyword general:layout dwindle
|
||||
bind = $mainMod , M , exec , hyprctl keyword general:layout master
|
||||
bind = $mainMod , R , exec , rofi -show combi
|
||||
# bind = $mainMod , RETURN , exec , systemctl --user is-active --quiet foot && footclient --no-wait || foot
|
||||
bind = $mainMod , RETURN , exec , kitty
|
||||
bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new "ts || tn home ~"
|
||||
|
||||
# XF86 keys
|
||||
binde = , XF86AudioLowerVolume , exec , pamixer -d 5
|
||||
|
@ -218,6 +232,14 @@ in
|
|||
# Toggle waybar
|
||||
bindr = $mainMod , SUPER_L , exec , pkill -USR1 waybar
|
||||
|
||||
# Lid open/close
|
||||
bindl=,switch:on:Lid Switch,exec,monitors="$(hyprctl monitors | grep -c '^Monitor')" && hyprctl keyword monitor "eDP-1, disable" && [ "$monitors" = 1 ] && loginctl lock-session
|
||||
bindl=,switch:off:Lid Switch,exec, hyprctl keyword monitor "eDP-1, preferred, auto"
|
||||
|
||||
|
||||
# Lock Screen
|
||||
bind=$mainMod ALT, L, exec, loginctl lock-session
|
||||
|
||||
# Extra Config
|
||||
${cfg.extraConfig}
|
||||
''
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
, ...
|
||||
} @ args:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkOption mkEnableOption mkIf types getExe genAttrs optionalAttrs optional;
|
||||
cfg = config.my.programs.hyprland;
|
||||
|
||||
hyprland = config.programs.hyprland.finalPackage;
|
||||
hyprland = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
in
|
||||
{
|
||||
options.my.programs.hyprland = {
|
||||
|
@ -31,9 +31,35 @@ in
|
|||
default = [ "de" "us" ];
|
||||
};
|
||||
monitors = mkOption {
|
||||
type = types.attrsOf (
|
||||
let
|
||||
sub = types.submodule {
|
||||
options = {
|
||||
resolution = mkOption {
|
||||
type = types.strMatching "\(preferred\)|\([[:digit:]]+x[[:digit:]]+\(@[[:digit:]]+\)\?\)";
|
||||
default = "preferred";
|
||||
};
|
||||
position = mkOption {
|
||||
type = types.strMatching "\(auto\)|\(-\?[[:digit:]]+x-?[[:digit:]]+\)";
|
||||
default = "auto";
|
||||
};
|
||||
disabled = mkEnableOption "disabled";
|
||||
scale = mkOption {
|
||||
type = types.oneOf [ types.float (types.strMatching "auto") ];
|
||||
default = 1.0;
|
||||
apply = x: if lib.isFloat x then lib.strings.floatToString x else x;
|
||||
};
|
||||
extra = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "monitor settings";
|
||||
default = [ ",preferred,auto,1" ];
|
||||
default = [ ];
|
||||
apply = lib.concatStringsSep ",";
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
sub
|
||||
);
|
||||
description = "monitor setting";
|
||||
};
|
||||
extraConfig = mkOption {
|
||||
type = types.str;
|
||||
|
@ -43,10 +69,16 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
my = {
|
||||
nixpkgs.overlays = [
|
||||
inputs.hypr-contrib.overlays.default
|
||||
];
|
||||
programs = {
|
||||
wallpaper.enable = true;
|
||||
# foot.enable = true;
|
||||
kitty.enable = true;
|
||||
rofi.enable = true;
|
||||
hyprland.monitors."" = lib.mkDefault { };
|
||||
hyprland.monitors."Unknown-1" = { disabled = true; };
|
||||
};
|
||||
wallpapers.enable = true;
|
||||
services = {
|
||||
|
@ -61,7 +93,7 @@ in
|
|||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
package = hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
|
@ -81,6 +113,14 @@ in
|
|||
# add waybar as a status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (old: {
|
||||
patches = old.patches or [ ] ++ [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/waybar/-/raw/0306af03fcb6de6aee1e288f42b0bf1b223513bd/a544f4b2cdcf632f1a4424b89f6e3d85ef5aaa85.patch";
|
||||
sha256 = "sha256-S/1oUj9Aj6BElNTsDY8CTcKtS1j7Gl54JFgCywH05pg=";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
# start using systemd service
|
||||
systemd = {
|
||||
|
@ -93,7 +133,7 @@ in
|
|||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
height = 24;
|
||||
modules-left = [ "hyprland/workspaces" ];
|
||||
modules-center = [ "hyprland/window" ];
|
||||
modules-right = [ "hyprland/language" "network" "memory" "cpu" "battery" "clock" ];
|
||||
|
@ -192,17 +232,16 @@ in
|
|||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
defaultSession = "hyprland";
|
||||
};
|
||||
};
|
||||
xserver.enable = true;
|
||||
xserver.displayManager.lightdm.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) any filterAttrs mapAttrsToList mkEnableOption mkIf mkOption;
|
||||
|
||||
cfg = config.my.programs.jetbrains;
|
||||
isEnabled = _: value: value.enable;
|
||||
anyEnabled = any (x: x) (mapAttrsToList isEnabled cfg);
|
||||
in
|
||||
{
|
||||
options.my.programs.jetbrains = {
|
||||
pycharm = {
|
||||
enable = mkEnableOption "pycharm";
|
||||
package = mkOption {
|
||||
default = pkgs.jetbrains.pycharm-community;
|
||||
};
|
||||
};
|
||||
idea = {
|
||||
enable = mkEnableOption "idea";
|
||||
package = mkOption {
|
||||
default = pkgs.jetbrains.idea-community;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf anyEnabled {
|
||||
home-manager.users.moritz = {
|
||||
xdg.configFile."ideavim/ideavimrc" = {
|
||||
source = ./ideavimrc;
|
||||
};
|
||||
home.packages =
|
||||
let
|
||||
enabledPackages = filterAttrs isEnabled cfg;
|
||||
in
|
||||
mapAttrsToList (_: value: value.package) enabledPackages;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
""" Map leader to space ---------------------
|
||||
let mapleader=" "
|
||||
|
||||
""" Plugins --------------------------------
|
||||
set surround
|
||||
set commentary
|
||||
set NERDTree
|
||||
|
||||
""" Common settings -------------------------
|
||||
set showmode
|
||||
set so=5
|
||||
set incsearch
|
||||
set nu
|
||||
set relativenumber
|
||||
set number
|
||||
|
||||
""" Which-Key
|
||||
set which-key
|
||||
set timeoutlen=5000
|
||||
|
||||
""" Idea specific settings ------------------
|
||||
set ideajoin
|
||||
|
||||
""" Mappings --------------------------------
|
||||
"" Quick action
|
||||
let g:WhichKeyDesc_quick_action = '<leader>q Quick action'
|
||||
map <leader>q <Action>(ShowIntentionActions)
|
||||
|
||||
"" Refactor binds
|
||||
let g:WhichKeyDesc_inline = '<leader>i Inline'
|
||||
map <leader>i <Action>(Inline)
|
||||
|
||||
let g:WhichKeyDesc_extract = '<leader>e Extract'
|
||||
let g:WhichKeyDesc_extract_variable = '<leader>ev Extract variable'
|
||||
map <leader>ev <Action>(IntroduceVariable)
|
||||
let g:WhichKeyDesc_extract_constant = '<leader>ec Extract constant'
|
||||
map <leader>ec <Action>(IntroduceConstant)
|
||||
let g:WhichKeyDesc_extract_field = '<leader>ef Extract field'
|
||||
map <leader>ef <Action>(IntroduceField)
|
||||
let g:WhichKeyDesc_extract_parameter = '<leader>ep Extract parameter'
|
||||
map <leader>ep <Action>(IntroduceParameter)
|
||||
let g:WhichKeyDesc_extract_method = '<leader>em Extract method'
|
||||
map <leader>em <Action>(ExtractMethod)
|
||||
|
||||
let g:WhichKeyDesc_rename = '<leader>r Rename'
|
||||
map <leader>r <Action>(RenameElement)
|
||||
|
||||
"" Navigation
|
||||
let g:WhichKeyDesc_prev_buffer = ']b Previous buffer'
|
||||
map [b <Action>(PreviousTab)
|
||||
let g:WhichKeyDesc_next_buffer = ']b Next buffer'
|
||||
map ]b <Action>(NextTab)
|
||||
|
||||
let g:WhichKeyDesc_goto_impl = 'gI Goto implementation'
|
||||
map gI <Action>(GotoImplementation)
|
||||
let g:WhichKeyDesc_goto_type = 'gt Goto type declaration'
|
||||
map gt <Action>(GotoTypeDeclaration)
|
||||
|
||||
"" Other
|
||||
let g:WhichKeyDesc_terminal = '<leader>t Terminal'
|
||||
map <leader>t <Action>(ActivateTerminalToolWindow)
|
||||
map = <Action>(ReformatCode)
|
||||
|
||||
"" Folding
|
||||
let g:WhichKeyDesc_folding = 'z Folding'
|
||||
let g:WhichKeyDesc_folding_toggle = 'za Toggle fold'
|
||||
map za <Action>(ExpandCollapseToggleAction)
|
||||
|
||||
let g:WhichKeyDesc_folding_expand = 'zr Fold less'
|
||||
map zr <Action>(ExpandRegion)
|
||||
let g:WhichKeyDesc_folding_collapse = 'zR Open all folds'
|
||||
map zR <Action>(ExpandAllRegions)
|
||||
let g:WhichKeyDesc_folding_collapse = 'zm Fold more'
|
||||
map zm <Action>(CollapseRegion)
|
||||
let g:WhichKeyDesc_folding_collapse = 'zM Close all folds'
|
||||
map zM <Action>(CollapseAllRegions)
|
||||
|
||||
let g:WhichKeyDesc_folding_collapse_doc = 'zc Collapse doc comments'
|
||||
map zc <Action>(CollapseDocComments)
|
||||
let g:WhichKeyDesc_folding_expand_doc = 'zC Expand doc comments'
|
||||
map zC <Action>(ExpandDocComments)
|
||||
|
||||
let g:WhichKeyDesc_folding_expand_level_one = 'z1 Expand all to level 1'
|
||||
map z1 <Action>(ExpandAllToLevel1)
|
||||
let g:WhichKeyDesc_folding_expand_level_two = 'z2 Expand all to level 2'
|
||||
map z2 <Action>(ExpandAllToLevel2)
|
||||
let g:WhichKeyDesc_folding_expand_level_three = 'z3 Expand all to level 3'
|
||||
map z3 <Action>(ExpandAllToLevel3)
|
||||
let g:WhichKeyDesc_folding_expand_level_four = 'z4 Expand all to level 4'
|
||||
map z4 <Action>(ExpandAllToLevel4)
|
|
@ -22,13 +22,15 @@ in
|
|||
window_padding_width = 3;
|
||||
confirm_os_window_close = 0;
|
||||
background_opacity = "0.9";
|
||||
font_features = "IntelOneMono-Regular +ss01";
|
||||
resize_in_steps = "yes";
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+plus" = "change_font_size all +2.0";
|
||||
"ctrl+minus" = "change_font_size all -2.0";
|
||||
};
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
name = "Intel One Mono";
|
||||
size = 10;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -6,9 +6,16 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkEnableOption mkOption types;
|
||||
|
||||
cfg = config.my.programs.nix;
|
||||
mkNom = system: nix:
|
||||
inputs.nix-monitored.packages.${system}.default.override
|
||||
{
|
||||
withNotify = false;
|
||||
nix = nix;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.programs.nix = {
|
||||
|
@ -23,10 +30,24 @@ in
|
|||
optimise.enable = mkEnableOption "nix-optimise";
|
||||
};
|
||||
|
||||
config.nix = {
|
||||
config = {
|
||||
my.nixpkgs.overlays = [
|
||||
(final: prev:
|
||||
{
|
||||
nixos-rebuild = prev.nixos-rebuild.override {
|
||||
nix = mkNom final.system final.nix;
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.moritz.programs.direnv.nix-direnv.package = pkgs.nix-direnv.override {
|
||||
nix = config.nix.package;
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
|
||||
package = inputs.nix-super.packages.${pkgs.system}.default;
|
||||
package = pkgs.nix;
|
||||
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
|
||||
|
@ -52,6 +73,7 @@ in
|
|||
stable.flake = inputs.stable;
|
||||
dotfiles.flake = self;
|
||||
default.flake = self;
|
||||
d.flake = self;
|
||||
};
|
||||
|
||||
settings = {
|
||||
|
@ -65,4 +87,5 @@ in
|
|||
trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf readFile;
|
||||
|
||||
cfg = config.my.programs.nvim;
|
||||
in
|
||||
{
|
||||
|
@ -11,12 +12,13 @@ in
|
|||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
xdg.configFile."nvim/snippets" = {
|
||||
recursive = true;
|
||||
source = ./plugins/snippets;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(
|
||||
if config.my.programs.hyprland.enable
|
||||
then neovide-hyprland
|
||||
else neovide
|
||||
)
|
||||
xdotool # for vimtex
|
||||
];
|
||||
|
||||
programs.neovim = {
|
||||
|
@ -39,12 +41,12 @@ in
|
|||
nixd
|
||||
nixpkgs-fmt
|
||||
nodePackages.bash-language-server
|
||||
nodePackages.jsonlint
|
||||
python3Packages.python-lsp-server
|
||||
shellcheck
|
||||
shfmt
|
||||
stable.yamlfix
|
||||
statix
|
||||
taplo
|
||||
stable.yamlfix
|
||||
yamllint
|
||||
];
|
||||
extraLuaConfig = readFile ./options.lua;
|
||||
|
|
|
@ -1,73 +1,28 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{ pkgs, lib, inputs, ... }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
inherit (builtins) readFile;
|
||||
in
|
||||
{
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
|
||||
{
|
||||
plugin = oil-nvim;
|
||||
plugin = pkgs.vimPlugins.oil-nvim;
|
||||
lazy = false;
|
||||
opts = { };
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = nvim-web-devicons; }
|
||||
];
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
|
||||
}
|
||||
{
|
||||
plugin = mini-nvim;
|
||||
plugin = pkgs.vimPlugins.lualine-nvim;
|
||||
opts = { };
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.nvim-web-devicons; }];
|
||||
}
|
||||
{
|
||||
plugin = pkgs.vimPlugins.mini-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./lua/mini-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = trouble-nvim;
|
||||
cmd = [ "TodoTelescope" ];
|
||||
keys = [
|
||||
{
|
||||
key = "<leader>cD";
|
||||
cmd = "<cmd>TroubleToggle document_diagnostics<cr>";
|
||||
desc = "Document Diagnostics (Trouble)";
|
||||
}
|
||||
{
|
||||
key = "<leader>cW";
|
||||
cmd = "<cmd>TroubleToggle workspace_diagnostics<cr>";
|
||||
desc = "Workspace Diagnostics (Trouble)";
|
||||
}
|
||||
{ key = "<leader>cl"; cmd = "<cmd>TroubleToggle loclist<cr>"; desc = "Location List (Trouble)"; }
|
||||
{ key = "<leader>cq"; cmd = "<cmd>TroubleToggle quickfix<cr>"; desc = "Quickfix List (Trouble)"; }
|
||||
{ key = "<leader>ft"; cmd = "<cmd>TodoTelescope<cr>"; desc = "Todo"; }
|
||||
{
|
||||
key = "[q";
|
||||
func = /* lua */ ''
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").previous({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cprev()
|
||||
end
|
||||
end
|
||||
'';
|
||||
desc = "Previous trouble/quickfix item";
|
||||
}
|
||||
{
|
||||
key = "]q";
|
||||
func = /* lua */ ''
|
||||
function()
|
||||
if require("trouble").is_open() then
|
||||
require("trouble").next({ skip_groups = true, jump = true })
|
||||
else
|
||||
vim.cmd.cnext()
|
||||
end
|
||||
end
|
||||
'';
|
||||
desc = "Next trouble/quickfix item";
|
||||
}
|
||||
];
|
||||
opts = { };
|
||||
dependencies = [
|
||||
{ plugin = nvim-web-devicons; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-cmp;
|
||||
plugin = pkgs.vimPlugins.nvim-cmp;
|
||||
keys = [
|
||||
{ key = "<leader>tc"; cmd = "<cmd>CmpToggle<cr>"; desc = "Toggle Cmp sources"; }
|
||||
];
|
||||
|
@ -75,82 +30,94 @@ with builtins;
|
|||
event = [ "InsertEnter" ];
|
||||
dependencies = [
|
||||
{
|
||||
plugin = nvim-autopairs;
|
||||
plugin = pkgs.vimPlugins.nvim-autopairs;
|
||||
opts = { };
|
||||
}
|
||||
{ plugin = cmp-async-path; }
|
||||
{ plugin = cmp-buffer; }
|
||||
{ plugin = cmp-cmdline; }
|
||||
{ plugin = cmp-nvim-lsp; }
|
||||
{ plugin = cmp_luasnip; }
|
||||
{ plugin = cmp-spell; }
|
||||
{ plugin = cmp-nvim-lsp-signature-help; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-async-path; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-buffer; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-cmdline; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp-signature-help; }
|
||||
{ plugin = pkgs.vimPlugins.cmp-nvim-lsp; }
|
||||
{
|
||||
plugin = copilot-cmp;
|
||||
opts = { };
|
||||
dependencies = [
|
||||
{
|
||||
plugin = copilot-lua;
|
||||
opts = {
|
||||
suggestion = { enabled = false; };
|
||||
panel = { enabled = false; };
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "cmp-vimtex";
|
||||
version = lib.my.mkVersionInput inputs.cmp-vimtex;
|
||||
src = inputs.cmp-vimtex;
|
||||
};
|
||||
conf = /* lua */ ''
|
||||
require("copilot").setup(opts)
|
||||
vim.cmd("Copilot disable")
|
||||
'';
|
||||
}
|
||||
];
|
||||
{ plugin = pkgs.vimPlugins.cmp_luasnip; }
|
||||
# {
|
||||
# plugin = pkgs.vimPlugins.copilot-cmp;
|
||||
# opts = { };
|
||||
# dependencies = [
|
||||
# {
|
||||
# plugin = pkgs.vimPlugins.copilot-lua;
|
||||
# opts = {
|
||||
# suggestion = { enabled = false; };
|
||||
# panel = { enabled = false; };
|
||||
# };
|
||||
# conf = /* lua */ ''
|
||||
# require("copilot").setup(opts)
|
||||
# vim.cmd("Copilot disable")
|
||||
# '';
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
{ plugin = pkgs.vimPlugins.friendly-snippets; }
|
||||
{ plugin = pkgs.vimPlugins.lspkind-nvim; }
|
||||
{
|
||||
plugin = pkgs.vimPlugins.luasnip;
|
||||
conf = readFile ./lua/luasnip.lua;
|
||||
}
|
||||
{ plugin = friendly-snippets; }
|
||||
{ plugin = lspkind-nvim; }
|
||||
{ plugin = luasnip; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = direnv-vim;
|
||||
plugin = pkgs.vimPlugins.direnv-vim;
|
||||
lazy = false;
|
||||
}
|
||||
{
|
||||
plugin = nvim-lspconfig;
|
||||
plugin = pkgs.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
||||
version = lib.my.mkVersionInput inputs.nvim-lspconfig;
|
||||
src = inputs.nvim-lspconfig;
|
||||
});
|
||||
event = [ "BufRead" "BufNewFile" ];
|
||||
conf = readFile ./lua/nvim-lspconfig.lua;
|
||||
dependencies = [
|
||||
{
|
||||
plugin = null-ls-nvim;
|
||||
# TODO: add all required tools to neovim or silence warnings
|
||||
plugin = pkgs.vimPlugins.none-ls-nvim;
|
||||
conf = readFile ./lua/null-ls-nvim.lua;
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = plenary-nvim; }
|
||||
{
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "none-ls-shellcheck.nvim";
|
||||
version = lib.my.mkVersionInput inputs.none-ls-shellcheck-nvim;
|
||||
src = inputs.none-ls-shellcheck-nvim;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = lsp_lines-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.lsp_lines-nvim; }
|
||||
{
|
||||
plugin = nvim-ufo;
|
||||
conf = readFile ./lua/nvim-ufo.lua;
|
||||
dependencies = [
|
||||
{ plugin = promise-async; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = neodev-nvim;
|
||||
conf = readFile ./lua/neodev-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = inc-rename-nvim;
|
||||
plugin = pkgs.vimPlugins.inc-rename-nvim;
|
||||
opts = {
|
||||
input_buffer_type = "dressing";
|
||||
};
|
||||
dependencies = [
|
||||
{ plugin = dressing-nvim; }
|
||||
];
|
||||
}
|
||||
{ plugin = actions-preview-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.dressing-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-fugitive;
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "actions-preview-nvim";
|
||||
version = lib.my.mkVersionInput inputs.actions-preview-nvim;
|
||||
src = inputs.actions-preview-nvim;
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = pkgs.vimPlugins.vim-fugitive;
|
||||
cmd = [
|
||||
"G"
|
||||
"Git"
|
||||
|
@ -176,13 +143,16 @@ with builtins;
|
|||
"GDelete"
|
||||
"GBrowse"
|
||||
];
|
||||
keys = [
|
||||
{ key = "<leader>gg"; cmd = "<cmd>Gedit :<cr>"; desc = "Open Status"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-tmux-navigator;
|
||||
plugin = pkgs.vimPlugins.vim-tmux-navigator;
|
||||
event = [ "VeryLazy" ];
|
||||
}
|
||||
{
|
||||
plugin = nvim-lastplace;
|
||||
plugin = pkgs.vimPlugins.nvim-lastplace;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = {
|
||||
lastplace_ignore_buftype = [ "quickfix" "nofile" "help" ];
|
||||
|
@ -191,7 +161,7 @@ with builtins;
|
|||
};
|
||||
}
|
||||
{
|
||||
plugin = telescope-nvim;
|
||||
plugin = pkgs.vimPlugins.telescope-nvim;
|
||||
cmd = [ "Telescope" ];
|
||||
conf = builtins.readFile ./lua/telescope.lua;
|
||||
keys = [
|
||||
|
@ -215,178 +185,49 @@ with builtins;
|
|||
{ key = "<leader>fr"; cmd = "<cmd>Telescope oldfiles<cr>"; desc = "Recent files"; }
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = telescope-fzf-native-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.plenary-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.telescope-fzf-native-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = vim-startuptime;
|
||||
plugin = pkgs.vimPlugins.vim-startuptime;
|
||||
cmd = [ "StartupTime" ];
|
||||
conf = readFile ./lua/vim-startuptime.lua;
|
||||
}
|
||||
{
|
||||
plugin = typst-vim;
|
||||
plugin = pkgs.vimPlugins.typst-vim;
|
||||
ft = [ "typst" "typ" ];
|
||||
}
|
||||
{
|
||||
plugin = comment-nvim;
|
||||
plugin = pkgs.vimPlugins.comment-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = telekasten-nvim;
|
||||
dependencies = [
|
||||
{ plugin = telescope-nvim; }
|
||||
{ plugin = which-key-nvim; }
|
||||
{
|
||||
plugin = markdown-preview-nvim;
|
||||
ft = [ "md" ];
|
||||
}
|
||||
];
|
||||
cmd = [ "Telekasten" ];
|
||||
keys = [
|
||||
{ key = "<leader>fz"; cmd = "<cmd>Telekasten<cr>"; desc = "Zettelkasten"; }
|
||||
];
|
||||
conf = builtins.readFile ./lua/zettelkasten-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = nvim-surround;
|
||||
plugin = pkgs.vimPlugins.nvim-surround;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = zen-mode-nvim;
|
||||
keys = [
|
||||
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
|
||||
];
|
||||
conf = /* lua */ ''
|
||||
require("zen-mode").setup({
|
||||
plugins = {
|
||||
tmux = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
dependencies = [
|
||||
{
|
||||
plugin = twilight-nvim;
|
||||
conf = /* lua */ ''
|
||||
require("twilight").setup({
|
||||
context = 20,
|
||||
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
||||
"function",
|
||||
"function_definition",
|
||||
"if_statement",
|
||||
"method",
|
||||
"method_definition",
|
||||
"table",
|
||||
},
|
||||
})
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = refactoring-nvim;
|
||||
keys = [
|
||||
{
|
||||
key = "<leader>cR";
|
||||
cmd = "<cmd>lua require('telescope').extensions.refactoring.refactors()<cr>";
|
||||
desc = "Refactor";
|
||||
mode = [ "x" "n" ];
|
||||
}
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = nvim-lspconfig; }
|
||||
];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = harpoon;
|
||||
keys = [
|
||||
{ key = "<leader>ha"; cmd = "<cmd>lua require('harpoon.mark').add_file()<cr>"; desc = "Add file"; }
|
||||
{ key = "<leader>hh"; cmd = "<cmd>lua require('harpoon.ui').toggle_quick_menu()<cr>"; desc = "Harpoon"; }
|
||||
{ key = "<leader>1"; cmd = "<cmd>lua require('harpoon.ui').nav_file(1)<cr>"; desc = "Harpoon file 1"; }
|
||||
{ key = "<leader>2"; cmd = "<cmd>lua require('harpoon.ui').nav_file(2)<cr>"; desc = "Harpoon file 2"; }
|
||||
{ key = "<leader>3"; cmd = "<cmd>lua require('harpoon.ui').nav_file(3)<cr>"; desc = "Harpoon file 3"; }
|
||||
{ key = "<leader>4"; cmd = "<cmd>lua require('harpoon.ui').nav_file(4)<cr>"; desc = "Harpoon file 4"; }
|
||||
];
|
||||
opts = { };
|
||||
init = /* lua */ ''
|
||||
require("which-key").register({
|
||||
["<leader>h"] = {
|
||||
name = "harpoon",
|
||||
},
|
||||
})
|
||||
'';
|
||||
dependencies = [
|
||||
{ plugin = which-key-nvim; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = nvim-puppeteer;
|
||||
lazy = false; # NOTE: plugin lazy-loads itself.
|
||||
}
|
||||
{
|
||||
plugin = neotest;
|
||||
keys = [
|
||||
{ key = "<leader>ct"; cmd = "<cmd>lua require('neotest').summary.toggle()<cr>"; desc = "Test"; }
|
||||
];
|
||||
dependencies = [
|
||||
{ plugin = plenary-nvim; }
|
||||
{ plugin = FixCursorHold-nvim; }
|
||||
|
||||
# adapters
|
||||
{ plugin = neotest-python; }
|
||||
];
|
||||
conf = readFile ./lua/neotest.lua;
|
||||
}
|
||||
{
|
||||
plugin = conform-nvim;
|
||||
plugin = pkgs.vimPlugins.conform-nvim;
|
||||
keys = [
|
||||
{ key = "="; cmd = "<cmd>lua require('conform').format()<cr>"; desc = "format buffer"; mode = [ "n" "v" ]; }
|
||||
];
|
||||
cmd = [ "ConformInfo" "Format" ];
|
||||
conf = readFile ./lua/conform.lua;
|
||||
}
|
||||
{ plugin = pkgs.vimPlugins.plantuml-syntax; }
|
||||
{
|
||||
plugin = neogen;
|
||||
keys = [
|
||||
{ key = "<leader>cg"; cmd = "<cmd>Neogen<cr>"; desc = "Test"; }
|
||||
];
|
||||
opts = {
|
||||
languages = {
|
||||
python = {
|
||||
template = {
|
||||
annotation_convention = "reST";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
cmd = [ "Neogen" ];
|
||||
}
|
||||
{
|
||||
plugin = gen-nvim;
|
||||
init = /* lua */ ''
|
||||
require("gen").setup({
|
||||
model = "zephyr:7b-beta", -- The default model to use.
|
||||
display_mode = "float", -- The display mode. Can be "float" or "split".
|
||||
show_prompt = false, -- Shows the Prompt submitted to Ollama.
|
||||
show_model = false, -- Displays which model you are using at the beginning of your chat session.
|
||||
no_auto_close = false, -- Never closes the window automatically.
|
||||
init = function(options) end,
|
||||
-- Function to initialize Ollama
|
||||
command = "${lib.getExe pkgs.curl} --silent --no-buffer -X POST http://localhost:11434/api/generate -d $body",
|
||||
-- The command for the Ollama service. You can use placeholders $prompt, $model and $body (shellescaped).
|
||||
-- This can also be a lua function returning a command string, with options as the input parameter.
|
||||
-- The executed command must return a JSON object with { response, context }
|
||||
-- (context property is optional).
|
||||
debug = false -- Prints errors and the command which is run.
|
||||
})
|
||||
plugin = pkgs.vimPlugins.vimtex;
|
||||
lazy = false;
|
||||
conf = /* lua */ ''
|
||||
vim.g.vimtex_view_method = "zathura"
|
||||
vim.g.vimtex_mappings_disable = vim.fn.executable("texlab") == 1 and { ["n"] = { "K" } } or {} -- disable `K` as it conflicts with LSP hover if texlab is in path
|
||||
vim.g.vimtex_quickfix_method = vim.fn.executable("pplatex") == 1 and "pplatex" or "latexlog"
|
||||
'';
|
||||
keys = [
|
||||
{ key = "<localleader>l"; cmd = ""; desc = "+vimtex"; }
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ local conform = require("conform")
|
|||
|
||||
local formatters_by_ft = {
|
||||
["*"] = { "codespell", "trim_whitespace" },
|
||||
elixir = { "mix" },
|
||||
gleam = { "gleam" },
|
||||
go = { "gofmt" },
|
||||
json = { "jq" },
|
||||
lua = { "stylua" },
|
||||
|
@ -9,12 +11,21 @@ local formatters_by_ft = {
|
|||
python = { { "ruff_fix", "isort" }, { "ruff_format", "black" } },
|
||||
rust = { "rustfmt" },
|
||||
sh = { "shfmt" },
|
||||
tex = { "latexindent" },
|
||||
toml = { "taplo" },
|
||||
yaml = { "yamlfix" },
|
||||
}
|
||||
|
||||
conform.setup({
|
||||
formatters_by_ft = formatters_by_ft,
|
||||
formatters = {
|
||||
gleam = {
|
||||
command = "gleam",
|
||||
args = { "format", "--stdin" },
|
||||
stdin = true,
|
||||
cwd = require("conform.util").root_file({ "gleam.toml" }),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_create_user_command("Format", function(opts)
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
require("gitsigns").setup()
|
||||
require("which-key").register({
|
||||
["[h"] = { "<cmd>Gitsigns prev_hunk<cr>", "Previous hunk" },
|
||||
["]h"] = { "<cmd>Gitsigns next_hunk<cr>", "Next hunk" },
|
||||
["<leader>g"] = {
|
||||
s = { "<cmd>Gitsigns stage_hunk<cr>", "Stage hunk", mode = { "n", "v" } },
|
||||
r = { "<cmd>Gitsigns reset_hunk<cr>", "Reset hunk", mode = { "n", "v" } },
|
||||
S = { "<cmd>Gitsigns stage_buffer<cr>", "Stage buffer" },
|
||||
R = { "<cmd>Gitsigns reset_buffer<cr>", "Reset buffer" },
|
||||
u = { "<cmd>Gitsigns undo_stage_hunk<cr>", "Undo stage hunk" },
|
||||
p = { "<cmd>Gitsigns preview_hunk_inline<cr>", "Preview hunk (inline)" },
|
||||
P = { "<cmd>Gitsigns preview_hunk<cr>", "Preview hunk (float)" },
|
||||
},
|
||||
["ih"] = { ":<C-U>Gitsigns select_hunk<cr>", "gitsigns hunk", mode = { "o", "x" } },
|
||||
require("which-key").add({
|
||||
{ "<leader>gP", "<cmd>Gitsigns preview_hunk<cr>", desc = "Preview hunk (float)" },
|
||||
{ "<leader>gR", "<cmd>Gitsigns reset_buffer<cr>", desc = "Reset buffer" },
|
||||
{ "<leader>gS", "<cmd>Gitsigns stage_buffer<cr>", desc = "Stage buffer" },
|
||||
{ "<leader>gp", "<cmd>Gitsigns preview_hunk_inline<cr>", desc = "Preview hunk (inline)" },
|
||||
{ "<leader>gu", "<cmd>Gitsigns undo_stage_hunk<cr>", desc = "Undo stage hunk" },
|
||||
{ "[h", "<cmd>Gitsigns prev_hunk<cr>", desc = "Previous hunk" },
|
||||
{ "]h", "<cmd>Gitsigns next_hunk<cr>", desc = "Next hunk" },
|
||||
{ "<leader>gr", "<cmd>Gitsigns reset_hunk<cr>", desc = "Reset hunk", mode = { "n", "v" } },
|
||||
{ "<leader>gs", "<cmd>Gitsigns stage_hunk<cr>", desc = "Stage hunk", mode = { "n", "v" } },
|
||||
{ "ih", ":<C-U>Gitsigns select_hunk<cr>", desc = "gitsigns hunk", mode = { "o", "x" } },
|
||||
})
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
local ls = require("luasnip")
|
||||
local types = require("luasnip.util.types")
|
||||
|
||||
-- Every unspecified option will be set to the default.
|
||||
ls.setup({
|
||||
history = true,
|
||||
|
||||
-- Update more often, :h events for more info.
|
||||
update_events = "TextChanged,TextChangedI",
|
||||
-- Snippets aren't automatically removed if their text is deleted.
|
||||
-- `delete_check_events` determines on which events (:h events) a check for
|
||||
-- deleted snippets is performed.
|
||||
-- This can be especially useful when `history` is enabled.
|
||||
delete_check_events = "TextChanged",
|
||||
ext_opts = {
|
||||
[types.choiceNode] = {
|
||||
active = {
|
||||
virt_text = { { "<--", "Error" } },
|
||||
},
|
||||
},
|
||||
},
|
||||
ft_func = require("luasnip.extras.filetype_functions").from_pos_or_filetype,
|
||||
})
|
||||
|
||||
require("luasnip.loaders.from_lua").load({ paths = "~/.config/nvim/snippets" })
|
|
@ -1,47 +1 @@
|
|||
require("mini.align").setup()
|
||||
require("mini.move").setup()
|
||||
|
||||
require("mini.statusline").setup({
|
||||
content = {
|
||||
active = function()
|
||||
local mode, mode_hl = MiniStatusline.section_mode({ trunc_width = 120 })
|
||||
local git = MiniStatusline.section_git({ trunc_width = 75 })
|
||||
local diagnostics = MiniStatusline.section_diagnostics({ trunc_width = 75 })
|
||||
local filename = MiniStatusline.section_filename({ trunc_width = 140 })
|
||||
local fileinfo = MiniStatusline.section_fileinfo({ trunc_width = 120 })
|
||||
local location = MiniStatusline.section_location({ trunc_width = 75 })
|
||||
local mode_hl_inverse = mode_hl .. "Inverse"
|
||||
-- Usage of `MiniStatusline.combine_groups()` ensures highlighting and
|
||||
-- correct padding with spaces between groups (accounts for 'missing'
|
||||
-- sections, etc.)
|
||||
return MiniStatusline.combine_groups({
|
||||
{ hl = mode_hl_inverse, strings = {} },
|
||||
"",
|
||||
{ hl = mode_hl, strings = { mode } },
|
||||
{ hl = "MiniStatuslineDevinfo", strings = { git, diagnostics } },
|
||||
"%<", -- Mark general truncate point
|
||||
{ hl = "MiniStatuslineFilename", strings = { filename } },
|
||||
"%=", -- End left alignment
|
||||
{ hl = "MiniStatuslineFileinfo", strings = { fileinfo } },
|
||||
{ hl = mode_hl, strings = { location } },
|
||||
{ hl = mode_hl_inverse, strings = {} },
|
||||
"",
|
||||
})
|
||||
end,
|
||||
},
|
||||
})
|
||||
local MiniStatuslineModes = {
|
||||
"MiniStatuslineModeInsert",
|
||||
"MiniStatuslineModeNormal",
|
||||
"MiniStatuslineModeReplace",
|
||||
"MiniStatuslineModeVisual",
|
||||
"MiniStatuslineModeCommand",
|
||||
"MiniStatuslineModeOther",
|
||||
}
|
||||
for _, mode_hl in ipairs(MiniStatuslineModes) do
|
||||
local hl_table = vim.api.nvim_get_hl(0, { name = mode_hl })
|
||||
local fg = hl_table.fg
|
||||
hl_table.fg = hl_table.bg
|
||||
hl_table.bg = fg
|
||||
vim.api.nvim_set_hl(0, mode_hl .. "Inverse", hl_table)
|
||||
end
|
||||
|
|
|
@ -3,15 +3,14 @@ local null_ls = require("null-ls")
|
|||
null_ls.setup({
|
||||
sources = {
|
||||
-- Code actions
|
||||
null_ls.builtins.code_actions.shellcheck,
|
||||
require("none-ls-shellcheck.code_actions"),
|
||||
null_ls.builtins.code_actions.statix,
|
||||
-- Diagnostics
|
||||
null_ls.builtins.diagnostics.checkmake,
|
||||
null_ls.builtins.diagnostics.deadnix,
|
||||
null_ls.builtins.diagnostics.dotenv_linter,
|
||||
null_ls.builtins.diagnostics.fish,
|
||||
null_ls.builtins.diagnostics.jsonlint,
|
||||
null_ls.builtins.diagnostics.shellcheck,
|
||||
require("none-ls-shellcheck.diagnostics"),
|
||||
null_ls.builtins.diagnostics.statix,
|
||||
null_ls.builtins.diagnostics.trail_space,
|
||||
null_ls.builtins.diagnostics.yamllint,
|
||||
|
|
|
@ -2,14 +2,6 @@ local cmp = require("cmp")
|
|||
local luasnip = require("luasnip")
|
||||
require("luasnip.loaders.from_vscode").lazy_load()
|
||||
|
||||
local has_words_before = function()
|
||||
if vim.api.nvim_buf_get_option(0, "buftype") == "prompt" then
|
||||
return false
|
||||
end
|
||||
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
|
||||
return col ~= 0 and vim.api.nvim_buf_get_text(0, line - 1, 0, line - 1, col, {})[1]:match("^%s*$") == nil
|
||||
end
|
||||
|
||||
cmp.setup({
|
||||
formatting = {
|
||||
format = require("lspkind").cmp_format({
|
||||
|
@ -17,7 +9,7 @@ cmp.setup({
|
|||
maxwidth = 50, -- prevent the popup from showing more than provided characters
|
||||
ellipsis_char = "...", -- when popup menu exceed maxwidth, the truncated part would show ellipsis_char instead
|
||||
symbol_map = {
|
||||
Copilot = "",
|
||||
-- Copilot = "",
|
||||
},
|
||||
}),
|
||||
},
|
||||
|
@ -31,36 +23,55 @@ cmp.setup({
|
|||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<S-CR>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() and has_words_before() then
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||
elseif luasnip.expand_or_jumpable() then
|
||||
luasnip.expand_or_jump()
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_prev_item()
|
||||
elseif luasnip.jumpable(-1) then
|
||||
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-n>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.choice_active() then
|
||||
luasnip.change_choice(1)
|
||||
elseif luasnip.locally_jumpable(1) then
|
||||
luasnip.jump(1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<C-p>"] = cmp.mapping(function(fallback)
|
||||
if luasnip.choice_active() then
|
||||
luasnip.change_choice(-1)
|
||||
elseif luasnip.locally_jumpable(-1) then
|
||||
luasnip.jump(-1)
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
}),
|
||||
sources = {
|
||||
{ name = "async_path", priority = 1 },
|
||||
{ name = "buffer", priority = 1 },
|
||||
{ name = "spell", priority = 1 },
|
||||
{ name = "luasnip", priority = 2 },
|
||||
{ name = "copilot", priority = 3 },
|
||||
{ name = "nvim_lsp", priority = 3 },
|
||||
{ name = "nvim_lsp_signature_help", priority = 3 },
|
||||
},
|
||||
sources = cmp.config.sources({
|
||||
{ priority = 1, name = "async_path" },
|
||||
{ priority = 1, name = "buffer" },
|
||||
{ priority = 1, name = "spell" },
|
||||
{ priority = 2, name = "nvim_lsp" },
|
||||
-- { priority = 3, name = "copilot" },
|
||||
{ priority = 3, name = "nvim_lsp_signature_help" },
|
||||
{ priority = 4, name = "luasnip" },
|
||||
{ priority = 4, name = "vimtex" },
|
||||
}),
|
||||
})
|
||||
|
||||
-- Set configuration for specific filetype.
|
||||
|
|
|
@ -21,37 +21,28 @@ capabilities.didChangeWatchedFiles = {
|
|||
|
||||
local lspconfig = require("lspconfig")
|
||||
local on_attach_def = function(client, bufnr)
|
||||
require("which-key").register({
|
||||
K = {
|
||||
function()
|
||||
local winid = require("ufo").peekFoldedLinesUnderCursor()
|
||||
if not winid then
|
||||
vim.lsp.buf.hover()
|
||||
end
|
||||
end,
|
||||
"Hover",
|
||||
},
|
||||
["<leader>"] = {
|
||||
c = {
|
||||
name = "code",
|
||||
c = { require("actions-preview").code_actions, "Code action", mode = { "v", "n" } },
|
||||
r = {
|
||||
require("which-key").add({
|
||||
{ "<leader>c", buffer = bufnr, group = "code" },
|
||||
{
|
||||
"<leader>cr",
|
||||
function()
|
||||
return ":IncRename " .. vim.fn.expand("<cword>")
|
||||
end,
|
||||
"Rename",
|
||||
buffer = bufnr,
|
||||
desc = "Rename",
|
||||
expr = true,
|
||||
replace_keycodes = false,
|
||||
},
|
||||
f = {
|
||||
{
|
||||
"<leader>ti",
|
||||
function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
|
||||
end,
|
||||
"Format (lsp)",
|
||||
mode = { "n", "v" },
|
||||
buffer = bufnr,
|
||||
desc = "LSP inlay hints",
|
||||
},
|
||||
},
|
||||
t = {
|
||||
l = {
|
||||
{
|
||||
"<leader>tl",
|
||||
function()
|
||||
lsp_lines.toggle()
|
||||
if vim.diagnostic.is_disabled() then
|
||||
|
@ -60,49 +51,57 @@ local on_attach_def = function(client, bufnr)
|
|||
vim.diagnostic.disable()
|
||||
end
|
||||
end,
|
||||
"LSP lines",
|
||||
buffer = bufnr,
|
||||
desc = "LSP lines",
|
||||
},
|
||||
i = {
|
||||
function()
|
||||
vim.lsp.inlay_hint.enable(bufnr, not vim.lsp.inlay_hint.is_enabled(bufnr))
|
||||
end,
|
||||
"LSP inlay hints",
|
||||
},
|
||||
},
|
||||
},
|
||||
g = {
|
||||
d = {
|
||||
{ "K", vim.lsp.buf.hover, buffer = bufnr, desc = "Hover" },
|
||||
{ "[d", vim.diagnostic.goto_prev, buffer = bufnr, desc = "Previous diagnostic" },
|
||||
{ "]d", vim.diagnostic.goto_next, buffer = bufnr, desc = "Next diagnostic" },
|
||||
{ "gD", vim.lsp.buf.declaration, buffer = bufnr, desc = "Goto declaration" },
|
||||
{ "gI", "<cmd>Telescope lsp_implementations<cr>", buffer = bufnr, desc = "Goto implementation" },
|
||||
{ "gK", vim.lsp.buf.signature_help, buffer = bufnr, desc = "Signature help" },
|
||||
{
|
||||
"gd",
|
||||
function()
|
||||
require("telescope.builtin").lsp_definitions({ reuse_win = true })
|
||||
end,
|
||||
"Goto definition",
|
||||
buffer = bufnr,
|
||||
desc = "Goto definition",
|
||||
},
|
||||
t = {
|
||||
{ "gr", "<cmd>Telescope lsp_references<cr>", buffer = bufnr, desc = "Goto references" },
|
||||
{
|
||||
"gt",
|
||||
|
||||
function()
|
||||
require("telescope.builtin").lsp_type_definitions({ reuse_win = true })
|
||||
end,
|
||||
"Goto type definition",
|
||||
buffer = bufnr,
|
||||
desc = "Goto type definition",
|
||||
},
|
||||
r = { "<cmd>Telescope lsp_references<cr>", "Goto references" },
|
||||
D = { vim.lsp.buf.declaration, "Goto declaration" },
|
||||
I = { "<cmd>Telescope lsp_implementations<cr>", "Goto implementation" },
|
||||
K = { vim.lsp.buf.signature_help, "Signature help" },
|
||||
{
|
||||
"<leader>cc",
|
||||
require("actions-preview").code_actions,
|
||||
buffer = bufnr,
|
||||
desc = "Code action",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
["["] = {
|
||||
d = { vim.diagnostic.goto_prev, "Previous diagnostic" },
|
||||
{
|
||||
"<leader>cf",
|
||||
function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
end,
|
||||
buffer = bufnr,
|
||||
desc = "Format (lsp)",
|
||||
mode = { "n", "v" },
|
||||
},
|
||||
["]"] = {
|
||||
d = { vim.diagnostic.goto_next, "Next diagnostic" },
|
||||
},
|
||||
}, { buffer = bufnr, silent = true })
|
||||
|
||||
})
|
||||
if client.server_capabilities.inlayHintProvider then
|
||||
local slow_lsp_servers = {
|
||||
"rust_analyzer",
|
||||
}
|
||||
local timeout = vim.tbl_contains(slow_lsp_servers, client.name, {}) and 500 or 0
|
||||
vim.defer_fn(function()
|
||||
vim.lsp.inlay_hint.enable(bufnr, true)
|
||||
vim.lsp.inlay_hint.enable(true, { bufnr })
|
||||
end, timeout)
|
||||
end
|
||||
end
|
||||
|
@ -126,10 +125,10 @@ end
|
|||
|
||||
local servers = {
|
||||
"bashls",
|
||||
"gleam",
|
||||
"gopls",
|
||||
"nil_ls",
|
||||
"nixd",
|
||||
"ruff_lsp",
|
||||
"pylsp",
|
||||
"ruff",
|
||||
"templ",
|
||||
"typst_lsp",
|
||||
}
|
||||
|
@ -137,6 +136,41 @@ for _, lsp in ipairs(servers) do
|
|||
lspconfig_setup(lsp, {})
|
||||
end
|
||||
|
||||
lspconfig_setup("elixirls", {
|
||||
cmd = { "elixir-ls" },
|
||||
})
|
||||
|
||||
lspconfig_setup("nil_ls", {
|
||||
settings = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
autoEvalInputs = true,
|
||||
nixpkgsInputName = "nixpkgs",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig_setup("nixd", {
|
||||
settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
expr = "import <nixpkgs> { }",
|
||||
},
|
||||
options = {
|
||||
nixos = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).nixosConfigurations.nixos-desktop.options',
|
||||
},
|
||||
["flake-parts"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).debug.options',
|
||||
},
|
||||
["flake-parts2"] = {
|
||||
expr = '(builtins.getFlake ("git+file://" + toString ./.)).currentSystem.options',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
-- Add templ filetype
|
||||
vim.filetype.add({ extension = { templ = "templ" } })
|
||||
|
||||
|
@ -149,18 +183,6 @@ lspconfig_setup("tailwindcss", {
|
|||
init_options = { userLanguages = { templ = "html" } },
|
||||
})
|
||||
|
||||
lspconfig_setup("pylsp", {
|
||||
settings = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
rope_autoimport = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig_setup("rust_analyzer", {
|
||||
settings = {
|
||||
["rust-analyzer"] = {
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
vim.o.fillchars = [[eob: ,fold: ,foldopen:,foldsep: ,foldclose:]]
|
||||
local builtin = require("statuscol.builtin")
|
||||
require("statuscol").setup({
|
||||
segments = {
|
||||
{
|
||||
sign = { name = { ".*" }, auto = true },
|
||||
click = "v:lua.ScSa",
|
||||
},
|
||||
{
|
||||
text = { builtin.lnumfunc },
|
||||
click = "v:lua.ScLa",
|
||||
},
|
||||
{
|
||||
sign = { namespace = { "gitsigns*" }, auto = true },
|
||||
click = "v:lua.ScSa",
|
||||
},
|
||||
{
|
||||
text = { builtin.foldfunc, " " },
|
||||
click = "v:lua.ScFa",
|
||||
},
|
||||
},
|
||||
})
|
|
@ -2,60 +2,50 @@ vim.o.timeout = true
|
|||
vim.o.timeoutlen = 500
|
||||
|
||||
-- Delete
|
||||
require("which-key").register({
|
||||
d = {
|
||||
name = "delete",
|
||||
b = { "<cmd>bd<cr>", "Delete buffer" },
|
||||
w = { "<C-w>c", "Delete window" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
require("which-key").add({
|
||||
{ "<leader>d", group = "delete" },
|
||||
{ "<leader>db", "<cmd>bd<cr>", desc = "Delete buffer" },
|
||||
{ "<leader>dw", "<C-w>c", desc = "Delete window" },
|
||||
})
|
||||
|
||||
-- buffer
|
||||
require("which-key").register({
|
||||
["["] = {
|
||||
b = { "<cmd>bprevious<cr>", "Previous buffer" },
|
||||
},
|
||||
["]"] = {
|
||||
b = { "<cmd>bnext<cr>", "Next buffer" },
|
||||
},
|
||||
require("which-key").add({
|
||||
{ "[b", "<cmd>bprevious<cr>", desc = "Previous buffer" },
|
||||
{ "]b", "<cmd>bnext<cr>", desc = "Next buffer" },
|
||||
})
|
||||
|
||||
-- window
|
||||
require("which-key").register({
|
||||
w = {
|
||||
name = "window",
|
||||
["|"] = { "<C-w>v", "Split window horizontally" },
|
||||
["-"] = { "<C-w>s", "Split window vertically" },
|
||||
w = { "<C-w>w", "Switch window" },
|
||||
},
|
||||
}, { prefix = "<leader>" })
|
||||
require("which-key").add({
|
||||
{ "<leader>w", group = "window" },
|
||||
{ "<leader>w-", "<C-w>s", desc = "Split window vertically" },
|
||||
{ "<leader>ww", "<C-w>w", desc = "Switch window" },
|
||||
{ "<leader>w|", "<C-w>v", desc = "Split window horizontally" },
|
||||
})
|
||||
|
||||
-- better descriptions for navigation
|
||||
require("which-key").register({
|
||||
["<leader>"] = {
|
||||
f = { name = "file/find" },
|
||||
g = { name = "git" },
|
||||
c = { name = "code" },
|
||||
s = { name = "search" },
|
||||
t = { name = "toggle" },
|
||||
},
|
||||
["["] = { name = "prev" },
|
||||
["]"] = { name = "next" },
|
||||
g = { name = "goto" },
|
||||
require("which-key").add({
|
||||
{ "<leader>c", group = "code" },
|
||||
{ "<leader>f", group = "file/find" },
|
||||
{ "<leader>g", group = "git" },
|
||||
{ "<leader>s", group = "search" },
|
||||
{ "<leader>t", group = "toggle" },
|
||||
{ "[", group = "prev" },
|
||||
{ "]", group = "next" },
|
||||
{ "g", group = "goto" },
|
||||
})
|
||||
|
||||
-- Clear search with <esc>
|
||||
require("which-key").register({
|
||||
["<esc>"] = { "<cmd>noh<cr><esc>", "Escape and clear hlsearch", mode = { "n", "i" } },
|
||||
require("which-key").add({
|
||||
{ "<esc>", "<cmd>noh<cr><esc>", desc = "Escape and clear hlsearch", mode = { "i", "n" } },
|
||||
})
|
||||
|
||||
-- better indenting
|
||||
require("which-key").register({
|
||||
["<"] = { "<gv", "Shift left" },
|
||||
[">"] = { ">gv", "Shift right" },
|
||||
}, { mode = "v" })
|
||||
require("which-key").add({
|
||||
{ "<", "<gv", desc = "Shift left", mode = "v" },
|
||||
{ ">", ">gv", desc = "Shift right", mode = "v" },
|
||||
})
|
||||
|
||||
-- better yank in visual mode
|
||||
require("which-key").register({
|
||||
y = { "ygv<esc>", "Yank" },
|
||||
}, { mode = "v" })
|
||||
require("which-key").add({
|
||||
{ "y", "ygv<esc>", desc = "Yank", mode = "v" },
|
||||
})
|
||||
|
|
|
@ -0,0 +1,46 @@
|
|||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local events = require("luasnip.util.events")
|
||||
local ai = require("luasnip.nodes.absolute_indexer")
|
||||
local extras = require("luasnip.extras")
|
||||
local l = extras.lambda
|
||||
local rep = extras.rep
|
||||
local p = extras.partial
|
||||
local m = extras.match
|
||||
local n = extras.nonempty
|
||||
local dl = extras.dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local conds = require("luasnip.extras.expand_conditions")
|
||||
local postfix = require("luasnip.extras.postfix").postfix
|
||||
local types = require("luasnip.util.types")
|
||||
local parse = require("luasnip.util.parser").parse_snippet
|
||||
local ms = ls.multi_snippet
|
||||
local k = require("luasnip.nodes.key_indexer").new_key
|
||||
|
||||
local def_template = [[
|
||||
def {fname}({args}) do
|
||||
{final}
|
||||
end
|
||||
]]
|
||||
|
||||
local def = s(
|
||||
"def",
|
||||
fmt(def_template, {
|
||||
fname = i(1, "fname"),
|
||||
args = i(2),
|
||||
final = i(3),
|
||||
}, { priority = 1001 })
|
||||
)
|
||||
|
||||
return {
|
||||
def,
|
||||
}
|
|
@ -0,0 +1,120 @@
|
|||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local events = require("luasnip.util.events")
|
||||
local ai = require("luasnip.nodes.absolute_indexer")
|
||||
local extras = require("luasnip.extras")
|
||||
local l = extras.lambda
|
||||
local rep = extras.rep
|
||||
local p = extras.partial
|
||||
local m = extras.match
|
||||
local n = extras.nonempty
|
||||
local dl = extras.dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local conds = require("luasnip.extras.expand_conditions")
|
||||
local postfix = require("luasnip.extras.postfix").postfix
|
||||
local types = require("luasnip.util.types")
|
||||
local parse = require("luasnip.util.parser").parse_snippet
|
||||
local ms = ls.multi_snippet
|
||||
local k = require("luasnip.nodes.key_indexer").new_key
|
||||
local matches = require("luasnip.extras.postfix").matches
|
||||
|
||||
local case_template = [[
|
||||
case {expression} {{
|
||||
{pattern1} -> {result1}
|
||||
{pattern2} -> {result2}{final}
|
||||
}}
|
||||
]]
|
||||
|
||||
local dot_case = postfix({ filetype = "gleam", trig = ".case", match_pattern = matches.line }, {
|
||||
d(1, function(_, parent)
|
||||
return sn(
|
||||
1,
|
||||
fmt(case_template, {
|
||||
expression = t(parent.env.POSTFIX_MATCH),
|
||||
pattern1 = i(1, "pattern"),
|
||||
result1 = i(2, "todo"),
|
||||
pattern2 = i(3, "_"),
|
||||
result2 = i(4, "todo"),
|
||||
final = i(0),
|
||||
})
|
||||
)
|
||||
end),
|
||||
})
|
||||
|
||||
local case = s(
|
||||
{ filetype = "gleam", trig = "case" },
|
||||
fmt(case_template, {
|
||||
expression = i(1),
|
||||
pattern1 = i(2),
|
||||
result1 = i(3, "todo"),
|
||||
pattern2 = i(4, "_"),
|
||||
result2 = i(5, "todo"),
|
||||
final = i(0),
|
||||
})
|
||||
)
|
||||
|
||||
local fn_template = [[
|
||||
fn {name}({args}) -> {rtype} {{
|
||||
{body}
|
||||
}}
|
||||
]]
|
||||
|
||||
local fn = s(
|
||||
{ filetype = "gleam", trig = "fn" },
|
||||
fmt(fn_template, {
|
||||
name = i(1),
|
||||
args = i(2),
|
||||
rtype = i(3),
|
||||
body = i(0),
|
||||
})
|
||||
)
|
||||
|
||||
local pfn = s(
|
||||
{ filetype = "gleam", trig = "pfn" },
|
||||
fmt("pub " .. fn_template, {
|
||||
name = i(1),
|
||||
args = i(2),
|
||||
rtype = i(3),
|
||||
body = i(0),
|
||||
})
|
||||
)
|
||||
|
||||
local type_template = [[
|
||||
type {name} {{
|
||||
{body}
|
||||
}}
|
||||
]]
|
||||
|
||||
local type = s(
|
||||
{ filetype = "gleam", trig = "type" },
|
||||
fmt(type_template, {
|
||||
name = i(1),
|
||||
body = i(0),
|
||||
})
|
||||
)
|
||||
|
||||
local ptype = s(
|
||||
{ filetype = "gleam", trig = "ptype" },
|
||||
fmt("pub " .. type_template, {
|
||||
name = i(1),
|
||||
body = i(0),
|
||||
})
|
||||
)
|
||||
|
||||
return {
|
||||
case,
|
||||
dot_case,
|
||||
fn,
|
||||
pfn,
|
||||
type,
|
||||
ptype,
|
||||
}
|
|
@ -0,0 +1,138 @@
|
|||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local events = require("luasnip.util.events")
|
||||
local ai = require("luasnip.nodes.absolute_indexer")
|
||||
local extras = require("luasnip.extras")
|
||||
local l = extras.lambda
|
||||
local rep = extras.rep
|
||||
local p = extras.partial
|
||||
local m = extras.match
|
||||
local n = extras.nonempty
|
||||
local dl = extras.dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local conds = require("luasnip.extras.expand_conditions")
|
||||
local postfix = require("luasnip.extras.postfix").postfix
|
||||
local types = require("luasnip.util.types")
|
||||
local parse = require("luasnip.util.parser").parse_snippet
|
||||
local ms = ls.multi_snippet
|
||||
local k = require("luasnip.nodes.key_indexer").new_key
|
||||
|
||||
local pe = s(
|
||||
"pe",
|
||||
fmt("<%= {final} %>", {
|
||||
final = i(1),
|
||||
}, { priority = 1001 })
|
||||
)
|
||||
|
||||
local ln = s(
|
||||
"ln",
|
||||
fmt(
|
||||
[[
|
||||
<.link navigate={{~p"{path}"}}">{final}</.link>
|
||||
]],
|
||||
{ path = i(1, "/"), final = i(2) },
|
||||
{ priority = 1001 }
|
||||
)
|
||||
)
|
||||
|
||||
local lp = s(
|
||||
"lp",
|
||||
fmt(
|
||||
[[
|
||||
<.link patch={{~p"{path}"}}">{final}</.link>
|
||||
]],
|
||||
{ path = i(1, "/"), final = i(2) },
|
||||
{ priority = 1001 }
|
||||
)
|
||||
)
|
||||
|
||||
local if_ = s(
|
||||
"if",
|
||||
fmt("<%= if {condition} do %>{final}<% end %>", { condition = i(1, "condition"), final = i(2) }, { priority = 1001 })
|
||||
)
|
||||
|
||||
local ife = s(
|
||||
"ife",
|
||||
fmt(
|
||||
[[
|
||||
<%= if {condition} do %>
|
||||
{when}
|
||||
<% else %>
|
||||
{final}
|
||||
<% end %>"
|
||||
]],
|
||||
{ condition = i(1, "condition"), when = i(2), final = i(3) },
|
||||
{ priority = 1001 }
|
||||
)
|
||||
)
|
||||
|
||||
local for_ = s(
|
||||
"for",
|
||||
fmt(
|
||||
[[
|
||||
<%= for {item} <- {list} do %>
|
||||
{final}
|
||||
<% end %>
|
||||
]],
|
||||
{ item = i(1, "item"), list = i(2, "items"), final = i(3) },
|
||||
{ priority = 1001 }
|
||||
)
|
||||
)
|
||||
|
||||
local lc =
|
||||
s("lc", fmt("<.live_component module={{{module}}} id={{{id}}} />", { module = i(1), id = i(2) }, { priority = 1001 }))
|
||||
|
||||
local slot = s(
|
||||
"slot",
|
||||
fmt("<:slot>{final}</:slot>", {
|
||||
final = i(1),
|
||||
}, { priority = 1001 })
|
||||
)
|
||||
|
||||
local socketp = s(
|
||||
"socketp",
|
||||
fmt(
|
||||
[[
|
||||
socket =
|
||||
socket
|
||||
|> {final}
|
||||
]],
|
||||
{ final = i(1) },
|
||||
{ priority = 1001 }
|
||||
)
|
||||
)
|
||||
|
||||
local fl = s(
|
||||
"fl",
|
||||
fmt(
|
||||
[[
|
||||
<{elem} :for={{{item} <- {list}}} class="{class}">
|
||||
{final}
|
||||
</{elem}>
|
||||
]],
|
||||
{ elem = i(1, "div"), item = i(2, "item"), list = i(3, "items"), class = i(4), final = i(5) },
|
||||
{ priority = 1001, repeat_duplicates = true }
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
pe,
|
||||
ln,
|
||||
lp,
|
||||
if_,
|
||||
ife,
|
||||
for_,
|
||||
lc,
|
||||
slot,
|
||||
socketp,
|
||||
fl,
|
||||
}
|
|
@ -0,0 +1,242 @@
|
|||
local ls = require("luasnip")
|
||||
local s = ls.snippet
|
||||
local sn = ls.snippet_node
|
||||
local isn = ls.indent_snippet_node
|
||||
local t = ls.text_node
|
||||
local i = ls.insert_node
|
||||
local f = ls.function_node
|
||||
local c = ls.choice_node
|
||||
local d = ls.dynamic_node
|
||||
local r = ls.restore_node
|
||||
local events = require("luasnip.util.events")
|
||||
local ai = require("luasnip.nodes.absolute_indexer")
|
||||
local extras = require("luasnip.extras")
|
||||
local l = extras.lambda
|
||||
local rep = extras.rep
|
||||
local p = extras.partial
|
||||
local m = extras.match
|
||||
local n = extras.nonempty
|
||||
local dl = extras.dynamic_lambda
|
||||
local fmt = require("luasnip.extras.fmt").fmt
|
||||
local fmta = require("luasnip.extras.fmt").fmta
|
||||
local conds = require("luasnip.extras.expand_conditions")
|
||||
local postfix = require("luasnip.extras.postfix").postfix
|
||||
local types = require("luasnip.util.types")
|
||||
local parse = require("luasnip.util.parser").parse_snippet
|
||||
local ms = ls.multi_snippet
|
||||
local k = require("luasnip.nodes.key_indexer").new_key
|
||||
|
||||
local arg_template = [[
|
||||
{arg}: {type}
|
||||
]]
|
||||
|
||||
local function pyarg()
|
||||
return sn(
|
||||
nil,
|
||||
fmt(arg_template, {
|
||||
arg = i(1, "arg"),
|
||||
type = i(2, "Any"),
|
||||
})
|
||||
)
|
||||
end
|
||||
|
||||
local function pyargs(_, _, _, user_args)
|
||||
local choices = {
|
||||
sn(nil, i(1)),
|
||||
sn(nil, {
|
||||
not user_args and t(", ") or t(""),
|
||||
d(1, pyarg),
|
||||
d(2, pyargs, { user_args = { false } }),
|
||||
}),
|
||||
}
|
||||
-- switch order for first call
|
||||
if user_args then
|
||||
local fst, snd = unpack(choices)
|
||||
choices = { snd, fst }
|
||||
end
|
||||
|
||||
return sn(nil, c(1, choices))
|
||||
end
|
||||
|
||||
local def_template = [[
|
||||
def {fname}({args}) -> {rtype}:
|
||||
"""
|
||||
{docs}
|
||||
"""
|
||||
{final}
|
||||
]]
|
||||
|
||||
local def = s(
|
||||
"def",
|
||||
fmt(def_template, {
|
||||
fname = i(1, "fname"),
|
||||
args = d(2, pyargs, nil, { user_args = { true } }),
|
||||
rtype = i(3, "None"),
|
||||
docs = i(4, "Documentation"),
|
||||
final = i(5, "pass"),
|
||||
}, { priority = 1001 })
|
||||
)
|
||||
|
||||
local defs_template = [[
|
||||
def {mname}(self, {args}) -> {rtype}:
|
||||
"""
|
||||
{docs}
|
||||
"""
|
||||
{final}
|
||||
]]
|
||||
|
||||
local defs = s(
|
||||
"defs",
|
||||
fmt(defs_template, {
|
||||
mname = i(1, "mname"),
|
||||
args = d(2, pyargs, nil, { user_args = { true } }),
|
||||
rtype = i(3, "None"),
|
||||
docs = i(4, "Documentation"),
|
||||
final = i(5, "pass"),
|
||||
}, { priority = 1001 })
|
||||
)
|
||||
|
||||
local enum_template = [[
|
||||
for {i}, {value} in enumerate({iter}):
|
||||
{final}
|
||||
]]
|
||||
|
||||
local dot_enum = postfix(".enum", {
|
||||
d(1, function(_, parent)
|
||||
return sn(
|
||||
1,
|
||||
fmt(enum_template, {
|
||||
i = i(1, "i"),
|
||||
value = i(2, "value"),
|
||||
iter = t(parent.env.POSTFIX_MATCH),
|
||||
final = i(3, "pass"),
|
||||
})
|
||||
)
|
||||
end),
|
||||
})
|
||||
|
||||
local enum = s(
|
||||
"enum",
|
||||
fmt(enum_template, {
|
||||
i = i(1, "i"),
|
||||
value = i(2, "value"),
|
||||
iter = i(3, "iter"),
|
||||
final = i(4, "pass"),
|
||||
})
|
||||
)
|
||||
|
||||
local for_template = [[
|
||||
for {item} in {iter}:
|
||||
{final}
|
||||
]]
|
||||
|
||||
local dot_for = postfix(".for", {
|
||||
d(1, function(_, parent)
|
||||
return sn(
|
||||
1,
|
||||
fmt(for_template, {
|
||||
item = i(1, "item"),
|
||||
iter = t(parent.env.POSTFIX_MATCH),
|
||||
final = i(2, "pass"),
|
||||
})
|
||||
)
|
||||
end),
|
||||
})
|
||||
|
||||
local items_template = [[
|
||||
for {key}, {value} in {iter}:
|
||||
{final}
|
||||
]]
|
||||
|
||||
local dot_items = postfix(".items", {
|
||||
d(1, function(_, parent)
|
||||
return sn(
|
||||
1,
|
||||
fmt(items_template, {
|
||||
key = i(1, "key"),
|
||||
value = i(2, "value"),
|
||||
iter = t(parent.env.POSTFIX_MATCH),
|
||||
final = i(3, "pass"),
|
||||
})
|
||||
)
|
||||
end),
|
||||
})
|
||||
|
||||
local try_template = [[
|
||||
try:
|
||||
{raises}
|
||||
except {exception} as {ename}:
|
||||
{final}
|
||||
]]
|
||||
|
||||
local dot_try = postfix(".try", {
|
||||
d(1, function(_, parent)
|
||||
return sn(
|
||||
1,
|
||||
fmt(try_template, {
|
||||
raises = t(parent.env.POSTFIX_MATCH),
|
||||
exception = i(1, "Exception"),
|
||||
ename = i(2, "e"),
|
||||
final = i(3, "pass"),
|
||||
})
|
||||
)
|
||||
end),
|
||||
})
|
||||
|
||||
local parr = s(
|
||||
"parr",
|
||||
fmt(
|
||||
[[
|
||||
:param {name}: {description}
|
||||
:type {name}: {type}
|
||||
]],
|
||||
{
|
||||
name = i(1, "name"),
|
||||
description = i(2, "description"),
|
||||
type = i(3, "type"),
|
||||
},
|
||||
{
|
||||
repeat_duplicates = true,
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
local retr = s(
|
||||
"retr",
|
||||
fmt(
|
||||
[[
|
||||
:return: {description}
|
||||
:rtype: {rtype}
|
||||
]],
|
||||
{
|
||||
description = i(1, "description"),
|
||||
rtype = i(2, "rtype"),
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
local raisr = s(
|
||||
"raisr",
|
||||
fmt(
|
||||
[[
|
||||
:raises {exception}: {description}
|
||||
]],
|
||||
{
|
||||
exception = i(1, "Exception"),
|
||||
description = i(2, "description"),
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
return {
|
||||
def,
|
||||
defs,
|
||||
dot_enum,
|
||||
dot_for,
|
||||
dot_items,
|
||||
dot_try,
|
||||
enum,
|
||||
parr,
|
||||
retr,
|
||||
raisr,
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
{ pkgs, config, ... }:
|
||||
{ pkgs, inputs, lib, ... }:
|
||||
|
||||
with builtins;
|
||||
{
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
|
||||
(
|
||||
let
|
||||
nvim-treesitter = pkgs.vimPlugins.nvim-treesitter;
|
||||
parserDir = pkgs.symlinkJoin {
|
||||
name = "tresitter-grammars-all";
|
||||
paths = pkgs.vimPlugins.nvim-treesitter.withAllGrammars.dependencies;
|
||||
paths = nvim-treesitter.withAllGrammars.dependencies;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
@ -18,6 +18,7 @@ with builtins;
|
|||
auto_install = false;
|
||||
highlight = {
|
||||
enable = true;
|
||||
disable = [ "latex" ];
|
||||
};
|
||||
textobjects =
|
||||
{
|
||||
|
@ -51,31 +52,17 @@ with builtins;
|
|||
};
|
||||
};
|
||||
conf =
|
||||
''
|
||||
/* lua */ ''
|
||||
vim.opt.runtimepath:append("${parserDir}")
|
||||
local final_opts = vim.tbl_deep_extend("keep", opts, { parser_install_dir = "${parserDir}" })
|
||||
require('nvim-treesitter.configs').setup(final_opts)
|
||||
'';
|
||||
init = ''
|
||||
local runtimepath = vim.opt.runtimepath:get()
|
||||
table.insert(runtimepath, 4, "${parserDir}")
|
||||
vim.opt.runtimepath = runtimepath
|
||||
'';
|
||||
priority = 100;
|
||||
dependencies = [
|
||||
{ plugin = nvim-treesitter-textobjects; }
|
||||
{ plugin = nvim-ts-context-commentstring; opts = { }; }
|
||||
{ plugin = pkgs.vimPlugins.nvim-treesitter-textobjects; }
|
||||
{ plugin = pkgs.vimPlugins.nvim-ts-context-commentstring; opts = { }; }
|
||||
];
|
||||
}
|
||||
)
|
||||
{
|
||||
plugin = nvim-treesitter-textsubjects;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./lua/nvim-treesitter-textsubjects.lua;
|
||||
}
|
||||
{
|
||||
plugin = nvim-treesitter-context;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = { };
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,47 +1,84 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, inputs, ... }:
|
||||
|
||||
with builtins;
|
||||
let
|
||||
inherit (lib) readFile;
|
||||
in
|
||||
{
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = with pkgs.vimPlugins; [
|
||||
config.home-manager.users.moritz.programs.neovim.lazy.plugins = [
|
||||
{
|
||||
plugin = which-key-nvim;
|
||||
plugin = pkgs.vimPlugins.which-key-nvim;
|
||||
lazy = false;
|
||||
conf = readFile ./lua/which-key-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = catppuccin-nvim;
|
||||
plugin = pkgs.vimPlugins.catppuccin-nvim;
|
||||
conf = readFile ./lua/catppuccin-nvim.lua;
|
||||
lazy = false;
|
||||
priority = 99;
|
||||
}
|
||||
{
|
||||
plugin = todo-comments-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
dependencies = [{ plugin = plenary-nvim; }];
|
||||
plugin = pkgs.vimPlugins.todo-comments-nvim;
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.plenary-nvim; }];
|
||||
opts = { };
|
||||
}
|
||||
{
|
||||
plugin = statuscol-nvim;
|
||||
event = [ "VeryLazy" ];
|
||||
conf = readFile ./lua/statuscol-nvim.lua;
|
||||
}
|
||||
{
|
||||
plugin = smartcolumn-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
opts = {
|
||||
colorcolumn = "120";
|
||||
disabled_filetypes = [ "help" "text" "markdown" "dashboard" ];
|
||||
};
|
||||
}
|
||||
{
|
||||
plugin = dressing-nvim;
|
||||
plugin = pkgs.vimPlugins.dressing-nvim;
|
||||
event = [ "VeryLazy" ];
|
||||
}
|
||||
{
|
||||
plugin = gitsigns-nvim;
|
||||
plugin = pkgs.vimPlugins.gitsigns-nvim;
|
||||
event = [ "BufReadPost" "BufNewFile" ];
|
||||
conf = readFile ./lua/gitsigns-nvim.lua;
|
||||
dependencies = [{ plugin = which-key-nvim; }];
|
||||
dependencies = [{ plugin = pkgs.vimPlugins.which-key-nvim; }];
|
||||
}
|
||||
{
|
||||
plugin = pkgs.vimUtils.buildVimPlugin {
|
||||
pname = "hawtkeys-nvim";
|
||||
version = lib.my.mkVersionInput inputs.hawtkeys-nvim;
|
||||
src = inputs.hawtkeys-nvim;
|
||||
};
|
||||
cmd = [ "Hawtkeys" "HawtkeysAll" "HawtkeysDupes" ];
|
||||
opts = { };
|
||||
dependencies = [
|
||||
{ plugin = pkgs.vimPlugins.plenary-nvim; }
|
||||
{ plugin = pkgs.vimPlugins.nvim-treesitter; }
|
||||
];
|
||||
}
|
||||
{
|
||||
plugin = pkgs.vimPlugins.zen-mode-nvim;
|
||||
keys = [
|
||||
{ key = "<leader>tz"; cmd = "<cmd>ZenMode<cr>"; desc = "Zen mode"; }
|
||||
];
|
||||
conf = /* lua */ ''
|
||||
require("zen-mode").setup({
|
||||
plugins = {
|
||||
tmux = {
|
||||
enabled = true,
|
||||
},
|
||||
},
|
||||
})
|
||||
'';
|
||||
dependencies = [
|
||||
{
|
||||
plugin = pkgs.vimPlugins.twilight-nvim;
|
||||
keys = [
|
||||
{ key = "<leader>tZ"; cmd = "<cmd>Twilight<cr>"; desc = "Twilight mode"; }
|
||||
];
|
||||
conf = /* lua */ ''
|
||||
require("twilight").setup({
|
||||
context = 20,
|
||||
expand = { -- for treesitter, we we always try to expand to the top-most ancestor with these types
|
||||
"function",
|
||||
"function_definition",
|
||||
"if_statement",
|
||||
"method",
|
||||
"method_definition",
|
||||
"table",
|
||||
},
|
||||
})
|
||||
'';
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
|
@ -4,11 +4,13 @@
|
|||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
inherit (lib) range filterAttrs attrNames foldl' head tail mkOption mkEnableOption intersectLists genAttrs flip getAttr;
|
||||
inherit (lib.types) listOf enum package;
|
||||
|
||||
cfg = config.my.programs.python;
|
||||
|
||||
pythonVersions = map (version: "3${toString version}") (range 8 11);
|
||||
pythonVersions = map (version: "3${toString version}") (range 8 13);
|
||||
enabledVersions = filterAttrs (_: value: value.enable) cfg.versions;
|
||||
|
||||
pythonPackages = version: attrNames pkgs."python${version}Packages";
|
||||
|
@ -23,7 +25,7 @@ let
|
|||
enable = mkEnableOption (toString version);
|
||||
pythonPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf (enum (pythonPackages version));
|
||||
type = listOf (enum (pythonPackages version));
|
||||
};
|
||||
};
|
||||
in
|
||||
|
@ -32,11 +34,11 @@ in
|
|||
versions = genAttrs pythonVersions versionOpts;
|
||||
defaultPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf (enum commonPackages);
|
||||
type = listOf (enum commonPackages);
|
||||
};
|
||||
extraPackages = mkOption {
|
||||
default = [ ];
|
||||
type = with types; listOf package;
|
||||
type = listOf package;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,293 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
|
||||
let
|
||||
inherit (lib) mkEnableOption mkIf mkOption types;
|
||||
|
||||
cfg = config.my.programs.river;
|
||||
in
|
||||
{
|
||||
options.my.programs.river = {
|
||||
enable = mkEnableOption "river";
|
||||
keyboardLayouts = mkOption {
|
||||
type = types.listOf types.str;
|
||||
description = "list of keyboard layouts";
|
||||
default = [ "us" "de" ];
|
||||
};
|
||||
nvidiaSupport = mkEnableOption "nvidiaSupport";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.river.enable = true;
|
||||
my = {
|
||||
programs = {
|
||||
wallpaper.enable = true;
|
||||
kitty.enable = true;
|
||||
tofi.enable = true;
|
||||
};
|
||||
wallpapers.enable = true;
|
||||
services = {
|
||||
dunst.enable = true;
|
||||
wallpaper = {
|
||||
enable = true;
|
||||
target = "river-session.target";
|
||||
};
|
||||
spotify-player.target = "river-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [
|
||||
rivercarro
|
||||
];
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
systemdTarget = "river-session.target";
|
||||
};
|
||||
wayland.windowManager.river = {
|
||||
enable = true;
|
||||
settings = {
|
||||
border-width = 2;
|
||||
declare-mode = [
|
||||
"locked"
|
||||
"normal"
|
||||
"passthrough"
|
||||
];
|
||||
map = {
|
||||
normal = {
|
||||
"Super Q" = "close";
|
||||
"Super Return" = "spawn kitty";
|
||||
"Super R" = ''spawn 'exec $(tofi-run --fuzzy-match=true)' '';
|
||||
"Super W" = ''spawn "pkill -USR1 waybar"'';
|
||||
"Super+Shift R" = "spawn ~/.config/river/init";
|
||||
|
||||
# Focus view
|
||||
"Super J" = "focus-view next";
|
||||
"Super K" = "focus-view previous";
|
||||
|
||||
# swap the focused view
|
||||
"Super+Shift J" = "swap next";
|
||||
"Super+Shift K" = "swap previous";
|
||||
|
||||
# focus output
|
||||
"Super Period" = "focus-output next";
|
||||
"Super Comma" = "focus-output previous";
|
||||
|
||||
# send to output
|
||||
"Super+Shift Period" = "send-to-output next";
|
||||
"Super+Shift Comma" = "send-to-output previous";
|
||||
|
||||
# bump in layout stack
|
||||
"Super Z" = "zoom";
|
||||
|
||||
# lock screen
|
||||
"Super+Alt L" = ''spawn "loginctl lock-session"'';
|
||||
} //
|
||||
# tags
|
||||
(
|
||||
let
|
||||
numbers = lib.range 1 9;
|
||||
toTag = num: "$((1 << (${toString num} - 1)))";
|
||||
|
||||
mkMappings = num:
|
||||
let
|
||||
numStr = toString num;
|
||||
tag = toTag num;
|
||||
in
|
||||
[
|
||||
# Super+Control+[1-9] to toggle focus of tag [0-8]
|
||||
{ name = "Super ${numStr}"; value = "set-focused-tags ${tag}"; }
|
||||
|
||||
# Super+Shift+Control+[1-9] to toggle tag [0-8] of focused view
|
||||
{ name = "Super+Shift ${numStr}"; value = "toggle-view-tags ${tag}"; }
|
||||
];
|
||||
mappings = lib.flatten (map mkMappings numbers);
|
||||
in
|
||||
lib.listToAttrs mappings
|
||||
);
|
||||
};
|
||||
map-pointer = {
|
||||
normal = {
|
||||
"Super BTN_LEFT" = "move-view";
|
||||
"Super BTN_RIGHT" = "resize-view";
|
||||
"Super BTN_MIDDLE" = "toggle-float";
|
||||
};
|
||||
};
|
||||
attach-mode = "bottom";
|
||||
default-layout = "rivercarro";
|
||||
focus-follows-cursor = "normal";
|
||||
hide-cursor = {
|
||||
timeout = "1500";
|
||||
when-typing = "enabled";
|
||||
};
|
||||
set-cursor-warp = "on-focus-change";
|
||||
keyboard-layout = "-options grp:win_space_toggle,caps:escape ${lib.concatStringsSep "," cfg.keyboardLayouts}";
|
||||
};
|
||||
extraConfig = /* bash */ ''
|
||||
rivercarro_pid="$(pidof rivercarro)"
|
||||
if [[ -z $rivercarro_pid ]]; then
|
||||
rivercarro -inner-gaps 4 -outer-gaps 4 &
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# add waybar as a status bar
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (old: {
|
||||
patches = old.patches or [ ] ++ [
|
||||
(pkgs.fetchpatch {
|
||||
url = "https://gitlab.archlinux.org/archlinux/packaging/packages/waybar/-/raw/0306af03fcb6de6aee1e288f42b0bf1b223513bd/a544f4b2cdcf632f1a4424b89f6e3d85ef5aaa85.patch";
|
||||
sha256 = "sha256-S/1oUj9Aj6BElNTsDY8CTcKtS1j7Gl54JFgCywH05pg=";
|
||||
})
|
||||
];
|
||||
});
|
||||
|
||||
# start using systemd service
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "river-session.target";
|
||||
};
|
||||
|
||||
settings = {
|
||||
mainBar = {
|
||||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
modules-left = [ "river/tags" ];
|
||||
modules-center = [ "river/window" ];
|
||||
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
||||
};
|
||||
};
|
||||
style = lib.readFile ./style.css;
|
||||
};
|
||||
|
||||
# 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";
|
||||
};
|
||||
};
|
||||
|
||||
# adds pam module for swaylock
|
||||
security.pam.services.swaylock = { };
|
||||
|
||||
# add user packages for wayland and hyprland in particular
|
||||
users.users.moritz.packages = with pkgs; [
|
||||
brightnessctl # control brightness
|
||||
grimblast # screenshot tool for hyprland
|
||||
pamixer # pulse audio cli
|
||||
playerctl # control media playback
|
||||
slurp # region select for wayland (for screensharing)
|
||||
wdisplays # manage monitors
|
||||
wl-clipboard # clipboard tool for wayland
|
||||
];
|
||||
|
||||
|
||||
# additional environment variables
|
||||
environment.sessionVariables =
|
||||
{
|
||||
XDG_CURRENT_DESKTOP = "river";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
XDG_SESSION_DESKTOP = "river";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
QT_QPA_PLATFORM = "wayland;xcb";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
QT_QPA_PLATFORMTHEME = "qt5ct";
|
||||
_JAVA_AWT_WM_NONEREPARENTING = "1";
|
||||
} // (lib.optionalAttrs cfg.nvidiaSupport
|
||||
{
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
GDK_BACKEND = "wayland";
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
WLR_DRM_DEVICES = "/dev/dri/card0";
|
||||
WLR_DRM_NO_ATOMIC = "1";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
XDG_CURRENT_DESKTOP = "river";
|
||||
_GL_GSYNC_ALLOWED = "0";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
__GL_VRR_ALLOWED = "0";
|
||||
});
|
||||
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
# use pipewire (needed for screensharing)
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
displayManager = {
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
defaultSession = "river";
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager.lightdm.enable = true;
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
home-manager.users.moritz.systemd.user.services =
|
||||
let
|
||||
units = [ "waybar" ];
|
||||
mkAfter = _: {
|
||||
Unit = {
|
||||
After = [ "river-session.target" ];
|
||||
Wants = [ "river-session.target" ];
|
||||
};
|
||||
};
|
||||
in
|
||||
lib.genAttrs units mkAfter;
|
||||
|
||||
systemd.user.services =
|
||||
let
|
||||
units = [ "pipewire" "xdg-desktop-portal" "wireplumber" ];
|
||||
mkAfter = _: {
|
||||
after = [ "river-session.target" ];
|
||||
wants = [ "river-session.target" ];
|
||||
};
|
||||
in
|
||||
lib.genAttrs units mkAfter;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,339 @@
|
|||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.5);
|
||||
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||
color: #ffffff;
|
||||
transition-property: background-color;
|
||||
transition-duration: .5s;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/*
|
||||
window#waybar.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
window#waybar.solo {
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
*/
|
||||
|
||||
window#waybar.termite {
|
||||
background-color: #3F3F3F;
|
||||
}
|
||||
|
||||
window#waybar.chromium {
|
||||
background-color: #000000;
|
||||
border: none;
|
||||
}
|
||||
|
||||
button {
|
||||
/* Use box-shadow instead of border so the text isn't offset */
|
||||
box-shadow: inset 0 -3px transparent;
|
||||
/* Avoid rounded borders under each button name */
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||
button:hover {
|
||||
background: inherit;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
/* you can set a style on hover for any module like this */
|
||||
#pulseaudio:hover {
|
||||
background-color: #a37800;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#mode {
|
||||
background-color: #64727D;
|
||||
box-shadow: inset 0 -3px #ffffff;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#power-profiles-daemon,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#window,
|
||||
#workspaces {
|
||||
margin: 0 4px;
|
||||
}
|
||||
|
||||
/* If workspaces is the leftmost module, omit left margin */
|
||||
.modules-left > widget:first-child > #workspaces {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
/* If workspaces is the rightmost module, omit right margin */
|
||||
.modules-right > widget:last-child > #workspaces {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background-color: #64727D;
|
||||
}
|
||||
|
||||
#battery {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: #ffffff;
|
||||
background-color: #26A65B;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
|
||||
#power-profiles-daemon {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.performance {
|
||||
background-color: #f53c3c;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.balanced {
|
||||
background-color: #2980b9;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.power-saver {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
label:focus {
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background-color: #2ecc71;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background-color: #9b59b6;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background-color: #964B00;
|
||||
}
|
||||
|
||||
#backlight {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#network {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #f1c40f;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
background-color: #fff0f5;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
#wireplumber.muted {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#custom-media {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
min-width: 100px;
|
||||
}
|
||||
|
||||
#custom-media.custom-spotify {
|
||||
background-color: #66cc99;
|
||||
}
|
||||
|
||||
#custom-media.custom-vlc {
|
||||
background-color: #ffa000;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background-color: #f0932b;
|
||||
}
|
||||
|
||||
#temperature.critical {
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#tray {
|
||||
background-color: #2980b9;
|
||||
}
|
||||
|
||||
#tray > .passive {
|
||||
-gtk-icon-effect: dim;
|
||||
}
|
||||
|
||||
#tray > .needs-attention {
|
||||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #2d3436;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #ecf0f1;
|
||||
color: #2d3436;
|
||||
}
|
||||
|
||||
#mpd {
|
||||
background-color: #66cc99;
|
||||
color: #2a5c45;
|
||||
}
|
||||
|
||||
#mpd.disconnected {
|
||||
background-color: #f53c3c;
|
||||
}
|
||||
|
||||
#mpd.stopped {
|
||||
background-color: #90b1b1;
|
||||
}
|
||||
|
||||
#mpd.paused {
|
||||
background-color: #51a37a;
|
||||
}
|
||||
|
||||
#language {
|
||||
background: #00b093;
|
||||
color: #740864;
|
||||
padding: 0 5px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state {
|
||||
background: #97e1ad;
|
||||
color: #000000;
|
||||
padding: 0 0px;
|
||||
margin: 0 5px;
|
||||
min-width: 16px;
|
||||
}
|
||||
|
||||
#keyboard-state > label {
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
#keyboard-state > label.locked {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad {
|
||||
background: rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
#scratchpad.empty {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#privacy {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#privacy-item {
|
||||
padding: 0 5px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
#privacy-item.screenshare {
|
||||
background-color: #cf5700;
|
||||
}
|
||||
|
||||
#privacy-item.audio-in {
|
||||
background-color: #1ca000;
|
||||
}
|
||||
|
||||
#privacy-item.audio-out {
|
||||
background-color: #0069d4;
|
||||
}
|
||||
|
||||
#tags button {
|
||||
color: black;
|
||||
}
|
||||
|
||||
#tags button.occupied {
|
||||
color: white;
|
||||
}
|
||||
|
||||
#tags button.focused {
|
||||
background-color: grey;
|
||||
}
|
|
@ -12,10 +12,8 @@ in
|
|||
options.my.programs.sway.enable = mkEnableOption "sway";
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
environment.loginShellInit = ''
|
||||
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.tofi;
|
||||
|
||||
configText =
|
||||
let
|
||||
settingsStrings = mapAttrsToList (name: value: "${name} = ${value}") cfg.settings;
|
||||
in
|
||||
concatLines settingsStrings;
|
||||
in
|
||||
{
|
||||
options.my.programs.tofi = {
|
||||
enable = mkEnableOption "tofi";
|
||||
settings = mkOption {
|
||||
type = with types; attrsOf str;
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
|
||||
# (lib.mkIf config.hardware.bluetooth.enable rofi-bluetooth)
|
||||
# rofi-power-menu
|
||||
];
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ tofi ];
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile."tofi/config".text = configText;
|
||||
configFile."networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = tofi
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,7 +8,14 @@ let
|
|||
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "wallpaper";
|
||||
runtimeInputs = with pkgs; [ findutils coreutils feh swaybg fzf viu ];
|
||||
runtimeInputs = with pkgs; [
|
||||
findutils
|
||||
coreutils
|
||||
feh
|
||||
swaybg
|
||||
fzf
|
||||
(viu.override { withSixel = true; })
|
||||
];
|
||||
text = builtins.readFile ./wallpaper.sh;
|
||||
};
|
||||
in
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
## System security tweaks
|
||||
|
@ -69,6 +70,7 @@
|
|||
|
||||
# SSH
|
||||
services.openssh = {
|
||||
package = pkgs.master.openssh; # HACK: to fix CVE-2024-6387
|
||||
settings = {
|
||||
# Disable ssh password login
|
||||
PasswordAuthentication = lib.mkDefault false;
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
_:
|
||||
|
||||
final: _:
|
||||
with final.lib;
|
||||
rec {
|
||||
fishFile =
|
||||
{ name
|
||||
, destination
|
||||
, content
|
||||
, checkPhase ? null
|
||||
}:
|
||||
final.writeTextFile {
|
||||
inherit name destination;
|
||||
executable = true;
|
||||
allowSubstitutes = true;
|
||||
preferLocalBuild = false;
|
||||
text = ''
|
||||
#!${getExe final.fish}
|
||||
|
||||
${content}
|
||||
'';
|
||||
|
||||
checkPhase =
|
||||
if checkPhase == null then ''
|
||||
runHook preCheck
|
||||
${getExe final.fish} -n "$target"
|
||||
runHook postCheck
|
||||
''
|
||||
else checkPhase;
|
||||
};
|
||||
|
||||
writeFishApplication =
|
||||
{ name
|
||||
, text
|
||||
, completions ? null
|
||||
, runtimeInputs ? [ ]
|
||||
, checkPhase ? null
|
||||
}:
|
||||
let
|
||||
runtimeHeader = optionalString (runtimeInputs != [ ])
|
||||
''export PATH="${makeBinPath runtimeInputs}:$PATH"'';
|
||||
|
||||
script = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_script";
|
||||
destination = "/bin/${name}";
|
||||
content = concatLines [ runtimeHeader text ];
|
||||
};
|
||||
completions_file = fishFile {
|
||||
inherit checkPhase;
|
||||
name = "${name}_completions";
|
||||
destination = "/share/fish/vendor_completions.d/${name}.fish";
|
||||
content = concatLines [ runtimeHeader completions ];
|
||||
};
|
||||
in
|
||||
final.symlinkJoin {
|
||||
inherit name;
|
||||
paths = [
|
||||
script
|
||||
] ++ optional (completions != null) completions_file;
|
||||
};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{ lib, ... }@args:
|
||||
|
||||
lib.composeManyExtensions
|
||||
(lib.my.mapModules' (file: import file args) ./.)
|
|
@ -1,16 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
final: prev: {
|
||||
# python-poetry/poetry#5929
|
||||
poetry = final.symlinkJoin {
|
||||
name = "poetry";
|
||||
paths = [ prev.poetry ];
|
||||
postBuild =
|
||||
let
|
||||
regex = "s/'([a-z]*[[:blank:]][a-z]*)''/\1'/g";
|
||||
in
|
||||
''
|
||||
${lib.getExe final.gnused} -i -E "${regex}" "$out/share/fish/vendor_completions.d/poetry.fish"
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ lib, ... }:
|
||||
|
||||
_: _: {
|
||||
inherit lib;
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
_:
|
||||
|
||||
_: prev:
|
||||
{
|
||||
xorg = prev.xorg // {
|
||||
lndir = prev.xorg.lndir.overrideAttrs (_: {
|
||||
meta.mainProgram = "lndir";
|
||||
});
|
||||
};
|
||||
}
|
|
@ -1,63 +0,0 @@
|
|||
{ inputs, lib }:
|
||||
|
||||
_: prev:
|
||||
with lib.my;
|
||||
{
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
smartcolumn-nvim = prev.vimUtils.buildVimPlugin {
|
||||
pname = "smartcolumn-nvim";
|
||||
version = mkVersionInput inputs.smartcolumn-nvim;
|
||||
src = inputs.smartcolumn-nvim;
|
||||
};
|
||||
|
||||
telekasten-nvim = prev.vimUtils.buildVimPlugin {
|
||||
pname = "telekasten-nvim";
|
||||
version = mkVersionInput inputs.telekasten-nvim;
|
||||
src = inputs.telekasten-nvim;
|
||||
};
|
||||
|
||||
actions-preview-nvim = prev.vimUtils.buildVimPlugin {
|
||||
pname = "actions-preview-nvim";
|
||||
version = mkVersionInput inputs.actions-preview-nvim;
|
||||
src = inputs.actions-preview-nvim;
|
||||
};
|
||||
|
||||
nvim-treesitter = prev.vimPlugins.nvim-treesitter.overrideAttrs (_: {
|
||||
version = mkVersionInput inputs.nvim-treesitter;
|
||||
src = inputs.nvim-treesitter;
|
||||
});
|
||||
|
||||
statuscol-nvim = prev.vimPlugins.statuscol-nvim.overrideAttrs (_: {
|
||||
version = mkVersionInput inputs.statuscol-nvim;
|
||||
src = inputs.statuscol-nvim;
|
||||
});
|
||||
|
||||
# HACK: to fix error in nixpkgs version of nvim-lspconfig
|
||||
nvim-lspconfig = prev.vimPlugins.nvim-lspconfig.overrideAttrs (_: {
|
||||
version = mkVersionInput inputs.nvim-lspconfig;
|
||||
src = inputs.nvim-lspconfig;
|
||||
});
|
||||
|
||||
nvim-puppeteer = prev.vimUtils.buildVimPlugin {
|
||||
pname = "nvim-puppeteer";
|
||||
version = mkVersionInput inputs.nvim-puppeteer;
|
||||
src = inputs.nvim-puppeteer;
|
||||
};
|
||||
|
||||
null-ls-nvim = prev.vimPlugins.null-ls-nvim.overrideAttrs (_: {
|
||||
version = mkVersionInput inputs.none-ls-nvim;
|
||||
src = inputs.none-ls-nvim;
|
||||
});
|
||||
|
||||
neotest-python = prev.vimPlugins.neotest-python.overrideAttrs (_: {
|
||||
version = mkVersionInput inputs.neotest-python;
|
||||
src = inputs.neotest-python;
|
||||
});
|
||||
|
||||
gen-nvim = prev.vimUtils.buildVimPlugin {
|
||||
pname = "gen-nvim";
|
||||
version = mkVersionInput inputs.gen-nvim;
|
||||
src = inputs.gen-nvim;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
_:
|
||||
|
||||
final: prev: {
|
||||
neovide-hyprland = final.symlinkJoin {
|
||||
name = "neovide-hyprland-${final.neovide.version}";
|
||||
paths = [ final.neovide ];
|
||||
nativeBuildInputs = [ final.makeWrapper ];
|
||||
postBuild = ''
|
||||
rm $out/bin/neovide
|
||||
makeWrapper ${final.neovide}/bin/neovide $out/bin/neovide --set WINIT_UNIX_BACKEND x11
|
||||
'';
|
||||
meta = final.neovide.meta // {
|
||||
mainProgram = "neovide";
|
||||
};
|
||||
};
|
||||
logseq-wayland = prev.symlinkJoin {
|
||||
name = "logseq-wayland";
|
||||
paths = [ prev.logseq ];
|
||||
nativeBuildInputs = [ prev.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/logseq \
|
||||
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||
'';
|
||||
};
|
||||
}
|
Binary file not shown.
|
@ -23,6 +23,7 @@ in
|
|||
"wireguard-private-key.age".publicKeys = personal;
|
||||
"webis.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ];
|
||||
"webis-ssh.age".publicKeys = hosts-personal ++ [ scadspc25 moritz ];
|
||||
"root-password.age".publicKeys = hosts-personal ++ [ moritz ];
|
||||
"moritz-password.age".publicKeys = hosts-personal ++ [ moritz ];
|
||||
"root-password.age".publicKeys = personal;
|
||||
"moritz-password.age".publicKeys = personal;
|
||||
"exercism.age".publicKeys = personal;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue