Compare commits

...

27 Commits

Author SHA1 Message Date
dim
fe6455b4f2
change hyprland to niri
All checks were successful
/ update-readme (push) Successful in 26s
2025-11-30 13:14:41 +07:00
dim
28f82915cf
change from nixvim to nvf 2025-11-09 21:12:03 +07:00
dim
2ffb2b1ef5
update flake 2025-11-09 21:07:21 +07:00
dim
0a52297be4
update flake 2025-11-05 08:10:38 +07:00
dim
5c4712a5e2
update window rule 2025-10-26 22:12:37 +07:00
dim
e04aca77b3
update flake 2025-10-11 08:24:51 +07:00
dim
cb5055363a
update office and hyprland config 2025-10-11 08:24:26 +07:00
dim
4222f21a6d
update tuigreet and flake 2025-09-14 08:22:53 +07:00
dim
0dfc051591
update flakes 2025-08-07 09:10:02 +07:00
dim
6c857ee393
update config 2025-08-07 09:09:38 +07:00
dim
b84b427fca update tlp and bar 2025-07-04 14:21:21 +07:00
dim
ac8bc15318 update nvim and hyprpanel config 2025-03-20 09:02:01 +07:00
dim
e87bf66688 update flake 2025-03-05 11:32:24 +07:00
dim
19cc2796d0 update hyrpland config 2025-03-05 11:32:09 +07:00
dim
a8f1d7e717 update flake 2025-03-01 08:14:34 +07:00
dim
7a35643080 add kmscon 2025-03-01 08:12:27 +07:00
dim
4225eea9bb add devenv, remove sops 2025-03-01 08:12:12 +07:00
dim
6e60476521 update flake 2025-02-15 08:31:35 +07:00
dim
62c029d3aa update config 2025-02-15 08:31:12 +07:00
dim
5ac628739e update flake 2025-02-08 13:34:01 +07:00
dim
2eaa716f66 update nvim, hyprpanel 2025-02-08 13:33:41 +07:00
dim
8fcccee072 update flake and hosts file 2025-01-30 21:38:38 +07:00
dim
43ffa50146 disable plymouth, change kernel, update neovim config 2025-01-30 21:38:10 +07:00
dim
7b62ce1e32 update flake 2025-01-23 16:40:37 +07:00
dim
516cd60e71 update thunar, hyprpanel, and vim 2025-01-23 16:40:22 +07:00
dim
491b417827 update wallpaper and remove nixy-wallpaper input 2025-01-16 08:51:55 +07:00
dim
8c7a786456 update hyprpanel and plymouth 2025-01-12 17:31:35 +07:00
65 changed files with 2916 additions and 1299 deletions

1129
flake.lock

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,6 @@
{
description = ''
Nixy is a NixOS configuration with home-manager, secrets and custom theming all in one place.
It's a simple way to manage your system configuration and dotfiles.
Dhimas config based on nixy
'';
inputs = {
@ -19,40 +18,32 @@
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixy-wallpapers = {
url = "github:anotherhadi/nixy-wallpapers";
flake = false;
};
hyprland.url = "github:/hyprwm/Hyprland?submodules=1";
hyprland.url = "github:/hyprwm/hyprland";
hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent";
hyprsunset.url = "github:hyprwm/hyprsunset";
hyprpanel = {
url = "github:Jas-SinghFSU/HyprPanel";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix.url = "github:danth/stylix";
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser.url = "github:0xc000022070/zen-browser-flake";
nvf.url = "github:notashelf/nvf";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, ... }: {
outputs = inputs @ {nixpkgs, ...}: {
nixosConfigurations = {
dark = # CHANGEME: This should match the 'hostname' in your variables.nix file
dark =
# CHANGEME: This should match the 'hostname' in your variables.nix file
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{
nixpkgs.overlays = [ inputs.hyprpanel.overlay ];
_module.args = { inherit inputs; };
}
{_module.args = {inherit inputs;};}
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x270 # CHANGEME: check https://github.com/NixOS/nixos-hardware
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix

View File

@ -1,4 +1,8 @@
{ pkgs, inputs, ... }: {
{
pkgs,
inputs,
...
}: {
programs.firefox = {
enable = true;
profiles.dark = {
@ -49,49 +53,53 @@
search = {
force = true;
default = "Searx";
order = [ "Searx" "Google" ];
order = ["Searx" "google"];
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@np"];
};
"NixOS Wiki" = {
urls = [{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
urls = [
{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}
];
icon = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
definedAliases = ["@nw"];
};
"Searx" = {
urls = [{
template = "https://searx.aicampground.com/?q={searchTerms}";
}];
iconUpdateURL = "https://nixos.wiki/favicon.png";
urls = [
{
template = "https://searx.aicampground.com/?q={searchTerms}";
}
];
icon = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@searx" ];
definedAliases = ["@searx"];
};
"Bing".metaData.hidden = true;
"Google".metaData.alias =
"@g"; # builtin engines only support specifying one additional alias
bing.metaData.hidden = true;
google.metaData.alias = "@g"; # builtin engines only support specifying one additional alias
};
};
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
extensions.packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
bitwarden
multi-account-containers
zotero-connector
@ -99,4 +107,5 @@
];
};
};
stylix.targets.firefox.profileNames = ["dark"];
}

View File

@ -0,0 +1,8 @@
{
programs.ghostty = {
enable = true;
enableZshIntegration = true;
installVimSyntax = true;
installBatSyntax = true;
};
}

View File

@ -1,12 +1,12 @@
{ config, ... }:
{ config, pkgs, ... }:
let
username = config.var.git.username;
email = config.var.git.email;
in {
home.packages = with pkgs; [ tea ];
programs.git = {
enable = true;
userName = username;
userEmail = email;
signing.key = "D8EDD65BCB54AC8719BE4EBD8D5D880EB08F1544";
ignores = [
".cache/"
".DS_Store"
@ -19,37 +19,44 @@ in {
"result"
"result-*"
];
extraConfig = {
settings = {
user = {
name = username;
email = email;
};
aliases = {
essa = "push --force";
co = "checkout";
fuck = "commit --amend -m";
c = "commit -m";
ca = "commit -am";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
d = "diff";
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
st = "status";
br = "branch";
df =
"!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
hist = ''
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
llog = ''
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
edit-unmerged =
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
};
init.defaultBranch = "main";
push.autoSetupRemote = true;
color.ui = "1";
};
aliases = {
essa = "push --force";
co = "checkout";
fuck = "commit --amend -m";
c = "commit -m";
ca = "commit -am";
forgor = "commit --amend --no-edit";
graph = "log --all --decorate --graph --oneline";
oops = "checkout --";
l = "log";
r = "rebase";
s = "status --short";
ss = "status";
d = "diff";
ps = "!git push origin $(git rev-parse --abbrev-ref HEAD)";
pl = "!git pull origin $(git rev-parse --abbrev-ref HEAD)";
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
st = "status";
br = "branch";
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
hist = ''
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
llog = ''
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
edit-unmerged =
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
commit.gpgSign = true;
};
};
}

View File

@ -0,0 +1,18 @@
{
inputs,
pkgs,
...
}: {
programs.helix = {
enable = true;
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt}/bin/nixfmt";
}
];
};
};
}

View File

@ -27,4 +27,5 @@
tab_bar_style = "powerline";
};
};
stylix.targets.kitty.variant256Colors = true;
}

View File

@ -0,0 +1,24 @@
{
inputs,
pkgs,
...
}: {
imports = [
inputs.nvf.homeManagerModules.default
./options.nix
./languages.nix
./picker.nix
./snacks.nix
./keymaps.nix
./utils.nix
./mini.nix
];
programs.nvf = {
enable = true;
settings.vim = {
startPlugins = [
pkgs.vimPlugins.vim-kitty-navigator
];
};
};
}

View File

@ -0,0 +1,173 @@
{
programs.nvf.settings.vim = {
globals.mapleader = " ";
binds = {
whichKey = {
enable = true;
# TODO: registers
register = { };
};
};
keymaps = [
# General Mappings
{
key = "s";
mode = "n";
silent = true;
action = "<cmd>lua require('flash').jump()<cr>";
desc = "Flash";
}
{
key = "K";
mode = "n";
silent = true;
action = "<cmd>lua vim.lsp.buf.hover()<cr>";
desc = "LSP Hover";
}
{
key = "<C-tab>";
mode = "n";
silent = true;
action = "<cmd>bnext<cr>";
desc = "Next Buffer";
}
# Kitty navigator
{
key = "<C-h>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateLeft<cr>";
}
{
key = "<C-j>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateDown<cr>";
}
{
key = "<C-k>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateUp<cr>";
}
{
key = "<C-l>";
mode = "n";
silent = true;
action = "<cmd>KittyNavigateRight<cr>";
}
# Disable Arrow Keys in Normal Mode
{
key = "<Up>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Up Arrow";
}
{
key = "<Down>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Down Arrow";
}
{
key = "<Left>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Left Arrow";
}
{
key = "<Right>";
mode = "n";
silent = true;
action = "<Nop>";
desc = "Disable Right Arrow";
}
# UI
{
key = "<leader>uw";
mode = "n";
silent = true;
action = "<cmd>set wrap!<cr>";
desc = "Toggle word wrapping";
}
{
key = "<leader>ul";
mode = "n";
silent = true;
action = "<cmd>set linebreak!<cr>";
desc = "Toggle linebreak";
}
{
key = "<leader>us";
mode = "n";
silent = true;
action = "<cmd>set spell!<cr>";
desc = "Toggle spellLazyGitcheck";
}
{
key = "<leader>uc";
mode = "n";
silent = true;
action = "<cmd>set cursorline!<cr>";
desc = "Toggle cursorline";
}
{
key = "<leader>un";
mode = "n";
silent = true;
action = "<cmd>set number!<cr>";
desc = "Toggle line numbers";
}
{
key = "<leader>ur";
mode = "n";
silent = true;
action = "<cmd>set relativenumber!<cr>";
desc = "Toggle relative line numbers";
}
{
key = "<leader>ut";
mode = "n";
silent = true;
action = "<cmd>set showtabline=2<cr>";
desc = "Show tabline";
}
{
key = "<leader>uT";
mode = "n";
silent = true;
action = "<cmd>set showtabline=0<cr>";
desc = "Hide tabline";
}
# Windows
{
key = "<leader>ws";
mode = "n";
silent = true;
action = "<cmd>split<cr>";
desc = "Split";
}
{
key = "<leader>wv";
mode = "n";
silent = true;
action = "<cmd>vsplit<cr>";
desc = "VSplit";
}
{
key = "<leader>wd";
mode = "n";
silent = true;
action = "<cmd>close<cr>";
desc = "Close";
}
];
};
}

View File

@ -0,0 +1,99 @@
{ lib, pkgs, ... }: {
programs.nvf.settings.vim = {
diagnostics = {
enable = true;
config = {
signs = {
text = {
"vim.diagnostic.severity.Error" = " ";
"vim.diagnostic.severity.Warn" = " ";
"vim.diagnostic.severity.Hint" = " ";
"vim.diagnostic.severity.Info" = " ";
};
};
underline = true;
update_in_insert = true;
virtual_text = {
format = lib.generators.mkLuaInline
# lua
''
function(diagnostic)
return string.format("%s", diagnostic.message)
--return string.format("%s (%s)", diagnostic.message, diagnostic.source)
end
'';
};
};
nvim-lint = { enable = true; };
};
syntaxHighlighting = true;
treesitter = {
enable = true;
autotagHtml = true;
context.enable = true;
highlight.enable = true;
grammars = with pkgs.vimPlugins.nvim-treesitter.builtGrammars;
[
typescript # in language settings only tsx gets enabled, not typescript
];
};
lsp = {
enable = true;
trouble.enable = true;
lspSignature.enable = true;
lspconfig.enable = true;
formatOnSave = true;
inlayHints.enable = true;
null-ls.enable = true;
servers.nixd.settings.nil.nix.autoArchive = true;
otter-nvim = {
enable = true;
setupOpts = {
buffers.set_filetype = true;
lsp = { diagnostic_update_event = [ "BufWritePost" "InsertLeave" ]; };
};
};
lspkind.enable = true;
lspsaga = {
enable = true;
setupOpts = {
ui = { code_action = ""; };
lightbulb = {
sign = false;
virtual_text = true;
};
breadcrumbs.enable = false;
};
};
};
languages = {
enableDAP = true;
enableExtraDiagnostics = true;
enableFormat = true;
enableTreesitter = true;
php = {
enable = true;
lsp.server = "intelephense";
};
go.enable = true;
markdown = {
enable = true;
format.type = "prettierd";
extensions = { markview-nvim = { enable = true; }; };
extraDiagnostics.enable = true;
};
ts = {
enable = false;
extensions.ts-error-translator.enable = true;
};
css.enable = true;
sql.enable = true;
html.enable = true;
bash.enable = true;
nix.enable = true;
tailwind.enable = true;
};
formatter = { conform-nvim = { enable = true; }; };
};
}

