Compare commits

...

67 Commits

Author SHA1 Message Date
mandlm 10c55a5a28
Merge branch 'wayland' 2024-01-11 08:12:05 +01:00
mandlm af9a0ec6d0
feat(nvim): replace discontinued rust-tools.nvim with rustaceanvim 2024-01-09 09:11:19 +01:00
mandlm 76062fc63f
feat: enable digital camera user-support 2024-01-09 08:28:34 +01:00
mandlm b35f0aa0da
chore: nix flake update 2024-01-09 08:28:01 +01:00
mandlm 44dbc88d8e
feat: add fwupd 2023-12-29 16:06:38 +01:00
mandlm 258e5a6b0e
refactor: remove obsolete zfs settings 2023-12-19 10:04:45 +01:00
mandlm dd280068e2
chore: nix flake update 2023-12-19 10:04:07 +01:00
mandlm ecaa5095cf
feat: manage firefox with home-manager 2023-12-14 17:07:25 +01:00
mandlm 4265578b80
feat: add zoxide 2023-12-12 08:38:55 +01:00
mandlm cdcebfde46
feat: add nushell 2023-12-12 08:38:55 +01:00
mandlm 36d1bb4252
feat: use carapace for completion 2023-12-11 08:14:36 +01:00
mandlm deaeb9d3b3
chore: nix flake update 2023-12-11 07:40:55 +01:00
mandlm 78eed10369
feat: install gthumb 2023-12-11 07:39:52 +01:00
mandlm 5bf65163a6
feat: add cargo-bin to path 2023-12-11 07:39:52 +01:00
mandlm ad6f261bca
feat: configure swaylock-fancy 2023-12-11 07:39:52 +01:00
mandlm bbd480f511
feat: make zoom windows floating 2023-12-11 07:39:52 +01:00
mandlm bc480b218a
chore: update to nixos 23.11 2023-12-11 07:39:52 +01:00
mandlm 4ca2bb7fa3
chore: nix flake update 2023-11-27 10:37:45 +01:00
mandlm ddeb0b7024
chore: nix flake update 2023-11-20 07:55:19 +01:00
mandlm 3ada2600f8
chore: nix flake update 2023-11-14 08:19:32 +01:00
mandlm ae5a3ffc15
feat: allow yubikey otp authentication 2023-11-05 18:25:29 +01:00
mandlm 98ca23db7e
feat: add libreoffice 2023-11-05 15:04:55 +01:00
mandlm 4304b2730b
fix: revert to stable zoom 2023-11-05 15:04:42 +01:00
mandlm f9ebd12607
chore: nix flake update 2023-11-03 16:19:30 +01:00
mandlm 97e641e205
chore: nix flake update 2023-10-31 09:15:44 +01:00
mandlm 16a7d1db2d
feat: install zoom from unstable 2023-10-31 09:13:17 +01:00
mandlm b67b8b70e4
feat: replace exa with eza 2023-10-31 09:13:03 +01:00
mandlm e91d1e1ce6
feat: configure treesitter incremental selection, remove obsolte settings 2023-10-25 10:49:16 +02:00
mandlm 02635a71b1
feat: configure illuminate highlighting as bold 2023-10-25 10:38:33 +02:00
mandlm a43a04aeab
feat: remove conflicting g-t key mapping 2023-10-25 10:38:15 +02:00
mandlm 06405a5d47
feat: remove obsolete nvim-illuminate lsp config 2023-10-25 10:37:53 +02:00
mandlm 56bf157a60
feat: use pipewire instead of pulseaudio to support zoom screensharing 2023-10-25 10:33:42 +02:00
mandlm bdd09aa73e
feat(sway): disable dead keys on keyboard 2023-10-25 10:33:06 +02:00
mandlm 8f7ab8dda1
chore: nix flake update 2023-10-23 08:47:00 +02:00
mandlm 73838a8411
feat: use update nixos packages for nvim plugins flog, lsp_lines and signature-help 2023-10-23 08:46:07 +02:00
mandlm 5fd57a74ed
feat: remove nix-output-monitor 2023-10-23 08:39:47 +02:00
mandlm d63f547a17
feat: enable wlr desktop sharing 2023-10-23 08:38:46 +02:00
mandlm 6e018f8396
feat: add c++ language servers 2023-10-19 08:45:40 +02:00
mandlm e020393721
feat: add calibre 2023-10-19 08:45:39 +02:00
mandlm 52dacfda31
feat: use installed html language server 2023-10-16 20:54:16 +02:00
mandlm f7e66f11d5
feat: install vue-language-server 2023-10-16 20:47:49 +02:00
mandlm 7349a8848d
feat: use eslint language server instead of null-ls 2023-10-16 20:43:08 +02:00
mandlm bb6968c86e
feat: add marksman language server 2023-10-16 20:28:32 +02:00
mandlm 6fca68679d
chore: nix flake update 2023-10-16 08:03:19 +02:00
mandlm 0b5ba97b32
feat(sway): add mod-shift-m keybinding to reset display 2023-10-12 08:34:44 +02:00
mandlm 24b86f821b
fix: remove custom vue-language-server path to enable volar package 2023-10-12 08:34:03 +02:00
mandlm 6e6411eddf
feat: add clangd and cmake lsp config 2023-10-12 08:33:48 +02:00
mandlm c7e5fd760c
feat: raise screen blanking timeouts 2023-10-10 08:59:32 +02:00
mandlm d86f00a7bf
chore: nix flake update 2023-10-05 08:40:46 +02:00
mandlm 4bdc608068
feat: don't focus new windows 2023-10-03 18:42:11 +02:00
mandlm c06d7054ed
feat: enable wayland clipboard in neovim 2023-10-01 11:01:55 +02:00
mandlm 60c315423c
feat: use shotman as screenshot tool 2023-10-01 10:53:24 +02:00
mandlm fd7095bbe7
feat(wip): add swayidle 2023-09-30 10:10:00 +02:00
mandlm 8d33d629c7
fix: use nerdfont compatible lsp-status icon 2023-09-30 10:10:00 +02:00
mandlm c7db575f3b
fix: use nerdfont only for symbols in kitty 2023-09-30 10:10:00 +02:00
mandlm ea81d83137
feat: add dunst 2023-09-30 10:10:00 +02:00
mandlm edf8967c10
feat: increase hide_cursor timout to 5 secs 2023-09-30 10:09:59 +02:00
mandlm 6672763d1d
chore: clean comments 2023-09-26 08:55:59 +02:00
mandlm 0ee3a84f4a
feat: add swaylock-fancy 2023-09-26 08:55:59 +02:00
mandlm a3832ac5eb
chore: nix flake update 2023-09-25 14:18:11 +02:00
mandlm c4a82dfb80
feat: configure p330 specialization 2023-09-25 14:17:55 +02:00
mandlm 051550f773
feat: set default workspace 2023-09-25 14:17:30 +02:00
mandlm 3a451c7d9c
feat: add autostart and key bindings 2023-09-25 14:17:12 +02:00
mandlm 6913cc47d0
feat: add mouse cursor 2023-09-25 14:16:57 +02:00
mandlm f7902362cc
feat: add xdg-open etc. 2023-09-25 14:16:42 +02:00
mandlm 1c66c5662e
feat: configure fuzzle 2023-09-25 14:16:31 +02:00
mandlm 1f447a4b56
feat: switch apache to sway 2023-09-25 07:57:45 +02:00
30 changed files with 413 additions and 376 deletions

