various updates

This commit is contained in:
Vivian 2024-03-18 17:12:51 +01:00
parent 89ce2c97d9
commit 636e23deb7
11 changed files with 149 additions and 145 deletions

View file

@ -4,7 +4,7 @@ let
inherit (pkgs.texlive) scheme-full; inherit (pkgs.texlive) scheme-full;
dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; }; dnd-5e-latex-template = { pkgs = [ pkgs.v.dnd-5e-latex-template ]; };
}; };
my-python-packages = ps: with ps; [ pandas requests numpy scapy pyshark cryptography ]; my-python-packages = ps: with ps; [ pandas requests numpy scapy pyshark cryptography flask ];
in { in {
home.packages = with pkgs; [ home.packages = with pkgs; [
(python3.withPackages my-python-packages) (python3.withPackages my-python-packages)

View file

@ -75,11 +75,25 @@ in with lib; {
key = "<S-C-Tab>"; key = "<S-C-Tab>";
action = ":bp<CR>"; action = ":bp<CR>";
} }
{
mode = "n";
key = "<S-Tab>";
action = "<<_";
}
{
mode = "v";
key = "<Tab>";
action = ">gv";
}
{
mode = "v";
key = "<S-Tab>";
action = "<gv";
}
]; ];
extraPlugins = with pkgs.vimPlugins; [ extraPlugins = with pkgs.vimPlugins; [
FixCursorHold-nvim FixCursorHold-nvim
luasnip
plenary-nvim plenary-nvim
neotest neotest
neotest-plenary neotest-plenary
@ -104,18 +118,8 @@ in with lib; {
plugins = { plugins = {
bufferline.enable = true; bufferline.enable = true;
none-ls = {
enable = true;
sources = {
formatting.nixpkgs_fmt.enable = true;
code_actions.statix.enable = true;
diagnostics = {
statix.enable = true;
deadnix.enable = true;
};
};
};
nix.enable = true; nix.enable = true;
luasnip.enable = true;
treesitter = { treesitter = {
enable = true; enable = true;
nixGrammars = true; nixGrammars = true;
@ -138,11 +142,22 @@ in with lib; {
enable = true; enable = true;
servers = { servers = {
nil_ls.enable = true; nil_ls.enable = true;
dockerls.enable = true;
rust-analyzer = { rust-analyzer = {
installCargo = false; installCargo = false;
installRustc = false; installRustc = false;
}; };
pyright.enable = true; pyright.enable = true;
pylsp = {
enable = true;
settings.plugins = {
black = {
enabled = true;
cache_config = true;
};
pycodestyle = { maxLineLength = 100; };
};
};
elixirls.enable = true; elixirls.enable = true;
clangd.enable = true; clangd.enable = true;
yamlls.enable = true; yamlls.enable = true;
@ -150,48 +165,37 @@ in with lib; {
}; };
trouble.enable = true; trouble.enable = true;
lspkind.enable = true; lspkind.enable = true;
vimtex.enable = true; vimtex.enable = true;
floaterm.enable = true; floaterm.enable = true;
# cmp = { cmp = {
# enable = true; enable = true;
# autoEnableSources = true; autoEnableSources = true;
# extraOptions.sources = [ settings = {
# { name = "nvim_lsp"; } snippet.expand =
# { "function(args) require('luasnip').lsp_expand(args.body) end";
# name = "luasnip"; mapping = {
# option = { show_autosnippets = true; }; "<S-Tab>" =
# } "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
# { name = "cmp-spell"; } "<Tab>" =
# { name = "cmp-rg"; } "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
# { name = "path"; } "<CR>" = "cmp.mapping.confirm({ select = true })";
# { name = "buffer"; } "<C-Space>" = "cmp.mapping.complete()";
# ]; "<C-e>" = "cmp.mapping.close()";
# extraOptions.snippet.expand = "luasnip"; };
# # mappingPresets = [ "insert" "cmdline" ]; sources = [
# extraOptions.mapping = { { name = "nvim_lsp_signature_help"; }
# "<CR>" = "cmp.mapping.confirm({ select = true })"; { name = "path"; }
# "<Tab>" = { { name = "nvim_lsp"; }
# modes = [ "i" "s" ]; { name = "luasnip"; }
# action = '' {
# function(fallback) name = "buffer";
# local luasnip = require('luasnip') # Words from other open buffers can also be suggested.
# if cmp.visible() then option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
# cmp.select_next_item() }
# elseif luasnip.expandable() then ];
# luasnip.expand() };
# elseif luasnip.expand_or_jumpable() then };
# luasnip.expand_or_jump()
# else
# fallback()
# end
# end
# '';
# };
# };
# };
}; };
}; };
}; };

134
flake.lock generated
View file

@ -108,11 +108,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1710186624, "lastModified": 1710529178,
"narHash": "sha256-2Rxxn4NShQBol7ajKws1+F4oF0vle0E3V0Rnigtv9d8=", "narHash": "sha256-PW9OS/ccRxigP0ikk1XR4QhQX4j9+ALQz0FMKXF3yRA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "comma", "repo": "comma",
"rev": "91c3006149aa2743ca873efaa3d217a00bb7f292", "rev": "1085a5af2907f537cae91c6279c98951dbc45cea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -418,11 +418,11 @@
"flake-compat_6": { "flake-compat_6": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668681692, "lastModified": 1696426674,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1", "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -588,7 +588,7 @@
}, },
"flake-utils_10": { "flake-utils_10": {
"inputs": { "inputs": {
"systems": "systems_10" "systems": "systems_11"
}, },
"locked": { "locked": {
"lastModified": 1710146030, "lastModified": 1710146030,
@ -620,7 +620,7 @@
}, },
"flake-utils_12": { "flake-utils_12": {
"inputs": { "inputs": {
"systems": "systems_12" "systems": "systems_13"
}, },
"locked": { "locked": {
"lastModified": 1681202837, "lastModified": 1681202837,
@ -725,7 +725,7 @@
}, },
"flake-utils_7": { "flake-utils_7": {
"inputs": { "inputs": {
"systems": "systems_7" "systems": "systems_8"
}, },
"locked": { "locked": {
"lastModified": 1705309234, "lastModified": 1705309234,
@ -743,7 +743,7 @@
}, },
"flake-utils_8": { "flake-utils_8": {
"inputs": { "inputs": {
"systems": "systems_8" "systems": "systems_9"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
@ -761,7 +761,7 @@
}, },
"flake-utils_9": { "flake-utils_9": {
"inputs": { "inputs": {
"systems": "systems_9" "systems": "systems_10"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1701680307,
@ -897,11 +897,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710401383, "lastModified": 1710714957,
"narHash": "sha256-jskq7uDpKXrRoY4hDpNqykmSSKHUXYlo7ZFc/se7fus=", "narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1ab3cec3a1bbb065b2d52b913d1431366028d5b5", "rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -995,16 +995,14 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-23_05": "nixpkgs-23_05",
"nixpkgs-23_11": "nixpkgs-23_11",
"utils": "utils_3" "utils": "utils_3"
}, },
"locked": { "locked": {
"lastModified": 1709905972, "lastModified": 1710449465,
"narHash": "sha256-18OF2/ypr0n4Lp6Fk5SLHPu12ok6jM+Hv3sC0PCim0Q=", "narHash": "sha256-2orO8nfplp6uQJBFqKkj1iyNMC6TysmwbWwbb4osTag=",
"owner": "simple-nixos-mailserver", "owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver", "repo": "nixos-mailserver",
"rev": "572c1b4d69deea1093ac231c37927cfa8ccad477", "rev": "79c8cfcd5873a85559da6201b116fb38b490d030",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -1134,11 +1132,11 @@
}, },
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1710031547, "lastModified": 1710636348,
"narHash": "sha256-pkUg3hOKuGWMGF9WEMPPN/G4pqqdbNGJQ54yhyQYDVY=", "narHash": "sha256-/kB+ZWSdkZjbZ0FTqm0u84sf2jFS+30ysaEajmBjtoY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixpkgs.lib", "repo": "nixpkgs.lib",
"rev": "630ebdc047ca96d8126e16bb664c7730dc52f6e6", "rev": "fa827dda806c5aa98f454da4c567991ab8ce422c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1155,11 +1153,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710398463, "lastModified": 1710722910,
"narHash": "sha256-fQlYanU84E8uwBpcoTCcLCwU8cqn0eQ7nwTcrWfSngc=", "narHash": "sha256-P5p9+WQFuABoBXBKEK1ZYu8mD6q8j/cQwZ9OYb0oh2E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixos-generators", "repo": "nixos-generators",
"rev": "efd4e38532b5abfaa5c9fc95c5a913157dc20ccb", "rev": "e63df01c798b99a76dc2ec25481be7dd25cd1610",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1170,11 +1168,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1710123225, "lastModified": 1710622004,
"narHash": "sha256-j3oWlxRZxB7cFsgEntpH3rosjFHRkAo/dhX9H3OfxtY=", "narHash": "sha256-6zR642tXcZzzk3C8BHxlCrR0yh8z8zMXLiuXpWDIpX0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "ad2fd7b978d5e462048729a6c635c45d3d33c9ba", "rev": "968952f950a59dee9ed1e8799dda38c6dfa1bad3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1199,36 +1197,6 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-23_05": {
"locked": {
"lastModified": 1704290814,
"narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.05",
"type": "indirect"
}
},
"nixpkgs-23_11": {
"locked": {
"lastModified": 1706098335,
"narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a77ab169a83a4175169d78684ddd2e54486ac651",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-23.11",
"type": "indirect"
}
},
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
@ -1425,11 +1393,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1710339354, "lastModified": 1710716398,
"narHash": "sha256-+P5ccUPiLouHexb8aJrUOVOIja9qm+fG57pgAu7uIRs=", "narHash": "sha256-HfuWX+8cykZsLWw2Kj6AbN1l6ZH8yB7vxjOKD8C0008=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2dbc8f62d8af7a1ab962e4b20d12b25ddcb86ced", "rev": "ca0de94ebb9a7c06447285310777567afd0053aa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1481,11 +1449,11 @@
"pre-commit-hooks": "pre-commit-hooks" "pre-commit-hooks": "pre-commit-hooks"
}, },
"locked": { "locked": {
"lastModified": 1710347506, "lastModified": 1710634405,
"narHash": "sha256-qwKEfLPd6oDugHfX6efCG9A2Z6360aAObYfFnbIKhzE=", "narHash": "sha256-e+EHQGqqjpvkln6vYmiAcafFKbTaze3XF7DEjDZyXGY=",
"owner": "pta2002", "owner": "pta2002",
"repo": "nixvim", "repo": "nixvim",
"rev": "9b9912077e11478460c0d919a0101ace8966f44a", "rev": "939530edca29b44e65d8bd606ef3485346510ebe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1496,11 +1464,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1710408786, "lastModified": 1710750753,
"narHash": "sha256-aEW6t8oODV576gPKtemz/Tolr1DPIQ/2Nt2AMGXvjgw=", "narHash": "sha256-MQ5haKyTNKAFTw3oDaShLHiECiD5DVV4HfmzN3l77Yk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "cdbce2df9378877576df216d4b5e0da724823581", "rev": "05351320d5ece2eb43cbd991edd4d1f56f5ca17f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1808,6 +1776,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_13": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": { "systems_2": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -1936,11 +1919,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1710409286, "lastModified": 1710410762,
"narHash": "sha256-DTq/5A8kUSQ+8rBIPvFir3Lo7Ta3OBOMyRNrmmJQR/s=", "narHash": "sha256-pCCCdoW4+ipCOwzJCYZJ8CNINDsQvACCaxh2xT6uqmw=",
"owner": "jdonszelmann", "owner": "jdonszelmann",
"repo": "t-rs", "repo": "t-rs",
"rev": "0dab4573e94ca01f17f1a325e8c2f66e9e885c2a", "rev": "1178091650351fc8372e4c84c786433f9bce69d5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -1986,12 +1969,15 @@
} }
}, },
"utils_3": { "utils_3": {
"inputs": {
"systems": "systems_7"
},
"locked": { "locked": {
"lastModified": 1605370193, "lastModified": 1709126324,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", "narHash": "sha256-q6EQdSeUZOG26WelxqkmR7kArjgWCdw5sfJVHPH/7j8=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d", "rev": "d465f4819400de7c8d874d50b982301f28a84605",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -2002,7 +1988,7 @@
}, },
"utils_4": { "utils_4": {
"inputs": { "inputs": {
"systems": "systems_11" "systems": "systems_12"
}, },
"locked": { "locked": {
"lastModified": 1694529238, "lastModified": 1694529238,

View file

@ -83,7 +83,7 @@
./common ./common
]; ];
specialArgs = { inherit self inputs; }; specialArgs = { inherit self inputs home-manager; };
}; };
# hosts # hosts

View file

@ -1,6 +1,12 @@
# common container config # common container config
{ lib, ... }: { { lib, home-manager, ... }: {
imports = [
# ../../../../common/modules
home-manager.nixosModules.home-manager # TODO: I don't like this
];
# Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686 # Workaround for bug https://github.com/NixOS/nixpkgs/issues/162686
networking.useHostResolvConf = lib.mkForce false; networking.useHostResolvConf = lib.mkForce false;
services.resolved.enable = true; services.resolved.enable = true;
system.stateVersion = lib.mkDefault "24.05";
} }

View file

@ -21,5 +21,13 @@ in {
# * fc00:x # * fc00:x
containers = { containers = {
dns = {
autoStart = true;
inherit hostAddress hostAddress6;
localAddress = "10.42.99.1";
localAddress6 = "fc00::2";
config = ./dns.nix;
};
}; };
} }

View file

@ -0,0 +1,8 @@
{ ... }: {
imports = [ ./common.nix ];
services.v.dns = {
enable = true;
openFirewall = true;
mode = "server";
};
}

View file

@ -36,9 +36,4 @@
environment.systemPackages = with pkgs; [ vault ]; environment.systemPackages = with pkgs; [ vault ];
networking.useNetworkd = true; networking.useNetworkd = true;
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
};
} }

View file

@ -1,8 +0,0 @@
{
olympus.bastion.nginx = {
dns = {
a = "0x76.dev";
};
ports = [80 443];
};
}

View file

@ -1,7 +1,12 @@
{ pkgs, ... }: { { pkgs, ... }: {
environment.systemPackages = with pkgs; [
pciutils
usbutils
lshw
];
hardware = { hardware = {
enableAllFirmware = true; enableAllFirmware = true;
bluetooth.enable = true; bluetooth.enable = true;
# OpenGL + Vulkan # OpenGL + Vulkan
@ -18,13 +23,13 @@
}; };
}; };
services = { services = {
fwupd.enable = true;
hardware.bolt.enable = true; hardware.bolt.enable = true;
fprintd.enable = true; fprintd.enable = true;
# Video Driver # Video Driver
xserver.videoDrivers = [ "amdgpu" ];
xserver = { xserver = {
dpi = 280; dpi = 280;
xkb.options = "caps:swapescape"; xkb.options = "caps:swapescape";

View file

@ -30,8 +30,7 @@ let
exec Hyprland exec Hyprland
''; '';
in in {
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -46,6 +45,7 @@ in
users.vivian = import ./home; users.vivian = import ./home;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
security = { security = {
pam.services.swaylock = { }; pam.services.swaylock = { };