Compare commits

...

6 commits

Author SHA1 Message Date
74900b3734 Add mini 2025-12-22 18:42:06 +00:00
9b930ea0e0 Fix errors 2025-12-22 18:27:52 +00:00
85c51ff9d0 Refactor terminal development 2025-12-22 18:18:26 +00:00
76d16b1348 Fix warnings 2025-12-22 17:33:30 +00:00
15d1a89310 Add fwupd service 2025-12-22 17:21:30 +00:00
113392c78e Add fwupd 2025-12-22 17:17:12 +00:00
10 changed files with 498 additions and 2147 deletions

View file

@ -1,5 +1,10 @@
{ pkgs, lib, osConfig, sources, ... }: {
let cfg = osConfig.mods; pkgs,
lib,
osConfig,
...
}: let
cfg = osConfig.mods;
in { in {
# Modules # Modules
mods.xdg.enable = true; mods.xdg.enable = true;
@ -12,6 +17,7 @@ in {
mods.desktop.development.enable = false; mods.desktop.development.enable = false;
mods.desktop.productivity.enable = false; mods.desktop.productivity.enable = false;
mods.desktop.media.enable = false; mods.desktop.media.enable = false;
mods.obsidian.enable = false;
# Hardware preferences # Hardware preferences
@ -37,10 +43,8 @@ in {
}; };
profiles.default = { profiles.default = {
fingerprint = { fingerprint = {
"${cfg.monitors.primary.name}" = "${cfg.monitors.primary.name}" = "00ffffffffffff004c2d850433324d431a120103803420782aee91a3544c99260f5054bfef80714f8100814081809500a940b30001011a3680a070381f403020350006202000001a000000fd00384b1e5111000a202020202020000000fc0053796e634d61737465720a2020000000ff004831414b3530303030300a202000e9";
"00ffffffffffff004c2d850433324d431a120103803420782aee91a3544c99260f5054bfef80714f8100814081809500a940b30001011a3680a070381f403020350006202000001a000000fd00384b1e5111000a202020202020000000fc0053796e634d61737465720a2020000000ff004831414b3530303030300a202000e9"; "${cfg.monitors.secondary.name}" = "00ffffffffffff00410cca140101010134100103804728788a288e9e5548972416484badce0031594559615981800101010101010101a91a00a05000163030203700c48e21000018662150b051001b3040703600c48e21000018000000fc005068696c697073545620283529000000fd002f551f500e000a2020202020200156020323714f930414051f10121103020116150706230907078301000066030c00100080011d00bc52d01e20b8285540c48e2100001a011d007251d01e206e285500c48e2100001e011d80d0721c1620102c2580c48e2100009e011d8018711c1620582c2500c48e2100009ef33980d072382d40102c4580c48e2100001e0000f2";
"${cfg.monitors.secondary.name}" =
"00ffffffffffff00410cca140101010134100103804728788a288e9e5548972416484badce0031594559615981800101010101010101a91a00a05000163030203700c48e21000018662150b051001b3040703600c48e21000018000000fc005068696c697073545620283529000000fd002f551f500e000a2020202020200156020323714f930414051f10121103020116150706230907078301000066030c00100080011d00bc52d01e20b8285540c48e2100001a011d007251d01e206e285500c48e2100001e011d80d0721c1620102c2580c48e2100009e011d8018711c1620582c2500c48e2100009ef33980d072382d40102c4580c48e2100001e0000f2";
}; };
config = { config = {
"${cfg.monitors.primary.name}" = cfg.monitors.primary.config; "${cfg.monitors.primary.name}" = cfg.monitors.primary.config;

View file

@ -59,6 +59,7 @@ in {
powerManagement.enable = true; powerManagement.enable = true;
services.thermald.enable = true; services.thermald.enable = true;
services.tlp.enable = true; services.tlp.enable = true;
services.fwupd.enable = true;
## Mouse ## Mouse
services.libinput.mouse.accelProfile = "flat"; services.libinput.mouse.accelProfile = "flat";

View file

@ -174,7 +174,7 @@ in
workspaceNumbers = true; workspaceNumbers = true;
trayOutput = "primary"; trayOutput = "primary";
} }
// config.lib.stylix.i3.bar; // config.stylix.targets.i3.exportedBarConfig;
in [stylix_bar]; in [stylix_bar];
}; };
}; };

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,18 @@
{ pkgs, lib, osConfig, ... }: { {
imports = lib,
[ ./shell.nix ./emulator.nix ./development.nix ./tools.nix ./yazi.nix ]; osConfig,
...
}: {
imports = [
./shell.nix
./emulator.nix
./development.nix
./tools.nix
./yazi.nix
./helix
./nvim
./zellij
];
config = lib.mkIf osConfig.mods.desktop.enable { config = lib.mkIf osConfig.mods.desktop.enable {
mods.terminal.emulator.enable = lib.mkDefault true; mods.terminal.emulator.enable = lib.mkDefault true;

View file

@ -12,27 +12,12 @@ in {
options.mods.terminal.development.enable = options.mods.terminal.development.enable =
lib.mkEnableOption "enables cli editor"; lib.mkEnableOption "enables cli editor";
options.mods.obsidian.enable =
lib.mkEnableOption "enables obsidian";
imports = [inputs.nvf.homeManagerModules.default];
config = lib.mkIf config.mods.terminal.development.enable { config = lib.mkIf config.mods.terminal.development.enable {
home.packages = with pkgs; [ mods = {
# Nix nvim.enable = true;
nil helix.enable = true;
zellij.enable = true;
# Rust };
rust-analyzer
lldb_18
# Shaders
glsl_analyzer
wgsl-analyzer
# Python
black
];
programs.direnv = { programs.direnv = {
enable = true; enable = true;
@ -40,395 +25,7 @@ in {
enableZshIntegration = lib.mkIf config.mods.terminal.zsh.enable true; enableZshIntegration = lib.mkIf config.mods.terminal.zsh.enable true;
}; };
programs.zellij = { home.sessionVariables.EDITOR = "nvim";
settings = { programs.zsh.sessionVariables.EDITOR = "nvim";
default_mode._args = ["locked"];
show_startup_tips._args = [false];
show_release_notes._args = [false];
};
extraConfig = builtins.readFile ./zellij/config.kdl;
layouts = {
dev = {
layout = {
_children = [
{
default_tab_template = {
_children = [
{
pane = {
size = 1;
borderless = true;
plugin = {
location = "zellij:tab-bar";
};
};
}
{"children" = {};}
{
pane = {
size = 1;
borderless = true;
plugin = {
location = "zellij:status-bar";
};
};
}
];
};
}
{
tab = {
_props = {
name = "project";
focus = true;
};
_children = [
{
pane = {
command = "zsh";
args = ["-c" "direnv exec . nvim"];
};
}
];
};
}
{
tab = {
_props = {
name = "test";
};
_children = [
{
pane = {};
}
];
};
}
{
tab = {
_props = {
name = "git";
};
_children = [
{
pane = {
command = "lazygit";
};
}
];
};
}
];
};
};
};
};
home.sessionVariables.EDITOR = "hx";
programs.zsh.sessionVariables.EDITOR = "hx";
programs.helix = {
enable = true;
package = pkgs.evil-helix;
settings = {
keys.normal = {
"esc" = ["collapse_selection" "keep_primary_selection"];
"Z" = {
"Q" = ":quit!";
"Z" = ":write-quit!";
};
"V" = ["select_mode" "extend_to_line_bounds"];
};
editor = {
line-number = "relative";
completion-replace = true;
bufferline = "always";
rulers = [80];
soft-wrap.enable = true;
indent-guides.render = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
};
languages.language-server = {
glsl.command = "${pkgs.glsl_analyzer}/bin/glsl_analyzer";
wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl-analyzer";
};
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
}
{
name = "rust";
auto-format = true;
formatter.command = "rustfmt";
}
{
name = "glsl";
language-servers = ["glsl"];
}
{
name = "wgsl";
language-servers = ["wgsl"];
}
{
name = "python";
auto-format = true;
formatter = {
command = "${pkgs.black}/bin/black";
args = ["-" "--quiet" "--line-length=79"];
};
}
];
};
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = false;
vimAlias = true;
lsp = {
enable = true;
formatOnSave = true;
};
keymaps = [
{
key = "<leader>w";
mode = ["n"];
action = ":w<CR>";
silent = true;
desc = "Save file";
}
{
key = "gd";
mode = "n";
silent = true;
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
desc = "Go to Definition";
}
];
languages = {
enableFormat = true;
enableTreesitter = true;
enableExtraDiagnostics = true;
nix.enable = true;
nix.lsp.server = "nixd";
markdown.enable = true;
bash.enable = true;
rust.enable = true;
rust.crates.enable = true;
python.enable = true;
python.lsp.server = "pyright";
# python.lsp.package = [(lib.getExe pkgs.ruff) "server"];
python.format.type = "ruff";
clang = {
enable = true;
cHeader = true;
};
};
statusline.lualine.enable = true;
telescope.enable = true;
autocomplete.nvim-cmp.enable = true;
autopairs.nvim-autopairs.enable = true;
tabline.nvimBufferline.enable = true;
treesitter.context.enable = true;
dashboard.alpha.enable = true;
comments.comment-nvim.enable = true;
options = {
tabstop = 2;
shiftwidth = 0;
conceallevel = 2;
};
notes = {
obsidian = lib.mkIf config.mods.obsidian.enable {
enable = true;
setupOpts = {
workspaces = [
{
name = "agentic";
path = "~/work/vaults/agentic";
}
];
completion.nvim_cmp = true;
note_id_func =
lib.generators.mkLuaInline
/*
lua
*/
''
function(title)
local suffix = ""
if title ~= nil then
-- If title is given, transform it into valid file name.
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
else
-- If title is nil, just add 4 random uppercase letters to the suffix.
for _ = 1, 4 do
suffix = suffix .. string.char(math.random(65, 90))
end
end
return tostring(os.date("%Y%m%d%H%M%S")) .. "-" .. suffix
end
'';
ui = {
enable = true;
update_debounce = 200;
max_file_length = 5000;
checkboxes = {
" " = {
char = "󰄱";
hl_group = "ObsidianTodo";
};
"x" = {
char = "";
hl_group = "ObsidianDone";
};
">" = {
char = "";
hl_group = "ObsidianRightArrow";
};
"~" = {
char = "󰰱";
hl_group = "ObsidianTilde";
};
"!" = {
char = "";
hl_group = "ObsidianImportant";
};
};
bullets = {
char = "";
hl_group = "ObsidianBullet";
};
external_link_icon = {
char = "";
hl_group = "ObsidianExtLinkIcon";
};
reference_text = {hl_group = "ObsidianRefText";};
highlight_text = {hl_group = "ObsidianHighlightText";};
tags = {hl_group = "ObsidianTag";};
block_ids = {hl_group = "ObsidianBlockID";};
hl_groups = {
ObsidianTodo = {
bold = true;
fg = "#f78c6c";
};
ObsidianDone = {
bold = true;
fg = "#89ddff";
};
ObsidianRightArrow = {
bold = true;
fg = "#f78c6c";
};
ObsidianTilde = {
bold = true;
fg = "#ff5370";
};
ObsidianImportant = {
bold = true;
fg = "#d73128";
};
ObsidianBullet = {
bold = true;
fg = "#89ddff";
};
ObsidianRefText = {
underline = true;
fg = "#c792ea";
};
ObsidianExtLinkIcon = {fg = "#c792ea";};
ObsidianTag = {
italic = true;
fg = "#89ddff";
};
ObsidianBlockID = {
italic = true;
fg = "#89ddff";
};
ObsidianHighlightText = {bg = "#75662e";};
};
};
};
};
todo-comments.enable = true;
};
spellcheck = {enable = true;};
binds = {
whichKey.enable = true;
cheatsheet.enable = true;
};
git = {
enable = true;
gitsigns.enable = true;
gitsigns.codeActions.enable =
false; # throws an annoying debug message
};
terminal = {
toggleterm = {
enable = true;
lazygit.enable = true;
};
};
utility = {
diffview-nvim.enable = true;
surround.enable = true;
# multicursors.enable = true;
undotree.enable = true;
motion = {
hop.enable = true;
leap.enable = true;
};
};
visuals = {
nvim-web-devicons.enable = true;
nvim-cursorline.enable = true;
cinnamon-nvim.enable = true;
fidget-nvim.enable = true;
highlight-undo.enable = true;
indent-blankline.enable = true;
};
ui = {
borders.enable = true;
noice.enable = true;
colorizer.enable = true;
illuminate.enable = true;
smartcolumn.enable = true;
fastaction.enable = true;
};
};
};
};
}; };
} }

View file

@ -0,0 +1,91 @@
{
pkgs,
lib,
config,
inputs,
...
}: {
options.mods.helix.enable =
lib.mkEnableOption "enables helix";
config = lib.mkIf config.mods.terminal.development.enable {
home.packages = with pkgs; [
# Nix
nil
# Rust
rust-analyzer
lldb_18
# Shaders
glsl_analyzer
wgsl-analyzer
# Python
black
];
programs.helix = {
enable = true;
package = pkgs.evil-helix;
settings = {
keys.normal = {
"esc" = ["collapse_selection" "keep_primary_selection"];
"Z" = {
"Q" = ":quit!";
"Z" = ":write-quit!";
};
"V" = ["select_mode" "extend_to_line_bounds"];
};
editor = {
line-number = "relative";
completion-replace = true;
bufferline = "always";
rulers = [80];
soft-wrap.enable = true;
indent-guides.render = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
};
};
languages.language-server = {
glsl.command = "${pkgs.glsl_analyzer}/bin/glsl_analyzer";
wgsl.command = "${pkgs.wgsl-analyzer}/bin/wgsl-analyzer";
};
languages.language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
}
{
name = "rust";
auto-format = true;
formatter.command = "rustfmt";
}
{
name = "glsl";
language-servers = ["glsl"];
}
{
name = "wgsl";
language-servers = ["wgsl"];
}
{
name = "python";
auto-format = true;
formatter = {
command = "${pkgs.black}/bin/black";
args = ["-" "--quiet" "--line-length=79"];
};
}
];
};
};
}

