Compare commits
28
Commits
4473056bf3
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecbc53eeb5 | ||
|
|
a7def16994 | ||
|
|
394f62c245 | ||
|
|
a0205f5e61 | ||
|
|
2aa6ef5688 | ||
|
|
0342d7da83 | ||
|
|
690766ac3f | ||
|
|
216f2cca81 | ||
|
|
5b75d9194f | ||
|
|
ae280f10b8 | ||
|
|
82a6ecf8b3 | ||
|
|
1e725369b8 | ||
|
|
6091a6ee5c | ||
|
|
371b13e8b5 | ||
|
|
41da0762f2 | ||
|
|
6c5a1371d7 | ||
|
|
1472cfa6d1 | ||
|
|
3fce314c34 | ||
|
|
1129b35f8c | ||
|
|
cad486346a | ||
|
|
cf6f3772ab | ||
|
|
882d8a6695 | ||
|
|
0474f7bbb4 | ||
|
|
d1e2bde503 | ||
|
|
dc469a8984 | ||
|
|
d34c4da132 | ||
|
|
2557d0f650 | ||
|
|
86c88e4b4d |
No files matched your search
Generated
+26
-25
@@ -8,11 +8,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1788450739,
|
||||
"narHash": "sha256-glZLQlzIn1fXH6PazR2iUmTo7kzzyYSshrWhLS9TqCU=",
|
||||
"lastModified": 1793576659,
|
||||
"narHash": "sha256-V1h85lUaJBQoHFrB2vpXZOE0Ju1MYSnIpsehoVZYlDo=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "31729ca8cbdb4fa927b34e5f4353e6a83f39e993",
|
||||
"rev": "ea2630b7470978622c7689a1ff75d2b389175399",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -28,11 +28,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789867870,
|
||||
"narHash": "sha256-sOag/7DTqw4tXLI7UxjrZxPGV+dlTe6zFtJn0VSkgFM=",
|
||||
"lastModified": 1795827905,
|
||||
"narHash": "sha256-Udjs2j0EkvK+qGXKHRIQwXWRgzNBIl4oXSUktuOzbmQ=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d2a22a3659a6ae99847ea9176114f6957b8ac62e",
|
||||
"rev": "5f5abf5eb8de62d954232f3797b5bf4505656b91",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -43,11 +43,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1789785513,
|
||||
"narHash": "sha256-B44WL6h0XoLjJ41bUPJk0X5SDinLCII//6EcBLXKiJ0=",
|
||||
"lastModified": 1795761588,
|
||||
"narHash": "sha256-lyvlcjA/bJySrgwKiEoIYFNkDJM6aOck6/9gGRm9He4=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "20b1ddd1aa5ace70c9468305030aa4f9ef79671b",
|
||||
"rev": "78cc855faf4382e44b781c23bf9f456b924ef0e2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -59,11 +59,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1789073787,
|
||||
"narHash": "sha256-xfX/toC2QV707s06GbP4II/TxYF0fNQj7s5/LClNDKc=",
|
||||
"lastModified": 1793977579,
|
||||
"narHash": "sha256-WrSODdZFVIs/Hh2NzC0bY+ROByi0bATg8WfePX8dPj8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "aff8a0b28396750446e5537a96461bc4facdb287",
|
||||
"rev": "4fe25e12eb9f4c744966dd3de5a05246cf098601",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -77,14 +77,16 @@
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"systems": "systems"
|
||||
"systems": [
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789740794,
|
||||
"narHash": "sha256-c25hFVF7muJOFNfvLWyXZh+W9b5rW7mcZ2tTij1jrP8=",
|
||||
"lastModified": 1794943345,
|
||||
"narHash": "sha256-1d33ym1V/UxX9pcNbrpG0/P8riFHE8VuVAc3T8WN52I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "56839cde1c3239470ec38545e8dadc6f9267cc8d",
|
||||
"rev": "b67578f451bd779e79ec42f8153a403421a4b266",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -98,7 +100,8 @@
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixvim": "nixvim",
|
||||
"sops-nix": "sops-nix"
|
||||
"sops-nix": "sops-nix",
|
||||
"systems": "systems"
|
||||
}
|
||||
},
|
||||
"sops-nix": {
|
||||
@@ -108,11 +111,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1789890976,
|
||||
"narHash": "sha256-GKwH3zpy7tartuJMG0Rv/xUsdetG1QLmTVv8UKgJLmA=",
|
||||
"lastModified": 1795471345,
|
||||
"narHash": "sha256-2p8/wnENYHU2Z79Ir/rpq+V1sMI9mSD6xGAlvlbVBUY=",
|
||||
"owner": "mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "7214124c20c1542c90deb54af50e2f53ae02711f",
|
||||
"rev": "d5abe5e53200ad48254e8e6bd95e6cef94e66577",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -122,18 +125,16 @@
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1774449309,
|
||||
"narHash": "sha256-brhZ8DmuGtzkCYHJg4HEd602amKm89Y9ytsFZ5uWD1w=",
|
||||
"lastModified": 1791244623,
|
||||
"narHash": "sha256-uuanbkFk8a313Zfrxdcz8Us/yQtaxNnKJtX8v0ZPpd8=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "c29398b59d2048c4ab79345812849c9bd15e9150",
|
||||
"rev": "d36eeed142f88b5a636f2e3856a53c61654cf29b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"ref": "future-26.11",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
|
||||
@@ -2,75 +2,64 @@
|
||||
description = "leonhard's nix config";
|
||||
|
||||
inputs = {
|
||||
systems.url = "github:nix-systems/default";
|
||||
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
url = "github:mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixvim.url = "github:nix-community/nixvim";
|
||||
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.systems.follows = "systems";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
systems,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
sops-nix,
|
||||
nixvim,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit (nixpkgs) lib;
|
||||
forAllSystems = lib.genAttrs (import systems);
|
||||
pkgsFor =
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
homeImports = [
|
||||
./options.nix
|
||||
nixvim.homeModules.nixvim
|
||||
./home-manager/base
|
||||
];
|
||||
|
||||
mkNixosConfig = name: modules: {
|
||||
"${name}" = nixpkgs.lib.nixosSystem {
|
||||
modules = modules ++ [
|
||||
./nixos/base
|
||||
./options.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
sops-nix.nixosModules.sops
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
backupFileExtension = "hm.bak";
|
||||
users.leonhard.imports = homeImports ++ [
|
||||
./home-manager/leonhard
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
|
||||
mkHomeConfig = name: modules: {
|
||||
"${name}" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = modules ++ homeImports;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations =
|
||||
(mkNixosConfig "desktop" [ ./nixos/desktop ]) // (mkNixosConfig "server" [ ./nixos/server ]);
|
||||
nixosConfigurations = import ./hosts { inherit self inputs; };
|
||||
|
||||
homeConfigurations = mkHomeConfig "leonhard" [ ./home-manager/leonhard ];
|
||||
# i. e. homeConfigurations.leonhard@x86_64-linux etc.
|
||||
homeConfigurations = builtins.listToAttrs (
|
||||
map (system: {
|
||||
name = "leonhard@${system}";
|
||||
value = import ./standalone {
|
||||
pkgs = pkgsFor system;
|
||||
inherit self inputs;
|
||||
};
|
||||
}) (import systems)
|
||||
);
|
||||
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
import ./pkgs {
|
||||
pkgs = pkgsFor system;
|
||||
inherit inputs;
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
{
|
||||
config,
|
||||
osConfig ? null,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkDefaultSharedAttrs =
|
||||
base: defaults: lib.mapAttrs (_: v: lib.mkDefault v) (lib.filterAttrs (k: _: base ? ${k}) defaults);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./fish.nix
|
||||
./nixvim
|
||||
./hyprland.nix
|
||||
./kitty.nix
|
||||
./rofi
|
||||
];
|
||||
|
||||
kekleo = lib.mkIf (osConfig != null) (mkDefaultSharedAttrs config.kekleo (osConfig.kekleo or { }));
|
||||
|
||||
nix =
|
||||
let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in
|
||||
lib.mkDefault {
|
||||
package = pkgs.nix;
|
||||
|
||||
settings = {
|
||||
experimental-features = osConfig.nix.settings.experimental-features or "nix-command flakes";
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
};
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CACHE_HOME = "$HOME/.cache";
|
||||
XDG_CONFIG_HOME = "$HOME/.config";
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
XDG_STATE_HOME = "$HOME/.local/state";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "25.11";
|
||||
}
|
||||
@@ -1,90 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
home.packages = with pkgs; [ nordzy-cursor-theme ];
|
||||
|
||||
programs.waybar.enable = true;
|
||||
|
||||
wayland.windowManager.hyprland =
|
||||
let
|
||||
# workspaces
|
||||
# binds $mod/alt + [shift +] {1..9} to [move to] workspace {1..9}
|
||||
workspaces = builtins.concatLists (
|
||||
builtins.genList (
|
||||
i:
|
||||
let
|
||||
ws = toString (i + 1);
|
||||
in
|
||||
[
|
||||
"$mod,${ws},workspace,${ws}"
|
||||
"ALT,${ws},workspace,${ws}"
|
||||
"$mod SHIFT,${ws},movetoworkspace,${ws}"
|
||||
"ALTSHIFT,${ws},movetoworkspace,${ws}"
|
||||
]
|
||||
) 9
|
||||
);
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.hyprland;
|
||||
|
||||
xwayland.enable = true;
|
||||
|
||||
settings = {
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,Nordzy-cursors"
|
||||
"HYPRCURSOR_SIZE,26"
|
||||
];
|
||||
monitor = [
|
||||
",1920x1080@60,0x0,1"
|
||||
];
|
||||
"$mod" = "SUPER";
|
||||
"$launcher" = "rofi -show drun";
|
||||
bindr = [
|
||||
"$mod,Super_L,exec,pkill rofi || $launcher"
|
||||
];
|
||||
bind = [
|
||||
"ALTSHIFT,Q,killactive,"
|
||||
"ALT,V,togglefloating,"
|
||||
"ALT,F,fullscreen,1"
|
||||
"ALTSHIFT,F,fullscreen,0"
|
||||
"$mod,Return,exec,kitty"
|
||||
"$mod,F,exec,firefox"
|
||||
|
||||
"ALT,H,movefocus,l"
|
||||
"ALT,L,movefocus,r"
|
||||
"ALT,K,movefocus,u"
|
||||
"ALT,J,movefocus,d"
|
||||
"ALTSHIFT,H,movewindow,l"
|
||||
"ALTSHIFT,L,movewindow,r"
|
||||
"ALTSHIFT,K,movewindow,u"
|
||||
"ALTSHIFT,J,movewindow,d"
|
||||
]
|
||||
++ workspaces;
|
||||
|
||||
windowrule = "border_size 0, match:fullscreen_state_client 1";
|
||||
|
||||
general = {
|
||||
gaps_in = 2;
|
||||
gaps_out = 2;
|
||||
"col.active_border" = "0xff888888";
|
||||
};
|
||||
animations.animation = [
|
||||
"windows,1,4,default"
|
||||
"border,1,5,default"
|
||||
"fadeIn,1,5,default"
|
||||
"workspaces,1,3,default"
|
||||
];
|
||||
|
||||
dwindle.force_split = 2;
|
||||
cursor.no_warps = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
themeFile = "tokyo_night_night";
|
||||
font = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono NF";
|
||||
size = 14;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+alt+enter" = "launch --cwd=current";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./opts.nix
|
||||
./keymaps.nix
|
||||
./plugins
|
||||
];
|
||||
|
||||
options.kekleo.neovim.enable = lib.mkEnableOption "neovim";
|
||||
|
||||
config = lib.mkIf config.kekleo.neovim.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
defaultEditor = true;
|
||||
|
||||
colorschemes.tokyonight.enable = true;
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
globals.mapleader = " ";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins = {
|
||||
blink-indent.enable = true;
|
||||
blink-pairs.enable = true;
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signature.enabled = true;
|
||||
keymap = {
|
||||
preset = "default";
|
||||
"<CR>" = [
|
||||
"accept"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.dap = {
|
||||
enable = true;
|
||||
luaConfig.content = ''
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
'';
|
||||
};
|
||||
plugins.dap-ui.enable = true;
|
||||
plugins.dap-python.enable = true;
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F5>";
|
||||
action = "<cmd>DapContinue<CR>";
|
||||
options.desc = "Debug: Start/Continue";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F1>";
|
||||
action = "<cmd>DapStepInto<CR>";
|
||||
options.desc = "Debug: Step Into";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F2>";
|
||||
action = "<cmd>DapStepOver<CR>";
|
||||
options.desc = "Debug: Step Over";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F3>";
|
||||
action = "<cmd>DapStepOut<CR>";
|
||||
options.desc = "Debug: Step Out";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action = "<cmd>DapToggleBreakpoint<CR>";
|
||||
options.desc = "Debug: Toggle Breakpoint";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>f";
|
||||
action.__raw = ''
|
||||
function() require 'conform'.format { async = true } end
|
||||
'';
|
||||
options.desc = "Format Buffer";
|
||||
}
|
||||
];
|
||||
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_format_opts.lsp_format = "fallback";
|
||||
format_on_save = {
|
||||
lsp_format = "fallback";
|
||||
timeout_ms = 500;
|
||||
};
|
||||
|
||||
formatters_by_ft = {
|
||||
c = [ "clang-format" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "nixfmt" ];
|
||||
python = [ "ruff_format" ];
|
||||
};
|
||||
|
||||
formatters.clang-format.prepend_args = [
|
||||
"--style=file"
|
||||
"--fallback-style=LLVM"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
stylua
|
||||
nixfmt
|
||||
ruff
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./typst.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
diagnostic.settings = {
|
||||
severity_sort = true;
|
||||
float = {
|
||||
border = "rounded";
|
||||
source = "if_many";
|
||||
};
|
||||
signs.text.__raw = "{
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
}";
|
||||
virtual_text = {
|
||||
source = "if_many";
|
||||
spacing = 2;
|
||||
format.__raw = "
|
||||
function(diagnostic)
|
||||
return diagnostic.message
|
||||
end
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
"gd" = "definition";
|
||||
"gD" = "declaration";
|
||||
"gr" = "references";
|
||||
"gI" = "implementation";
|
||||
"<leader>ca" = "code_action";
|
||||
"<leader>D" = "type_definition";
|
||||
"<leader>rn" = "rename";
|
||||
};
|
||||
};
|
||||
|
||||
servers = {
|
||||
lua_ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
basedpyright.enable = true;
|
||||
ts_ls.enable = true;
|
||||
vue_ls.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
clangd.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
highlight.enable = true;
|
||||
indent.enable = true;
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.kekleo.neovim.typst.enable = lib.mkEnableOption "typst editing";
|
||||
|
||||
config = {
|
||||
programs.nixvim = lib.mkIf config.kekleo.neovim.typst.enable {
|
||||
dependencies.tinymist.enable = true;
|
||||
dependencies.websocat.enable = true;
|
||||
|
||||
plugins.typst-preview.enable = true;
|
||||
|
||||
plugins.lsp.servers.tinymist.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
programs.nixvim.plugins.which-key.enable = true;
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "JetBrainsMono Nerd Font 11";
|
||||
theme = ./tokyonight.rasi;
|
||||
extraConfig = {
|
||||
modi = [
|
||||
"drun"
|
||||
"window"
|
||||
"run"
|
||||
];
|
||||
icon-theme = "Papirus-Dark";
|
||||
show-icons = true;
|
||||
terminal = "kitty";
|
||||
drun-display-format = "{icon} {name}";
|
||||
location = 0;
|
||||
disable-history = false;
|
||||
sidebar-mode = false;
|
||||
display-drun = " ";
|
||||
display-run = " ";
|
||||
display-window = " ";
|
||||
|
||||
kb-row-up = "Up,Control+k";
|
||||
kb-row-left = "Left,Control+h";
|
||||
kb-row-right = "Right,Control+l";
|
||||
kb-row-down = "Down,Control+j";
|
||||
|
||||
kb-accept-entry = "Return";
|
||||
# remove clashing keybinds
|
||||
kb-remove-to-eol = "";
|
||||
kb-move-char-back = "Control+b";
|
||||
kb-remove-char-back = "BackSpace";
|
||||
kb-move-char-forward = "Control+f";
|
||||
kb-mode-complete = "Control+o";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
{
|
||||
home = {
|
||||
username = "leonhard";
|
||||
homeDirectory = "/home/leonhard";
|
||||
};
|
||||
|
||||
kekleo.neovim.enable = true;
|
||||
kekleo.neovim.typst.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig ? null,
|
||||
...
|
||||
}:
|
||||
let
|
||||
mkDefaultSharedAttrs =
|
||||
base: defaults: lib.mapAttrs (_: v: lib.mkDefault v) (lib.filterAttrs (k: _: base ? ${k}) defaults);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../options.nix
|
||||
|
||||
./git.nix
|
||||
./fish.nix
|
||||
./firefox.nix
|
||||
./nixvim.nix
|
||||
./niri
|
||||
./kitty.nix
|
||||
./rofi
|
||||
];
|
||||
|
||||
home = {
|
||||
username = "leonhard";
|
||||
homeDirectory = "/home/leonhard";
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.configFile."nixpkgs/config.nix".text = "{ allowUnfree = true; }";
|
||||
|
||||
nix-leonhard = lib.mkIf (osConfig != null) (
|
||||
mkDefaultSharedAttrs config.nix-leonhard (osConfig.nix-leonhard or { })
|
||||
);
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "26.11";
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = config.nix-leonhard.graphical.enable;
|
||||
};
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
@@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = config.nix-leonhard.graphical.enable;
|
||||
themeFile = "tokyo_night_night";
|
||||
font = {
|
||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
||||
name = "JetBrainsMono NF";
|
||||
size = 14;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+alt+enter" = "launch --cwd=current";
|
||||
};
|
||||
settings = {
|
||||
hide_window_decorations = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,384 @@
|
||||
// This config is in the KDL format: https://kdl.dev
|
||||
// "/-" comments out the following node.
|
||||
// Check the wiki for a full description of the configuration:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Introduction
|
||||
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
// You can set rules, model, layout, variant and options.
|
||||
// For more information, see xkeyboard-config(7).
|
||||
|
||||
// For example:
|
||||
// layout "us,ru"
|
||||
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||
|
||||
// If this section is empty, niri will fetch xkb settings
|
||||
// from org.freedesktop.locale1. You can control these using
|
||||
// localectl set-x11-keymap.
|
||||
}
|
||||
|
||||
// Enable numlock on startup, omitting this setting disables it.
|
||||
numlock
|
||||
}
|
||||
}
|
||||
|
||||
output "DP-2" {
|
||||
mode "1920x1080@199.997"
|
||||
focus-at-startup
|
||||
}
|
||||
|
||||
cursor {
|
||||
xcursor-theme "Nordzy-cursors"
|
||||
xcursor-size 16
|
||||
hide-when-typing
|
||||
}
|
||||
|
||||
gestures {
|
||||
hot-corners {
|
||||
off
|
||||
}
|
||||
}
|
||||
|
||||
// Settings that influence how windows are positioned and sized.
|
||||
// Find more information on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Layout
|
||||
layout {
|
||||
// Set gaps around windows in logical pixels.
|
||||
gaps 5
|
||||
|
||||
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
|
||||
preset-column-widths {
|
||||
// Proportion sets the width as a fraction of the output width, taking gaps into account.
|
||||
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
|
||||
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
|
||||
// Fixed sets the width in logical pixels exactly.
|
||||
// fixed 1920
|
||||
}
|
||||
|
||||
// You can also customize the heights that "switch-preset-window-height" (Mod+Ctrl+Shift+R) toggles between.
|
||||
// preset-window-heights { }
|
||||
|
||||
// You can change the default width of the new windows.
|
||||
default-column-width { proportion 0.5; }
|
||||
// If you leave the brackets empty, the windows themselves will decide their initial width.
|
||||
// default-column-width {}
|
||||
|
||||
focus-ring {
|
||||
// How many logical pixels the ring extends out from the windows.
|
||||
width 2
|
||||
|
||||
// Color of the ring on the active monitor.
|
||||
active-color "#7fc8ff"
|
||||
|
||||
// Color of the ring on inactive monitors.
|
||||
//
|
||||
// The focus ring only draws around the active window, so the only place
|
||||
// where you can see its inactive-color is on other monitors.
|
||||
inactive-color "#505050"
|
||||
}
|
||||
}
|
||||
|
||||
// Add lines like this to spawn processes at startup.
|
||||
// Note that running niri as a session supports xdg-desktop-autostart,
|
||||
// which may be more convenient to use.
|
||||
// See the binds section below for more spawn examples.
|
||||
|
||||
// This line starts waybar, a commonly used bar for Wayland compositors.
|
||||
spawn-at-startup "waybar"
|
||||
|
||||
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
|
||||
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
|
||||
|
||||
hotkey-overlay {
|
||||
skip-at-startup
|
||||
}
|
||||
|
||||
prefer-no-csd
|
||||
|
||||
// You can change the path where screenshots are saved.
|
||||
// A ~ at the front will be expanded to the home directory.
|
||||
// The path is formatted with strftime(3) to give you the screenshot date and time.
|
||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||
|
||||
// You can also set this to null to disable saving screenshots to disk.
|
||||
// screenshot-path null
|
||||
|
||||
// Animation settings.
|
||||
// The wiki explains how to configure individual animations:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Animations
|
||||
animations {
|
||||
// Uncomment to turn off all animations.
|
||||
// off
|
||||
|
||||
// Slow down all animations by this factor. Values below 1 speed them up instead.
|
||||
// slowdown 3.0
|
||||
}
|
||||
|
||||
// Window rules let you adjust behavior for individual windows.
|
||||
// Find more information on the wiki:
|
||||
// https://niri-wm.github.io/niri/Configuration:-Window-Rules
|
||||
|
||||
// Work around WezTerm's initial configure bug
|
||||
// by setting an empty default-column-width.
|
||||
window-rule {
|
||||
// This regular expression is intentionally made as specific as possible,
|
||||
// since this is the default config, and we want no false positives.
|
||||
// You can get away with just app-id="wezterm" if you want.
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
// Open the Firefox picture-in-picture player as floating by default.
|
||||
window-rule {
|
||||
// This app-id regular expression will work for both:
|
||||
// - host Firefox (app-id is "firefox")
|
||||
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
|
||||
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
|
||||
open-floating true
|
||||
}
|
||||
|
||||
// Example: block out two password managers from screen capture.
|
||||
// (This example rule is commented out with a "/-" in front.)
|
||||
/-window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
|
||||
// Use this instead if you want them visible on third-party screenshot tools.
|
||||
// block-out-from "screencast"
|
||||
}
|
||||
|
||||
binds {
|
||||
// Keys consist of modifiers separated by + signs, followed by an XKB key name
|
||||
// in the end. To find an XKB name for a particular key, you may use a program
|
||||
// like wev.
|
||||
//
|
||||
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
|
||||
// when running as a winit window.
|
||||
//
|
||||
// Most actions that you can bind here can also be invoked programmatically with
|
||||
// `niri msg action do-something`.
|
||||
|
||||
// Mod-Shift-/, which is usually the same as Mod-?,
|
||||
// shows a list of important hotkeys.
|
||||
Mod+Shift+Slash { show-hotkey-overlay; }
|
||||
|
||||
// Suggested binds for running programs: terminal, app launcher, screen locker.
|
||||
Super+Return hotkey-overlay-title="Open a Terminal: kitty" repeat=false { spawn "kitty"; }
|
||||
Super+R hotkey-overlay-title="Open Launcher: rofi" { spawn-sh "pkill rofi || exec rofi -show drun"; }
|
||||
Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; }
|
||||
|
||||
// Example volume keys mappings for PipeWire & WirePlumber.
|
||||
// The allow-when-locked=true property makes them work even when the session is locked.
|
||||
// Using spawn-sh allows to pass multiple arguments together with the command.
|
||||
// "-l 1.0" limits the volume to 100%.
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+ -l 1.0"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn-sh "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; }
|
||||
|
||||
// Example media keys mapping using playerctl.
|
||||
// This will work with any MPRIS-enabled media player.
|
||||
XF86AudioPlay allow-when-locked=true { spawn-sh "playerctl play-pause"; }
|
||||
XF86AudioStop allow-when-locked=true { spawn-sh "playerctl stop"; }
|
||||
XF86AudioPrev allow-when-locked=true { spawn-sh "playerctl previous"; }
|
||||
XF86AudioNext allow-when-locked=true { spawn-sh "playerctl next"; }
|
||||
|
||||
// Example brightness key mappings for brightnessctl.
|
||||
// You can use regular spawn with multiple arguments too (to avoid going through "sh"),
|
||||
// but you need to manually put each argument in separate "" quotes.
|
||||
XF86MonBrightnessUp allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "+10%"; }
|
||||
XF86MonBrightnessDown allow-when-locked=true { spawn "brightnessctl" "--class=backlight" "set" "10%-"; }
|
||||
|
||||
// Open/close the Overview: a zoomed-out view of workspaces and windows.
|
||||
// You can also move the mouse into the top-left hot corner,
|
||||
// or do a four-finger swipe up on a touchpad.
|
||||
Mod+O repeat=false { toggle-overview; }
|
||||
|
||||
Mod+Q repeat=false { close-window; }
|
||||
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
// And you can also move a whole workspace to another monitor:
|
||||
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
|
||||
// ...
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
// Similarly, you can bind touchpad scroll "ticks".
|
||||
// Touchpad scrolling is continuous, so for these binds it is split into
|
||||
// discrete intervals.
|
||||
// These binds are also affected by touchpad's natural-scroll, so these
|
||||
// example binds are "inverted", since we have natural-scroll enabled for
|
||||
// touchpads by default.
|
||||
// Mod+TouchpadScrollDown { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02+"; }
|
||||
// Mod+TouchpadScrollUp { spawn-sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.02-"; }
|
||||
|
||||
// You can refer to workspaces by index. However, keep in mind that
|
||||
// niri is a dynamic workspace system, so these commands are kind of
|
||||
// "best effort". Trying to refer to a workspace index bigger than
|
||||
// the current workspace count will instead refer to the bottommost
|
||||
// (empty) workspace.
|
||||
//
|
||||
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
|
||||
// will all refer to the 3rd workspace.
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+1 { move-window-to-workspace 1; }
|
||||
|
||||
// Switches focus between the current and the previous workspace.
|
||||
// Mod+Tab { focus-workspace-previous; }
|
||||
|
||||
// The following binds move the focused window in and out of a column.
|
||||
// If the window is alone, they will consume it into the nearby column to the side.
|
||||
// If the window is already in a column, they will expel it out.
|
||||
Mod+BracketLeft { consume-or-expel-window-left; }
|
||||
Mod+BracketRight { consume-or-expel-window-right; }
|
||||
|
||||
// Consume one window from the right to the bottom of the focused column.
|
||||
Mod+Comma { consume-window-into-column; }
|
||||
// Expel the bottom window from the focused column to the right.
|
||||
Mod+Period { expel-window-from-column; }
|
||||
|
||||
// Cycle through widths set in preset-column-widths.
|
||||
// Mod+R { switch-preset-column-width; }
|
||||
// Cycling through the presets in reverse order is also possible.
|
||||
// Mod+Shift+R { switch-preset-column-width-back; }
|
||||
|
||||
// Mod+Ctrl+Shift+R { switch-preset-window-height; }
|
||||
// Mod+Ctrl+R { reset-window-height; }
|
||||
|
||||
Mod+F { maximize-column; }
|
||||
Mod+Shift+F { fullscreen-window; }
|
||||
|
||||
// While maximize-column leaves gaps and borders around the window,
|
||||
// maximize-window-to-edges doesn't: the window expands to the edges of the screen.
|
||||
// This bind corresponds to normal window maximizing,
|
||||
// e.g. by double-clicking on the titlebar.
|
||||
Mod+M { maximize-window-to-edges; }
|
||||
|
||||
// Expand the focused column to space not taken up by other fully visible columns.
|
||||
// Makes the column "fill the rest of the space".
|
||||
Mod+Ctrl+F { expand-column-to-available-width; }
|
||||
|
||||
Mod+C { center-column; }
|
||||
|
||||
// Center all fully visible columns on screen.
|
||||
Mod+Ctrl+C { center-visible-columns; }
|
||||
|
||||
// Finer width adjustments.
|
||||
// This command can also:
|
||||
// * set width in pixels: "1000"
|
||||
// * adjust width in pixels: "-5" or "+5"
|
||||
// * set width as a percentage of screen width: "25%"
|
||||
// * adjust width as a percentage of screen width: "-10%" or "+10%"
|
||||
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
|
||||
// set-column-width "100" will make the column occupy 200 physical screen pixels.
|
||||
Mod+Minus { set-column-width "-10%"; }
|
||||
Mod+Equal { set-column-width "+10%"; }
|
||||
|
||||
// Finer height adjustments when in column with other windows.
|
||||
Mod+Shift+Minus { set-window-height "-10%"; }
|
||||
Mod+Shift+Equal { set-window-height "+10%"; }
|
||||
|
||||
// Move the focused window between the floating and the tiling layout.
|
||||
Mod+V { toggle-window-floating; }
|
||||
Mod+Shift+V { switch-focus-between-floating-and-tiling; }
|
||||
|
||||
// Toggle tabbed column display mode.
|
||||
// Windows in this column will appear as vertical tabs,
|
||||
// rather than stacked on top of each other.
|
||||
Mod+W { toggle-column-tabbed-display; }
|
||||
|
||||
// Actions to switch layouts.
|
||||
// Note: if you uncomment these, make sure you do NOT have
|
||||
// a matching layout switch hotkey configured in xkb options above.
|
||||
// Having both at once on the same hotkey will break the switching,
|
||||
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
|
||||
// Mod+Space { switch-layout "next"; }
|
||||
// Mod+Shift+Space { switch-layout "prev"; }
|
||||
|
||||
Print { screenshot; }
|
||||
Ctrl+Print { screenshot-screen; }
|
||||
Alt+Print { screenshot-window; }
|
||||
|
||||
// Applications such as remote-desktop clients and software KVM switches may
|
||||
// request that niri stops processing the keyboard shortcuts defined here
|
||||
// so they may, for example, forward the key presses as-is to a remote machine.
|
||||
// It's a good idea to bind an escape hatch to toggle the inhibitor,
|
||||
// so a buggy application can't hold your session hostage.
|
||||
//
|
||||
// The allow-inhibiting=false property can be applied to other binds as well,
|
||||
// which ensures niri always processes them, even when an inhibitor is active.
|
||||
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
|
||||
|
||||
// The quit action will show a confirmation dialog to avoid accidental exits.
|
||||
Mod+Shift+E { quit; }
|
||||
Ctrl+Alt+Delete { quit; }
|
||||
|
||||
// Powers off the monitors. To turn them back on, do any input like
|
||||
// moving the mouse or pressing any other key.
|
||||
Mod+Shift+P { power-off-monitors; }
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.nix-leonhard.graphical.enable {
|
||||
home.packages = [
|
||||
(pkgs.stdenvNoCC.mkDerivation rec {
|
||||
pname = "nordzy-cursors-default";
|
||||
version = "2.4.0";
|
||||
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://github.com/guillaumeboehm/Nordzy-cursors/releases/download/v${version}/Nordzy-cursors.tar.gz";
|
||||
hash = "sha256-9fVkYSU9twZoTgeRE/XSDP4Q/tQ6Ar+NnJ7jCxV16lw=";
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
dontBuild = true;
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
mkdir -p $out/share/icons
|
||||
cp -r Nordzy-cursors $out/share/icons
|
||||
runHook postInstall
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
xdg.configFile."niri/config.kdl".source = ./config.kdl;
|
||||
|
||||
wayland.windowManager.niri = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = lib.mkIf config.nix-leonhard.neovim.enable [
|
||||
self.packages.${pkgs.stdenv.hostPlatform.system}.nixvim
|
||||
];
|
||||
|
||||
home.sessionVariables = lib.mkIf config.nix-leonhard.neovim.enable {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = config.nix-leonhard.graphical.enable;
|
||||
theme = ./tokyonight.rasi;
|
||||
settings = {
|
||||
modi = [
|
||||
"drun"
|
||||
"window"
|
||||
"run"
|
||||
];
|
||||
font = "JetBrainsMono Nerd Font 11";
|
||||
icon-theme = "Papirus-Dark";
|
||||
show-icons = true;
|
||||
terminal = "kitty";
|
||||
drun-display-format = "{icon} {name}";
|
||||
location = 0;
|
||||
disable-history = false;
|
||||
sidebar-mode = false;
|
||||
display-drun = " ";
|
||||
display-run = " ";
|
||||
display-window = " ";
|
||||
|
||||
kb-row-up = "Up,Control+k";
|
||||
kb-row-left = "Left,Control+h";
|
||||
kb-row-right = "Right,Control+l";
|
||||
kb-row-down = "Down,Control+j";
|
||||
|
||||
kb-accept-entry = "Return";
|
||||
# remove clashing keybinds
|
||||
kb-remove-to-eol = "";
|
||||
kb-move-char-back = "Control+b";
|
||||
kb-remove-char-back = "BackSpace";
|
||||
kb-move-char-forward = "Control+f";
|
||||
kb-mode-complete = "Control+o";
|
||||
};
|
||||
};
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,33 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
|
||||
specialArgs = { inherit inputs self; };
|
||||
|
||||
mkNixosSystem =
|
||||
modules:
|
||||
nixosSystem {
|
||||
inherit specialArgs;
|
||||
modules = modules ++ [
|
||||
../system
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.leonhard = ../home;
|
||||
home-manager.extraSpecialArgs = specialArgs;
|
||||
}
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
desktop = mkNixosSystem [ ./desktop ];
|
||||
server = mkNixosSystem [
|
||||
./server
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix-leonhard.graphical.enable = true;
|
||||
nix-leonhard.neovim.enable = true;
|
||||
|
||||
users.users = {
|
||||
leonhard = {
|
||||
initialPassword = "leonhard";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "desktop";
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./secrets
|
||||
./dyndns
|
||||
./gitea.nix
|
||||
./vaultwarden.nix
|
||||
];
|
||||
|
||||
options.nix-leonhard = with lib.types; {
|
||||
domain = lib.mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
description = "Domain of the device.";
|
||||
};
|
||||
publicKeys = lib.mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
description = "Public keys for ssh login.";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
nix-leonhard.neovim.enable = true;
|
||||
|
||||
users.users.leonhard = {
|
||||
initialPassword = "leonhard";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = config.nix-leonhard.publicKeys;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "server";
|
||||
firewall.enable = false;
|
||||
interfaces.eno1 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.178.210";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "192.168.178.1";
|
||||
interface = "eno1";
|
||||
};
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 5432 ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "admin@${config.nix-leonhard.domain}";
|
||||
defaults.webroot = "/var/lib/acme/acme-challenge/";
|
||||
certs.${config.nix-leonhard.domain} = {
|
||||
group = config.services.nginx.group;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts.${config.nix-leonhard.domain} = {
|
||||
forceSSL = true;
|
||||
useACMEHost = config.nix-leonhard.domain;
|
||||
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
File renamed without changes.
File renamed without changes.
@@ -3,7 +3,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = config.kekleo.domain;
|
||||
domain = config.nix-leonhard.domain;
|
||||
gitDomain = "git.${domain}";
|
||||
in
|
||||
{
|
||||
@@ -11,7 +11,6 @@ in
|
||||
enable = true;
|
||||
settings.server.ROOT_URL = "https://${gitDomain}";
|
||||
settings.server.SSH_PORT = builtins.elemAt config.services.openssh.ports 0;
|
||||
settings.service.DISABLE_REGISTRATION = true;
|
||||
settings.log.LEVEL = "Critical";
|
||||
};
|
||||
|
||||
@@ -24,7 +23,7 @@ in
|
||||
|
||||
virtualHosts.${gitDomain} = {
|
||||
forceSSL = true;
|
||||
useACMEHost = config.kekleo.domain;
|
||||
useACMEHost = config.nix-leonhard.domain;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.gitea.settings.server.HTTP_PORT}";
|
||||
proxyWebsockets = true;
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file not shown.
File renamed without changes.
@@ -3,7 +3,7 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
domain = config.kekleo.domain;
|
||||
domain = config.nix-leonhard.domain;
|
||||
vaultDomain = "bitwarden.${domain}";
|
||||
in
|
||||
{
|
||||
@@ -29,7 +29,7 @@ in
|
||||
|
||||
virtualHosts.${vaultDomain} = {
|
||||
forceSSL = true;
|
||||
useACMEHost = config.kekleo.domain;
|
||||
useACMEHost = config.nix-leonhard.domain;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:${toString config.services.vaultwarden.config.ROCKET_PORT}";
|
||||
proxyWebsockets = true;
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
programs.firefox.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
programs.hyprland.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
config = lib.mkIf config.kekleo.graphical {
|
||||
services.displayManager.ly.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
#services.printing.enable = true;
|
||||
|
||||
# Enable firmware
|
||||
#hardware.enableAllFirmware = true;
|
||||
|
||||
# Enable bluetooth
|
||||
#hardware.bluetooth.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
# security.rtkit.enable = true;
|
||||
# services.pipewire = {
|
||||
# enable = true;
|
||||
# alsa.enable = true;
|
||||
# alsa.support32Bit = true;
|
||||
# pulse.enable = true;
|
||||
# };
|
||||
|
||||
users.users = {
|
||||
leonhard = {
|
||||
initialPassword = "leonhard";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "desktop";
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/swap"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.hypervGuest.enable = true;
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./secrets
|
||||
./dyndns
|
||||
./gitea.nix
|
||||
./vaultwarden.nix
|
||||
];
|
||||
|
||||
kekleo.graphical = false;
|
||||
|
||||
users.users.leonhard = {
|
||||
initialPassword = "leonhard";
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = config.kekleo.publicKeys;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "server";
|
||||
firewall.enable = false;
|
||||
interfaces.eno1 = {
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.178.210";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
defaultGateway = {
|
||||
address = "192.168.178.1";
|
||||
interface = "eno1";
|
||||
};
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ 5432 ];
|
||||
settings = {
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
security.acme = {
|
||||
acceptTerms = true;
|
||||
defaults.email = "admin@${config.kekleo.domain}";
|
||||
defaults.webroot = "/var/lib/acme/acme-challenge/";
|
||||
certs.${config.kekleo.domain} = {
|
||||
group = config.services.nginx.group;
|
||||
};
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
|
||||
virtualHosts.${config.kekleo.domain} = {
|
||||
forceSSL = true;
|
||||
useACMEHost = config.kekleo.domain;
|
||||
locations."/.well-known/".root = config.security.acme.defaults.webroot;
|
||||
};
|
||||
};
|
||||
}
|
||||
Binary file not shown.
+3
-16
@@ -3,21 +3,8 @@
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.kekleo = with lib.types; {
|
||||
domain = lib.mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
description = "Domain of the device.";
|
||||
};
|
||||
publicKeys = lib.mkOption {
|
||||
type = listOf str;
|
||||
default = [ ];
|
||||
description = "List of public keys to use for ssh login, secret encryption, etc.";
|
||||
};
|
||||
graphical = lib.mkOption {
|
||||
type = bool;
|
||||
default = true;
|
||||
description = "Whether to enable GUI features and programs.";
|
||||
};
|
||||
options.nix-leonhard = {
|
||||
graphical.enable = lib.mkEnableOption "GUI features and programs";
|
||||
neovim.enable = lib.mkEnableOption "neovim";
|
||||
};
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
# This file defines overlays
|
||||
{ inputs, ... }:
|
||||
{
|
||||
# This one brings our custom packages from the 'pkgs' directory
|
||||
additions = final: _prev: import ../pkgs final.pkgs;
|
||||
|
||||
# This one contains whatever you want to overlay
|
||||
# You can change versions, add patches, set compilation flags, anything really.
|
||||
# https://nixos.wiki/wiki/Overlays
|
||||
modifications = final: prev: {
|
||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||
# ...
|
||||
# });
|
||||
};
|
||||
|
||||
# When applied, the unstable nixpkgs set (declared in the flake inputs) will
|
||||
# be accessible through 'pkgs.unstable'
|
||||
unstable-packages = final: _prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = final.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
+11
-4
@@ -1,5 +1,12 @@
|
||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||
# You can build them using 'nix build .#example'
|
||||
pkgs: {
|
||||
# example = pkgs.callPackage ./example { };
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixvim =
|
||||
(inputs.nixvim.lib.evalNixvim {
|
||||
inherit (pkgs) system;
|
||||
modules = [ ./nixvim ];
|
||||
}).config.build.package;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
imports = [
|
||||
./opts.nix
|
||||
./keymaps.nix
|
||||
./plugins
|
||||
];
|
||||
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
colorschemes.tokyonight.enable = true;
|
||||
|
||||
clipboard.providers.wl-copy.enable = true;
|
||||
|
||||
globals.mapleader = " ";
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
programs.nixvim.keymaps = [
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<Esc>";
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
programs.nixvim.opts = {
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
showmode = false;
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
plugins = {
|
||||
blink-indent.enable = true;
|
||||
blink-pairs.enable = true;
|
||||
blink-cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
signature.enabled = true;
|
||||
keymap = {
|
||||
preset = "default";
|
||||
"<CR>" = [
|
||||
"accept"
|
||||
"fallback"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
{
|
||||
plugins.dap = {
|
||||
enable = true;
|
||||
luaConfig.content = ''
|
||||
local dap = require 'dap'
|
||||
local dapui = require 'dapui'
|
||||
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
|
||||
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
|
||||
dap.listeners.before.event_exited['dapui_config'] = dapui.close
|
||||
'';
|
||||
};
|
||||
plugins.dap-ui.enable = true;
|
||||
plugins.dap-python.enable = true;
|
||||
keymaps = [
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F5>";
|
||||
action = "<cmd>DapContinue<CR>";
|
||||
options.desc = "Debug: Start/Continue";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F1>";
|
||||
action = "<cmd>DapStepInto<CR>";
|
||||
options.desc = "Debug: Step Into";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F2>";
|
||||
action = "<cmd>DapStepOver<CR>";
|
||||
options.desc = "Debug: Step Over";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<F3>";
|
||||
action = "<cmd>DapStepOut<CR>";
|
||||
options.desc = "Debug: Step Out";
|
||||
options.silent = true;
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "<leader>b";
|
||||
action = "<cmd>DapToggleBreakpoint<CR>";
|
||||
options.desc = "Debug: Toggle Breakpoint";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./blink.nix
|
||||
@@ -8,12 +7,10 @@
|
||||
./treesitter.nix
|
||||
./telescope.nix
|
||||
./lualine.nix
|
||||
./which-key.nix
|
||||
];
|
||||
|
||||
programs.nixvim = {
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
vim-sleuth
|
||||
];
|
||||
plugins = {
|
||||
sleuth.enable = true;
|
||||
which-key.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
opts.formatexpr = "v:lua.require'conform'.formatexpr()";
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<leader>f";
|
||||
action.__raw = ''
|
||||
function() require 'conform'.format { async = true } end
|
||||
'';
|
||||
options.desc = "Format Buffer";
|
||||
}
|
||||
];
|
||||
|
||||
plugins.conform-nvim = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_format_opts.lsp_format = "fallback";
|
||||
format_on_save = {
|
||||
lsp_format = "fallback";
|
||||
timeout_ms = 500;
|
||||
};
|
||||
|
||||
formatters_by_ft = {
|
||||
c = [ "clang-format" ];
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "nixfmt" ];
|
||||
python = [ "ruff_format" ];
|
||||
};
|
||||
|
||||
formatters.clang-format.prepend_args = [
|
||||
"--style=file"
|
||||
"--fallback-style=LLVM"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
stylua
|
||||
nixfmt
|
||||
ruff
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
imports = [
|
||||
./typst.nix
|
||||
];
|
||||
|
||||
diagnostic.settings = {
|
||||
severity_sort = true;
|
||||
float = {
|
||||
border = "rounded";
|
||||
source = "if_many";
|
||||
};
|
||||
signs.text.__raw = "{
|
||||
[vim.diagnostic.severity.ERROR] = ' ',
|
||||
[vim.diagnostic.severity.WARN] = ' ',
|
||||
[vim.diagnostic.severity.INFO] = ' ',
|
||||
[vim.diagnostic.severity.HINT] = ' ',
|
||||
}";
|
||||
virtual_text = {
|
||||
source = "if_many";
|
||||
spacing = 2;
|
||||
format.__raw = "
|
||||
function(diagnostic)
|
||||
return diagnostic.message
|
||||
end
|
||||
";
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
lsp = {
|
||||
enable = true;
|
||||
|
||||
keymaps = {
|
||||
silent = true;
|
||||
lspBuf = {
|
||||
"gd" = "definition";
|
||||
"gD" = "declaration";
|
||||
"gr" = "references";
|
||||
"gI" = "implementation";
|
||||
"<leader>ca" = "code_action";
|
||||
"<leader>D" = "type_definition";
|
||||
"<leader>rn" = "rename";
|
||||
};
|
||||
};
|
||||
|
||||
servers = {
|
||||
lua_ls.enable = true;
|
||||
nil_ls.enable = true;
|
||||
basedpyright.enable = true;
|
||||
ts_ls.enable = true;
|
||||
vue_ls.enable = true;
|
||||
rust_analyzer = {
|
||||
enable = true;
|
||||
installCargo = false;
|
||||
installRustc = false;
|
||||
};
|
||||
clangd.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
programs.nixvim.plugins.lualine = {
|
||||
plugins.lualine = {
|
||||
enable = true;
|
||||
settings = {
|
||||
options = {
|
||||
@@ -1,10 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ripgrep
|
||||
];
|
||||
|
||||
programs.nixvim.plugins.telescope = {
|
||||
plugins.telescope = {
|
||||
enable = true;
|
||||
extensions.fzf-native.enable = true;
|
||||
keymaps = {
|
||||
@@ -43,4 +39,7 @@
|
||||
"%.ipynb"
|
||||
];
|
||||
};
|
||||
extraPackages = with pkgs; [
|
||||
ripgrep
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
plugins.treesitter = {
|
||||
enable = true;
|
||||
nixGrammars = false;
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
local function start(buf, lang)
|
||||
if not vim.api.nvim_buf_is_valid(buf) then return end
|
||||
if not pcall(vim.treesitter.start, buf, lang) then return end
|
||||
|
||||
-- indent (nvim-treesitter's indents.scm, experimental on main)
|
||||
vim.bo[buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
|
||||
-- folds (built into Neovim, uses folds.scm)
|
||||
-- vim.api.nvim_buf_call(buf, function()
|
||||
-- vim.wo[0][0].foldmethod = "expr"
|
||||
-- vim.wo[0][0].foldexpr = "v:lua.vim.treesitter.foldexpr()"
|
||||
-- end)
|
||||
end
|
||||
|
||||
vim.api.nvim_create_autocmd("FileType", {
|
||||
callback = function(args)
|
||||
local lang = vim.treesitter.language.get_lang(args.match)
|
||||
if not lang then return end
|
||||
local ts = require("nvim-treesitter")
|
||||
if vim.tbl_contains(ts.get_installed(), lang) then
|
||||
start(args.buf, lang)
|
||||
elseif vim.tbl_contains(ts.get_available(), lang) then
|
||||
ts.install(lang):await(function() start(args.buf, lang) end)
|
||||
end
|
||||
end,
|
||||
})
|
||||
'';
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gcc
|
||||
tree-sitter
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
dependencies.tinymist.enable = true;
|
||||
dependencies.websocat.enable = true;
|
||||
|
||||
plugins.typst-preview.enable = true;
|
||||
|
||||
plugins.lsp.servers.tinymist.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix =
|
||||
let
|
||||
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
|
||||
in
|
||||
{
|
||||
package = pkgs.nix;
|
||||
|
||||
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
|
||||
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
|
||||
|
||||
# set the path for channels compat
|
||||
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
|
||||
|
||||
settings.experimental-features = "nix-command flakes";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
{
|
||||
pkgs,
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (inputs.home-manager.lib) homeManagerConfiguration;
|
||||
|
||||
extraSpecialArgs = { inherit self inputs; };
|
||||
in
|
||||
homeManagerConfiguration {
|
||||
inherit pkgs extraSpecialArgs;
|
||||
modules = [
|
||||
./base.nix
|
||||
../home
|
||||
{
|
||||
nix-leonhard.neovim.enable = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -1,47 +1,29 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../options.nix
|
||||
|
||||
./fish.nix
|
||||
./firefox.nix
|
||||
./hyprland.nix
|
||||
./niri.nix
|
||||
./ly.nix
|
||||
./nix.nix
|
||||
];
|
||||
|
||||
nix =
|
||||
let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in
|
||||
lib.mkForce {
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
# Opinionated: disable global registry
|
||||
flake-registry = "";
|
||||
};
|
||||
# Opinionated: disable channels
|
||||
channel.enable = false;
|
||||
|
||||
# Opinionated: make flake registry and nix path match flake inputs
|
||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
wget
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
@@ -61,5 +43,5 @@
|
||||
};
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "25.11";
|
||||
system.stateVersion = "26.11";
|
||||
}
|
||||
File renamed without changes.
@@ -0,0 +1,10 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
services.displayManager.ly = {
|
||||
enable = config.nix-leonhard.graphical.enable;
|
||||
settings.session_log = ".cache/ly-lession.log";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.niri.enable = config.nix-leonhard.graphical.enable;
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nix =
|
||||
let
|
||||
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
|
||||
in
|
||||
{
|
||||
package = pkgs.nix;
|
||||
|
||||
# pin the registry to avoid downloading and evaling a new nixpkgs version every time
|
||||
registry = lib.mapAttrs (_: v: { flake = v; }) flakeInputs;
|
||||
|
||||
# set the path for channels compat
|
||||
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
|
||||
|
||||
settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
channel.enable = false;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user