Merge branch 'wayland'
This commit is contained in:
commit
10c55a5a28
@ -32,6 +32,8 @@
|
||||
'';
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
|
||||
services.resolved.enable = true;
|
||||
@ -41,31 +43,7 @@
|
||||
programs = {
|
||||
appgate-sdp.enable = true;
|
||||
zsh.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";
|
||||
};
|
||||
};
|
||||
gphoto2.enable = true;
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
@ -79,16 +57,32 @@
|
||||
keyMap = "de-latin1-nodeadkeys";
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "DejaVuSansMono" "FiraCode" ]; })
|
||||
font-awesome
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "DejaVuSansMono" "NerdFontsSymbolsOnly" ]; })
|
||||
dejavu_fonts
|
||||
fira-code
|
||||
];
|
||||
|
||||
hardware.pulseaudio.enable = true;
|
||||
hardware = {
|
||||
opengl.enable = true;
|
||||
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
sane = {
|
||||
enable = true;
|
||||
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; [
|
||||
@ -98,11 +92,35 @@
|
||||
|
||||
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 = {
|
||||
enable = true;
|
||||
settings.X11Forwarding = true;
|
||||
};
|
||||
|
||||
services.udisks2.enable = true;
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
};
|
||||
|
22
flake.lock
22
flake.lock
@ -7,43 +7,43 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1693208669,
|
||||
"narHash": "sha256-hHFaaUsZ860wvppPeiu7nJn/nXZjJfnqAQEu9SPFE9I=",
|
||||
"lastModified": 1704099619,
|
||||
"narHash": "sha256-QRVMkdxLmv+aKGjcgeEg31xtJEIsYq4i1Kbyw5EPS6g=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5bac4a1c06cd77cf8fc35a658ccb035a6c50cd2c",
|
||||
"rev": "7e398b3d76bc1503171b1364c9d4a07ac06f3851",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-23.05",
|
||||
"ref": "release-23.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1694304580,
|
||||
"narHash": "sha256-5tIpNodDpEKT8mM/F5zCzWEAnidOg8eb1/x3SRaaBLs=",
|
||||
"lastModified": 1704420045,
|
||||
"narHash": "sha256-C36QmoJd5tdQ5R9MC1jM7fBkZW9zBUqbUCsgwS6j4QU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4c8cf44c5b9481a4f093f1df3b8b7ba997a7c760",
|
||||
"rev": "c1be43e8e837b8dbee2b3665a007e761680f0c3d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-23.05",
|
||||
"ref": "nixos-23.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1694183432,
|
||||
"narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=",
|
||||
"lastModified": 1704538339,
|
||||
"narHash": "sha256-1734d3mQuux9ySvwf6axRWZRBhtcZA9Q8eftD6EZg6U=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b",
|
||||
"rev": "46ae0210ce163b3cba6c7da08840c1d63de9c701",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
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;
|
||||
|
||||
home-manager = {
|
||||
url = github:nix-community/home-manager/release-23.05;
|
||||
url = github:nix-community/home-manager/release-23.11;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
@ -32,6 +32,7 @@
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./greetd.nix
|
||||
./users.nix
|
||||
./machines/nixos-vm/configuration.nix
|
||||
./machines/nixos-vm/hardware-configuration.nix
|
||||
@ -53,6 +54,7 @@
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./greetd.nix
|
||||
./users.nix
|
||||
./machines/apache/configuration.nix
|
||||
./machines/apache/hardware-configuration.nix
|
||||
@ -77,6 +79,7 @@
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./greetd.nix
|
||||
./users.nix
|
||||
./machines/p330/configuration.nix
|
||||
./machines/p330/hardware-configuration.nix
|
||||
@ -101,6 +104,7 @@
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./configuration.nix
|
||||
./greetd.nix
|
||||
./users.nix
|
||||
./machines/yoga/configuration.nix
|
||||
./machines/yoga/hardware-configuration.nix
|
||||
|
19
greetd.nix
Normal file
19
greetd.nix
Normal 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
|
||||
'';
|
||||
}
|
9
home-manager/carapace.nix
Normal file
9
home-manager/carapace.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, user, theme, ... }:
|
||||
{
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
}
|
||||
|
@ -5,6 +5,7 @@
|
||||
direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
|
9
home-manager/firefox.nix
Normal file
9
home-manager/firefox.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
firefox = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -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 |
@ -1,10 +0,0 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
"name": "Terminal",
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^kitty$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
"name": "Element",
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^Element$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
"name": "Email",
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^thunderbird$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
// vim:ts=4:sw=4:et
|
||||
{
|
||||
"name": "Browser",
|
||||
"swallows": [
|
||||
{
|
||||
"class": "^firefox$"
|
||||
}
|
||||
],
|
||||
"type": "con"
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, user, theme, ... }:
|
||||
{ theme, ... }:
|
||||
|
||||
let
|
||||
theme_name = if theme == "light" then "Solarized Light" else "Solarized Dark";
|
||||
@ -9,7 +9,7 @@ in
|
||||
enable = true;
|
||||
theme = theme_name;
|
||||
font = {
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
name = "FiraCode";
|
||||
};
|
||||
settings = {
|
||||
tab_bar_style = "powerline";
|
||||
|
@ -1,49 +1,5 @@
|
||||
{ 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; [
|
||||
xclip
|
||||
@ -62,8 +18,12 @@ in
|
||||
nodePackages.typescript
|
||||
nodePackages.dockerfile-language-server-nodejs
|
||||
nodePackages.vscode-langservers-extracted
|
||||
nodePackages.volar
|
||||
lldb
|
||||
vscode-extensions.vadimcn.vscode-lldb
|
||||
marksman
|
||||
clang-tools
|
||||
cmake-language-server
|
||||
];
|
||||
|
||||
# symlink for a stable path
|
||||
@ -103,7 +63,6 @@ in
|
||||
plenary-nvim
|
||||
vim-illuminate
|
||||
registers-nvim
|
||||
pre-commit-nvim
|
||||
vim-surround
|
||||
|
||||
editorconfig-nvim
|
||||
@ -138,10 +97,11 @@ in
|
||||
# LSP
|
||||
nvim-lspconfig
|
||||
lsp-status-nvim
|
||||
rust-tools-nvim
|
||||
rustaceanvim
|
||||
neodev-nvim
|
||||
null-ls-nvim
|
||||
lsp_lines-nvim
|
||||
lsp-inlayhints-nvim
|
||||
|
||||
# debugging
|
||||
nvim-dap
|
||||
@ -183,6 +143,10 @@ in
|
||||
|
||||
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
|
||||
'';
|
||||
};
|
||||
|
@ -1,6 +1,5 @@
|
||||
require("indent_blankline").setup {
|
||||
char = "┊",
|
||||
buftype_exclude = { "terminal", "help", "nofile" },
|
||||
filetype_exclude = { 'help', 'packer' },
|
||||
show_trailing_blankline_indent = false
|
||||
require("ibl").setup {
|
||||
indent = {
|
||||
char = "┊",
|
||||
},
|
||||
}
|
||||
|
@ -15,11 +15,12 @@ local on_attach = function(client, bufnr)
|
||||
})
|
||||
end
|
||||
|
||||
require("lsp-inlayhints").on_attach(client, bufnr)
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
|
||||
nnoremap("gD", vim.lsp.buf.declaration)
|
||||
nnoremap("gd", telescope.lsp_definitions)
|
||||
nnoremap("gt", telescope.lsp_type_definitions)
|
||||
nnoremap("gi", telescope.lsp_implementations)
|
||||
nnoremap("gr", telescope.lsp_references)
|
||||
nnoremap("K", vim.lsp.buf.hover)
|
||||
@ -39,16 +40,16 @@ local on_attach = function(client, bufnr)
|
||||
callback = format_buffer,
|
||||
})
|
||||
end
|
||||
|
||||
local illuminate = require("illuminate")
|
||||
illuminate.on_attach(client)
|
||||
end
|
||||
|
||||
require("lsp-inlayhints").setup({})
|
||||
|
||||
local lsp_status = require("lsp-status")
|
||||
lsp_status.config({
|
||||
current_function = false,
|
||||
show_filename = false,
|
||||
diagnostics = true,
|
||||
status_symbol = "",
|
||||
})
|
||||
lsp_status.register_progress()
|
||||
|
||||
@ -66,7 +67,11 @@ local capabilities = require("cmp_nvim_lsp").default_capabilities(lsp_status.cap
|
||||
|
||||
local servers = {
|
||||
["bashls"] = {},
|
||||
["clangd"] = {},
|
||||
["cmake"] = {},
|
||||
["dockerls"] = {},
|
||||
["eslint"] = {},
|
||||
["html"] = {},
|
||||
["jsonls"] = {},
|
||||
["lua_ls"] = {
|
||||
Lua = {
|
||||
@ -84,6 +89,8 @@ local servers = {
|
||||
},
|
||||
},
|
||||
},
|
||||
["marksman"] = {},
|
||||
["nushell"] = {},
|
||||
["pylsp"] = {
|
||||
pylsp = {
|
||||
plugins = {
|
||||
@ -115,12 +122,8 @@ for lsp, settings in pairs(servers) do
|
||||
})
|
||||
end
|
||||
|
||||
-- setup rust tools
|
||||
local codelldb_base_path = vim.env.HOME .. "/.vscode-extensions/vscode-lldb/share/vscode/extensions/vadimcn.vscode-lldb/"
|
||||
local codelldb_bin_path = codelldb_base_path .. 'adapter/codelldb'
|
||||
local codelldb_lib_path = codelldb_base_path .. 'lldb/lib/liblldb.so'
|
||||
|
||||
require("rust-tools").setup({
|
||||
-- setup rustaceanvim
|
||||
vim.g.rustaceanvim = {
|
||||
server = {
|
||||
on_attach = on_attach,
|
||||
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
|
||||
local null_ls = require("null-ls")
|
||||
null_ls.setup({
|
||||
sources = {
|
||||
null_ls.builtins.formatting.prettier,
|
||||
null_ls.builtins.code_actions.eslint_d,
|
||||
null_ls.builtins.diagnostics.eslint_d,
|
||||
null_ls.builtins.diagnostics.tsc,
|
||||
},
|
||||
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 })
|
||||
end
|
||||
|
||||
-- setup html languageserver
|
||||
lspconfig["html"].setup({
|
||||
cmd = { "html-languageserver", "--stdio" },
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
})
|
||||
|
||||
-- setup volar
|
||||
lspconfig["volar"].setup({
|
||||
cmd = { "./node_modules/.bin/vue-language-server", "--stdio" },
|
||||
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue', 'json' },
|
||||
on_attach = on_attach,
|
||||
capabilities = capabilities,
|
||||
|
@ -1,14 +1,14 @@
|
||||
require('nvim-treesitter.configs').setup({
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false
|
||||
},
|
||||
indent = {
|
||||
enable = false,
|
||||
},
|
||||
rainbow = {
|
||||
incremental_selection = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
keymaps = {
|
||||
init_selection = "v",
|
||||
node_decremental = "<",
|
||||
node_incremental = ">",
|
||||
scope_incremental = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
|
36
home-manager/nushell.nix
Normal file
36
home-manager/nushell.nix
Normal 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
|
||||
)
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
141
home-manager/sway/default.nix
Normal file
141
home-manager/sway/default.nix
Normal 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"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
34
home-manager/sway/dunst.nix
Normal file
34
home-manager/sway/dunst.nix
Normal 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
10
home-manager/zoxide.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, lib, pkgs, user, theme, ... }:
|
||||
|
||||
{
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
# enableAutosuggestions = true;
|
||||
# enableCompletion = true;
|
||||
history.size = 10000;
|
||||
|
||||
initExtra = ''
|
||||
@ -23,7 +23,7 @@ in
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
ls = "exa --group-directories-first --git";
|
||||
ls = "eza --group-directories-first --git";
|
||||
neovide = "neovide --multigrid";
|
||||
xclip = "xclip -selection clipboard";
|
||||
};
|
||||
|
@ -4,10 +4,12 @@
|
||||
home = {
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
sessionPath = [
|
||||
"$HOME/.cargo/bin/"
|
||||
];
|
||||
|
||||
packages = with pkgs; [
|
||||
exa
|
||||
firefox
|
||||
unstable.eza
|
||||
jq
|
||||
htop
|
||||
ripgrep
|
||||
@ -28,7 +30,9 @@
|
||||
kubectl
|
||||
kubectx
|
||||
gnome.simple-scan
|
||||
nix-output-monitor
|
||||
calibre
|
||||
libreoffice
|
||||
gthumb
|
||||
];
|
||||
|
||||
stateVersion = "22.05";
|
||||
@ -37,16 +41,19 @@
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
./home-manager/firefox.nix
|
||||
./home-manager/fzf.nix
|
||||
./home-manager/git.nix
|
||||
./home-manager/kitty.nix
|
||||
./home-manager/neovim
|
||||
./home-manager/gpg
|
||||
./home-manager/carapace.nix
|
||||
./home-manager/zsh.nix
|
||||
./home-manager/nushell.nix
|
||||
./home-manager/starship.nix
|
||||
./home-manager/i3
|
||||
./home-manager/rofi.nix
|
||||
./home-manager/sway
|
||||
./home-manager/direnv.nix
|
||||
./home-manager/bat.nix
|
||||
./home-manager/zoxide.nix
|
||||
];
|
||||
}
|
||||
|
@ -3,6 +3,5 @@
|
||||
{
|
||||
networking.hostName = "apache";
|
||||
boot.loader.grub.enableCryptodisk = true;
|
||||
services.xserver.videoDrivers = [ "intel" "nvidia" ];
|
||||
}
|
||||
|
||||
|
@ -2,35 +2,5 @@
|
||||
|
||||
{
|
||||
networking.hostName = "p330";
|
||||
networking.hostId = "05130071";
|
||||
|
||||
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"
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -1,23 +1,30 @@
|
||||
{ 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 = [
|
||||
{ workspace = "1"; output = "DP3"; }
|
||||
{ workspace = "2"; output = "DP2"; }
|
||||
{ workspace = "3"; output = "DP3"; }
|
||||
{ workspace = "4"; output = "DP2"; }
|
||||
{ workspace = "5"; output = "DP3"; }
|
||||
{ workspace = "6"; output = "DP2"; }
|
||||
{ workspace = "7"; output = "DP3"; }
|
||||
{ workspace = "8"; output = "DP2"; }
|
||||
{ workspace = "9"; output = "DP3"; }
|
||||
{ workspace = "10"; output = "DP2"; }
|
||||
{ workspace = "0"; output = "DP-2"; }
|
||||
{ workspace = "1"; output = "DP-3"; }
|
||||
{ workspace = "2"; output = "DP-2"; }
|
||||
{ workspace = "3"; output = "DP-3"; }
|
||||
{ workspace = "4"; output = "DP-2"; }
|
||||
{ workspace = "5"; output = "DP-3"; }
|
||||
{ workspace = "6"; output = "DP-2"; }
|
||||
{ workspace = "7"; output = "DP-3"; }
|
||||
{ workspace = "8"; output = "DP-2"; }
|
||||
{ workspace = "9"; output = "DP-3"; }
|
||||
];
|
||||
};
|
||||
|
||||
programs.kitty.font.size = 16;
|
||||
programs.rofi.font = lib.mkForce "DejaVu Sans Mono 16";
|
||||
|
||||
services.betterlockscreen.inactiveInterval = 20;
|
||||
}
|
||||
|
14
users.nix
14
users.nix
@ -8,8 +8,18 @@
|
||||
isNormalUser = true;
|
||||
uid = 1000;
|
||||
home = "/home/mandlm";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "wheel" "networkmanager" "audio" "video" "input" "docker" "scanner" "lp" ];
|
||||
shell = pkgs.nushell;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"video"
|
||||
"input"
|
||||
"docker"
|
||||
"scanner"
|
||||
"lp"
|
||||
"camera"
|
||||
];
|
||||
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" ];
|
||||
};
|
||||
|
Reference in New Issue
Block a user