Cleanup of modules (#18)

This commit is contained in:
Christoph Hollizeck 2024-08-21 22:39:31 +02:00 committed by GitHub
commit 20f4850036
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 75 additions and 459 deletions

View file

@ -86,11 +86,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1706830856,
"narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@ -230,11 +230,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1710933866,
"narHash": "sha256-GtYTuxY6AdFxl3uwFkTkqpvOP4lQLzu2YwqnejhDs1Q=",
"lastModified": 1718922730,
"narHash": "sha256-ykhhOPqA9NzdNBr3ii+3h2DkK2+wasNqQLfMF6BXxTE=",
"owner": "mrcjkb",
"repo": "nix-gen-luarc-json",
"rev": "6e8912ea4fbfaa10797caafb1f5628fb4178b6e8",
"rev": "021e8078e43884c6cdc70ca753d9a0b146cd55a4",
"type": "github"
},
"original": {
@ -246,11 +246,11 @@
"gpg-base-conf": {
"flake": false,
"locked": {
"lastModified": 1719781410,
"narHash": "sha256-cmtAG7UQX7mVNoHHpVIqasfkjnO7VtBMcz8MJ7frO0k=",
"lastModified": 1724021581,
"narHash": "sha256-f+ghj8qiljbHyIPZb6b2IAxxQU9GvbYpTdEEjSN9g8E=",
"owner": "drduh",
"repo": "config",
"rev": "4eca229664d056737f1a097cdbdb10e5f247b0bc",
"rev": "eedb4ecf4bb2b5fd71bb27768f76da0f2e2605c8",
"type": "github"
},
"original": {
@ -266,11 +266,11 @@
]
},
"locked": {
"lastModified": 1723015306,
"narHash": "sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA=",
"lastModified": 1723986931,
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e",
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
"type": "github"
},
"original": {
@ -289,11 +289,11 @@
]
},
"locked": {
"lastModified": 1714917689,
"narHash": "sha256-tRZfUxABa96Xab2RspciohsXbUw06+Qsc+uzqRaL2t4=",
"lastModified": 1723810905,
"narHash": "sha256-CabIenMDQL6mg5jKkgB8h9HsuLDhrjCITitm6YDXOqw=",
"owner": "Daholli",
"repo": "kickstart-nix-nvim",
"rev": "f3fe9cd765965a12dc58c08a5ecfb63fd61df96a",
"rev": "eae53c17749121adbd9425fbd84803b139661687",
"type": "github"
},
"original": {
@ -326,11 +326,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1722332872,
"narHash": "sha256-2xLM4sc5QBfi0U/AANJAW21Bj4ZX479MHPMPkB+eKBU=",
"lastModified": 1724067415,
"narHash": "sha256-WJBAEFXAtA41RMpK8mvw0cQ62CJkNMBtzcEeNIJV7b0=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "14c333162ba53c02853add87a0000cbd7aa230c2",
"rev": "b09c46430ffcf18d575acf5c339b38ac4e1db5d2",
"type": "github"
},
"original": {
@ -363,11 +363,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1708475490,
"narHash": "sha256-g1v0TsWBQPX97ziznfJdWhgMyMGtoBFs102xSYO4syU=",
"lastModified": 1718714799,
"narHash": "sha256-FUZpz9rg3gL8NVPKbqU8ei1VkPLsTIfAJ2fdAf5qjak=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0e74ca98a74bc7270d28838369593635a5db3260",
"rev": "c00d587b1a1afbf200b1d8f0b0e4ba9deb1c7f0e",
"type": "github"
},
"original": {
@ -379,20 +379,14 @@
},
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1706550542,
"narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "97b17f32362e475016f942bbdfda4a4a72a8a652",
"type": "github"
"lastModified": 1717284937,
"narHash": "sha256-lIbdfCsf8LMFloheeE6N31+BMIeixqyQWbSr2vk79EQ=",
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
},
"original": {
"dir": "lib",
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz"
}
},
"nixpkgs-stable": {
@ -413,11 +407,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1723362943,
"narHash": "sha256-dFZRVSgmJkyM0bkPpaYRtG/kRMRTorUIDj8BxoOt1T4=",
"lastModified": 1723991338,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a58bc8ad779655e790115244571758e8de055e3d",
"rev": "8a3354191c0d7144db9756a74755672387b702ba",
"type": "github"
},
"original": {
@ -554,11 +548,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1722897572,
"narHash": "sha256-3m/iyyjCdRBF8xyehf59QlckIcmShyTesymSb+N4Ap4=",
"lastModified": 1723501126,
"narHash": "sha256-N9IcHgj/p1+2Pvk8P4Zc1bfrMwld5PcosVA0nL6IGdE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "8ae477955dfd9cbf5fa4eb82a8db8ddbb94e79d9",
"rev": "be0eec2d27563590194a9206f551a6f73d52fa34",
"type": "github"
},
"original": {
@ -629,11 +623,11 @@
},
"unstable": {
"locked": {
"lastModified": 1722813957,
"narHash": "sha256-IAoYyYnED7P8zrBFMnmp7ydaJfwTnwcnqxUElC1I26Y=",
"lastModified": 1723991338,
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cb9a96f23c491c081b38eab96d22fa958043c9fa",
"rev": "8a3354191c0d7144db9756a74755672387b702ba",
"type": "github"
},
"original": {

View file

@ -1,20 +0,0 @@
{
lib,
pkgs,
config,
osConfig ? { },
format ? "unknown",
...
}:
with lib.wyrdgard;
{
wyrdgard = {
apps = {
kitty = enabled;
};
tools = {
direnv = enabled;
};
};
}

View file

@ -1,315 +0,0 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard; let
cfg = config.wyrdgard.apps.cli-apps.nixvim;
in {
options.wyrdgard.apps.cli-apps.nixvim = with types; {
enable = mkBoolOpt true "Whether to enable nixvim or not (Default true)";
};
config = mkIf cfg.enable {
programs.nixvim = {
enable = true;
colorschemes.tokyonight = enabled;
globals.mapleader = " ";
clipboard.providers.wl-copy = enabled;
options = {
number = true;
relativenumber = true;
shiftwidth = 4;
};
autoCmd = [
{
event = "FileType";
pattern = "nix";
command = "setlocal tabstop=2 shiftwidth=2";
}
];
keymaps = [
{
action = "<cmd>Ex<CR>";
key = "<leader>e";
options.desc = "Open Explorer";
}
{
mode = "n";
action = "<cmd>w<CR>";
key = "<C-s>";
options.desc = "Save";
}
{
mode = "n";
action = "<cmd>noh<CR>";
key = "<esc>";
options.silent = true;
}
{
mode = "n";
action = "<cmd>UndotreeToggle<CR>";
key = "<leader>ut";
options.desc = "Toggle Undotree";
}
{
mode = "n";
action = "<cmd>UndotreeToggle<CR>";
key = "<leader>uf";
options.desc = "Focus Undotree";
}
];
plugins = {
telescope = {
enable = true;
keymaps = {
"<leader>sr" = {
action = "oldfiles";
desc = "[s]earch [r]ecent";
};
"<leader>sk" = {
action = "keymaps";
desc = "[s]earch [k]eys";
};
"<leader>sg" = {
action = "live_grep";
desc = "[s]earch [g]rep";
};
};
};
harpoon = {
enable = true;
enableTelescope = true;
keymaps = {
addFile = "<leader>a";
toggleQuickMenu = "<leader>ha";
navFile = {
"1" = "<C-1>";
"2" = "<C-2>";
"3" = "<C-3>";
"4" = "<C-4>";
};
};
};
treesitter = {
enable = true;
nixGrammars = true;
indent = true;
};
treesitter-context.enable = true;
lualine.enable = true;
copilot-lua = {
panel.enabled = false;
suggestion.enabled = false;
};
nix.enable = true;
nix-develop.enable = true;
nvim-autopairs.enable = true;
rainbow-delimiters = {enable = true;};
nvim-colorizer.enable = true;
undotree.enable = true;
which-key = {enable = true;};
trouble.enable = true;
markdown-preview.enable = true;
dashboard = {enable = true;};
auto-save = {
enable = true;
enableAutoSave = true;
};
## cmp extract into file
luasnip.enable = true;
cmp-buffer = {enable = true;};
cmp-emoji = {enable = true;};
cmp-nvim-lsp = {enable = true;};
cmp-path = {enable = true;};
cmp_luasnip = {enable = true;};
cmp = {
enable = true;
settings = {
snippet.expand = "luasnip";
sources = [
{name = "nvim_lsp";}
{name = "luasnip";}
{name = "copilot";}
{
name = "buffer";
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
}
{name = "nvim_lua";}
{name = "path";}
];
formatting = {
fields = ["abbr" "kind" "menu"];
format =
# lua
''
function(_, item)
local icons = {
Namespace = "󰌗",
Text = "󰉿",
Method = "󰆧",
Function = "󰆧",
Constructor = "",
Field = "󰜢",
Variable = "󰀫",
Class = "󰠱",
Interface = "",
Module = "",
Property = "󰜢",
Unit = "󰑭",
Value = "󰎠",
Enum = "",
Keyword = "󰌋",
Snippet = "",
Color = "󰏘",
File = "󰈚",
Reference = "󰈇",
Folder = "󰉋",
EnumMember = "",
Constant = "󰏿",
Struct = "󰙅",
Event = "",
Operator = "󰆕",
TypeParameter = "󰊄",
Table = "",
Object = "󰅩",
Tag = "",
Array = "[]",
Boolean = "",
Number = "",
Null = "󰟢",
String = "󰉿",
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
local icon = icons[item.kind] or ""
item.kind = string.format("%s %s", icon, item.kind or "")
return item
end
'';
};
window = {
completion = {
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
scrollbar = false;
sidePadding = 0;
border = ["" "" "" "" "" "" "" ""];
};
settings.documentation = {
border = ["" "" "" "" "" "" "" ""];
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
};
};
mapping = {
"<C-n>" = "cmp.mapping.select_next_item()";
"<C-p>" = "cmp.mapping.select_prev_item()";
"<C-j>" = "cmp.mapping.select_next_item()";
"<C-k>" = "cmp.mapping.select_prev_item()";
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
"<C-f>" = "cmp.mapping.scroll_docs(4)";
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.close()";
"<CR>" = "cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Insert, select = true })";
"<Tab>" =
# lua
''
function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif require("luasnip").expand_or_jumpable() then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-expand-or-jump", true, true, true), "")
else
fallback()
end
end
'';
"<S-Tab>" =
# lua
''
function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif require("luasnip").jumpable(-1) then
vim.fn.feedkeys(vim.api.nvim_replace_termcodes("<Plug>luasnip-jump-prev", true, true, true), "")
else
fallback()
end
end
'';
};
};
};
## lsp
lsp = {
enable = true;
servers = {
fsautocomplete.enable = true;
nixd.enable = true;
};
keymaps.lspBuf = {
"<leader>gd" = "definition";
"<leader>gD" = "references";
"<leader>gt" = "type_definition";
"<leader>gi" = "implementation";
"<leader>K" = "hover";
};
};
rust-tools.enable = true;
## none-ls
none-ls = {
enable = true;
sources = {
diagnostics = {statix.enable = true;};
formatting = {
nixfmt.enable = true;
markdownlint.enable = true;
shellharden.enable = true;
shfmt.enable = true;
};
};
};
};
};
};
}

View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.obs-studio;
in
{
options.wyrdgard.apps.obs-studio = with types; {
enable = mkBoolOpt false "Whether or not to enable obs-studio";
};
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ obs-studio ]; };
}

View file

@ -0,0 +1,18 @@
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.wyrdgard;
let
cfg = config.wyrdgard.apps.teamspeak;
in
{
options.wyrdgard.apps.teamspeak = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration";
};
config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ teamspeak_client ]; };
}