View File

@ -0,0 +1,13 @@
{
programs.nvf.settings.vim.mini = {
starter.enable = true;
comment.enable = true;
# cursorword.enable = true;
icons.enable = true;
indentscope.enable = true;
notify.enable = true;
pairs.enable = true;
diff.enable = true;
git.enable = true;
};
}

View File

@ -0,0 +1,40 @@
{ lib, ... }: {
programs.nvf.settings.vim = {
viAlias = false;
vimAlias = true;
withNodeJs = true;
# syntaxHighlighting = true;
options = {
autoindent = true;
smartindent = true;
shiftwidth = 2;
foldlevel = 99;
foldcolumn = "auto:1";
mousescroll = "ver:1,hor:1";
mousemoveevent = true;
fillchars = "eob:,fold: ,foldopen:,foldsep:,foldclose:";
signcolumn = "yes";
tabstop = 2;
softtabstop = 2;
wrap = false;
};
globals = {
navic_silence = true; # navic tries to attach multiple LSPs and fails
suda_smart_edit = 1; # use super user write automatically
neovide_scale_factor = 0.7;
neovide_cursor_animation_length = 0.1;
neovide_cursor_short_animation_length = 0;
};
clipboard = {
enable = true;
registers = "unnamedplus";
providers.wl-copy.enable = true;
};
theme = {
enable = true;
name = lib.mkForce "catppuccin";
style = lib.mkForce "mocha";
transparent = lib.mkForce true;
};
};
}

View File

@ -0,0 +1,257 @@
{
programs.nvf.settings.vim = {
utility = {
oil-nvim.enable = true;
snacks-nvim = {
setupOpts = {
picker.enabled = true;
explorer.enabled = true;
};
};
};
keymaps = [
# Top Pickers & Explorer
{
key = "<leader> ";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.smart()<cr>";
desc = "Smart Find Files";
}
{
key = "<leader>,";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.buffers()<cr>";
desc = "Buffers";
}
{
key = "<leader>/";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep()<cr>";
desc = "Grep";
}
{
key = "<leader>:";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.command_history()<cr>";
desc = "Command History";
}
{
key = "<leader>e";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.explorer()<cr>";
desc = "File Explorer";
}
{
key = "-";
mode = "n";
silent = true;
action = "<cmd>Oil<cr>";
desc = "Oil";
}
# Find
{
key = "<leader>fb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.buffers()<cr>";
desc = "Buffers";
}
{
key = "<leader>fc";
mode = "n";
silent = true;
action = ''
<cmd>lua Snacks.picker.files({ cwd = vim.fn.stdpath("config") })<cr>'';
desc = "Find Config File";
}
{
key = "<leader>ff";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.files()<cr>";
desc = "Find Files";
}
{
key = "<leader>fg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_files()<cr>";
desc = "Find Git Files";
}
{
key = "<leader>fp";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.projects()<cr>";
desc = "Projects";
}
{
key = "<leader>fr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.recent()<cr>";
desc = "Recent";
}
{
key = "<leader>fn";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.notifications()<cr>";
desc = "Notification History";
}
{
key = "<leader>fe";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.icons()<cr>";
desc = "Emoji";
}
# Git
{
key = "<leader>gb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_branches()<cr>";
desc = "Git Branches";
}
{
key = "<leader>gL";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_log()<cr>";
desc = "Git Log Line";
}
{
key = "<leader>gs";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_status()<cr>";
desc = "Git Status";
}
{
key = "<leader>gS";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_stash()<cr>";
desc = "Git Stash";
}
{
key = "<leader>gd";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_diff()<cr>";
desc = "Git Diff (Hunks)";
}
{
key = "<leader>gf";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.git_log_file()<cr>";
desc = "Git Log File";
}
# Grep
{
key = "<leader>sb";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lines()<cr>";
desc = "Buffer Lines";
}
{
key = "<leader>st";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.todo_comments()<cr>";
desc = "Todos";
}
{
key = "<leader>sB";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep_buffers()<cr>";
desc = "Grep Open Buffers";
}
{
key = "<leader>sg";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep()<cr>";
desc = "Grep";
}
{
key = "<leader>sw";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.grep_word()<cr>";
desc = "Visual selection or word";
}
{
key = "<leader>sr";
mode = "n";
silent = true;
action = "<cmd>nohlsearch<cr>";
desc = "Reset search";
}
# LSP
{
key = "gd";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_definitions()<cr>";
desc = "Goto Definition";
}
{
key = "gD";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_declarations()<cr>";
desc = "Goto Declaration";
}
{
key = "gr";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_references()<cr>";
desc = "References";
nowait = true;
}
{
key = "gI";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_implementations()<cr>";
desc = "Goto Implementation";
}
{
key = "gy";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_type_definitions()<cr>";
desc = "Goto Type Definition";
}
{
key = "<leader>ss";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_symbols()<cr>";
desc = "LSP Symbols";
}
{
key = "<leader>sS";
mode = "n";
silent = true;
action = "<cmd>lua Snacks.picker.lsp_workspace_symbols()<cr>";
desc = "LSP Workspace Symbols";
}
];
};
}

View File

@ -0,0 +1,19 @@
{
programs.nvf.settings.vim.utility.snacks-nvim = {
enable = true;
setupOpts = {
image = {
enabled = true;
doc = {
inline = false;
float = true;
};
};
quickfile.enabled = true;
statuscolumn.enabled = true;
zen.enabled = true;
bufdelete.enabled = true;
gitsigns.enabled = true;
};
};
}

View File

@ -0,0 +1,49 @@
{ pkgs, ... }: {
programs.nvf.settings.vim = {
undoFile.enable = true;
utility = {
motion.flash-nvim.enable = true;
outline.aerial-nvim.enable = true;
};
tabline.nvimBufferline.enable = true;
notes.todo-comments.enable = true;
assistant.copilot = {
enable = false;
cmp.enable = true;
};
statusline.lualine.enable = true;
autocomplete = {
nvim-cmp = {
enable = true;
sources = {
buffer = "[Buffer]";
nvim-cmp = null;
path = "[Path]";
};
sourcePlugins = [ pkgs.vimPlugins.cmp-cmdline ];
};
};
snippets.luasnip.enable = true;
ui = {
noice.enable = true;
colorizer.enable = true;
};
git = {
enable = true;
gitsigns.enable = true;
};
terminal.toggleterm = {
enable = true;
lazygit = {
enable = true;
mappings.open = "<leader>gl";
};
};
visuals = {
rainbow-delimiters.enable = true;
nvim-scrollbar = { enable = false; };
};
};
}

View File

@ -0,0 +1,186 @@
{
programs.nixvim = {
autoGroups = {
auto_quit.clear = true;
autoview.clear = true;
checktime.clear = true;
create_dir.clear = true;
editorconfig_filetype.clear = true;
file_user_events.clear = true;
highlighturl.clear = true;
highlightyank.clear = true;
large_buf_settings.clear = true;
q_close_windows.clear = true;
terminal_settings.clear = true;
unlist_quickfix.clear = true;
};
autoCmd = [
# auto_quit
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L18-L46
{
desc =
"Quit neovim if more than one window is open and only sidebar windows are list";
event = "BufEnter";
group = "auto_quit";
callback.__raw = ''
function()
local wins = vim.api.nvim_tabpage_list_wins(0)
-- Both neo-tree and aerial will auto-quit if there is only a single window left
if #wins <= 1 then return end
local sidebar_fts = { aerial = true, ["neo-tree"] = true }
for _, winid in ipairs(wins) do
if vim.api.nvim_win_is_valid(winid) then
local bufnr = vim.api.nvim_win_get_buf(winid)
local filetype = vim.bo[bufnr].filetype
-- If any visible windows are not sidebars, early return
if not sidebar_fts[filetype] then
return
-- If the visible window is a sidebar
else
-- only count filetypes once, so remove a found sidebar from the detection
sidebar_fts[filetype] = nil
end
end
end
if #vim.api.nvim_list_tabpages() > 1 then
vim.cmd.tabclose()
else
vim.cmd.qall()
end
end
'';
}
# autoview
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L49-L70
{
desc = "Save view with mkview for real files";
event = [ "BufWinLeave" "BufWritePost" "WinLeave" ];
group = "autoview";
callback.__raw = ''
function(event)
if vim.b[event.buf].view_activated then vim.cmd.mkview { mods = { emsg_silent = true } } end
end
'';
}
{
desc =
"Try to load file view if available and enable view saving for real files";
event = "BufWinEnter";
group = "autoview";
callback.__raw = ''
function(event)
if not vim.b[event.buf].view_activated then
local filetype = vim.bo[event.buf].filetype
local buftype = vim.bo[event.buf].buftype
local ignore_filetypes = { "gitcommit", "gitrebase", "svg", "hgcommit" }
if buftype == "" and filetype and filetype ~= "" and not vim.tbl_contains(ignore_filetypes, filetype) then
vim.b[event.buf].view_activated = true
vim.cmd.loadview { mods = { emsg_silent = true } }
end
end
end
'';
}
# checktime
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L118-L122
{
desc = "Check if buffers changed on editor focus";
event = [ "FocusGained" "TermClose" "TermLeave" ];
group = "checktime";
command = "checktime";
}
# editorconfig_filetype
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L135-L144
{
desc =
"Configure editorconfig after filetype detection to override `ftplugin`s";
event = "FileType";
group = "editorconfig_filetype";
callback.__raw = ''
function(args)
if vim.F.if_nil(vim.b.editorconfig, vim.g.editorconfig, true) then
local editorconfig_avail, editorconfig = pcall(require, "editorconfig")
if editorconfig_avail then editorconfig.config(args.buf) end
end
end
'';
}
# highlightyank
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L206-L211
{
desc = "Highlight yanked text";
event = "TextYankPost";
group = "highlightyank";
pattern = "*";
callback.__raw = ''
function()
vim.highlight.on_yank()
end
'';
}
# q_close_windows
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L242-L255
{
desc = "Make q close help, man, quickfix, dap floats";
event = "BufWinEnter";
group = "q_close_windows";
callback.__raw = ''
function(event)
if vim.tbl_contains({ "help", "nofile", "quickfix" }, vim.bo[event.buf].buftype) then
vim.keymap.set("n", "q", "<Cmd>close<CR>", {
desc = "Close window",
buffer = event.buf,
silent = true,
nowait = true,
})
end
end
'';
}
# terminal_settings
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L258-L266
{
desc = "Disable line number/fold column/sign column for terminals";
event = "TermOpen";
group = "terminal_settings";
callback.__raw = ''
function()
vim.opt_local.number = false
vim.opt_local.relativenumber = false
vim.opt_local.foldcolumn = "0"
vim.opt_local.signcolumn = "no"
end
'';
}
# unlist_quickfix
# https://github.com/AstroNvim/AstroNvim/blob/v4.7.7/lua/astronvim/plugins/_astrocore_autocmds.lua#L270-L275
{
desc = "Unlist quickfix buffers";
event = "FileType";
group = "unlist_quickfix";
pattern = "qf";
callback.__raw = ''
function()
vim.opt_local.buflisted = false
end
'';
}
];
};
}

View File

@ -1,13 +1,14 @@
# Nixvim is a NixOS module that installs and configures Neovim
{ inputs, ... }: {
imports = [
inputs.nixvim.homeManagerModules.nixvim
inputs.nixvim.homeModules.nixvim
./plugins/cmp.nix
./plugins/dashboard.nix
./plugins/lsp.nix
./plugins/markdown.nix
./plugins/tree.nix
./plugins/ui.nix
./plugins/lualine.nix
./plugins/utils.nix
./plugins/dap.nix
./plugins/telescope.nix
@ -17,6 +18,7 @@
./options.nix
./keymaps.nix
./autocmds.nix
];
programs.nixvim.enable = true;

View File

@ -313,6 +313,16 @@
action = "<cmd>lua require('dap').toggle_breakpoint()<CR>";
options.desc = "Toggle breakpoint";
}
{
key = "<S-l>";
action = "<cmd>BufferLineCycleNext<CR>";
options.desc = "Go to next buffer";
}
{
key = "<S-h>";
action = "<cmd>BufferLineCyclePrev<CR>";
options.desc = "Go to previous buffer";
}
];
};
}