View file

@ -0,0 +1,149 @@
{
lib,
config,
inputs,
...
}: {
options.mods.nvim.enable =
lib.mkEnableOption "enables nvim";
imports = [
inputs.nvf.homeManagerModules.default
./obsidian.nix
];
config = lib.mkIf config.mods.nvim.enable {
programs.nvf = {
enable = true;
settings = {
vim = {
viAlias = true;
vimAlias = true;
lsp = {
enable = true;
formatOnSave = true;
};
keymaps = [
{
key = "<leader>w";
mode = ["n"];
action = ":w<CR>";
silent = true;
desc = "Save file";
}
{
key = "<leader>q";
mode = ["n"];
action = ":q<CR>";
silent = false;
desc = "Quit";
}
{
key = "gd";
mode = "n";
silent = true;
action = "<cmd>lua vim.lsp.buf.definition()<CR>";
desc = "Go to Definition";
}
];
languages = {
enableFormat = true;
enableTreesitter = true;
enableExtraDiagnostics = true;
nix.enable = true;
nix.lsp.servers = ["nixd"];
markdown.enable = true;
bash.enable = true;
rust.enable = true;
rust.extensions.crates-nvim.enable = true;
python = {
enable = true;
lsp.servers = ["pyright"];
format.type = ["ruff" "black"];
};
clang = {
enable = true;
cHeader = true;
};
};
statusline.lualine.enable = true;
telescope.enable = true;
autocomplete.nvim-cmp.enable = true;
autopairs.nvim-autopairs.enable = true;
tabline.nvimBufferline.enable = true;
treesitter.context.enable = true;
comments.comment-nvim.enable = true;
notes.todo-comments.enable = true;
clipboard = {
enable = true;
providers.xclip.enable = true;
};
mini = {
ai.enable = true;
comment.enable = true;
surround.enable = true;
};
options = {
tabstop = 2;
shiftwidth = 0;
conceallevel = 2;
};
spellcheck = {enable = true;};
binds = {
whichKey.enable = true;
cheatsheet.enable = true;
};
git = {
enable = true;
gitsigns.enable = true;
gitsigns.codeActions.enable =
false; # throws an annoying debug message
};
utility = {
diffview-nvim.enable = true;
surround.enable = true;
undotree.enable = true;
motion = {
hop.enable = true;
leap.enable = true;
};
};
visuals = {
nvim-web-devicons.enable = true;
nvim-cursorline.enable = true;
cinnamon-nvim.enable = true;
fidget-nvim.enable = true;
highlight-undo.enable = true;
indent-blankline.enable = true;
};
ui = {
borders.enable = true;
noice.enable = true;
colorizer.enable = true;
illuminate.enable = true;
smartcolumn.enable = true;
fastaction.enable = true;
};
};
};
};
};
}

