Compare commits
No commits in common. "47365d05f5cf035271c69c6899fd88957cabf075" and "9d7655193c3c1e274910537abe4ef546643ee058" have entirely different histories.
47365d05f5
...
9d7655193c
|
@ -16,7 +16,6 @@ in {
|
|||
curl
|
||||
dig
|
||||
nix-tree
|
||||
procps
|
||||
];
|
||||
|
||||
modules = {
|
||||
|
|
|
@ -8,13 +8,7 @@
|
|||
./feishin/default.nix
|
||||
./firefox/default.nix
|
||||
./fontconfig/default.nix
|
||||
./foot/default.nix
|
||||
./mako/default.nix
|
||||
./neovim/default.nix
|
||||
./obsidian/default.nix
|
||||
./qutebrowser/default.nix
|
||||
./rofi/default.nix
|
||||
./rofi/rofi-rbw.nix
|
||||
./shell/bash.nix
|
||||
./shell/fish.nix
|
||||
./steam/default.nix
|
||||
|
|
|
@ -1,120 +0,0 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.waybar;
|
||||
theme = config.theming;
|
||||
colors = theme.colors;
|
||||
in {
|
||||
options.modules.waybar = {
|
||||
enable = mkEnableOption "waybar";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
pulsemixer
|
||||
playerctl
|
||||
];
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
spacing = 16;
|
||||
modules-left = [
|
||||
"river/tags"
|
||||
];
|
||||
modules-center = [
|
||||
#"river/window"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
"river/window" = {
|
||||
max-length = 50;
|
||||
};
|
||||
"river/tags" = {
|
||||
tag-labels = [
|
||||
"一"
|
||||
"二"
|
||||
"三"
|
||||
"四"
|
||||
"五"
|
||||
"六"
|
||||
"七"
|
||||
"八"
|
||||
"九"
|
||||
];
|
||||
disable-click = false;
|
||||
};
|
||||
pulseaudio = {
|
||||
tooltip = false;
|
||||
format = "{icon} {volume}%"; # Spacing achieved using "Thin Space"
|
||||
#format-muted = "";
|
||||
format-muted = "{icon} --%"; # Spacing achieved using "Thin Space"
|
||||
format-icons = {
|
||||
#headphone = "";
|
||||
#default = [ "" "" ];
|
||||
headphone = "";
|
||||
headphone-muted = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%"; # Spacing achieved using "Thin Space"
|
||||
format-charging = " {capacity}%"; # Spacing achieved using "Thin Space"
|
||||
#format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
interval = 1;
|
||||
};
|
||||
clock = {
|
||||
#format = " {:%H:%M}";
|
||||
#format = " {:%H:%M}"; # Spacing achieved using "Thin Space"
|
||||
format = "{:%H:%M}";
|
||||
};
|
||||
mpris = {
|
||||
format = "{dynamic}";
|
||||
tooltip-format = "";
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
# TODO: Replace base03 color with named color
|
||||
style = ''
|
||||
window#waybar {
|
||||
color: #${colors.fg};
|
||||
background-color: #${colors.bg};
|
||||
border-style: none none solid none;
|
||||
border-width: ${toString theme.layout.borderSize}px;
|
||||
border-color: #${colors.unfocused};
|
||||
font-size: 12px;
|
||||
font-family: "${theme.fonts.monospace.name}";
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
#tags button {
|
||||
color: #${theme.schemeColors.base03};
|
||||
padding: 0 5px 1px 5px;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
font-family: "Unifont";
|
||||
}
|
||||
|
||||
#tags button.occupied {
|
||||
color: #${colors.fg};
|
||||
}
|
||||
|
||||
#tags button.focused {
|
||||
color: #${colors.accent};
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -6,13 +6,11 @@ let
|
|||
in {
|
||||
imports = [
|
||||
# Import desktop environment modules
|
||||
./bar/waybar.nix
|
||||
./lock-screen/waylock.nix
|
||||
./window-manager/river.nix
|
||||
];
|
||||
|
||||
options.modules.desktop = {
|
||||
wayland = mkEnableOption "wayland";
|
||||
initScript = mkOption {
|
||||
type = types.lines;
|
||||
default = "${pkgs.bash}/bin/bash";
|
||||
|
@ -21,11 +19,6 @@ in {
|
|||
};
|
||||
|
||||
config = {
|
||||
home.packages = optionals cfg.wayland (with pkgs; [
|
||||
pkgs.wl-clipboard
|
||||
pkgs.wtype
|
||||
]);
|
||||
|
||||
home.file.".initrc" = {
|
||||
enable = true;
|
||||
executable = true;
|
||||
|
|
|
@ -10,32 +10,14 @@ in {
|
|||
# };
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Set desktop type to wayland
|
||||
modules.desktop.wayland = true;
|
||||
|
||||
# Change desktop to execute river
|
||||
modules.desktop.initScript = ''
|
||||
river
|
||||
'';
|
||||
|
||||
# Update background after rebuild
|
||||
home.activation = {
|
||||
river = lib.hm.dag.entryAfter [ "installPackages" ] ''
|
||||
# Close waybar
|
||||
PATH="${pkgs.procps}/bin:$PATH" $DRY_RUN_CMD pkill waybar
|
||||
|
||||
# Kill rivertile
|
||||
PATH="${pkgs.procps}/bin:$PATH" $DRY_RUN_CMD pkill rivertile
|
||||
|
||||
# Restart river
|
||||
PATH="${pkgs.river}/bin:$PATH" $DRY_RUN_CMD ~/.config/river/init
|
||||
'';
|
||||
};
|
||||
|
||||
# River setup
|
||||
wayland.windowManager.river = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
xwayland.enable = true;
|
||||
settings = let
|
||||
layout = "rivertile";
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.feishin;
|
||||
in {
|
||||
options.modules.feishin.enable = mkEnableOption "feishin";
|
||||
options.modules.feishin.enable = lib.mkEnableOption "feishin";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
feishin
|
||||
];
|
||||
|
|
|
@ -1,25 +0,0 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.foot;
|
||||
in {
|
||||
options.modules.foot.enable = mkEnableOption "foot";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = let
|
||||
font = config.theming.fonts.monospace.name;
|
||||
size = toString config.theming.fonts.monospace.recommendedSize;
|
||||
in {
|
||||
font = mkForce "${font}:style=Regular:size=${size}";
|
||||
font-bold = "${font}:style=Bold:size=${size}";
|
||||
font-italic = "${font}:style=Italic:size=${size}";
|
||||
font-bold-italic = "${font}:style=Bold Italic:size=${size}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.mako;
|
||||
theme = config.theming;
|
||||
colors = theme.colors;
|
||||
in {
|
||||
options.modules.mako.enable = mkEnableOption "mako";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
anchor = "top-right";
|
||||
defaultTimeout = 5000;
|
||||
backgroundColor = "#${colors.bg}ff";
|
||||
textColor = "#${colors.fg}ff";
|
||||
borderColor = "#${colors.fg}ff";
|
||||
progressColor = "#${colors.accent}ff";
|
||||
borderRadius = 0;
|
||||
borderSize = theme.layout.borderSize;
|
||||
font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,186 +0,0 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.neovim;
|
||||
theme = config.theming;
|
||||
colors = theme.colors;
|
||||
in {
|
||||
options.modules.neovim = {
|
||||
enable = mkEnableOption "neovim";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
];
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
signcolumn = "yes";
|
||||
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
softtabstop = 0;
|
||||
expandtab = true;
|
||||
smarttab = true;
|
||||
|
||||
list = true;
|
||||
listchars = "tab:»┈«,trail:·,extends:→,precedes:←,nbsp:␣";
|
||||
};
|
||||
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
signs = true;
|
||||
underline = true;
|
||||
update_in_insert = true;
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{text = "", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{text = "", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{text = "", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{text = "💡", texthl = "DiagnosticSignHint"})
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
# Save shortcut
|
||||
{
|
||||
action = ":update<CR>";
|
||||
key = "<C-s>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<C-o>:update<CR>";
|
||||
key = "<C-s>";
|
||||
mode = "i";
|
||||
}
|
||||
|
||||
# Neo tree
|
||||
{
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
key = "<leader>n";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
desc = "Automatic formatting";
|
||||
event = "BufWritePre";
|
||||
callback = {
|
||||
__raw = ''
|
||||
function()
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
highlight = {
|
||||
Comment = {
|
||||
italic = true;
|
||||
fg = theme.schemeColors.withHashtag.base03; # TODO: Come up with a good name colors.muted maybe?
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
#plugins.treesitter = {
|
||||
# enable = true;
|
||||
#};
|
||||
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
};
|
||||
sources = [
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
width = 30;
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
default_component_configs.git_status.symbols = {
|
||||
# Change type
|
||||
added = "+";
|
||||
deleted = "✕";
|
||||
modified = "✦";
|
||||
renamed = "→";
|
||||
|
||||
# Status type
|
||||
untracked = "?";
|
||||
ignored = "▫";
|
||||
unstaged = "□";
|
||||
staged = "■";
|
||||
conflict = "‼";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#plugins.cmp-nvim-lsp.enable = true;
|
||||
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings.current_line_blame = true;
|
||||
};
|
||||
|
||||
#plugins.copilot-vim = {
|
||||
# enable = true;
|
||||
#};
|
||||
|
||||
plugins.rust-tools = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
texlivePackage = null;
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.neovim.defaultEditor = true;
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.qutebrowser;
|
||||
theme = config.theming;
|
||||
in {
|
||||
options.modules.qutebrowser.enable = mkEnableOption "qutebrowser";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
config.set("colors.webpage.darkmode.enabled", False)
|
||||
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
|
||||
config.set("fonts.default_family", "${theme.fonts.monospace.name}")
|
||||
config.set("fonts.default_size", "${toString theme.fonts.monospace.recommendedSize}pt")
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.rofi;
|
||||
theme = config.theming;
|
||||
colors = theme.colors;
|
||||
in {
|
||||
options.modules.rofi.enable = mkEnableOption "rofi";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = "${theme.fonts.monospace.name} ${toString theme.fonts.monospace.recommendedSize}";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
border-color = mkLiteral "#${colors.fg}";
|
||||
text-color = mkLiteral "#${colors.fg}";
|
||||
};
|
||||
mainbox = {
|
||||
background-color = mkLiteral "#${colors.bg}";
|
||||
border = mkLiteral "${toString theme.layout.borderSize}px";
|
||||
};
|
||||
element-text = {
|
||||
highlight = mkLiteral "#${colors.accent}";
|
||||
};
|
||||
inputbar = {
|
||||
children = mkLiteral "[textbox-search, entry]";
|
||||
};
|
||||
listview = {
|
||||
padding = mkLiteral "2px 0px";
|
||||
};
|
||||
textbox-search = {
|
||||
expand = false;
|
||||
content = "> ";
|
||||
};
|
||||
"inputbar, message" = {
|
||||
padding = mkLiteral "2px";
|
||||
};
|
||||
element = {
|
||||
padding = mkLiteral "0px 2px";
|
||||
};
|
||||
"element selected" = {
|
||||
background-color = mkLiteral "#${colors.unfocused}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.rofi-rbw;
|
||||
in {
|
||||
options.modules.rofi-rbw.enable = mkEnableOption "rofi-rbw";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
modules.rofi.enable = true;
|
||||
|
||||
home.packages = [
|
||||
pkgs.rofi-rbw
|
||||
];
|
||||
|
||||
# TODO: Move to separate module and make configurable
|
||||
programs.rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = "https://keys.bulthuis.dev";
|
||||
identity_url = "https://keys.bulthuis.dev";
|
||||
email = "jan@bulthuis.dev";
|
||||
pinentry = pkgs.pinentry;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -104,12 +104,6 @@ in {
|
|||
description = "Base 16 color scheme to use for styling. See stylix documentation for more information.";
|
||||
};
|
||||
|
||||
clientSideDecorations = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Whether to enable client side decorations for windows.";
|
||||
};
|
||||
|
||||
schemeColors = mkOption {
|
||||
type = types.attrsOf types.anything;
|
||||
default = config.lib.stylix.colors;
|
||||
|
@ -125,10 +119,6 @@ in {
|
|||
type = types.str;
|
||||
default = colors.base05;
|
||||
};
|
||||
accent = mkOption {
|
||||
type = types.str;
|
||||
default = colors.base09;
|
||||
};
|
||||
focused = mkOption {
|
||||
type = types.str;
|
||||
default = cfg.colors.fg;
|
||||
|
@ -214,63 +204,6 @@ in {
|
|||
# Install configured fonts
|
||||
home.packages = fontPackageList;
|
||||
|
||||
# Configure gnome theme
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = if cfg.darkMode then "prefer-dark" else "prefer-light";
|
||||
};
|
||||
};
|
||||
|
||||
# Configure qt theme
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = if cfg.darkMode then "adwaita-dark" else "adwaita-light";
|
||||
};
|
||||
|
||||
# Configure gtk theme
|
||||
gtk = let
|
||||
disableCSD = ''
|
||||
headerbar.default-decoration {
|
||||
margin-bottom: 50px;
|
||||
margin-top: -100px;
|
||||
}
|
||||
|
||||
window.csd,
|
||||
window.csd decoration {
|
||||
box-shadow: none;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
name = if cfg.darkMode then "Adwaita-dark" else "Adwaita-light";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
|
||||
gtk3.extraCss = mkIf (! cfg.clientSideDecorations) disableCSD;
|
||||
gtk4.extraCss = mkIf (! cfg.clientSideDecorations) disableCSD;
|
||||
};
|
||||
|
||||
# TODO: This should just straight up not be here
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# TODO: Make cursors configurable using modules.
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
package = lib.mkForce pkgs.rose-pine-cursor;
|
||||
size = lib.mkForce 24;
|
||||
x11 = {
|
||||
defaultCursor = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable stylix
|
||||
# TODO: Move to own module
|
||||
stylix = {
|
||||
|
@ -278,11 +211,7 @@ in {
|
|||
autoEnable = false;
|
||||
|
||||
targets = {
|
||||
foot.enable = true;
|
||||
nixvim.enable = true;
|
||||
qutebrowser.enable = true;
|
||||
vscode.enable = true;
|
||||
zathura.enable = true;
|
||||
vscode.enable = config.modules.vscode.enable;
|
||||
};
|
||||
|
||||
base16Scheme = cfg.colorScheme;
|
||||
|
|
|
@ -47,9 +47,6 @@ in {
|
|||
|
||||
# Autoformatting
|
||||
"editor.formatOnSave" = true;
|
||||
|
||||
# Layout
|
||||
"window.menuBarVisibility" = "hidden";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
# How Jan likes his linux to be configured
|
||||
|
||||
{ config, ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# TODO: Remove later
|
||||
imports = [
|
||||
./janMerged.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
# State version
|
||||
home.stateVersion = "24.05";
|
||||
|
@ -12,7 +17,6 @@
|
|||
# Window manager
|
||||
river.enable = true;
|
||||
waylock.enable = true;
|
||||
waybar.enable = true;
|
||||
|
||||
# Theming
|
||||
theming.enable = true;
|
||||
|
@ -20,16 +24,11 @@
|
|||
# Programs
|
||||
feishin.enable = true;
|
||||
firefox.enable = true;
|
||||
foot.enable = true;
|
||||
mako.enable = true;
|
||||
vscode.enable = true;
|
||||
zathura.enable = true;
|
||||
fish.enable = true;
|
||||
winbox.enable = true;
|
||||
discord.enable = true;
|
||||
qutebrowser.enable = true;
|
||||
neovim.enable = true;
|
||||
rofi.enable = true; # TODO: Remove this, should be enabled by other modules that require rofi.
|
||||
|
||||
# Enable unfree
|
||||
unfree.enable = true;
|
||||
|
@ -42,12 +41,13 @@
|
|||
fonts.sansSerif = fontpkgs."DejaVu Sans";
|
||||
fonts.monospace = fontpkgs."Dina";
|
||||
fonts.emoji = fontpkgs."Dina";
|
||||
fonts.extraFonts = [];
|
||||
fonts.extraFonts = [
|
||||
];
|
||||
|
||||
# Color scheme
|
||||
themes.catppuccin = {
|
||||
enable = true;
|
||||
flavor = "frappe";
|
||||
flavor = "latte";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -0,0 +1,651 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
let
|
||||
# Theming constants
|
||||
colors = config.lib.stylix.colors;
|
||||
fonts = config.stylix.fonts;
|
||||
borderSize = 1;
|
||||
windowPadding = 2;
|
||||
|
||||
waylockOptions = "-init-color 0x${colors.base00} -input-color 0x${colors.base02} -fail-color 0x${colors.base00}";
|
||||
in {
|
||||
# Extra modules
|
||||
imports = [
|
||||
# nixvim.homeManagerModules.nixvim
|
||||
# stylix.homeManagerModules.stylix
|
||||
];
|
||||
|
||||
# Packages
|
||||
home.packages = with pkgs; [
|
||||
# Programs
|
||||
# vscode
|
||||
# feishin
|
||||
# discord
|
||||
# obsidian
|
||||
# winbox
|
||||
|
||||
# Utilities
|
||||
pulsemixer
|
||||
wl-clipboard
|
||||
pinentry-rofi
|
||||
wtype
|
||||
# waylock
|
||||
playerctl
|
||||
nix-tree
|
||||
|
||||
# Fish plugin dependencies
|
||||
# grc
|
||||
# fzf
|
||||
|
||||
# Rust development
|
||||
rustc
|
||||
cargo
|
||||
rustfmt
|
||||
|
||||
# Bitwarden
|
||||
rofi-rbw
|
||||
|
||||
# LaTeX libraries
|
||||
(pkgs.texlive.combine {
|
||||
inherit (pkgs.texlive) scheme-full;
|
||||
})
|
||||
];
|
||||
|
||||
# Stylix
|
||||
stylix = {
|
||||
# enable = true;
|
||||
# polarity = "dark";
|
||||
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
|
||||
fonts = {
|
||||
# monospace = {
|
||||
# package = pkgs.dina-font;
|
||||
# name = "Dina";
|
||||
# };
|
||||
|
||||
sizes = {
|
||||
terminal = 9;
|
||||
};
|
||||
};
|
||||
|
||||
# autoEnable = false;
|
||||
targets = {
|
||||
foot.enable = true;
|
||||
nixvim.enable = true;
|
||||
qutebrowser.enable = true;
|
||||
vscode.enable = true;
|
||||
# zathura.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Fish shell
|
||||
# programs.fish = {
|
||||
# enable = true;
|
||||
|
||||
# plugins = [
|
||||
# { name = "done"; src = pkgs.fishPlugins.done.src; }
|
||||
# { name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; }
|
||||
# { name = "grc"; src = pkgs.fishPlugins.grc.src; }
|
||||
# ];
|
||||
# };
|
||||
|
||||
# # Bash prompt
|
||||
# programs.bash = {
|
||||
# enable = true;
|
||||
# initExtra = ''
|
||||
# if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
# then
|
||||
# shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
# exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
# fi
|
||||
# '';
|
||||
# bashrcExtra = ''
|
||||
# FG_BLACK="\[$(tput setaf 0)\]"
|
||||
# FG_RED="\[$(tput setaf 1)\]"
|
||||
# FG_GREEN="\[$(tput setaf 2)\]"
|
||||
# FG_YELLOW="\[$(tput setaf 3)\]"
|
||||
# FG_BLUE="\[$(tput setaf 4)\]"
|
||||
# FG_MAGENTA="\[$(tput setaf 5)\]"
|
||||
# FG_CYAN="\[$(tput setaf 6)\]"
|
||||
# FG_WHITE="\[$(tput setaf 7)\]"
|
||||
|
||||
# RESET="\[$(tput sgr0)\]"
|
||||
|
||||
# export PS0="\n''${RESET}"
|
||||
# export PS1="''${FG_GREEN}\n│\w\n│"
|
||||
# export PS2="│"
|
||||
# '';
|
||||
# };
|
||||
|
||||
# Direnv setup
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Qutebrowser
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
|
||||
extraConfig = ''
|
||||
config.set("colors.webpage.darkmode.enabled", False)
|
||||
config.set("colors.webpage.preferred_color_scheme", "dark")
|
||||
config.set("fonts.default_family", "${fonts.monospace.name}")
|
||||
config.set("fonts.default_size", "${toString fonts.sizes.terminal}pt")
|
||||
'';
|
||||
};
|
||||
|
||||
# Bitwarden client
|
||||
programs.rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = "https://keys.bulthuis.dev";
|
||||
identity_url = "https://keys.bulthuis.dev";
|
||||
email = "jan@bulthuis.dev";
|
||||
pinentry = pkgs.pinentry;
|
||||
};
|
||||
};
|
||||
|
||||
# Firefox
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
policies = {
|
||||
AppAutoUpdate = false;
|
||||
BlockAboutAddons = true;
|
||||
BlockAboutConfig = true;
|
||||
BlockAboutProfiles = true;
|
||||
DisableAppUpdate = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableMasterPasswordCreation = true;
|
||||
DisablePocket = true;
|
||||
DisableProfileImport = true;
|
||||
DisableProfileRefresh = true;
|
||||
DisableSetDesktopBackground = true;
|
||||
DisableTelemetry = true;
|
||||
DisplayBookmarksToolbar = "never";
|
||||
DisplayMenuBar = "never";
|
||||
DNSOverHTTPS = { Enabled = false; };
|
||||
DontCheckDefaultBrowser = true;
|
||||
PasswordManagerEnabled = false;
|
||||
TranslateEnabled = true;
|
||||
UseSystemPrintDialog = true;
|
||||
};
|
||||
profiles.nixos = {
|
||||
search.default = "DuckDuckGo";
|
||||
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
];
|
||||
|
||||
settings = {
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
};
|
||||
|
||||
# Force overwriting configuration file
|
||||
search.force = true;
|
||||
containersForce = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Email setup
|
||||
accounts.email.accounts = {
|
||||
Personal = {
|
||||
primary = true;
|
||||
realName = "Jan Bulthuis";
|
||||
userName = "jan@bulthuis.dev";
|
||||
address = "jan@bulthuis.dev";
|
||||
thunderbird.enable = true;
|
||||
|
||||
flavor = "plain";
|
||||
imap = {
|
||||
host = "mail.bulthuis.dev";
|
||||
port = 993;
|
||||
};
|
||||
smtp = {
|
||||
host = "mail.bulthuis.dev";
|
||||
port = 465;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Thunderbird setup
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.nixos = {
|
||||
isDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Rofi setup
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = "${fonts.monospace.name} ${toString fonts.sizes.terminal}";
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
border-color = mkLiteral colors.withHashtag.base05;
|
||||
text-color = mkLiteral colors.withHashtag.base05;
|
||||
};
|
||||
mainbox = {
|
||||
background-color = mkLiteral colors.withHashtag.base00;
|
||||
border = mkLiteral "${toString borderSize}px";
|
||||
};
|
||||
element-text = {
|
||||
highlight = mkLiteral colors.withHashtag.base09;
|
||||
};
|
||||
inputbar = {
|
||||
children = mkLiteral "[textbox-search, entry]";
|
||||
};
|
||||
listview = {
|
||||
padding = mkLiteral "2px 0px";
|
||||
};
|
||||
textbox-search = {
|
||||
expand = false;
|
||||
content = "> ";
|
||||
};
|
||||
"inputbar, message" = {
|
||||
padding = mkLiteral "2px";
|
||||
};
|
||||
element = {
|
||||
padding = mkLiteral "0px 2px";
|
||||
};
|
||||
"element selected" = {
|
||||
background-color = mkLiteral colors.withHashtag.base02;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Dark mode
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/interface" = {
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme.name = "adwaita";
|
||||
style.name = "adwaita-dark";
|
||||
};
|
||||
systemd.user.sessionVariables = config.home.sessionVariables;
|
||||
|
||||
# Configure GTK
|
||||
gtk = let
|
||||
css = ''
|
||||
headerbar.default-decoration {
|
||||
margin-bottom: 50px;
|
||||
margin-top: -100px;
|
||||
}
|
||||
|
||||
window.csd,
|
||||
window.csd decoration {
|
||||
box-shadow: none;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
enable = true;
|
||||
|
||||
# Dark mode
|
||||
theme = {
|
||||
name = "Adwaita-dark";
|
||||
package = pkgs.gnome-themes-extra;
|
||||
};
|
||||
|
||||
# Disable CSD
|
||||
gtk3.extraCss = css;
|
||||
gtk4.extraCss = css;
|
||||
};
|
||||
|
||||
# Cursors
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
package = lib.mkForce pkgs.rose-pine-cursor;
|
||||
size = lib.mkForce 24;
|
||||
x11 = {
|
||||
defaultCursor = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Neovim setup
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
];
|
||||
|
||||
opts = {
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
|
||||
signcolumn = "yes";
|
||||
|
||||
ignorecase = true;
|
||||
smartcase = true;
|
||||
|
||||
tabstop = 4;
|
||||
shiftwidth = 4;
|
||||
softtabstop = 0;
|
||||
expandtab = true;
|
||||
smarttab = true;
|
||||
|
||||
list = true;
|
||||
listchars = "tab:»┈«,trail:·,extends:→,precedes:←,nbsp:␣";
|
||||
};
|
||||
|
||||
diagnostics = {
|
||||
enable = true;
|
||||
signs = true;
|
||||
underline = true;
|
||||
update_in_insert = true;
|
||||
};
|
||||
|
||||
extraConfigLua = ''
|
||||
vim.fn.sign_define("DiagnosticSignError",
|
||||
{text = "", texthl = "DiagnosticSignError"})
|
||||
vim.fn.sign_define("DiagnosticSignWarn",
|
||||
{text = "", texthl = "DiagnosticSignWarn"})
|
||||
vim.fn.sign_define("DiagnosticSignInfo",
|
||||
{text = "", texthl = "DiagnosticSignInfo"})
|
||||
vim.fn.sign_define("DiagnosticSignHint",
|
||||
{text = "💡", texthl = "DiagnosticSignHint"})
|
||||
'';
|
||||
|
||||
keymaps = [
|
||||
# Save shortcut
|
||||
{
|
||||
action = ":update<CR>";
|
||||
key = "<C-s>";
|
||||
mode = "n";
|
||||
}
|
||||
{
|
||||
action = "<C-o>:update<CR>";
|
||||
key = "<C-s>";
|
||||
mode = "i";
|
||||
}
|
||||
|
||||
# Neo tree
|
||||
{
|
||||
action = ":Neotree action=focus reveal toggle<CR>";
|
||||
key = "<leader>n";
|
||||
mode = "n";
|
||||
options.silent = true;
|
||||
}
|
||||
];
|
||||
|
||||
autoCmd = [
|
||||
{
|
||||
desc = "Automatic formatting";
|
||||
event = "BufWritePre";
|
||||
callback = {
|
||||
__raw = ''
|
||||
function()
|
||||
vim.lsp.buf.format {
|
||||
async = false,
|
||||
}
|
||||
end
|
||||
'';
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
highlight = {
|
||||
Comment = {
|
||||
italic = true;
|
||||
fg = colors.withHashtag.base03;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
plugins.lsp = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
#plugins.treesitter = {
|
||||
# enable = true;
|
||||
#};
|
||||
|
||||
plugins.cmp = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-Space>" = "cmp.mapping.complete()";
|
||||
"<C-d>" = "cmp.mapping.scroll_docs(-4)";
|
||||
"<C-e>" = "cmp.mapping.close()";
|
||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
||||
"<S-Tab>" = "cmp.mapping(cmp.mapping.select_prev_item(), {'i', 's'})";
|
||||
"<Tab>" = "cmp.mapping(cmp.mapping.select_next_item(), {'i', 's'})";
|
||||
};
|
||||
sources = [
|
||||
{ name = "path"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
plugins.neo-tree = {
|
||||
enable = true;
|
||||
|
||||
closeIfLastWindow = true;
|
||||
window = {
|
||||
width = 30;
|
||||
autoExpandWidth = true;
|
||||
};
|
||||
|
||||
extraOptions = {
|
||||
default_component_configs.git_status.symbols = {
|
||||
# Change type
|
||||
added = "+";
|
||||
deleted = "✕";
|
||||
modified = "✦";
|
||||
renamed = "→";
|
||||
|
||||
# Status type
|
||||
untracked = "?";
|
||||
ignored = "▫";
|
||||
unstaged = "□";
|
||||
staged = "■";
|
||||
conflict = "‼";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#plugins.cmp-nvim-lsp.enable = true;
|
||||
|
||||
plugins.gitsigns = {
|
||||
enable = true;
|
||||
settings.current_line_blame = true;
|
||||
};
|
||||
|
||||
#plugins.copilot-vim = {
|
||||
# enable = true;
|
||||
#};
|
||||
|
||||
plugins.rust-tools = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
plugins.vimtex = {
|
||||
enable = true;
|
||||
texlivePackage = null;
|
||||
settings = {
|
||||
view_method = "zathura";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.neovim.defaultEditor = true;
|
||||
|
||||
# Foot setup
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = let
|
||||
font = fonts.monospace.name;
|
||||
size = toString fonts.sizes.terminal;
|
||||
in {
|
||||
font = lib.mkForce "${font}:style=Regular:size=${size}";
|
||||
font-bold = "${font}:style=Bold:size=${size}";
|
||||
font-italic = "${font}:style=Italic:size=${size}";
|
||||
font-bold-italic = "${font}:style=Bold Italic:size=${size}";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Fuzzel setup
|
||||
#programs.fuzzel = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# main = {
|
||||
# font = "${fonts.monospace.name}:size=${toString fonts.sizes.terminal}";
|
||||
# icons-enabled = "no";
|
||||
# horizontal-pad = borderSize;
|
||||
# vertical-pad = borderSize;
|
||||
# inner-pad = 2;
|
||||
# dpi-aware = "no";
|
||||
# };
|
||||
# colors = {
|
||||
# background = colors.base00 + "ff";
|
||||
# text = colors.base05 + "ff";
|
||||
# match = colors.base09 + "ff";
|
||||
# selection = colors.base02 + "ff";
|
||||
# selection-text = colors.base05 + "ff";
|
||||
# selection-match = colors.base09 + "ff";
|
||||
# border = colors.base05 + "ff";
|
||||
# };
|
||||
# border = {
|
||||
# width = borderSize;
|
||||
# radius = 0;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# Mako notifications setup
|
||||
services.mako = {
|
||||
enable = true;
|
||||
anchor = "top-right";
|
||||
defaultTimeout = 5000;
|
||||
backgroundColor = "#${colors.base00}ff";
|
||||
textColor = "#${colors.base05}ff";
|
||||
borderColor = "#${colors.base05}ff";
|
||||
progressColor = "#${colors.base09}ff";
|
||||
borderRadius = 0;
|
||||
borderSize = borderSize;
|
||||
font = "${fonts.monospace.name} ${toString fonts.sizes.terminal}";
|
||||
};
|
||||
|
||||
# Waybar setup
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
spacing = 16;
|
||||
modules-left = [
|
||||
"river/tags"
|
||||
];
|
||||
modules-center = [
|
||||
#"river/window"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"clock"
|
||||
];
|
||||
"river/window" = {
|
||||
max-length = 50;
|
||||
};
|
||||
"river/tags" = {
|
||||
tag-labels = [
|
||||
"一"
|
||||
"二"
|
||||
"三"
|
||||
"四"
|
||||
"五"
|
||||
"六"
|
||||
"七"
|
||||
"八"
|
||||
"九"
|
||||
];
|
||||
disable-click = false;
|
||||
};
|
||||
pulseaudio = {
|
||||
tooltip = false;
|
||||
format = "{icon} {volume}%"; # Spacing achieved using "Thin Space"
|
||||
#format-muted = "";
|
||||
format-muted = "{icon} --%"; # Spacing achieved using "Thin Space"
|
||||
format-icons = {
|
||||
#headphone = "";
|
||||
#default = [ "" "" ];
|
||||
headphone = "";
|
||||
headphone-muted = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%"; # Spacing achieved using "Thin Space"
|
||||
format-charging = " {capacity}%"; # Spacing achieved using "Thin Space"
|
||||
#format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" "" "" ];
|
||||
interval = 1;
|
||||
};
|
||||
clock = {
|
||||
#format = " {:%H:%M}";
|
||||
#format = " {:%H:%M}"; # Spacing achieved using "Thin Space"
|
||||
format = "{:%H:%M}";
|
||||
};
|
||||
mpris = {
|
||||
format = "{dynamic}";
|
||||
tooltip-format = "";
|
||||
interval = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
window#waybar {
|
||||
color: #${colors.base05};
|
||||
background-color: #${colors.base00};
|
||||
border-style: none none solid none;
|
||||
border-width: ${toString borderSize}px;
|
||||
border-color: #${colors.base01};
|
||||
font-size: 12px;
|
||||
font-family: "${fonts.monospace.name}";
|
||||
}
|
||||
|
||||
.modules-right {
|
||||
margin: 0 8px 0 0;
|
||||
}
|
||||
|
||||
#tags button {
|
||||
color: #${colors.base03};
|
||||
padding: 0 5px 1px 5px;
|
||||
border-radius: 0;
|
||||
font-size: 16px;
|
||||
font-family: "Unifont";
|
||||
}
|
||||
|
||||
#tags button.occupied {
|
||||
color: #${colors.base05};
|
||||
}
|
||||
|
||||
#tags button.focused {
|
||||
color: #${colors.base09};
|
||||
}
|
||||
|
||||
#tags.button.bell {
|
||||
color: #${colors.base0A};
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
home.stateVersion = "24.05";
|
||||
}
|
Loading…
Reference in New Issue