View File

@ -1,40 +1,149 @@
{
programs.nixvim.globals.mapleader = " ";
programs.nixvim.opts = {
updatetime = 50; # Faster completion
programs.nixvim = {
globals.mapleader = " ";
opts = {
autoindent = true;
number = true;
relativenumber = true;
smartindent = true;
autoindent = true;
clipboard = "unnamed,unnamedplus";
incsearch = true;
hlsearch = true;
wildmode = "list:longest";
scrolloff = 8;
expandtab = true;
tabstop = 2;
softtabstop = 2;
shiftwidth = 2;
smartindent = true;
breakindent = true;
swapfile = false;
conceallevel = 3;
clipboard = "unnamed,unnamedplus";
ignorecase = true;
incsearch = true;
hlsearch = true;
smartcase = true;
wildmode = "list:longest";
completeopt = [ "menuone" "noselect" "noinsert" ];
signcolumn = "yes";
cursorline = false;
scrolloff = 8;
mouse = "a";
termguicolors = true;
showmode = false;
# Don't stop backspace at insert
backspace.__raw = ''
vim.list_extend(vim.opt.backspace:get(), { "nostop" })
'';
wrap = false;
linebreak = true;
# Keep visual indentation on wrapped lines
breakindent = true;
swapfile = false;
undofile = true;
conceallevel = 3;
# Hide command line unless needed
cmdheight = 0;
# Insert mode completion options
completeopt = [ "menu" "menuone" "noselect" ];
# Raise a dialog asking if you wish to save the current file(s)
confirm = true;
# Copy previous indentation on autoindenting
copyindent = true;
# Highlight current line
cursorline = true;
# Enable linematch diff algorithm
diffopt.__raw = ''
vim.list_extend(vim.opt.diffopt:get(), { "algorithm:histogram", "linematch:60" })
'';
# Expand <Tab> to spaces
expandtab = true;
# Disable `~` on nonexistent lines
fillchars = { eob = " "; };
# Enable fold with all code unfolded
foldcolumn = "1";
foldenable = true;
foldlevel = 99;
foldlevelstart = 99;
# Ignore case in search patterns
ignorecase = true;
# Show substitution preview in split window
inccommand = "split";
# Infer casing on word completion
infercase = true;
# Global statusline
laststatus = 3;
# Wrap lines at 'breakat'
linebreak = true;
# Enable mouse support
mouse = "a";
# Show line numbers
number = true;
# Preserve indentation as much as possible
preserveindent = true;
# Height of the popup menu
pumheight = 10;
# Display line numbers relative to current line
relativenumber = true;
# Minimal number of lines to keep around the cursor
# This has the effect to move the view along with current line
#scrolloff = 999;
# Number of spaces to use for indentation
shiftwidth = 2;
# Disable search count wrap and startup messages
shortmess.__raw = ''
vim.tbl_deep_extend("force", vim.opt.shortmess:get(), { s = true, I = true })
'';
# Disable showing modes in command line
showmode = false;
# Show signs column
signcolumn = "yes";
# Override ignorecase if search pattern contains uppercase characters
smartcase = true;
# Number of spaces input on <Tab>
softtabstop = 2;
# Open horizontal split below (:split)
splitbelow = true;
# Open vertical split to the right (:vsplit)
splitright = true;
# Number of spaces to represent a <Tab>
tabstop = 2;
# Enables 24-bit RGB color
termguicolors = true;
# Shorter timeout duration
timeoutlen = 500;
# Set window title to the filename
title = true;
# Save undo history to undo file (in $XDG_STATE_HOME/nvim/undo)
undofile = true;
viewoptions.__raw = ''
vim.tbl_filter(function(val) return val ~= "curdir" end, vim.opt.viewoptions:get())
'';
# Enable virtual edit in visual block mode
# This has the effect of selecting empty cells beyond lines boundaries
virtualedit = "block";
# Disable line wrapping
wrap = false;
# Disable making a backup before overwriting a file
writebackup = false;
};
};
programs.nixvim.extraConfigLuaPost = ''
vim.g.neovide_scale_factor = 1.0

View File

@ -1,6 +1,7 @@
{
programs.nixvim.plugins = {
luasnip.enable = true;
friendly-snippets.enable = true;
cmp-buffer = { enable = true; };
cmp-emoji = { enable = true; };
cmp-nvim-lsp = { enable = true; };
@ -68,7 +69,6 @@
Calendar = "",
Watch = "󰥔",
Package = "",
Copilot = "",
Codeium = "",
TabNine = "",
}
@ -112,6 +112,5 @@
};
};
};
};
}

View File

@ -16,13 +16,9 @@
texthl = "DapLogPoint";
};
};
extensions = {
dap-go = {
enable = true;
delve.path = "${pkgs.delve}/bin/dlv";
};
dap-ui = { enable = true; };
dap-virtual-text = { enable = true; };
};
};
programs.nixvim.plugins = {
dap-virtual-text.enable = true;
dap-ui.enable = true;
};
}

View File