View File

@ -32,6 +32,8 @@
''; '';
}; };
services.fwupd.enable = true;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
services.resolved.enable = true; services.resolved.enable = true;
@ -41,31 +43,7 @@
programs = { programs = {
appgate-sdp.enable = true; appgate-sdp.enable = true;
zsh.enable = true; zsh.enable = true;
}; gphoto2.enable = true;
services.xserver = {
enable = true;
windowManager.i3.enable = true;
layout = "de";
xkbVariant = "nodeadkeys";
xkbModel = "pc105";
libinput = {
enable = true;
touchpad = {
horizontalScrolling = false;
naturalScrolling = true;
};
};
displayManager = {
defaultSession = "none+i3";
autoLogin = {
enable = true;
user = "mandlm";
};
};
}; };
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
@ -79,16 +57,32 @@
keyMap = "de-latin1-nodeadkeys"; keyMap = "de-latin1-nodeadkeys";
}; };
fonts.fonts = with pkgs; [ fonts.packages = with pkgs; [
(nerdfonts.override { fonts = [ "DejaVuSansMono" "FiraCode" ]; }) (nerdfonts.override { fonts = [ "DejaVuSansMono" "NerdFontsSymbolsOnly" ]; })
font-awesome dejavu_fonts
fira-code
]; ];
hardware.pulseaudio.enable = true; hardware = {
opengl.enable = true;
hardware.sane = { sane = {
enable = true; enable = true;
extraBackends = [ pkgs.sane-airscan ]; extraBackends = [ pkgs.sane-airscan ];
};
};
security = {
polkit.enable = true;
rtkit.enable = true;
pam.services.swaylock = { };
pam.yubico = {
enable = true;
mode = "challenge-response";
id = [ "23664350" ];
control = "sufficient";
};
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -98,11 +92,35 @@
environment.pathsToLink = [ "/share/zsh" ]; environment.pathsToLink = [ "/share/zsh" ];
xdg.portal = {
enable = true;
wlr.enable = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
];
config = {
common = {
default = [ "wlr" "gtk" ];
};
};
};
services.udev.packages = [ pkgs.yubikey-personalization ];
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
};
services.openssh = { services.openssh = {
enable = true; enable = true;
settings.X11Forwarding = true; settings.X11Forwarding = true;
}; };
services.udisks2.enable = true;
services.printing = { services.printing = {
enable = true; enable = true;
}; };