View file

@ -1,8 +1,6 @@
{
options,
config,
lib,
pkgs,
...
}:
with lib;
@ -19,6 +17,7 @@ in
wyrdgard = {
apps = {
discord = enabled;
teamspeak = enabled;
};
};
};

View file

@ -15,7 +15,7 @@ in
};
config = mkIf cfg.enable {
boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_8;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

View file

@ -1,33 +0,0 @@
{
pkgs,
config,
lib,
...
}:
with lib;
with lib.wyrdgard;
{
imports = [ ./hardware.nix ];
boot.blacklistedKernelModules = [ "hyperv-fb" ];
virtualisation.hypervGuest.videoMode = "1920x1080";
environment.systemPackages = with pkgs; [ ];
environment.variables.EDITOR = "nvim";
environment.variables.SUDOEDITOR = "nvim";
wyrdgard = {
apps = {
vivaldi = enabled;
};
submodules = {
basics = enabled;
graphical-interface = enabled;
socials = enabled;
};
};
system.stateVersion = "23.11";
}

View file

@ -1,44 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ ];
boot.initrd.availableKernelModules = [
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/c58c66b3-4e0f-4393-8d7b-871d934856e3";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6FC0-C2A2";
fsType = "vfat";
};
swapDevices = [ ];
# 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;
virtualisation.hypervGuest.videoMode = "1920x1080";
}

View file

@ -11,8 +11,6 @@ with lib.wyrdgard;
environment.systemPackages = with pkgs; [
jetbrains.rust-rover
inputs.pyfa
teamspeak_client
path-of-building
];
@ -31,6 +29,7 @@ with lib.wyrdgard;
_1password = enabled;
onedrive = enabled;
factorio-server = enabled;
obs-studio = enabled;
};
system = {