@ -50,7 +50,17 @@ in {
val = "󰭎 Find file";
on_press.__raw = "function() vim.cmd[[Telescope find_files]] end";
opts = {
shortcut = "nf";
keymap = [
"n"
"f"
":Telescope find_files <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "f";
position = "center";
cursor = 3;
width = 50;
@ -64,7 +74,17 @@ in {
val = " New file";
on_press.__raw = "function() vim.cmd[[ene]] end";
opts = {
shortcut = "nn";
keymap = [
"n"
"n"
":ene <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "n";
position = "center";
cursor = 3;
width = 50;
@ -78,7 +98,17 @@ in {
val = " NixOs Config";
on_press.__raw = "function() vim.cmd[[Neotree ${configDir}]] end";
opts = {
shortcut = "nc";
keymap = [
"n"
"c"
":Neotree ${configDir} <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "c";
position = "center";
cursor = 3;
width = 50;
@ -93,7 +123,17 @@ in {
on_press.__raw =
"function() vim.cmd[[e ${configDir}/docs/KEYBINDINGS.md]] end";
opts = {
shortcut = "nc";
keymap = [
"n"
"b"
":e ${configDir}/docs/KEYBINDINGS.md <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "b";
position = "center";
cursor = 3;
width = 50;
@ -107,7 +147,17 @@ in {
val = " Recently used";
on_press.__raw = "function() vim.cmd[[Telescope oldfiles]] end";
opts = {
shortcut = "no";
keymap = [
"n"
"o"
":Telescope oldfiles <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "o";
position = "center";
cursor = 3;
width = 50;
@ -121,7 +171,17 @@ in {
val = "󰱽 Find text";
on_press.__raw = "function() vim.cmd[[Telescope live_grep]] end";
opts = {
shortcut = "nt";
keymap = [
"n"
"t"
":Telescope live_grep <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "t";
position = "center";
cursor = 3;
width = 50;
@ -135,7 +195,17 @@ in {
val = "󰩈 Quit Neovim";
on_press.__raw = "function() vim.cmd[[qa]] end";
opts = {
shortcut = "nq";
keymap = [
"n"
"q"
":qa <CR>"
{
noremap = true;
silent = true;
nowait = true;
}
];
shortcut = "q";
position = "center";
cursor = 3;
width = 50;

View File

@ -40,7 +40,7 @@
enable = true;
sources = {
diagnostics = {
golangci_lint.enable = true;
golangci_lint.enable = false;
statix.enable = true;
};
formatting = {
@ -53,7 +53,7 @@
shfmt.enable = true;
# golines.enable = true;
# gofumpt.enable = true;
phpcsfixer.enable = true;
# phpcsfixer.enable = true;
elm_format.enable = true;
blade_formatter = {
enable = true;

View File

@ -0,0 +1,32 @@
{
programs.nixvim.plugins.lualine = {
enable = true;
settings = {
options.disabled_filetypes.statusline =
[ "dashboard" "alpha" "neo-tree" ];
options = { show_filename_only = false; };
alwaysDivideMiddle = true;
globalstatus = true;
ignoreFocus = [ "neo-tree" ];
extensions = [ "fzf" ];
theme = "auto";
componentSeparators = {
left = "|";
right = "|";
};
sectionSeparators = {
left = ""; # 
right = ""; # 
};
sections = {
lualine_a = [ "mode" ];
lualine_b = [ "branch" "diff" "diagnostics" ];
lualine_c = [ "filename" ];
lualine_x = [ "filetype" ];
lualine_y = [ "progress" "selectioncount" ];
lualine_z = [ ''" " .. os.date("%R")'' ];
};
};
};
}

View File

@ -1,4 +1,3 @@
# The render-markdown.nvim plugin is a plugin that renders markdown files in a neovim in a more readable way.
{ config, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
@ -9,112 +8,113 @@ in {
programs.nixvim = {
plugins.mkdnflow = {
enable = true;
modules = { conceal = false; };
toDo.symbols = [ " " "-" "x" "!" "/" ];
mappings = {
MkdnCreateLink = false;
MkdnCreateLinkFromClipboard = {
key = "<leader>ml";
modes = [ "n" "v" ];
enable = false;
settings = {
modules = { conceal = false; };
to_do.symbols = [ " " "-" "x" "!" "/" ];
# mappings = {
# MkdnCreateLink = false;
# MkdnCreateLinkFromClipboard = {
# key = "<leader>ml";
# modes = [ "n" "v" ];
# };
# MkdnDecreaseHeading = {
# key = "<leader>m-";
# modes = "n";
# };
# MkdnDestroyLink = false;
# MkdnEnter = {
# key = "<CR>";
# modes = [ "v" ];
# };
# MkdnExtendList = false;
# MkdnFoldSection = {
# key = "<leader>mf";
# modes = "n";
# };
# MkdnUnfoldSection = {
# key = "<leader>mF";
# modes = "n";
# };
# MkdnFollowLink = {
# key = "gd";
# modes = "n";
# };
# MkdnGoBack = false;
# MkdnGoForward = false;
# MkdnIncreaseHeading = {
# key = "<leader>m+";
# modes = "n";
# };
# MkdnMoveSource = false;
# MkdnNewListItem = false;
# MkdnNewListItemAboveInsert = {
# key = "O";
# modes = "n";
# };
# MkdnNewListItemBelowInsert = {
# key = "o";
# modes = "n";
# };
# MkdnNextHeading = {
# key = "<leader>m#";
# modes = "n";
# };
# MkdnNextLink = false;
# MkdnPrevLink = false;
# MkdnPrevHeading = {
# key = "<leader>m*";
# modes = "n";
# };
# MkdnSTab = false;
# MkdnTab = false;
# MkdnTableNewColAfter = {
# key = "<leader>mc";
# modes = "n";
# };
# MkdnTableNewColBefore = {
# key = "<leader>mC";
# modes = "n";
# };
# MkdnTableNewRowAbove = {
# key = "<leader>mR";
# modes = "n";
# };
# MkdnTableNewRowBelow = {
# key = "<leader>mr";
# modes = "n";
# };
# MkdnTableNextCell = {
# key = "<S-Tab>";
# modes = "n";
# };
# MkdnTableNextRow = false;
# MkdnTablePrevCell = {
# key = "<S-Tab>";
# modes = "n";
# };
# MkdnTablePrevRow = false;
# MkdnToggleToDo = {
# key = "<C-Space>";
# modes = [ "n" "v" ];
# };
# MkdnUpdateNumbering = {
# key = "<leader>mn";
# modes = "n";
# };
# MkdnYankAnchorLink = {
# key = "ya";
# modes = "n";
# };
# MkdnYankFileAnchorLink = {
# key = "yfa";
# modes = "n";
# };
# };
tables = {
formatOnMove = true;
trimWhitespace = true;
};
MkdnDecreaseHeading = {
key = "<leader>m-";
modes = "n";
};
MkdnDestroyLink = false;
MkdnEnter = {
key = "<CR>";
modes = [ "v" ];
};
MkdnExtendList = false;
MkdnFoldSection = {
key = "<leader>mf";
modes = "n";
};
MkdnUnfoldSection = {
key = "<leader>mF";
modes = "n";
};
MkdnFollowLink = {
key = "gd";
modes = "n";
};
MkdnGoBack = false;
MkdnGoForward = false;
MkdnIncreaseHeading = {
key = "<leader>m+";
modes = "n";
};
MkdnMoveSource = false;
MkdnNewListItem = false;
MkdnNewListItemAboveInsert = {
key = "O";
modes = "n";
};
MkdnNewListItemBelowInsert = {
key = "o";
modes = "n";
};
MkdnNextHeading = {
key = "<leader>m#";
modes = "n";
};
MkdnNextLink = false;
MkdnPrevLink = false;
MkdnPrevHeading = {
key = "<leader>m*";
modes = "n";
};
MkdnSTab = false;
MkdnTab = false;
MkdnTableNewColAfter = {
key = "<leader>mc";
modes = "n";
};
MkdnTableNewColBefore = {
key = "<leader>mC";
modes = "n";
};
MkdnTableNewRowAbove = {
key = "<leader>mR";
modes = "n";
};
MkdnTableNewRowBelow = {
key = "<leader>mr";
modes = "n";
};
MkdnTableNextCell = {
key = "<S-Tab>";
modes = "n";
};
MkdnTableNextRow = false;
MkdnTablePrevCell = {
key = "<S-Tab>";
modes = "n";
};
MkdnTablePrevRow = false;
MkdnToggleToDo = {
key = "<C-Space>";
modes = [ "n" "v" ];
};
MkdnUpdateNumbering = {
key = "<leader>mn";
modes = "n";
};
MkdnYankAnchorLink = {
key = "ya";
modes = "n";
};
MkdnYankFileAnchorLink = {
key = "yfa";
modes = "n";
};
};
tables = {
formatOnMove = true;
trimWhitespace = true;
};
};
extraFiles = {
@ -132,8 +132,9 @@ in {
RenderMarkdownH4.fg = accent-alt;
RenderMarkdownH5.fg = accent-alt;
RenderMarkdownH6.fg = accent-alt;
RenderMarkdownTodo.fg = muted;
RenderMarkdownWarning.fg = accent;
RenderMarkdownTodo.fg = "#f78c6c";
RenderMarkdownWarning.fg = "#ff5370";
RenderMarkdownDone.fg = muted;
};
plugins.headlines = {
enable = true;
@ -156,6 +157,7 @@ in {
settings = {
heading = {
icons = [ "# " "󰲣 " "󰲥 " "󰲧 " "󰲩 " "󰲫 " ];
sign = false;
backgrounds = [ "RenderMarkdownBg" ];
foregrounds = [
"RenderMarkdownH1"
@ -168,7 +170,7 @@ in {
};
checkbox = {
unchecked = { highlight = "RenderMarkdownTodo"; };
checked = { highlight = "RenderMarkdownTodo"; };
checked = { highlight = "RenderMarkdownDone"; };
custom = {
pending = {
raw = "[-]";
@ -177,13 +179,13 @@ in {
};
important = {
raw = "[!]";
rendered = " ";
rendered = "󰰱 ";
highlight = "RenderMarkdownWarning";
};
cancel = {
raw = "[/]";
rendered = "󱋬 ";
highlight = "RenderMarkdownTodo";
highlight = "RenderMarkdownWarning";
};
};
};

View File

@ -1,54 +1,13 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ ctags ];
programs.nixvim = {
plugins = {
lualine = {
enable = true;
settings = {
options.disabled_filetypes.statusline =
[ "dashboard" "alpha" "neo-tree" ];
alwaysDivideMiddle = true;
globalstatus = true;
ignoreFocus = [ "neo-tree" ];
extensions = [ "fzf" ];
theme = "auto";
componentSeparators = {
left = "|";
right = "|";
};
sectionSeparators = {
left = ""; # 
right = ""; # 
};
sections = {
lualine_a = [ "mode" ];
lualine_b = [ "branch" "diff" "diagnostics" ];
lualine_c = [ "filename" ];
lualine_x = [ "filetype" ];
lualine_y = [ "progress" "selectioncount" ];
lualine_z = [ ''" " .. os.date("%R")'' ];
};
};
};
web-devicons.enable = true;
noice.enable = true;
notify = {
enable = true;
level = "warn";
};
gitsigns = {
enable = true;
settings.current_line_blame = false;
};
trouble.enable = true;
indent-blankline.enable = true;
colorizer.enable = true;
tagbar = {
enable = true;
tagsPackage = pkgs.universal-ctags;
};
programs.nixvim.plugins = {
web-devicons.enable = true;
noice.enable = true;
glance.enable = true;
gitsigns = {
enable = true;
settings.current_line_blame = false;
};
trouble.enable = true;
};
}

View File

@ -4,11 +4,11 @@
FloatBorder.fg = "#${config.lib.stylix.colors.base0D}";
};
plugins = {
copilot-vim.enable = true;
copilot-vim.enable = false;
flash.enable = true;
image = {
enable = false;
integrations.markdown = {
settings.integrations.markdown = {
clearInInsertMode = true;
onlyRenderImageAtCursor = true;
};
@ -16,26 +16,8 @@
tmux-navigator.enable = true;
comment.enable = true;
nvim-autopairs.enable = true;
friendly-snippets.enable = true;
todo-comments.enable = true;
harpoon = {
enable = true;
enableTelescope = true;
keymapsSilent = true;
keymaps = {
addFile = "<leader>ha";
toggleQuickMenu = "<leader>hu";
navNext = "<leader>hl";
navPrev = "<leader>hh";
navFile = {
"1" = "<leader>h1";
"2" = "<leader>h2";
"3" = "<leader>h3";
"4" = "<leader>h4";
};
};
};
orgmode.enable = true;
orgmode.enable = false;
treesitter-context.enable = true;
nvim-surround.enable = true;
vim-suda.enable = true;

View File

@ -1,3 +1,14 @@
{ pkgs, ... }: {
home.packages = with pkgs; [ libreoffice thunderbird marp-cli ];
home.packages = with pkgs; [
libreoffice
hunspell
hunspellDicts.id_ID
hunspellDicts.en_US
thunderbird
marp-cli
qpdf
qrencode
temurin-jre-bin
librsvg
];
}

View File

@ -11,6 +11,6 @@
enableZshIntegration = true;
verbose = true;
enableScDaemon = false;
pinentryPackage = pkgs.pinentry-all;
pinentry.package = pkgs.pinentry-all;
};
}

View File

@ -55,7 +55,7 @@ in {
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
tmuxPlugins.resurrect
# tmuxPlugins.resurrect
tmuxPlugins.sensible
# tmuxPlugins.tokyo-night-tmux
];

View File

@ -12,9 +12,9 @@ in {
extraPackages = with pkgs.bat-extras; [
batman
batdiff
batgrep
# batgrep
batwatch
prettybat
# prettybat
];
};
@ -26,7 +26,7 @@ in {
syntaxHighlighting.enable = true;
historySubstringSearch.enable = true;
initExtraFirst = ''
initContent = lib.mkBefore ''
bindkey -e
${if fetch == "neofetch" then
pkgs.neofetch + "/bin/neofetch"
@ -95,7 +95,7 @@ in {
gcu = "git add . && git commit -m 'Update'";
gp = "git push";
gpl = "git pull";
gs = "git status";
gst = "git status";
gd = "git diff";
gco = "git checkout";
gcb = "git checkout -b";

View File

@ -1,13 +1,16 @@
# Spicetify is a spotify client customizer
{ pkgs, config, lib, inputs, ... }:
let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
{
pkgs,
config,
lib,
inputs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.hostPlatform.system};
accent = "${config.lib.stylix.colors.base0D}";
background = "${config.lib.stylix.colors.base00}";
in {
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [ "spotify" ];
imports = [inputs.spicetify-nix.homeManagerModules.default];
stylix.targets.spicetify.enable = false;
@ -21,6 +24,9 @@ in {
button = accent;
button-active = accent;
tab-active = accent;
player = background;
main = background;
sidebar = background;
};
enabledExtensions = with spicePkgs.extensions; [
@ -31,6 +37,7 @@ in {
adblock
fullAppDisplay
shuffle
keyboardShortcut
];
};
}

View File

@ -1,48 +1,10 @@
# Thunar is a file explorer
{ pkgs, ... }: {
# ctrl + m to toggle the menubar
home.packages = with pkgs.xfce; [
thunar
xfconf
tumbler
thunar-archive-plugin
thunar-volman
home.packages = with pkgs; [
xfce.thunar
xfce.xfconf
xfce.tumbler
file-roller
];
# home.file.".config/xfce4/xfconf/xfce-perchannel-xml/thunar.xml".text = ''
# <?xml version="1.0" encoding="UTF-8"?>
#
# <channel name="thunar" version="1.0">
# <property name="last-view" type="string" value="ThunarIconView"/>
# <property name="last-icon-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_100_PERCENT"/>
# <property name="last-window-maximized" type="bool" value="true"/>
# <property name="last-separator-position" type="int" value="170"/>
# <property name="last-statusbar-visible" type="bool" value="false"/>
# <property name="last-menubar-visible" type="bool" value="false"/>
# <property name="misc-single-click" type="bool" value="false"/>
# <property name="shortcuts-icon-emblems" type="bool" value="true"/>
# <property name="tree-icon-emblems" type="bool" value="true"/>
# <property name="misc-file-size-binary" type="bool" value="true"/>
# <property name="misc-thumbnail-draw-frames" type="bool" value="false"/>
# <property name="misc-text-beside-icons" type="bool" value="true"/>
# <property name="misc-change-window-icon" type="bool" value="true"/>
# <property name="hidden-bookmarks" type="array">
# <value type="string" value="computer:///"/>
# <value type="string" value="recent:///"/>
# <value type="string" value="file:///"/>
# <value type="string" value="network:///"/>
# </property>
# <property name="hidden-devices" type="array">
# <value type="string" value="52FEA905FEA8E309"/>
# </property>
# <property name="last-toolbar-item-order" type="string" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"/>
# <property name="last-toolbar-visible-buttons" type="string" value="0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0"/>
# <property name="last-location-bar" type="string" value="ThunarLocationButtons"/>
# <property name="last-show-hidden" type="bool" value="false"/>
# <property name="last-details-view-zoom-level" type="string" value="THUNAR_ZOOM_LEVEL_38_PERCENT"/>
# <property name="last-details-view-column-widths" type="string" value="50,50,127,50,50,50,50,50,751,50,50,75,50,145"/>
# <property name="misc-middle-click-in-tab" type="bool" value="true"/>
# <property name="last-details-view-visible-columns" type="string" value="THUNAR_COLUMN_DATE_MODIFIED,THUNAR_COLUMN_NAME,THUNAR_COLUMN_SIZE,THUNAR_COLUMN_TYPE"/>
# </channel>
# '';
}

View File

@ -4,8 +4,6 @@
./sounds
./brightness
./caffeine
./hyprpanel
./hyprfocus
./night-shift
./screenshot
./nerdfont_fzf

View File

@ -8,36 +8,36 @@
{ pkgs, ... }:
let
hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" ''
hyprpanel -t bar-0
hyprpanel -t bar-1
hyprpanel -t bar-2
hyprpanel -t bar-3
hyprpanel toggleWindow bar-0
hyprpanel toggleWindow bar-1
hyprpanel toggleWindow bar-2
hyprpanel toggleWindow bar-3
'';
hyprpanel-hide = pkgs.writeShellScriptBin "hyprpanel-hide" ''
status=$(hyprpanel -r "isWindowVisible('bar-0')")
status=$(hyprpanel isWindowVisible bar-0)
if [[ $status == "true" ]]; then
hyprpanel -t bar-0
hyprpanel toggleWindow bar-0
fi
status=$(hyprpanel -r "isWindowVisible('bar-1')")
status=$(hyprpanel isWindowVisible bar-1)
if [[ $status == "true" ]]; then
hyprpanel -t bar-1
hyprpanel toggleWindow bar-1
fi
'';
hyprpanel-show = pkgs.writeShellScriptBin "hyprpanel-show" ''
status=$(hyprpanel -r "isWindowVisible('bar-0')")
status=$(hyprpanel isWindowVisible bar-0)
if [[ $status == "false" ]]; then
hyprpanel -t bar-0
hyprpanel toggleWindow bar-0
fi
status=$(hyprpanel -r "isWindowVisible('bar-1')")
status=$(hyprpanel isWindowVisible bar-1)
if [[ $status == "false" ]]; then
hyprpanel -t bar-1
hyprpanel toggleWindow bar-1
fi
'';
hyprpanel-reload = pkgs.writeShellScriptBin "hyprpanel-reload" ''
[ $(pgrep "ags") ] && pkill ags
[ $(pgrep "hyprpanel") ] && pkill hyprpanel
hyprctl dispatch exec hyprpanel
'';
in {

View File

@ -29,7 +29,6 @@ let
";Collect Garbage;nixy gc"
"󰍜;Clean Boot Menu;nixy cb"
"󰌌;Hyprland Keybindings;nvim ${configDirectory}/docs/KEYBINDINGS-HYPRLAND.md"
"󰋩;Wallpapers;nvim ${inputs.nixy-wallpapers}/docs/MOBILE-VIEW.md"
)
# Apply default icons if empty:

View File

@ -0,0 +1,36 @@
{ config, lib, ... }:
let
accent = "#${config.lib.stylix.colors.base0D}";
accent-alt = "#${config.lib.stylix.colors.base03}";
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = "${config.stylix.fonts.sansSerif.name}";
font-size = "${toString config.stylix.fonts.sizes.desktop}";
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
in {
services.dunst = {
enable = true;
settings = {
global = {
height = 300;
offset = "15x15";
origin = "top-right";
follow = "keyboard";
shrink = "no";
transparency = 0;
separator_height = 2;
padding = gaps-in;
horizontal_padding = gaps-in;
corner_radius = rounding;
gap_size = gaps-out;
frame_width = border-size;
markup = "full";
word_wrap = "yes";
ellipsize = "middle";
};
};
};
}

View File

@ -1,11 +1,10 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland.settings = {
bind = [
"$mod,RETURN, exec, ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,RETURN, exec, ${pkgs.kitty}/bin/kitty" # Terminal
"$mod,E, exec, ${pkgs.xfce.thunar}/bin/thunar" # Thunar
# "$mod,B, exec, ${pkgs.qutebrowser}/bin/qutebrowser" # Qutebrowser
"$mod,U, exec, ${pkgs.firefox}/bin/firefox" # Firefox
# "$shiftMod,B, exec, ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,M, exec, ${pkgs.emacs-pgtk}/bin/emacs" # Emacs
"$shiftMod,Q, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,X, exec, powermenu" # Powermenu
"$mod,SPACE, exec, menu" # Launcher
@ -32,14 +31,16 @@
"$mod,l, movefocus, r" # Move focus Right
"$mod,k, movefocus, u" # Move focus Up
"$mod,j, movefocus, d" # Move focus Down
"$shiftMod,j, swapnext" # Swap with next client
"$shiftMod,k, swapnext, prev" # Swap with previous client
"$ctrlMod,k, focusmonitor, -1" # Focus previous monitor
"$ctrlMod,j, focusmonitor, 1" # Focus next monitor
"$ctrlMod,h, layoutmsg, addmaster" # Add to master
"$ctrlMod,l, layoutmsg, removemaster" # Remove from master
"$mod,PRINT, exec, screenshot window" # Screenshot window
",PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod,PRINT, exec, screenshot region" # Screenshot region
"$mod,PRINT, exec, screenshot window swappy" # Screenshot window
",PRINT, exec, screenshot monitor swappy" # Screenshot monitor
"$shiftMod,PRINT, exec, screenshot region swappy" # Screenshot region
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
# "$shiftMod,S, exec, ${pkgs.qutebrowser}/bin/qutebrowser :open $(wofi --show dmenu -L 1 -p ' Search on internet')" # Search on internet with wofi

View File

@ -13,7 +13,7 @@ in {
qt5.qtwayland
qt6.qtwayland
libsForQt5.qt5ct
qt6ct
qt6Packages.qt6ct
hyprshot
hyprpicker
swappy
@ -34,12 +34,12 @@ in {
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd = {
enable = true;
variables = [ "--all" ];
};
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
systemd.enable = true;
systemd.variables = [ "--all" ];
package =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
settings = {
"$mod" = "SUPER";
@ -47,8 +47,11 @@ in {
"$ctrlMod" = "SUPER_CTRL";
exec-once = [
"dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"systemctl --user import-environment"
"hash dbus-update-activation-environment 2>/dev/null"
"dbus-update-activation-environment --systemd --all"
];
ecosystem = { no_update_news = true; };
plugin = { overview = { autoDrag = false; }; };
@ -102,12 +105,14 @@ in {
gaps_in = gaps-in;
gaps_out = gaps-out;
border_size = border-size;
border_part_of_window = true;
layout = "master";
};
decoration = {
blur = { enabled = if blur then "true" else "false"; };
blur = {
enabled = if blur then "true" else "false";
size = 18;
};
shadow = {
enabled = true;
range = 20;
@ -121,10 +126,10 @@ in {
master = {
new_status = true;
allow_small_split = true;
mfact = 0.5;
mfact = 0.6;
};
gestures = { workspace_swipe = true; };
gesture = [ "3, horizontal, workspace" ];
misc = {
vfr = true;
@ -135,8 +140,34 @@ in {
new_window_takes_over_fullscreen = 2;
};
windowrulev2 =
[ "float, tag:modal" "pin, tag:modal" "center, tag:modal" ];
windowrulev2 = [
"float, tag:modal"
"pin, tag:modal"
"center, tag:modal"
"float, title:^(Media viewer)$"
# Bitwarden extension
"float, title:^(.*Bitwarden Password Manager.*)$"
# make Firefox/Zen PiP window floating and sticky
"float, title:^(Picture-in-Picture)$"
"pin, title:^(Picture-in-Picture)$"
# idle inhibit while watching videos
"idleinhibit focus, class:^(mpv|.+exe|celluloid)$"
"idleinhibit focus, class:^(zen)$, title:^(.*YouTube.*)$"
"idleinhibit fullscreen, class:^(zen)$"
"dimaround, class:^(gcr-prompter)$"
"dimaround, class:^(xdg-desktop-portal-gtk)$"
"dimaround, class:^(polkit-gnome-authentication-agent-1)$"
"dimaround, class:^(zen)$, title:^(File Upload)$"
# fix xwayland apps
"rounding 0, xwayland:1"
"center, class:^(.*jetbrains.*)$, title:^(Confirm Exit|Open Project|win424|win201|splash)$"
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
];
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ];
@ -156,6 +187,6 @@ in {
};
};
};
systemd.user.targets.hyprland-session.Unit.Wants =
[ "xdg-desktop-autostart.target" ];
# systemd.user.targets.hyprland-session.Unit.Wants =
# [ "xdg-desktop-autostart.target" ];
}

View File

@ -1,7 +1,8 @@
{ inputs, pkgs, ... }: {
home.packages =
[ inputs.hyprpolkitagent.packages."${pkgs.system}".hyprpolkitagent ];
wayland.windowManager.hyprland.settings.exec-once =
[ "systemctl --user start hyprpolkitagent" ];
{
inputs,
pkgs,
...
}: {
home.packages = [inputs.hyprpolkitagent.packages."${pkgs.stdenv.hostyPlatform.system}".hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}

View File

@ -1,33 +1,52 @@
{ pkgs, ... }: {
wayland.windowManager.hyprland.settings = {
windowrulev2 = [
windowrule = [
"workspace 2, class:^(emacs)$"
"workspace 3, class:^(kitty)$"
"workspace 3, class:^(com.mitchellh.ghostty)$"
"workspace 9, class:^(org.qutebrowser.qutebrowser)$"
"workspace 9, title:^(Chromium)$"
"fullscreen, class:^(wlogout)$"
"float, class:^(Zotero)$"
"float, class:^(firefox)$,title:^(Certificate for )*$"
"float, class:^(firefox)$,title:^(.*Firefox Sharing Indicator.*)$"
"float, class:^(firefox)$,title:^(.*Presensi Mahasiswa.*)$"
"float, class:(firefox),title:^(Extension)(.*)$"
"float, class:^(pcmanfm)$,title:^(Confirm File Replacing)$"
"float, class:^(nemo)$,title:^(Confirm File Replacing)$"
"float, class:^(firefox)$"
"center, class:^(firefox)$"
"size 620 720, class:^(firefox)$"
"size 810 200, class:^(Zotero)$, title:^(Quick Format Citation)*$"
"tag +dialog, class:^(firefox)$, title:^(Certificate for )*$"
"tag +dialog, class:^(firefox)$, title:^(Extension: )*$"
"float, class:^(firefox)$, title:^(.*Firefox Sharing Indicator.*)$"
"tag +dialog, class:^(firefox)$, title:^(Presensi Mahasiswa)*$"
"float, class:^(firefox)$, title:^(Extension)(.*)$"
"float, class:^(pcmanfm)$, title:^(Confirm File Replacing)$"
"float, class:^(nemo)$, title:^(Confirm File Replacing)$"
"float, title:^(Confirm File Replacing)$"
"float, class:thunar, title:^(Rename.*)$"
"float, class:^(org.inkscape.Inkscape)$"
"float, class:^(nm-connection-editor)$"
"float, class:^(.*blueman-manager.*)$"
"float, title:^(Picture-in-Picture)$"
"size 960 540, title:^(Picture-in-Picture)$"
"move 25%-, title:^(Picture-in-Picture)$"
"float, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$"
"move 25%-, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$"
"size 960 540, title:^(imv|mpv|danmufloat|termfloat|nemo|ncmpcpp)$"
"pin, title:^(danmufloat)$"
"noblur, class:^(org.mozilla.firefox)$"
"size 530 300, class:^(.*blueman-manager.*)$"
"move 100%-w-20 40, class:^(.*blueman-manager.*)$"
"noborder, class:^(.*dg-desktop-portal-.*)$"
"noblur, class:^(.*dg-desktop-portal-.*)$"
"noshadow, class:^(.*dg-desktop-portal-.*)$"
"float, class:^(*.dg-desktop-portal-.*)$"
"pin, class:^(*.dg-desktop-portal-.*)$"
"tag +portal, class:^(.*desktop-portal.*)$"
"tag +dialog, initialTitle:^.(Calendar Reminders).*$"
"noborder, tag:portal"
"noblur, tag:portal"
"noshadow, tag:portal"
"float, tag:portal"
"float, tag:dialog"
"pin, tag:portal"
"pin, class:^(gcr-prompter)$"
"float, title:^(Volume Control)$"
"pin, title:^(Volume Control)$"
"size 560 340, title:^(Volume Control)$"
"move 100%-w-30 30, title:^(Volume Control)$"
"move 100%-w-40 40, title:^(Volume Control)$"
"float, class:^(spotube)$"
"size 660 700, class:^(spotube)$"
"move 100%-w-20 40, class:^(spotube)$"
@ -43,6 +62,9 @@
"float, class:^(virt-manager)$,title:^(Virtual Machine Manager)$"
"size 440 220, class:^(virt-manager)$,title:^(Virtual Machine Manager)$"
"center, class:^(virt-manager)$,title:^(Virtual Machine Manager)$"
"stayfocused, class:(pinentry-)(.*)" # fix pinentry losing focus
"rounding 10, class:kitty"
# "float, class:.*xdg-desktop-portal.*"
];
};
}

View File

@ -2,88 +2,98 @@
{ config, ... }:
let
foreground = "rgba(216, 222, 233, 0.70)";
imageStr = "screenshow"; # toString config.stylix.image;
font = config.stylix.fonts.serif.name;
imageStr = toString config.stylix.image;
font = config.stylix.fonts.sansSerif.name;
in {
programs.hyprlock = {
enable = true;
settings = {
general = {
grace = 5;
grace = 3;
no_fade_in = false;
disable_loading_bar = false;
};
# # BACKGROUND
# background = {
# monitor = "";
# path = imageStr;
# blur_passes = 0;
# contrast = 0.8916;
# brightness = 0.7172;
# vibrancy = 0.1696;
# vibrancy_darkness = 0.0;
# };
#
# label = [
# {
# # Day-Month-Date
# monitor = "";
# text = ''cmd[update:1000] echo -e "$(date +"%A, %B %d")"'';
# color = foreground;
# font_size = 28;
# font_family = font + " Bold";
# position = "0, 490";
# halign = "center";
# valign = "center";
# }
# # Time
# {
# monitor = "";
# text = ''cmd[update:1000] echo "<span>$(date +"%I:%M")</span>"'';
# color = foreground;
# font_size = 160;
# font_family = "steelfish outline regular";
# position = "0, 370";
# halign = "center";
# valign = "center";
# }
# # USER
# {
# monitor = "";
# text = " $USER";
# color = foreground;
# outline_thickness = 2;
# dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
# dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
# dots_center = true;
# font_size = 18;
# font_family = font + " Bold";
# position = "0, -180";
# halign = "center";
# valign = "center";
# }
# ];
#
# # INPUT FIELD
# input-field = [{
# monitor = "";
# size = "300, 60";
# outline_thickness = 2;
# dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
# dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
# dots_center = true;
# outer_color = "rgba(255, 255, 255, 0)";
# inner_color = "rgba(255, 255, 255, 0.1)";
# font_color = foreground;
# fade_on_empty = false;
# font_family = font + " Bold";
# placeholder_text = "<i>🔒 Enter Password</i>";
# hide_input = false;
# position = "0, -250";
# halign = "center";
# valign = "center";
# }];
background = {
path = "screenshot";
blur_passes = 3;
blur_size = 6;
noise = 1.17e-2;
contrast = 1.3; # Vibrant!!!
brightness = 0.8;
vibrancy = 0.21;
vibrancy_darkness = 0.0;
};
label = [
# Hour
{
text = ''cmd[update:1000] echo "<b><big> $(date +"%H") </big></b>"'';
color = "#${config.lib.stylix.colors.base06}";
font_size = 112;
font_family = font;
shadow_passes = 2;
shadow_boost = 0.4;
shadow_size = 4;
position = "0, 220";
halign = "center";
valign = "center";
}
{
monitor = "";
text = ''cmd[update:1000] echo "<b><big> $(date +"%M") </big></b>"'';
color = "#${config.lib.stylix.colors.base06}";
font_size = 112;
font_family = font;
shadow_passes = 2;
shadow_boost = 0.4;
shadow_size = 4;
position = "0, 80";
halign = "center";
valign = "center";
}
{
monitor = "";
text =
''cmd[update:18000000] echo "<b><big> "$(date +'%A')" </big></b>"'';
color = "#${config.lib.stylix.colors.base07}";
font_size = 22;
font_family = font;
position = "0, -10";
halign = "center";
valign = "center";
}
{
monitor = "";
text = ''cmd[update:18000000] echo "<b> "$(date +'%d %b')" </b>"'';
color = "#${config.lib.stylix.colors.base07}";
font_size = 18;
font_family = font;
position = "0, -40";
halign = "center";
valign = "center";
}
];
input-field = [{
monitor = "";
size = "250, 50";
outline_thickness = 3;
dots_size = 0.26; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.64; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
dots_rouding = -1;
rounding = 22;
outer_color = "#${config.lib.stylix.colors.base00}";
inner_color = "#${config.lib.stylix.colors.base00}";
font_color = "#${config.lib.stylix.colors.base06}";
fade_on_empty = true;
placeholder_text =
"<i>Password...</i>"; # Text rendered in the input box when it's empty.
position = "0, 120";
halign = "center";
valign = "bottom";
}];
};
};
}

View File

@ -7,90 +7,51 @@ let
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = "${config.stylix.fonts.serif.name}";
font = "${config.stylix.fonts.sansSerif.name}";
fontSize = "${toString config.stylix.fonts.sizes.desktop}px";
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
inherit (config.var.theme.bar)
floating transparentButtons transparent position;
inherit (config.var) cpuTempSensor location username weatherapikey;
inherit (config.var) location username weatherapikey;
in {
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
programs.hyprpanel = {
enable = true;
systemd.enable = true;
overlay.enable = true;
hyprland.enable = true;
overwrite.enable = true;
layout = {
"bar.layouts" = {
"0" = {
left = [ "dashboard" "hypridle" "workspaces" "windowtitle" ];
middle = [ "media" ];
right = [
"systray"
"volume"
"hyprsunset"
"battery"
"network"
"cputemp"
"clock"
"notifications"
];
};
"*" = {
left = [ "dashboard" "workspaces" "windowtitle" ];
middle = [ "clock" ];
right = [ "volume" "notifications" ];
settings = {
layout = {
bar.layouts = {
"0" = {
left = [ "dashboard" "hypridle" "workspaces" "windowtitle" ];
middle = [ "media" ];
right = [
"volume"
"hyprsunset"
"battery"
"network"
"bluetooth"
"cpu"
"clock"
"systray"
"notifications"
];
};
"*" = {
left = [ "dashboard" "workspaces" "windowtitle" ];
middle = [ "clock" ];
right = [ "volume" "notifications" ];
};
};
};
};
override = {
bar.battery.hideLabelWhenFull = true;
bar.bluetooth.label = false;
bar.clock.format = "%a, %d %b %H:%M";
bar.customModules.cpuTemp.sensor = cpuTempSensor;
bar.customModules.hypridle.label = false;
bar.customModules.hyprsunset.label = false;
bar.launcher.icon = "";
bar.media.show_active_only = true;
bar.network.label = false;
bar.network.truncation_size = 12;
bar.volume.label = false;
bar.windowtitle.label = true;
bar.workspaces.hideUnoccupied = false;
bar.workspaces.monitorSpecific = true;
menus.clock.time.hideSeconds = true;
menus.clock.time.military = true;
menus.clock.weather.key = weatherapikey;
menus.clock.weather.location = location;
menus.clock.weather.unit = "metric";
menus.dashboard.powermenu.avatar.image =
"/home/${username}/.profile_picture.png";
menus.dashboard.powermenu.confirmation = false;
menus.dashboard.shortcuts.left.shortcut1.command = "firefox";
menus.dashboard.shortcuts.left.shortcut1.icon = "";
menus.dashboard.shortcuts.left.shortcut1.tooltip = "Firefox";
menus.dashboard.shortcuts.left.shortcut2.command = "caffeine";
menus.dashboard.shortcuts.left.shortcut2.icon = "󰅶";
menus.dashboard.shortcuts.left.shortcut2.tooltip = "Caffeine";
menus.dashboard.shortcuts.left.shortcut3.command = "night-shift";
menus.dashboard.shortcuts.left.shortcut3.icon = "󰖔";
menus.dashboard.shortcuts.left.shortcut3.tooltip = "Night-shift";
menus.dashboard.shortcuts.left.shortcut4.command = "menu";
menus.dashboard.shortcuts.left.shortcut4.icon = "";
menus.dashboard.shortcuts.left.shortcut4.tooltip = "Search Apps";
menus.dashboard.shortcuts.right.shortcut1.command = "hyprpicker -a";
menus.dashboard.shortcuts.right.shortcut1.icon = "";
menus.dashboard.shortcuts.right.shortcut1.tooltip = "Color Picker";
menus.dashboard.shortcuts.right.shortcut3.command =
"screenshot region swappy";
menus.dashboard.shortcuts.right.shortcut3.icon = "󰄀";
menus.dashboard.shortcuts.right.shortcut3.tooltip = "Screenshot";
menus.dashboard.stats.enabled = false;
theme.bar.background =
"${background + (if transparentButtons then "00" else "")}";
"${background + (if transparent then "00" else "")}";
theme.bar.border_radius = "${toString rounding}px";
theme.bar.buttons.background =
"${(if transparent then background else background-alt)
@ -111,9 +72,9 @@ in {
theme.bar.buttons.workspaces.available = accent-alt;
theme.bar.buttons.workspaces.hover = accent-alt;
theme.bar.buttons.workspaces.occupied = accent;
theme.bar.buttons.y_margins =
if floating && transparent then "0" else "8";
theme.bar.floating = if floating then "true" else "false";
theme.bar.buttons.y_margins = if transparentButtons then "0" else "8";
theme.bar.dropdownGap = "3em";
theme.bar.floating = floating;
theme.bar.location = position;
theme.bar.margin_bottom =
"${if position == "top" then "0" else toString (gaps-in * 2)}px";
@ -169,6 +130,56 @@ in {
theme.osd.muted_zero = true;
theme.osd.orientation = "vertical";
theme.osd.radius = "${toString rounding}px";
bar.workspaces.reverse_scroll = true;
bar.battery.hideLabelWhenFull = true;
bar.bluetooth.label = false;
bar.clock.format = "%a, %d %b %H:%M";
bar.customModules.hypridle.label = false;
bar.customModules.hyprsunset.label = false;
bar.customModules.hyprsunset.temperature = "4500k";
bar.launcher.icon = "";
bar.media.show_active_only = true;
bar.network.label = false;
bar.network.truncation_size = 12;
bar.volume.label = false;
bar.windowtitle.label = true;
# bar.workspaces.applicationIconEmptyWorkspace = "";
# bar.workspaces.hideUnoccupied = false;
bar.workspaces.monitorSpecific = false;
# bar.workspaces.numbered_active_indicator = "underline";
# bar.workspaces.showApplicationIcons = false;
bar.workspaces.show_icons = false;
bar.workspaces.workspaces = 5;
bar.workspaces.show_numbered = true;
menus.clock.time.hideSeconds = true;
menus.clock.time.military = true;
menus.clock.weather.key = weatherapikey;
menus.clock.weather.location = location;
menus.clock.weather.unit = "metric";
menus.dashboard.powermenu.avatar.image =
"/home/${username}/.profile_picture.png";
menus.dashboard.powermenu.confirmation = false;
menus.dashboard.shortcuts.left.shortcut1.command = "firefox";
menus.dashboard.shortcuts.left.shortcut1.icon = "";
menus.dashboard.shortcuts.left.shortcut1.tooltip = "Firefox";
menus.dashboard.shortcuts.left.shortcut2.command = "caffeine";
menus.dashboard.shortcuts.left.shortcut2.icon = "󰅶";
menus.dashboard.shortcuts.left.shortcut2.tooltip = "Caffeine";
menus.dashboard.shortcuts.left.shortcut3.command = "night-shift";
menus.dashboard.shortcuts.left.shortcut3.icon = "󰖔";
menus.dashboard.shortcuts.left.shortcut3.tooltip = "Night-shift";
menus.dashboard.shortcuts.left.shortcut4.command = "menu";
menus.dashboard.shortcuts.left.shortcut4.icon = "";
menus.dashboard.shortcuts.left.shortcut4.tooltip = "Search Apps";
menus.dashboard.shortcuts.right.shortcut1.command = "hyprpicker -a";
menus.dashboard.shortcuts.right.shortcut1.icon = "";
menus.dashboard.shortcuts.right.shortcut1.tooltip = "Color Picker";
menus.dashboard.shortcuts.right.shortcut3.command =
"screenshot region swappy";
menus.dashboard.shortcuts.right.shortcut3.icon = "󰄀";
menus.dashboard.shortcuts.right.shortcut3.tooltip = "Screenshot";
menus.dashboard.stats.enabled = false;
wallpaper.enable = false;
};
};

View File

@ -31,5 +31,7 @@
"application/pdf" = "org.pwmt.zathura.desktop";
"inode/directory" = "Thunar.desktop";
};
associations.added = { "x-scheme-handler/mailto" = "thunderbird.desktop"; };
};
xdg.configFile."mimeapps.list".force = true;
}

View File

@ -0,0 +1,244 @@
{
pkgs,
config,
inputs,
...
}: let
noctalia = cmd:
["noctalia-shell" "ipc" "call"]
++ (pkgs.lib.splitString " " cmd);
in {
imports = [inputs.niri.homeModules.niri inputs.noctalia.homeModules.default];
home.packages = with pkgs; [
wayland-utils
libsecret
cage
xwayland-satellite
libnotify
cliphist
cava
kdePackages.polkit-kde-agent-1
nautilus
direnv
imv
];
programs.niri = {
enable = true;
settings = {
prefer-no-csd = true;
hotkey-overlay.skip-at-startup = true;
environment = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
ELECTRON_OZON_PLATFORM_HINT = "wayland";
DISPLAY = ":0"; # Or null
_JAVA_AWT_WM_NONREPARENTING = "1";
};
cursor = {
hide-when-typing = true;
hide-after-inactive-ms = 1000;
};
binds = with config.lib.niri.actions; {
"Mod+Space".action.spawn = noctalia "launcher toggle";
"Mod+P".action.spawn = noctalia "sessionMenu toggle";
"Mod+V".action.spawn = noctalia "launcher clipboard";
"Mod+Shift+C".action.spawn = noctalia "launcher calculator";
"Mod+C".action.spawn = noctalia "calendar toggle";
"Mod+S".action.spawn = noctalia "controlCenter toggle";
"Mod+F12".action.spawn = noctalia "powerProfile cycle";
"XF86AudioLowerVolume".action.spawn = noctalia "volume decrease";
"XF86AudioRaiseVolume".action.spawn = noctalia "volume increase";
"XF86AudioMute".action.spawn = noctalia "volume muteOutput";
"XF86MonBrightnessUp".action.spawn = noctalia "brightness increase";
"XF86MonBrightnessDown".action.spawn = noctalia "brightness decrease";
"XF86AudioPlay".action.spawn = noctalia "media playPause";
"XF86AudioNext".action.spawn = noctalia "media next";
"XF86AudioPrev".action.spawn = noctalia "media previous";
"Mod+Shift+Q".action.spawn = noctalia "lockScreen lock";
"Mod+Return".action.spawn = ["alacritty"];
"Mod+E".action.spawn = ["nautilus"];
"Mod+B".action.spawn = ["firefox"];
"Mod+U".action = move-workspace-up;
"Mod+I".action = move-workspace-down;
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+Q".action = close-window;
"Mod+H".action = focus-column-or-monitor-left;
"Mod+L".action = focus-column-or-monitor-right;
"Mod+J".action = focus-window-or-monitor-down;
"Mod+K".action = focus-window-or-monitor-up;
"Mod+Shift+H".action = move-column-left-or-to-monitor-left;
"Mod+Shift+L".action = move-column-right-or-to-monitor-right;
"Mod+Shift+J".action = move-window-down-or-to-workspace-down;
"Mod+Shift+K".action = move-window-up-or-to-workspace-up;
"Mod+Ctrl+K".action = move-window-to-workspace-up;
"Mod+Ctrl+J".action = move-window-to-workspace-down;
"Mod+0".action = focus-workspace 0;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+Shift+Period".action = move-workspace-to-monitor-next;
"Mod+Shift+Comma".action = move-workspace-to-monitor-previous;
"Mod+Comma".action = consume-or-expel-window-left;
"Mod+Period".action = consume-or-expel-window-right;
"Mod+Grave".action = toggle-overview;
"Mod+Tab".action = focus-workspace-previous;
"Mod+Equal".action = set-column-width "+5%";
"Mod+Minus".action = set-column-width "-5%";
"Mod+Shift+Equal".action = set-window-height "+5%";
"Mod+Shift+Minus".action = set-window-height "-5%";
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+Ctrl+Shift+F".action = toggle-windowed-fullscreen;
"Mod+Y".action = toggle-window-floating;
"Mod+Shift+Y".action = switch-focus-between-floating-and-tiling;
"Mod+W".action = toggle-column-tabbed-display;
"Mod+Parenright".action = switch-layout "next";
"Mod+Parenleft".action = switch-layout "prev";
"Mod+Shift+E".action = quit;
};
input = {
warp-mouse-to-focus.enable = true;
focus-follows-mouse.enable = false;
trackpoint = {
accel-profile = "adaptive";
accel-speed = 0.6;
};
};
layout = {
focus-ring = {
width = 2;
};
};
window-rules = [
{
geometry-corner-radius = let
r = 4.0;
in {
top-left = r;
top-right = r;
bottom-left = r;
bottom-right = r;
};
clip-to-geometry = true;
}
{
matches = [{app-id = "firefox";}];
open-maximized = true;
}
{
matches = [{app-id = "chromium-browser";}];
open-maximized = true;
}
];
# debug = {
# honor-xdg-activation-with-invalid-serial = 1;
# };
};
};
programs.noctalia-shell = {
enable = true;
systemd.enable = true;
settings = {
general = {
animationSpeed = 2;
compactLockScreen = true;
};
wallpaper = {
enabled = false;
directory = "~/Pictures/wallpapers";
};
dock.enabled = false;
bar = {
density = "compact";
position = "right";
showCapsule = false;
widgets = {
left = [
{
id = "SidePanelToggle";
useDistroLogo = true;
}
{
id = "WiFi";
}
{
id = "Bluetooth";
}
];
center = [
{
hideUnoccupied = false;
id = "Workspace";
labelMode = "none";
}
];
right = [
{
colorizeIcons = true;
drawerEnabled = true;
id = "Tray";
}
{
alwaysShowPercentage = false;
id = "Battery";
warningThreshold = 30;
}
{
formatHorizontal = "HH:mm";
formatVertical = "HH mm";
id = "Clock";
useMonospacedFont = true;
usePrimaryColor = true;
}
];
};
};
colorSchemes.predefinedScheme = "Monochrome";
general = {
avatarImage = "/home/dim/.face";
radiusRatio = 0.2;
};
location = {
monthBeforeDay = false;
name = "Tangerang";
};
};
# this may also be a string or a path to a JSON file,
# but in this case must include *all* settings.
};
programs.alacritty = {
enable = true;
settings = {
window.decorations = "None";
};
};
services.kanshi = {
enable = true;
profiles = {
rumah = {
outputs = [
{
criteria = "LG Electronics 16EN33 305INKH5P181";
position = "0,0";
}
{
criteria = "eDP-1";
position = "0,768";
}
];
};
};
};
}

View File

@ -0,0 +1,225 @@
{
config,
pkgs,
...
}: let
inherit (config.var.theme.bar) position;
inherit (config.var.theme) rounding border-size gaps-in gaps-out;
in {
home.packages = with pkgs; [playerctl];
programs.waybar = {
enable = true;
systemd = {
enable = true;
target = "hyprland-session";
};
settings = [
{
layer = "top";
position = position;
modules-left = ["hyprland/workspaces" "mpris"];
modules-center = [];
modules-right = [
"idle_inhibitor"
"backlight"
"battery#1"
"battery#2"
"cpu"
"memory"
"temperature"
"clock"
"privacy"
"wireplumber"
"tray"
];
clock = {
"format" = "{:%d %b %H:%M} ";
"format-alt" = "{:%A, %d %B %Y (%R)} ";
"tooltip-format" = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
"calendar" = {
"mode" = "year";
"mode-mon-col" = 3;
"weeks-pos" = "right";
"on-scroll" = 1;
"format" = {
"months" = "<span color='#ffead3'><b>{}</b></span>";
"days" = "<span color='#ecc6d9'><b>{}</b></span>";
"weeks" = "<span color='#99ffdd'><b>W{}</b></span>";
"weekdays" = "<span color='#ffcc66'><b>{}</b></span>";
"today" = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
actions = {
"on-click-right" = "mode";
"on-scroll-up" = "shift_up";
"on-scroll-down" = "shift_down";
};
};
tray = {spacing = gaps-in;};
cpu = {format = " {usage}";};
memory = {format = " {}";};
idle_inhibitor = {
format = "{icon}";
format-icons = {
activated = "";
deactivated = "";
};
};
network = {
format = "{ifname}";
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} 󰈀";
format-disconnected = "";
tooltip-format = "{ifname} via {gwaddr} 󰈀";
tooltip-format-wifi = "{essid} ({signalStrength}%) ";
tooltip-format-ethernet = "{ifname} ";
tooltip-format-disconnected = "Disconnected";
max-length = 50;
};
temperature = {format = "{temperatureC}󰔄 ";};
backlight = {
device = "intel_backlight";
format = "{icon}";
format-icons = ["󱃓" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥"];
};
"battery#1" = {
bat = "BAT0";
interval = 90;
states = {
warning = 30;
critical = 15;
};
format = "{capacity}";
max-length = 2;
};
"battery#2" = {
bat = "BAT1";
interval = 90;
states = {
warning = 30;
critical = 15;
};
format = "{capacity} {icon}";
format-icons = ["" "" "" "" ""];
max-length = 25;
};
"hyprland/window" = {
format = "{}";
max-length = 32;
rewrite = {
"(.*) Mozilla Firefox" = "󰈹 $1";
"(.*) - kitty" = " [$1]";
};
separate-outputs = true;
};
"hyprland/workspaces" = {format = "<small>{name}</small>";};
mpris = {
"format" = "{player_icon} {dynamic}";
"format-paused" = "{status_icon} <i>{dynamic}</i>";
"player-icons" = {
"default" = "󰐊";
"mpv" = "󰎇";
};
"dynamic-len" = 30;
"status-icons" = {"paused" = "󰏤";};
"ignored-players" = ["firefox"];
};
privacy = {
"icon-spacing" = 4;
"icon-size" = 18;
"transition-duration" = 250;
"modules" = [
{
"type" = "screenshare";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-out";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
{
"type" = "audio-in";
"tooltip" = true;
"tooltip-icon-size" = 24;
}
];
};
pulseaudio = {
"format" = "{volume}%{icon}";
"format-bluetooth" = "{volume}%{icon}";
"format-muted" = "";
"format-icons" = {
"headphone" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = ["" ""];
};
"scroll-step" = 1;
"on-click" = "pavucontrol";
"ignored-sinks" = ["Easy Effects Sink"];
};
"wireplumber" = {
"on-click" = "pavucontrol";
"on-click-right" = "amixer sset Master toggle 1>/dev/null";
"format" = "<span foreground='#fab387'>{icon}</span>{volume}%";
"format-muted" = " ";
"format-source" = "";
"format-source-muted" = "";
"format-icons" = {
"headphone" = " ";
"hands-free" = " ";
"headset" = " ";
"phone" = " ";
"portable" = " ";
"car" = " ";
"default" = [" " " " " "];
};
};
"custom/cuaca" = {
"format" = "{}";
"format-alt" = "{alt}: {}";
"format-alt-click" = "click-right";
"interval" = 3600;
"exec" = "curl -s 'https://wttr.in/Tangerang?format=1'";
"exec-if" = "ping wttr.in -c1";
};
}
];
style = ''
* { border: none; border-radius: 0; }
window#waybar { background-color: transparent; color: @base05; transition-property: background-color; transition-duration: 0.5s; }
window#waybar.hidden { opacity: 0.2; }
label.module { padding: 0 0.5em; }
#workspaces {
background-color: @base03;
border-radius: 1em;
margin: 0 1em;
}
#workspaces button {
padding: 0 .3em;
border-radius: 1em;
background-color: @base03;
}
#workspaces button.urgent { background-color: @base09; }
#workspaces button.empty { background-color: @base03; }
#workspaces button.visible { background-color: @base04; color: @base01 }
#workspaces button.active { background-color: @base0A; }
#window { font-weight:800; color: @base06; background-color: @base00; margin: 0 .5em; padding: 0 1em; border-radius: 0 0 1em 1em;}
.modules-left { background-color: transparent; border-radius: 0 1em 1em 0; padding-right: 1em; }
.modules-right { background-color: @base00; border-radius: 0 0 0 1em; padding-left: 1em; }
label#battery.1 { padding-right: 0; }
label#battery.2 { padding-left: ${toString gaps-in}px; }
#privacy, #tray { padding: 0 ${toString gaps-in}px; }
#tray { background-color: @base03; border-radius: 1em 0 0 1em; }
#tray > .passive { -gtk-icon-effect: dim; }
#tray > .needs-attention { -gtk-icon-effect: highlight; background-color: @base08; }
tooltip { border-radius: ${toString rounding}px; }
'';
};
}

View File

@ -5,7 +5,7 @@ let
background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}";
foreground = "#${config.lib.stylix.colors.base05}";
font = config.stylix.fonts.serif.name;
font = config.stylix.fonts.sansSerif.name;
rounding = config.var.theme.rounding;
font-size = config.stylix.fonts.sizes.popups;
in {

View File

@ -1,8 +1,9 @@
{ config, pkgs, ... }: {
{
config,
pkgs,
...
}: {
imports = [
# ../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
# ../../nixos/prime.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
../../nixos/audio.nix
../../nixos/auto-upgrade.nix
../../nixos/bluetooth.nix
@ -13,6 +14,8 @@
../../nixos/systemd-boot.nix
../../nixos/timezone.nix
../../nixos/tuigreet.nix
# ../../nixos/tlp.nix
../../nixos/upower.nix
../../nixos/users.nix
../../nixos/utils.nix
../../nixos/virtualisation.nix
@ -31,7 +34,14 @@
# users.users."${config.var.username}".extraGroups = [ "scanner" "lp" ];
# hardware.sane.enable = true;
networking.hosts = { "192.168.122.52" = [ "websiteku.lokal" ]; };
programs.nm-applet.enable = true;
networking.hosts = {
"192.168.122.52" = ["websiteku.lokal"];
"127.0.0.1" = ["dimensi.lokal" "sisfokampus.ddev.site"];
# "10.230.4.15" = [ "www.yapeim.my" ];
# "43.239.205.20" = [ "dimensi.my" ];
# "103.106.6.124" = [ "dimensi.my" ];
};
# Don't touch this
system.stateVersion = "24.05";

View File

@ -1,11 +1,16 @@
{ pkgs, config, inputs, ... }: {
{
pkgs,
config,
lib,
...
}: {
imports = [
./variables.nix
# Programs
../../home/programs/kitty
../../home/programs/nvim
../../home/programs/nvf
../../home/programs/helix
../../home/programs/shell
../../home/programs/pass
../../home/programs/fetch
@ -23,46 +28,49 @@
../../home/scripts # All scripts
# System (Desktop environment like stuff)
../../home/system/hyprland
../../home/system/hypridle
../../home/system/hyprlock
../../home/system/hyprpanel
../../home/system/hyprpaper
../../home/system/wofi
# ../../home/system/hyprland
# ../../home/system/hypridle
# ../../home/system/hyprlock
# ../../home/system/hyprpaper
# ../../home/system/wofi
# ../../home/system/waybar
# ../../home/system/dunst
../../home/system/batsignal
../../home/system/zathura
../../home/system/mime
../../home/system/udiskie
../../home/system/clipman
../../home/system/niri
# ./secrets # CHANGEME: You should probably remove this line, this is where I store my secrets
];
stylix = {
targets.gtk.flatpakSupport.enable = false;
targets.hyprlock.enable = false;
targets.waybar.addCss = false;
iconTheme = {
enable = true;
package = pkgs.tela-icon-theme;
dark = "Tela-dark";
light = "Tela-light";
package = pkgs.qogir-icon-theme;
dark = "Qogir-Dark";
light = "Qogir";
};
};
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) ["intelephense" "spotify"];
home = {
inherit (config.var) username;
homeDirectory = "/home/" + config.var.username;
packages = with pkgs; [
# Apps
#discord # Chat
# bitwarden # Password manager
mpv # Video player
pcmanfm
xarchiver
#blanket # White-noise app
# pcmanfm
# xarchiver
# Dev
go
# go
nodejs
(python3.withPackages (ps:
with ps; [
@ -79,7 +87,8 @@
sha256 = "sha256-caff7K4++eQJE/7kbKJb8DgI6aWJdiHBbdV1+46aFMs=";
};
doCheck = false;
buildInputs = [ pip ];
pyproject = true;
propagatedBuildInputs = [pip setuptools pyyaml mypy];
})
]))
jq
@ -87,13 +96,13 @@
just
ddev
mkcert
devenv
# Utils
zip
xz
unzip
p7zip
unrar
optipng
pfetch
pandoc
@ -111,12 +120,12 @@
inetutils
gdu
enchant
inxi
# Just cool
peaclock
cbonsai
pipes
cmatrix
# peaclock
# cbonsai
# cmatrix
# cava
# Backup
@ -127,14 +136,24 @@
gimp
sqlitebrowser
sqlite
emacs29-pgtk
emacs-pgtk
php
phpPackages.composer
aspell
aspellDicts.id
aspellDicts.en
html-tidy
stylelint
jsbeautifier
zotero_7
chromium
# inputs.zen-browser.packages."${pkgs.system}"
remmina
exercism
elixir
];
# Import my profile picture, used by the hyprpanel dashboard
file.".profile_picture.png" = { source = ./profile_picture.png; };
file.".profile_picture.png" = {source = ./profile_picture.png;};
# Don't touch this
stateVersion = "24.05";

View File

@ -1,14 +1,13 @@
{ config, ... }: {
imports = [ ../../nixos/variables-config.nix ];
{config, ...}: {
imports = [../../nixos/variables-config.nix];
config.var = {
hostname = "dark";
username = "dim";
fullname = "Dhimas Widrayato";
uid = 1000;
hashedPassword =
"$y$j9T$OqKMt8etf8DgTrZhN9jzy/$biMoM3P.WPZMpk0DAK.QhaHjGOL23pEgxlSvfu9LEPD";
configDirectory = "/home/" + config.var.username
+ "/.config/nixos"; # The path of the nixos configuration directory
hashedPassword = "$y$j9T$OqKMt8etf8DgTrZhN9jzy/$biMoM3P.WPZMpk0DAK.QhaHjGOL23pEgxlSvfu9LEPD";
configDirectory = "/home/" + config.var.username + "/.config/nixos"; # The path of the nixos configuration directory
keyboardLayout = "us";
@ -29,8 +28,7 @@
autoUpgrade = false;
autoGarbageCollector = false;
cpuTempSensor =
"/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon5/temp1_input";
cpuTempSensor = "/sys/devices/platform/thinkpad_hwmon/hwmon/hwmon5/temp1_input";
theme = import ../../themes/var/nixy.nix;
};

View File

@ -1,6 +1,8 @@
{
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [ pavucontrol ];
security.rtkit.enable = true;
hardware.pulseaudio.enable = false;
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
@ -16,5 +18,13 @@
};
};
};
extraConfig.pipewire = {
"92-clock-rate" = {
"context.properties" = {
"default.clock.quantum" = 2048;
"default.clock.force-quantum" = 2048;
};
};
};
};
}

View File

@ -14,15 +14,13 @@
dejavu_fonts
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
noto-fonts-color-emoji
victor-mono
# (nerdfonts.override { fonts = [ "FiraCode" "Meslo" "VictorMono" ]; })
nerd-fonts.victor-mono
nerd-fonts.fira-code
nerd-fonts.meslo-lg
openmoji-color
twemoji-color-font
inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd
];
enableDefaultPackages = false;
@ -30,8 +28,8 @@
fontconfig = {
defaultFonts = {
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
sansSerif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
serif = [ "SFProDisplay Nerd Font" "Noto Color Emoji" ];
sansSerif = [ "Inter Display" "Noto Color Emoji" ];
serif = [ "Noto Serif" "Noto Color Emoji" ];
emoji = [ "Noto Color Emoji" ];
};
};

View File

@ -1,6 +1,6 @@
{ inputs, ... }: {
home-manager = {
useGlobalPkgs = true;
useGlobalPkgs = false;
useUserPackages = true;
backupFileExtension = "hm-backup";
extraSpecialArgs = { inherit inputs; };

View File

@ -1,4 +1,5 @@
{
networking.networkmanager.enable = true;
systemd.services.NetworkManager-wait-online.enable = false;
networking.firewall.checkReversePath = "loose";
}

View File

@ -1,6 +1,13 @@
{ config, inputs, ... }:
let autoGarbageCollector = config.var.autoGarbageCollector;
in {
security.sudo.extraRules = [{
users = [ config.var.username ];
commands = [{
command = "/run/current-system/sw/bin/nixos-rebuild";
options = [ "NOPASSWD" ];
}];
}];
nixpkgs.config = {
allowUnfree = true;
allowBroken = true;
@ -8,15 +15,24 @@ in {
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
channel.enable = false;
extraOptions = ''
warn-dirty = false
'';
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://hyprland.cachix.org" ];
substituters = [
"https://cache.nixos.org/?priority=10"
"https://nix-community.cachix.org"
"https://hyprland.cachix.org"
"https://devenv.cachix.org"
];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
"nixpkgs-python.cachix.org-1:hxjI7pFxTyuTHn2NkvWCrAUcNZLNS3ZAvfYNuYifcEU="
];
};
gc = {

View File

@ -25,4 +25,9 @@
consoleLogLevel = 0;
initrd.verbose = false;
};
services.kmscon = {
enable = true;
hwRender = true;
};
}

28
nixos/tlp.nix Normal file
View File

@ -0,0 +1,28 @@
{
services.tlp = {
enable = true;
settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 60;
# Optional helps save long term battery health
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
START_CHARGE_THRESH_BAT1 = 40; # 40 and bellow it starts to charge
STOP_CHARGE_THRESH_BAT1 = 80; # 80 and above it stops charging
RESTORE_THRESHOLD_ON_BAT = 1;
# Networking powersave
DEVICES_TO_DISABLE_ON_LAN_CONNECT = "wifi";
DEVICES_TO_ENABLE_ON_UNDOCK = "wifi";
};
};
}

View File

@ -1,17 +1,16 @@
{ pkgs, ... }: {
{pkgs, ...}: {
services.greetd = {
enable = true;
settings = {
default_session = {
command =
"${pkgs.greetd.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a %h | %F' --cmd Hyprland";
command = "${pkgs.tuigreet}/bin/tuigreet --remember --asterisks --container-padding 2 --time --time-format '%I:%M %p | %a %h | %F' --cmd niri-session";
user = "greeter";
};
};
};
security.pam.services.greetd.enableGnomeKeyring = true;
environment.systemPackages = with pkgs; [ greetd.tuigreet ];
environment.systemPackages = with pkgs; [tuigreet];
# this is a life saver.
# literally no documentation about this anywhere.
@ -29,6 +28,12 @@
};
# To prevent getting stuck at shutdown
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
# systemd.extraConfig = "DefaultTimeoutStopSec=10s";
systemd.settings.Manager = {
# KExecWatchdogSec = "5min";
# RebootWatchdogSec = "10min";
# RuntimeWatchdogSec = "30s";
# WatchdogDevice = "/dev/watchdog";
DefaultTimeoutStopSec = "10s";
};
}

5
nixos/upower.nix Normal file
View File

@ -0,0 +1,5 @@
{
services.tlp.enable = false;
services.tuned.enable = true;
services.upower.enable = true;
}

View File

@ -1,18 +1,36 @@
{ config, pkgs, ... }:
let
{
config,
pkgs,
inputs,
...
}: let
username = config.var.username;
hashedPassword = config.var.hashedPassword;
userId = config.var.uid;
in {
programs.zsh.enable = true;
# Thunar plugins and services
programs.thunar.plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
programs.xfconf.enable = true;
services.tumbler.enable = true;
# hardware.graphics = {
# package =
# inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.mesa;
# };
users = {
defaultUserShell = pkgs.zsh;
users.${username} = {
hashedPassword = "${hashedPassword}";
uid = userId;
isNormalUser = true;
description = "${username} account";
extraGroups = [ "networkmanager" "wheel" "audio" "video" "input" ];
description = config.var.fullname;
extraGroups = ["networkmanager" "wheel" "audio" "video" "input"];
};
};
}

View File

@ -14,15 +14,18 @@ in {
EDITOR = "nvim";
};
services.libinput.enable = true;
programs.dconf.enable = true;
services = {
libinput.enable = true;
dbus.enable = true;
gvfs.enable = true;
upower.enable = true;
power-profiles-daemon.enable = true;
# power-profiles-daemon.enable = true;
udisks2.enable = true;
devmon.enable = true;
journald.extraConfig = ''
SystemMaxUse=1G
'';
};
# Faster rebuilding
@ -59,10 +62,11 @@ in {
nix-tree
stevenblack-blocklist
wlay
ldns
];
services.logind.extraConfig = ''
# dont shutdown when power button is short-pressed
HandlePowerKey=ignore
'';
# services.logind.settings.Login = ''
# # dont shutdown when power button is short-pressed
# HandlePowerKey=ignore
# '';
}

View File

@ -1,7 +1,14 @@
{ pkgs, config, inputs, ... }: {
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
{
pkgs,
config,
...
}: {
virtualisation = {
docker.enable = true;
docker.extraPackages = [pkgs.docker-buildx];
libvirtd.enable = true;
};
programs.virt-manager.enable = true;
environment.systemPackages = with pkgs; [ virtiofsd ];
users.users."${config.var.username}".extraGroups = [ "docker" "libvirtd" ];
environment.systemPackages = with pkgs; [virtiofsd];
users.users."${config.var.username}".extraGroups = ["docker" "libvirtd"];
}

View File

@ -1,10 +1,29 @@
{ pkgs, ... }: {
{pkgs, ...}: {
# xdg.portal = {
# enable = true;
# config.common.default = "*";
# wlr.enable = true;
# xdgOpenUsePortal = true;
# extraPortals = [ pkgs.xdg-desktop-portal pkgs.xdg-desktop-portal-gtk ];
# };
xdg.portal = {
enable = true;
config.common.default = "*";
wlr.enable = true;
xdgOpenUsePortal = true;
extraPortals =
[ pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ];
wlr.enable = true;
config = {
common = {
default = [
"gtk"
"gnome"
];
};
niri = {
default = [
"gtk"
"gnome"
];
};
};
};
xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr pkgs.xdg-desktop-portal-gtk];
}

View File

@ -44,27 +44,31 @@
name = "JetBrains Mono Nerd Font";
};
sansSerif = {
package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd;
name = "SFProDisplay Nerd Font";
package = pkgs.inter;
name = "Inter Display";
};
serif = {
package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd;
name = "SFProDisplay Nerd Font";
package = pkgs.noto-fonts;
name = "Noto Serif";
};
emoji = {
package = pkgs.noto-fonts-emoji;
package = pkgs.noto-fonts-color-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 11;
desktop = 12;
popups = 12;
terminal = 11;
desktop = 10;
popups = 10;
terminal = 10;
};
};
polarity = "dark";
image = inputs.nixy-wallpapers + "/wallpapers/dark.png";
image = pkgs.fetchurl {
url =
"https://www.pixelstalk.net/wp-content/uploads/images3/Cute_Owl_HD_Background.jpg";
hash = "sha256-pqeVSfJgR9e5mCln6c+WDojAXDRujUSl2n+TS3agWdw=";
};
};
}

View File

@ -11,8 +11,8 @@
bar = {
position = "top"; # "top" | "bottom"
transparent = true;
transparentButtons = false;
floating = true;
transparent = false;
transparentButtons = true;
floating = false;
};
}