View File

@ -7,43 +7,43 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1693208669, "lastModified": 1704099619,
"narHash": "sha256-hHFaaUsZ860wvppPeiu7nJn/nXZjJfnqAQEu9SPFE9I=", "narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5bac4a1c06cd77cf8fc35a658ccb035a6c50cd2c", "rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-23.05", "ref": "release-23.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1694304580, "lastModified": 1704420045,
"narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=", "narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760", "rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-23.05", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1694183432, "lastModified": 1704538339,
"narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=", "narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b", "rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -1,10 +1,10 @@
{ {
inputs = { inputs = {
nixpkgs.url = github:NixOS/nixpkgs/nixos-23.05; nixpkgs.url = github:NixOS/nixpkgs/nixos-23.11;
nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable; nixpkgs-unstable.url = github:NixOS/nixpkgs/nixos-unstable;
home-manager = { home-manager = {
url = github:nix-community/home-manager/release-23.05; url = github:nix-community/home-manager/release-23.11;
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@ -32,6 +32,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
./greetd.nix
./users.nix ./users.nix
./machines/nixos-vm/configuration.nix ./machines/nixos-vm/configuration.nix
./machines/nixos-vm/hardware-configuration.nix ./machines/nixos-vm/hardware-configuration.nix
@ -53,6 +54,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
./greetd.nix
./users.nix ./users.nix
./machines/apache/configuration.nix ./machines/apache/configuration.nix
./machines/apache/hardware-configuration.nix ./machines/apache/hardware-configuration.nix
@ -77,6 +79,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
./greetd.nix
./users.nix ./users.nix
./machines/p330/configuration.nix ./machines/p330/configuration.nix
./machines/p330/hardware-configuration.nix ./machines/p330/hardware-configuration.nix
@ -101,6 +104,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./configuration.nix ./configuration.nix
./greetd.nix
./users.nix ./users.nix
./machines/yoga/configuration.nix ./machines/yoga/configuration.nix
./machines/yoga/hardware-configuration.nix ./machines/yoga/hardware-configuration.nix

19
greetd.nix Normal file
View File

@ -0,0 +1,19 @@
{ config, pkgs, ... }:
{
services.greetd = {
enable = true;
settings = {
default_session.command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--cmd sway
'';
};
};
environment.etc."greetd/environments".text = ''
sway
'';
}

View File

@ -0,0 +1,9 @@
{ config, lib, pkgs, user, theme, ... }:
{
programs.carapace = {
enable = true;
enableZshIntegration = true;
enableNushellIntegration = true;
};
}

View File

@ -5,6 +5,7 @@
direnv = { direnv = {
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
enableNushellIntegration = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
}; };

9
home-manager/firefox.nix Normal file
View File

@ -0,0 +1,9 @@
{ config, lib, pkgs, user, ... }:
{
programs = {
firefox = {
enable = true;
};
};
}

View File

@ -1,136 +0,0 @@
{ config, lib, pkgs, user, ... }:
let
cfg = config.xsession.windowManager.i3;
font.name = "DejaVu Sans Mono";
font.size = 12.0;
in
{
imports = [
./i3status-rust.nix
];
home.file = {
workspaces = {
source = ./workspaces;
target = ".config/i3/workspaces";
recursive = true;
};
wallpapers = {
source = ./wallpapers;
target = ".config/i3/wallpapers";
recursive = true;
};
};
xsession.windowManager.i3 = {
enable = true;
config = {
modifier = "Mod4";
terminal = "${pkgs.kitty}/bin/kitty";
fonts = {
names = [ font.name ];
size = font.size;
};
window = {
titlebar = false;
border = 0;
};
floating = {
titlebar = false;
border = 0;
};
menu = "${pkgs.rofi}/bin/rofi -show drun";
bars = [{
mode = "hide";
position = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
fonts = {
names = [ font.name ];
size = font.size * 1.1;
};
}];
defaultWorkspace = "workspace number 1";
keybindings = lib.mkOptionDefault {
"${cfg.config.modifier}+Shift+o" = "exec xdg-open \"zoommtg://zoom.us/join?action=join&confno=4861587170&pwd=ZVk3aHphcWppY21ONjZOMVh6STN6dz09\"";
"${cfg.config.modifier}+Shift+s" = "exec flameshot gui";
};
startup = [
{ command = "i3-msg 'workspace 1; append_layout ~/.config/i3/workspaces/workspace-1.json'"; }
{ command = "i3-msg 'workspace 2; append_layout ~/.config/i3/workspaces/workspace-2.json'"; }
{ command = "i3-msg 'workspace 4; append_layout ~/.config/i3/workspaces/workspace-4.json'"; }
{ command = "i3-msg 'workspace 5; append_layout ~/.config/i3/workspaces/workspace-5.json'"; }
{ command = "kitty"; notification = false; }
{ command = "firefox"; notification = false; }
{ command = "element-desktop"; notification = false; }
{ command = "keepassxc"; notification = false; }
{ command = "nextcloud"; notification = false; }
{ command = "thunderbird"; notification = false; }
];
assigns = {
"6" = [{ class = "^\.zoom $"; }];
};
};
};
services = {
betterlockscreen = {
enable = true;
arguments = [ "--update /home/mandlm/.config/i3/wallpapers/nix-wallpaper-dracula.png" ];
};
flameshot = {
enable = true;
settings = {
General = {
showStartupLaunchMessage = false;
};
};
};
unclutter.enable = true;
dunst = {
enable = true;
settings = {
global = {
follow = "keyboard";
font = "DejaVu Sans Mono 11";
frame_width = 1;
};
urgency_low = {
frame_color = "#268bd2";
foreground = "#eee8d5";
background = "#002b36";
timeout = 4;
};
urgency_normal = {
frame_color = "#859900";
foreground = "#eee8d5";
background = "#002b36";
timeout = 6;
};
urgency_critical = {
frame_color = "#dc322f";
foreground = "#eee8d5";
background = "#002b36";
timeout = 8;
};
};
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

View File

@ -1,10 +0,0 @@
// vim:ts=4:sw=4:et
{
"name": "Terminal",
"swallows": [
{
"class": "^kitty$"
}
],
"type": "con"
}

View File

@ -1,10 +0,0 @@
// vim:ts=4:sw=4:et
{
"name": "Element",
"swallows": [
{
"class": "^Element$"
}
],
"type": "con"
}

View File

@ -1,10 +0,0 @@
// vim:ts=4:sw=4:et
{
"name": "Email",
"swallows": [
{
"class": "^thunderbird$"
}
],
"type": "con"
}

View File

@ -1,10 +0,0 @@
// vim:ts=4:sw=4:et
{
"name": "Browser",
"swallows": [
{
"class": "^firefox$"
}
],
"type": "con"
}

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, user, theme, ... }: { theme, ... }:
let let
theme_name = if theme == "light" then "Solarized Light" else "Solarized Dark"; theme_name = if theme == "light" then "Solarized Light" else "Solarized Dark";
@ -9,7 +9,7 @@ in
enable = true; enable = true;
theme = theme_name; theme = theme_name;
font = { font = {
name = "FiraCode Nerd Font Mono"; name = "FiraCode";
}; };
settings = { settings = {
tab_bar_style = "powerline"; tab_bar_style = "powerline";

View File

@ -1,49 +1,5 @@
{ config, lib, pkgs, user, theme, ... }: { config, lib, pkgs, user, theme, ... }:
let
cmp-nvim-lsp-signature-help = pkgs.vimUtils.buildVimPlugin {
name = "cmp-nvim-lsp-signature-help";
version = "2023-02-27";
src = pkgs.fetchFromGitHub {
owner = "hrsh7th";
repo = "cmp-nvim-lsp-signature-help";
rev = "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1";
sha256 = "sha256-yDxYvjTIeXIKYR3tg+bf+okXKr5JYc/I9obP+6uKey4=";
};
meta.homepage = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help";
};
lsp_lines-nvim = pkgs.vimUtils.buildVimPlugin {
name = "lsp_lines.nvim";
version = "2023-02-27";
src = pkgs.fetchgit {
url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim";
rev = "ec98b45c8280e5ef8c84028d4f38aa447276c002";
sha256 = "sha256-HjLCfuvZZ7vTJT0Te5VBRLNWvWIBFBou1Mvoxe2Hi3c=";
};
meta.homepage = "https://git.sr.ht/~whynothugo/lsp_lines.nvim";
};
pre-commit-nvim = pkgs.vimUtils.buildVimPlugin {
name = "pre-commit.nvim";
version = "2022-08-05";
src = pkgs.fetchgit {
url = "https://github.com/Ttibsi/pre-commit.nvim";
rev = "4a608cef0f0a196fa39cdc60579eb9cf601d21c4";
sha256 = "Y0biF/yrOX1YYztj8/u0n8zPN4YLGLSQL3vb9I3+3dE=";
};
meta.homepage = "https://github.com/Ttibsi/pre-commit.nvim";
};
vim-flog = pkgs.vimUtils.buildVimPlugin {
name = "vim-flog";
version = "2023-01-24";
src = pkgs.fetchgit {
url = "https://github.com/rbong/vim-flog";
rev = "2ba8af2c9682e3560db5b813d10acf3ba3415bc1";
sha256 = "sha256-xnzHAc30DD9W9/5s8PvpuBaEUJbB4BJ7WqbNb/CY3mY=";
};
meta.homepage = "https://github.com/rbong/vim-flog/";
};
in
{ {
home.packages = with pkgs.unstable; [ home.packages = with pkgs.unstable; [
xclip xclip
@ -62,8 +18,12 @@ in
nodePackages.typescript nodePackages.typescript
nodePackages.dockerfile-language-server-nodejs nodePackages.dockerfile-language-server-nodejs
nodePackages.vscode-langservers-extracted nodePackages.vscode-langservers-extracted
nodePackages.volar
lldb lldb
vscode-extensions.vadimcn.vscode-lldb vscode-extensions.vadimcn.vscode-lldb
marksman
clang-tools
cmake-language-server
]; ];
# symlink for a stable path # symlink for a stable path
@ -103,7 +63,6 @@ in
plenary-nvim plenary-nvim
vim-illuminate vim-illuminate
registers-nvim registers-nvim
pre-commit-nvim
vim-surround vim-surround
editorconfig-nvim editorconfig-nvim
@ -138,10 +97,11 @@ in
# LSP # LSP
nvim-lspconfig nvim-lspconfig
lsp-status-nvim lsp-status-nvim
rust-tools-nvim rustaceanvim
neodev-nvim neodev-nvim
null-ls-nvim null-ls-nvim
lsp_lines-nvim lsp_lines-nvim
lsp-inlayhints-nvim
# debugging # debugging
nvim-dap nvim-dap
@ -183,6 +143,10 @@ in
vim.g.gitblame_date_format = "%r" vim.g.gitblame_date_format = "%r"
-- setup illuminate highlight groups
vim.api.nvim_set_hl(0, "IlluminatedWordText", { bold = true })
vim.api.nvim_set_hl(0, "IlluminatedWordRead", { link = "IlluminatedWordText" })
vim.api.nvim_set_hl(0, "IlluminatedWordWrite", { link = "IlluminatedWordText" })
EOF EOF
''; '';
}; };

View File

@ -1,6 +1,5 @@
require("indent_blankline").setup { require("ibl").setup {
char = "", indent = {
buftype_exclude = { "terminal", "help", "nofile" }, char = "",
filetype_exclude = { 'help', 'packer' }, },
show_trailing_blankline_indent = false
} }

View File

@ -15,11 +15,12 @@ local on_attach = function(client, bufnr)
}) })
end end
require("lsp-inlayhints").on_attach(client, bufnr)
local telescope = require("telescope.builtin") local telescope = require("telescope.builtin")
nnoremap("gD", vim.lsp.buf.declaration) nnoremap("gD", vim.lsp.buf.declaration)
nnoremap("gd", telescope.lsp_definitions) nnoremap("gd", telescope.lsp_definitions)
nnoremap("gt", telescope.lsp_type_definitions)
nnoremap("gi", telescope.lsp_implementations) nnoremap("gi", telescope.lsp_implementations)
nnoremap("gr", telescope.lsp_references) nnoremap("gr", telescope.lsp_references)
nnoremap("K", vim.lsp.buf.hover) nnoremap("K", vim.lsp.buf.hover)
@ -39,16 +40,16 @@ local on_attach = function(client, bufnr)
callback = format_buffer, callback = format_buffer,
}) })
end end
local illuminate = require("illuminate")
illuminate.on_attach(client)
end end
require("lsp-inlayhints").setup({})
local lsp_status = require("lsp-status") local lsp_status = require("lsp-status")
lsp_status.config({ lsp_status.config({
current_function = false, current_function = false,
show_filename = false, show_filename = false,
diagnostics = true, diagnostics = true,
status_symbol = "",
}) })
lsp_status.register_progress() lsp_status.register_progress()
@ -66,7 +67,11 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities(lsp_status.cap
local servers = { local servers = {
["bashls"] = {}, ["bashls"] = {},
["clangd"] = {},
["cmake"] = {},
["dockerls"] = {}, ["dockerls"] = {},
["eslint"] = {},
["html"] = {},
["jsonls"] = {}, ["jsonls"] = {},
["lua_ls"] = { ["lua_ls"] = {
Lua = { Lua = {
@ -84,6 +89,8 @@ local servers = {
}, },
}, },
}, },
["marksman"] = {},
["nushell"] = {},
["pylsp"] = { ["pylsp"] = {
pylsp = { pylsp = {
plugins = { plugins = {
@ -115,12 +122,8 @@ for lsp, settings in pairs(servers) do
}) })
end end
-- setup rust tools -- setup rustaceanvim
local codelldb_base_path = vim.env.HOME .. "/.vscode-extensions/vscode-lldb/share/vscode/extensions/vadimcn.vscode-lldb/" vim.g.rustaceanvim = {
local codelldb_bin_path = codelldb_base_path .. 'adapter/codelldb'
local codelldb_lib_path = codelldb_base_path .. 'lldb/lib/liblldb.so'
require("rust-tools").setup({
server = { server = {
on_attach = on_attach, on_attach = on_attach,
settings = { settings = {
@ -134,20 +137,14 @@ require("rust-tools").setup({
}, },
}, },
}, },
capabilities = capabilities,
}, },
dap = { }
adapter = require("rust-tools.dap").get_codelldb_adapter(codelldb_bin_path, codelldb_lib_path)
},
})
-- setup null-ls for markdown formatting -- setup null-ls for markdown formatting
local null_ls = require("null-ls") local null_ls = require("null-ls")
null_ls.setup({ null_ls.setup({
sources = { sources = {
null_ls.builtins.formatting.prettier, null_ls.builtins.formatting.prettier,
null_ls.builtins.code_actions.eslint_d,
null_ls.builtins.diagnostics.eslint_d,
null_ls.builtins.diagnostics.tsc, null_ls.builtins.diagnostics.tsc,
}, },
on_attach = on_attach, on_attach = on_attach,
@ -178,16 +175,8 @@ for type, icon in pairs(diagnostics_signs) do
vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl })
end end
-- setup html languageserver
lspconfig["html"].setup({
cmd = { "html-languageserver", "--stdio" },
on_attach = on_attach,
capabilities = capabilities,
})
-- setup volar -- setup volar
lspconfig["volar"].setup({ lspconfig["volar"].setup({
cmd = { "./node_modules/.bin/vue-language-server", "--stdio" },
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json' }, filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json' },
on_attach = on_attach, on_attach = on_attach,
capabilities = capabilities, capabilities = capabilities,

View File

@ -1,14 +1,14 @@
require('nvim-treesitter.configs').setup({ require('nvim-treesitter.configs').setup({
highlight = { highlight = {
enable = true, enable = true,
additional_vim_regex_highlighting = false
}, },
indent = { incremental_selection = {
enable = false,
},
rainbow = {
enable = true, enable = true,
extended_mode = true, keymaps = {
max_file_lines = nil, init_selection = "v",
node_decremental = "<",
node_incremental = ">",
scope_incremental = false,
},
}, },
}) })

36
home-manager/nushell.nix Normal file
View File

@ -0,0 +1,36 @@
{ config, lib, pkgs, user, theme, ... }:
{
programs.nushell = {
enable = true;
extraConfig = ''
let carapace_completer = {|spans|
carapace $spans.0 nushell $spans | from json
}
$env.config = {
show_banner: false,
edit_mode: vi
shell_integration: true
use_kitty_protocol: true
completions: {
case_sensitive: false # case-sensitive completions
quick: true # set to false to prevent auto-selecting completions
partial: true # set to false to prevent partial filling of the prompt
algorithm: "fuzzy" # prefix or fuzzy
external: {
# set to false to prevent nushell looking into $env.PATH to find more suggestions
enable: true
# set to lower can improve completion performance at the cost of omitting some options
max_results: 100
completer: $carapace_completer # check 'carapace_completer'
}
}
}
$env.PATH = ($env.PATH |
split row (char esep) |
prepend /home/myuser/.apps |
append /usr/bin/env
)
'';
};
}

View File

@ -1,13 +0,0 @@
{ config, lib, pkgs, user, ... }:
{
programs.rofi = {
enable = true;
font = "DejaVu Sans Mono 12";
terminal = "${pkgs.kitty}/bin/kitty";
extraConfig = {
show-icons = true;
matching = "fuzzy";
};
};
}

View File

@ -0,0 +1,141 @@
{ config, lib, pkgs, user, ... }:
let
font.name = "DejaVu Sans Mono";
font.size = 12.0;
lock_command = "${pkgs.swaylock-fancy}/bin/swaylock-fancy --daemonize --show-failed-attempts --ignore-empty-password";
swaymsg = "${pkgs.sway}/bin/swaymsg";
in
{
imports = [
./i3status-rust.nix
./dunst.nix
];
home.packages = with pkgs; [
xdg-utils
shotman
wl-clipboard
];
programs.fuzzel = {
enable = true;
settings = {
main = {
terminal = "${pkgs.kitty}/bin/kitty";
layer = "overlay";
font = "DejaVu Sans Mono:size=12";
};
colors = {
background = "002b36ff";
border = "ffffffaa";
};
};
};
programs.swaylock = {
enable = true;
package = pkgs.swaylock-fancy;
};
home.pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
services.swayidle = {
enable = true;
events = [
{ event = "before-sleep"; command = lock_command; }
];
timeouts = [
{ timeout = 900; command = "${swaymsg} output '*' power off"; resumeCommand = "${swaymsg} output '*' power on"; }
{ timeout = 1000; command = lock_command; }
];
};
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "${pkgs.kitty}/bin/kitty";
input = {
"type:keyboard" = {
xkb_layout = "de";
xkb_variant = "nodeadkeys";
};
"type:touchpad" = {
natural_scroll = "enabled";
tap = "enabled";
accel_profile = "flat";
dwt = "enabled";
};
};
seat = {
"*" = {
hide_cursor = "5000";
};
};
defaultWorkspace = "1";
focus.newWindow = "urgent";
floating.criteria = [{ app_id = "zoom"; floating = true; }];
fonts = {
names = [ font.name ];
size = font.size;
};
bars = [{
mode = "hide";
position = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-default.toml";
fonts = {
names = [ font.name ];
size = font.size;
};
}];
menu = "${pkgs.fuzzel}/bin/fuzzel";
keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
"${modifier}+Shift+o" = "exec xdg-open \"zoommtg://zoom.us/join?action=join&confno=4861587170&pwd=ZVk3aHphcWppY21ONjZOMVh6STN6dz09\"";
"${modifier}+Shift+s" = "exec shotman --capture region --copy";
"${modifier}+l" = "exec ${lock_command}";
"${modifier}+Shift+m" = "output DP-2 power off, output DP-3 power off, output DP-2 power on, output DP-3 power on";
};
assigns = {
"6" = [{ class = "^\.zoom $"; }];
};
startup = [
{ command = "keepassxc"; }
{ command = "nextcloud"; }
{ command = "swaymsg 'workspace 1"; }
{ command = "kitty"; }
{ command = "swaymsg 'workspace 2"; }
{ command = "element-desktop"; }
{ command = "swaymsg 'workspace 4"; }
{ command = "thunderbird"; }
{ command = "swaymsg 'workspace 5"; }
{ command = "firefox"; }
];
};
};
}

View File

@ -0,0 +1,34 @@
{ config, lib, pkgs, user, ... }:
{
services.dunst = {
enable = true;
settings = {
global = {
follow = "keyboard";
font = "DejaVu Sans Mono 11";
frame_width = 1;
};
urgency_low = {
frame_color = "#268bd2";
foreground = "#eee8d5";
background = "#002b36";
timeout = 4;
};
urgency_normal = {
frame_color = "#859900";
foreground = "#eee8d5";
background = "#002b36";
timeout = 6;
};
urgency_critical = {
frame_color = "#dc322f";
foreground = "#eee8d5";
background = "#002b36";
timeout = 8;
};
};
};
}

10
home-manager/zoxide.nix Normal file
View File

@ -0,0 +1,10 @@
{ config, lib, pkgs, user, theme, ... }:
{
programs.zoxide = {
enable = true;
enableNushellIntegration = true;
enableZshIntegration = true;
};
}

View File

@ -5,8 +5,8 @@ in
{ {
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableAutosuggestions = true; # enableAutosuggestions = true;
enableCompletion = true; # enableCompletion = true;
history.size = 10000; history.size = 10000;
initExtra = '' initExtra = ''
@ -23,7 +23,7 @@ in
}; };
shellAliases = { shellAliases = {
ls = "exa --group-directories-first --git"; ls = "eza --group-directories-first --git";
neovide = "neovide --multigrid"; neovide = "neovide --multigrid";
xclip = "xclip -selection clipboard"; xclip = "xclip -selection clipboard";
}; };

View File

@ -4,10 +4,12 @@
home = { home = {
username = "${user}"; username = "${user}";
homeDirectory = "/home/${user}"; homeDirectory = "/home/${user}";
sessionPath = [
"$HOME/.cargo/bin/"
];
packages = with pkgs; [ packages = with pkgs; [
exa unstable.eza
firefox
jq jq
htop htop
ripgrep ripgrep
@ -28,7 +30,9 @@
kubectl kubectl
kubectx kubectx
gnome.simple-scan gnome.simple-scan
nix-output-monitor calibre
libreoffice
gthumb
]; ];
stateVersion = "22.05"; stateVersion = "22.05";
@ -37,16 +41,19 @@
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [ imports = [
./home-manager/firefox.nix
./home-manager/fzf.nix ./home-manager/fzf.nix
./home-manager/git.nix ./home-manager/git.nix
./home-manager/kitty.nix ./home-manager/kitty.nix
./home-manager/neovim ./home-manager/neovim
./home-manager/gpg ./home-manager/gpg
./home-manager/carapace.nix
./home-manager/zsh.nix ./home-manager/zsh.nix
./home-manager/nushell.nix
./home-manager/starship.nix ./home-manager/starship.nix
./home-manager/i3 ./home-manager/sway
./home-manager/rofi.nix
./home-manager/direnv.nix ./home-manager/direnv.nix
./home-manager/bat.nix ./home-manager/bat.nix
./home-manager/zoxide.nix
]; ];
} }

View File

@ -3,6 +3,5 @@
{ {
networking.hostName = "apache"; networking.hostName = "apache";
boot.loader.grub.enableCryptodisk = true; boot.loader.grub.enableCryptodisk = true;
services.xserver.videoDrivers = [ "intel" "nvidia" ];
} }

View File

@ -2,35 +2,5 @@
{ {
networking.hostName = "p330"; networking.hostName = "p330";
networking.hostId = "05130071";
boot.loader.grub.enableCryptodisk = true; boot.loader.grub.enableCryptodisk = true;
boot.supportedFilesystems = [ "zfs" ];
services.xserver = {
videoDrivers = [ "intel" ];
dpi = 144;
xrandrHeads = [
{
output = "DP2";
primary = true;
monitorConfig = ''
Option "Position" "0 790"
'';
}
{
output = "DP3";
monitorConfig = ''
Option "Position" "3840 0"
Option "Rotate" "right"
'';
}
];
serverFlagsSection = ''
Option "BlankTime" "19"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "20"
'';
};
} }

View File

@ -1,23 +1,30 @@
{ config, lib, pkgs, user, ... }: { config, lib, pkgs, user, ... }:
{ {
xsession.windowManager.i3.config = { wayland.windowManager.sway.config = {
output = {
DP-2 = {
scale = "1.5";
position = "0 526";
};
DP-3 = {
scale = "1.5";
position = "2560 0";
transform = "90";
};
};
workspaceOutputAssign = [ workspaceOutputAssign = [
{ workspace = "1"; output = "DP3"; } { workspace = "0"; output = "DP-2"; }
{ workspace = "2"; output = "DP2"; } { workspace = "1"; output = "DP-3"; }
{ workspace = "3"; output = "DP3"; } { workspace = "2"; output = "DP-2"; }
{ workspace = "4"; output = "DP2"; } { workspace = "3"; output = "DP-3"; }
{ workspace = "5"; output = "DP3"; } { workspace = "4"; output = "DP-2"; }
{ workspace = "6"; output = "DP2"; } { workspace = "5"; output = "DP-3"; }
{ workspace = "7"; output = "DP3"; } { workspace = "6"; output = "DP-2"; }
{ workspace = "8"; output = "DP2"; } { workspace = "7"; output = "DP-3"; }
{ workspace = "9"; output = "DP3"; } { workspace = "8"; output = "DP-2"; }
{ workspace = "10"; output = "DP2"; } { workspace = "9"; output = "DP-3"; }
]; ];
}; };
programs.kitty.font.size = 16;
programs.rofi.font = lib.mkForce "DejaVu Sans Mono 16";
services.betterlockscreen.inactiveInterval = 20;
} }

View File

@ -8,8 +8,18 @@
isNormalUser = true; isNormalUser = true;
uid = 1000; uid = 1000;
home = "/home/mandlm"; home = "/home/mandlm";
shell = pkgs.zsh; shell = pkgs.nushell;
extraGroups = [ "wheel" "networkmanager" "audio" "video" "input" "docker" "scanner" "lp" ]; extraGroups = [
"wheel"
"networkmanager"
"audio"
"video"
"input"
"docker"
"scanner"
"lp"
"camera"
];
hashedPassword = "$6$wV6dzYlgke5tN01q$rCMP/Hquss/1BgKarnZUkmejpBtjEcwmlUhbhAAmjc2Pwdbztp3yr/bD/LJ63XoZ0oD7yhTMqbECDdMqNKKDe/"; hashedPassword = "$6$wV6dzYlgke5tN01q$rCMP/Hquss/1BgKarnZUkmejpBtjEcwmlUhbhAAmjc2Pwdbztp3yr/bD/LJ63XoZ0oD7yhTMqbECDdMqNKKDe/";
openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI6NmrDRvDtUkeJM8cE7DvZKtiNBKUQ+30MhOX4BwWPzN2b+kM+TjZ5Dtiln+Zbk/QToCDFir+CIKHshpgtCPAvVkjmldeqqflKKUkShTjWfF2zRwEql58DGaTuJqPgMhS9ZVDI5OL6VoecSxWOLSKCqGu4R+yJJnTRBSaoHNzBsq81psYk/yty+QofbWsJktjJc2r3JSuM8UUVkCVqcYS9wd/3vW3NbkqOL7KJhktsJa6sBZfTs1Yr1lpKqJou24CE1TGwTxiZ7SASjiRzbtK7J9jJBCjZ80hgEp/Cop0caaVw7aedo6xRC26X2TSm7ljAdvcPew9m6ayxuLaV9Nz mandlm@apache" ]; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI6NmrDRvDtUkeJM8cE7DvZKtiNBKUQ+30MhOX4BwWPzN2b+kM+TjZ5Dtiln+Zbk/QToCDFir+CIKHshpgtCPAvVkjmldeqqflKKUkShTjWfF2zRwEql58DGaTuJqPgMhS9ZVDI5OL6VoecSxWOLSKCqGu4R+yJJnTRBSaoHNzBsq81psYk/yty+QofbWsJktjJc2r3JSuM8UUVkCVqcYS9wd/3vW3NbkqOL7KJhktsJa6sBZfTs1Yr1lpKqJou24CE1TGwTxiZ7SASjiRzbtK7J9jJBCjZ80hgEp/Cop0caaVw7aedo6xRC26X2TSm7ljAdvcPew9m6ayxuLaV9Nz mandlm@apache" ];
}; };