Fix formatting

This commit is contained in:
2026-07-12 18:07:46 +01:00
parent ebf3e773c6
commit 1edf4af07f
14 changed files with 346 additions and 171 deletions
+14
View File
@@ -24,6 +24,9 @@
home-manager.users.root = import ./home/root.nix;
}
];
pkgs = import nixpkgs {
inherit system;
};
in {
nixosConfigurations = {
syedm = nixpkgs.lib.nixosSystem {
@@ -43,5 +46,16 @@
];
};
};
# For development
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
nil
nixfmt
lua-language-server
stylua
];
};
};
}
+1 -1
View File
@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
let
battery = pkgs.writeShellScript "battery" ''
+243 -81
View File
@@ -8,114 +8,276 @@
colourful = true;
filekinds = {
normal = { foreground = "#c0caf5"; };
directory = { foreground = "#7aa2f7"; };
symlink = { foreground = "#2ac3de"; };
pipe = { foreground = "#414868"; };
block_device = { foreground = "#e0af68"; };
char_device = { foreground = "#e0af68"; };
socket = { foreground = "#414868"; };
special = { foreground = "#9d7cd8"; };
executable = { foreground = "#9ece6a"; };
mount_point = { foreground = "#b4f9f8"; };
normal = {
foreground = "#c0caf5";
};
directory = {
foreground = "#7aa2f7";
};
symlink = {
foreground = "#2ac3de";
};
pipe = {
foreground = "#414868";
};
block_device = {
foreground = "#e0af68";
};
char_device = {
foreground = "#e0af68";
};
socket = {
foreground = "#414868";
};
special = {
foreground = "#9d7cd8";
};
executable = {
foreground = "#9ece6a";
};
mount_point = {
foreground = "#b4f9f8";
};
};
perms = {
user_read = { foreground = "#2ac3de"; };
user_write = { foreground = "#bb9af7"; };
user_execute_file = { foreground = "#9ece6a"; };
user_execute_other = { foreground = "#9ece6a"; };
group_read = { foreground = "#2ac3de"; };
group_write = { foreground = "#ff9e64"; };
group_execute = { foreground = "#9ece6a"; };
other_read = { foreground = "#2ac3de"; };
other_write = { foreground = "#ff007c"; };
other_execute = { foreground = "#9ece6a"; };
special_user_file = { foreground = "#ff007c"; };
special_other = { foreground = "#db4b4b"; };
attribute = { foreground = "#737aa2"; };
user_read = {
foreground = "#2ac3de";
};
user_write = {
foreground = "#bb9af7";
};
user_execute_file = {
foreground = "#9ece6a";
};
user_execute_other = {
foreground = "#9ece6a";
};
group_read = {
foreground = "#2ac3de";
};
group_write = {
foreground = "#ff9e64";
};
group_execute = {
foreground = "#9ece6a";
};
other_read = {
foreground = "#2ac3de";
};
other_write = {
foreground = "#ff007c";
};
other_execute = {
foreground = "#9ece6a";
};
special_user_file = {
foreground = "#ff007c";
};
special_other = {
foreground = "#db4b4b";
};
attribute = {
foreground = "#737aa2";
};
};
size = {
major = { foreground = "#2ac3de"; };
minor = { foreground = "#9d7cd8"; };
number_byte = { foreground = "#a9b1d6"; };
number_kilo = { foreground = "#89ddff"; };
number_mega = { foreground = "#2ac3de"; };
number_giga = { foreground = "#ff9e64"; };
number_huge = { foreground = "#ff007c"; };
unit_byte = { foreground = "#a9b1d6"; };
unit_kilo = { foreground = "#89ddff"; };
unit_mega = { foreground = "#2ac3de"; };
unit_giga = { foreground = "#ff9e64"; };
unit_huge = { foreground = "#ff007c"; };
major = {
foreground = "#2ac3de";
};
minor = {
foreground = "#9d7cd8";
};
number_byte = {
foreground = "#a9b1d6";
};
number_kilo = {
foreground = "#89ddff";
};
number_mega = {
foreground = "#2ac3de";
};
number_giga = {
foreground = "#ff9e64";
};
number_huge = {
foreground = "#ff007c";
};
unit_byte = {
foreground = "#a9b1d6";
};
unit_kilo = {
foreground = "#89ddff";
};
unit_mega = {
foreground = "#2ac3de";
};
unit_giga = {
foreground = "#ff9e64";
};
unit_huge = {
foreground = "#ff007c";
};
};
users = {
user_you = { foreground = "#3d59a1"; };
user_root = { foreground = "#bb9af7"; };
user_other = { foreground = "#2ac3de"; };
group_yours = { foreground = "#89ddff"; };
group_root = { foreground = "#bb9af7"; };
group_other = { foreground = "#c0caf5"; };
user_you = {
foreground = "#3d59a1";
};
user_root = {
foreground = "#bb9af7";
};
user_other = {
foreground = "#2ac3de";
};
group_yours = {
foreground = "#89ddff";
};
group_root = {
foreground = "#bb9af7";
};
group_other = {
foreground = "#c0caf5";
};
};
links = {
normal = { foreground = "#89ddff"; };
multi_link_file = { foreground = "#2ac3de"; };
normal = {
foreground = "#89ddff";
};
multi_link_file = {
foreground = "#2ac3de";
};
};
git = {
new = { foreground = "#9ece6a"; };
modified = { foreground = "#bb9af7"; };
deleted = { foreground = "#db4b4b"; };
renamed = { foreground = "#2ac3de"; };
typechange = { foreground = "#2ac3de"; };
ignored = { foreground = "#545c7e"; };
conflicted = { foreground = "#ff9e64"; };
new = {
foreground = "#9ece6a";
};
modified = {
foreground = "#bb9af7";
};
deleted = {
foreground = "#db4b4b";
};
renamed = {
foreground = "#2ac3de";
};
typechange = {
foreground = "#2ac3de";
};
ignored = {
foreground = "#545c7e";
};
conflicted = {
foreground = "#ff9e64";
};
};
git_repo = {
branch_main = { foreground = "#737aa2"; };
branch_other = { foreground = "#b4f9f8"; };
git_clean = { foreground = "#292e42"; };
git_dirty = { foreground = "#bb9af7"; };
branch_main = {
foreground = "#737aa2";
};
branch_other = {
foreground = "#b4f9f8";
};
git_clean = {
foreground = "#292e42";
};
git_dirty = {
foreground = "#bb9af7";
};
};
security_context = {
colon = { foreground = "#545c7e"; };
user = { foreground = "#737aa2"; };
role = { foreground = "#2ac3de"; };
typ = { foreground = "#3d59a1"; };
range = { foreground = "#9d7cd8"; };
colon = {
foreground = "#545c7e";
};
user = {
foreground = "#737aa2";
};
role = {
foreground = "#2ac3de";
};
typ = {
foreground = "#3d59a1";
};
range = {
foreground = "#9d7cd8";
};
};
file_type = {
image = { foreground = "#89ddff"; };
video = { foreground = "#b4f9f8"; };
music = { foreground = "#73daca"; };
lossless = { foreground = "#41a6b5"; };
crypto = { foreground = "#db4b4b"; };
document = { foreground = "#a9b1d6"; };
compressed = { foreground = "#ff9e64"; };
temp = { foreground = "#737aa2"; };
compiled = { foreground = "#737aa2"; };
build = { foreground = "#1abc9c"; };
source = { foreground = "#bb9af7"; };
image = {
foreground = "#89ddff";
};
video = {
foreground = "#b4f9f8";
};
music = {
foreground = "#73daca";
};
lossless = {
foreground = "#41a6b5";
};
crypto = {
foreground = "#db4b4b";
};
document = {
foreground = "#a9b1d6";
};
compressed = {
foreground = "#ff9e64";
};
temp = {
foreground = "#737aa2";
};
compiled = {
foreground = "#737aa2";
};
build = {
foreground = "#1abc9c";
};
source = {
foreground = "#bb9af7";
};
};
punctuation = { foreground = "#292e42"; };
date = { foreground = "#e0af68"; };
inode = { foreground = "#737aa2"; };
blocks = { foreground = "#737aa2"; };
header = { foreground = "#a9b1d6"; };
octal = { foreground = "#ff9e64"; };
flags = { foreground = "#9d7cd8"; };
punctuation = {
foreground = "#292e42";
};
date = {
foreground = "#e0af68";
};
inode = {
foreground = "#737aa2";
};
blocks = {
foreground = "#737aa2";
};
header = {
foreground = "#a9b1d6";
};
octal = {
foreground = "#ff9e64";
};
flags = {
foreground = "#9d7cd8";
};
symlink_path = { foreground = "#89ddff"; };
control_char = { foreground = "#ff9e64"; };
broken_symlink = { foreground = "#ff007c"; };
broken_path_overlay = { foreground = "#ff007c"; };
symlink_path = {
foreground = "#89ddff";
};
control_char = {
foreground = "#ff9e64";
};
broken_symlink = {
foreground = "#ff007c";
};
broken_path_overlay = {
foreground = "#ff007c";
};
};
};
}
+3 -1
View File
@@ -4,7 +4,9 @@ let
script = pkgs.substitute {
src = ./config.rb;
substitutions = [
"--replace-fail" "@src@" "${./scripts}"
"--replace-fail"
"@src@"
"${./scripts}"
];
};
in
-6
View File
@@ -41,12 +41,6 @@
p.cpp
]))
];
extraPackages = with pkgs; [
lua-language-server
clang-tools
stylua
];
};
home.file.".config/nvim".source = ./.;
+1
View File
@@ -1,3 +1,4 @@
require("formatting")
require("extra")
require("keymaps")
require("lsp")
+11
View File
@@ -0,0 +1,11 @@
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
nix = { "nixfmt" },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
})
+11 -16
View File
@@ -5,24 +5,19 @@ vim.lsp.config("lua_ls", {
capabilities = capabilities,
settings = {
Lua = {
diagnostics = {
globals = {
"vim",
},
},
workspace = {
library = vim.api.nvim_get_runtime_file("", true),
},
telemetry = {
enable = false,
},
diagnostics = { globals = { "vim" } },
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
telemetry = { enable = false },
},
},
})
vim.lsp.config("clangd", {
capabilities = capabilities,
})
local servers = { "clangd", "nil", "solargraph", "hls" }
vim.lsp.enable("lua_ls")
vim.lsp.enable("clangd")
for _, server in ipairs(servers) do
vim.lsp.config(server, { capabilities = capabilities })
end
vim.list_extend(servers, { "lua_ls" })
vim.lsp.enable(servers)
-11
View File
@@ -60,17 +60,6 @@ require("nvim-cursorline").setup({
},
})
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
})
local cmp = require("cmp")
cmp.setup({
window = {
-10
View File
@@ -24,14 +24,4 @@ in
exec ~/.xsession
fi
'';
programs.spicetify = {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
adblockify
hidePodcasts
];
theme = spicePkgs.themes.catppuccin;
colorScheme = "mocha";
};
}
+13 -7
View File
@@ -1,15 +1,16 @@
{ config, lib, pkgs, ... }:
{
config,
pkgs,
...
}:
{
imports =
[
imports = [
../modules/secrets
];
boot.resumeDevice =
if config.swapDevices != []
then (builtins.head config.swapDevices).device
else null;
if config.swapDevices != [ ] then (builtins.head config.swapDevices).device else null;
nixpkgs.config.allowUnfree = true;
@@ -44,7 +45,12 @@
users.users.me = {
isNormalUser = true;
shell = pkgs.fish;
extraGroups = [ "wheel" "video" "networkmanager" "input" ];
extraGroups = [
"wheel"
"video"
"networkmanager"
"input"
];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPFh01e9doyInt0980V8T4xaakcSaOyXaxxYE4+oSwM me@syedm # server"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJFUwk54CNtSLUyXSTLsIs5KXgEsjOgE4HGlA4FacKjV me@tardis # msi laptop"
+7 -4
View File
@@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }:
{ ... }:
{
imports =
[
imports = [
./hardware-configuration.nix
../../modules/cloudflare-ddns
@@ -37,7 +36,11 @@
tempAddresses = "disabled";
firewall = {
enable = true;
allowedTCPPorts = [ 22 80 443 ];
allowedTCPPorts = [
22
80
443
];
allowedUDPPorts = [ ];
allowPing = true;
};
+13 -5
View File
@@ -1,8 +1,12 @@
{ config, lib, pkgs, inputs, ... }:
{
lib,
pkgs,
inputs,
...
}:
{
imports =
[
imports = [
./hardware-configuration.nix
../../modules/ollama
@@ -12,7 +16,9 @@
../../modules/workstation/keyd.nix
];
environment.systemPackages = lib.mkAfter (with pkgs; [
environment.systemPackages = lib.mkAfter (
with pkgs;
[
firefox
xdg-utils
dmenu
@@ -22,9 +28,11 @@
xclip
xsel
prismlauncher
spotify
inputs.kutu.packages.${stdenv.hostPlatform.system}.default
]);
]
);
fonts.packages = with pkgs; [
nerd-fonts.hurmit