View file

@ -0,0 +1,122 @@
{
lib,
config,
...
}: {
options.mods.obsidian.enable =
lib.mkEnableOption "enables obsidian";
config = lib.mkIf config.mods.obsidian.enable {
programs.nvf.settings.vim.notes.obsidian = {
enable = true;
setupOpts = {
workspaces = [
{
name = "agentic";
path = "~/work/vaults/agentic";
}
];
completion.nvim_cmp = true;
note_id_func =
lib.generators.mkLuaInline
# lua
''
function(title)
local suffix = ""
if title ~= nil then
-- If title is given, transform it into valid file name.
suffix = title:gsub(" ", "-"):gsub("[^A-Za-z0-9-]", ""):lower()
else
-- If title is nil, just add 4 random uppercase letters to the suffix.
for _ = 1, 4 do
suffix = suffix .. string.char(math.random(65, 90))
end
end
return tostring(os.date("%Y%m%d%H%M%S")) .. "-" .. suffix
end
'';
ui = {
enable = true;
update_debounce = 200;
max_file_length = 5000;
checkboxes = {
" " = {
char = "󰄱";
hl_group = "ObsidianTodo";
};
"x" = {
char = "";
hl_group = "ObsidianDone";
};
">" = {
char = "";
hl_group = "ObsidianRightArrow";
};
"~" = {
char = "󰰱";
hl_group = "ObsidianTilde";
};
"!" = {
char = "";
hl_group = "ObsidianImportant";
};
};
bullets = {
char = "";
hl_group = "ObsidianBullet";
};
external_link_icon = {
char = "";
hl_group = "ObsidianExtLinkIcon";
};
reference_text = {hl_group = "ObsidianRefText";};
highlight_text = {hl_group = "ObsidianHighlightText";};
tags = {hl_group = "ObsidianTag";};
block_ids = {hl_group = "ObsidianBlockID";};
hl_groups = {
ObsidianTodo = {
bold = true;
fg = "#f78c6c";
};
ObsidianDone = {
bold = true;
fg = "#89ddff";
};
ObsidianRightArrow = {
bold = true;
fg = "#f78c6c";
};
ObsidianTilde = {
bold = true;
fg = "#ff5370";
};
ObsidianImportant = {
bold = true;
fg = "#d73128";
};
ObsidianBullet = {
bold = true;
fg = "#89ddff";
};
ObsidianRefText = {
underline = true;
fg = "#c792ea";
};
ObsidianExtLinkIcon = {fg = "#c792ea";};
ObsidianTag = {
italic = true;
fg = "#89ddff";
};
ObsidianBlockID = {
italic = true;
fg = "#89ddff";
};
ObsidianHighlightText = {bg = "#75662e";};
};
};
};
};
};
}

View file

@ -0,0 +1,102 @@
{
pkgs,
lib,
config,
inputs,
...
}: let
zellij-muon = pkgs.zellij.overrideAttrs (previousAttrs: {
patches = previousAttrs.patches ++ [./zellij/floating_fix.patch];
});
in {
options.mods.zellij.enable =
lib.mkEnableOption "enables zellij";
config = lib.mkIf config.mods.terminal.development.enable {
programs.zellij = {
settings = {
default_mode._args = ["locked"];
show_startup_tips._args = [false];
show_release_notes._args = [false];
};
extraConfig = builtins.readFile ./config.kdl;
layouts = {
dev = {
layout = {
_children = [
{
default_tab_template = {
_children = [
{
pane = {
size = 1;
borderless = true;
plugin = {
location = "zellij:tab-bar";
};
};
}
{"children" = {};}
{
pane = {
size = 1;
borderless = true;
plugin = {
location = "zellij:status-bar";
};
};
}
];
};
}
{
tab = {
_props = {
name = "project";
focus = true;
};
_children = [
{
pane = {
command = "zsh";
args = ["-c" "direnv exec . nvim"];
};
}
];
};
}
{
tab = {
_props = {
name = "test";
};
_children = [
{
pane = {};
}
];
};
}
{
tab = {
_props = {
name = "git";
};
_children = [
{
pane = {
command = "lazygit";
};
}
];
};
}
];
};
};
};
};
};
}