Reworked home manager configuration to modules

This commit is contained in:
xeovalyte 2024-12-24 10:20:09 +01:00
parent 5edd8b1e01
commit b3fde8e028
Signed by: xeovalyte
SSH Key Fingerprint: SHA256:kSQDrQDmKzljJzfGYcd3m9RqHi4h8rSwkZ3sQ9kBURo
54 changed files with 1202 additions and 1463 deletions

View File

@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [

View File

@ -2,21 +2,10 @@
{ {
imports = [ imports = [
# GUI # Modules
../../modules/home/gui/common ../../modules/home/default.nix
../../modules/home/gui/hyprland
../../modules/home/gui/nextcloud.nix
../../modules/home/gui/theming.nix
../../modules/home/gui/thunderbird.nix
# CLI
../../modules/home/cli/common
../../modules/home/cli/develop.nix
../../modules/home/cli/ssh.nix
../../modules/home/cli/yazi.nix
]; ];
options = { options = {
host = lib.mkOption { host = lib.mkOption {
type = with lib.types; str; type = with lib.types; str;
@ -42,6 +31,27 @@
host = "xv-laptop"; host = "xv-laptop";
headless = false; headless = false;
settings = {
applications.common.enable = true;
applications.alacritty.enable = true;
applications.devenv.enable = true;
applications.firefox.enable = true;
applications.git.enable = true;
applications.helix.enable = true;
applications.zsh.enable = true;
applications.ssh.enable = true;
applications.thunderbird.enable = true;
applications.yazi.enable = true;
applications.zellij.enable = true;
services.nextcloud-sync.enable = true;
theming.fonts.enable = true;
theming.nix-colors.enable = true;
desktop-environments.hyprland.enable = false;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
# Desktop Applications # Desktop Applications
kdenlive kdenlive

View File

@ -0,0 +1,62 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.alacritty;
in {
options = {
settings.applications.alacritty.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable alacritty terimnal
'';
};
};
config = mkIf cfg.enable {
programs.alacritty = {
enable = true;
settings = {
font = {
normal = { family = "DejaVuSansM Nerd Font"; style = "Regular"; };
};
window = {
opacity = 0.8;
padding = { x = 10; y = 10; };
};
colors = {
draw_bold_text_with_bright_colors = false;
primary = {
background = "0x${config.colorScheme.palette.base00}";
foreground = "0x${config.colorScheme.palette.base05}";
};
cursor = {
text = "0x${config.colorScheme.palette.base00}";
cursor = "0x${config.colorScheme.palette.base05}";
};
normal = {
black = "0x${config.colorScheme.palette.base00}";
red = "0x${config.colorScheme.palette.base08}";
green = "0x${config.colorScheme.palette.base0B}";
yellow = "0x${config.colorScheme.palette.base0A}";
blue = "0x${config.colorScheme.palette.base0D}";
magenta = "0x${config.colorScheme.palette.base0E}";
cyan = "0x${config.colorScheme.palette.base0C}";
white = "0x${config.colorScheme.palette.base05}";
};
bright = {
black = "0x${config.colorScheme.palette.base03}";
red = "0x${config.colorScheme.palette.base09}";
green = "0x${config.colorScheme.palette.base01}";
yellow = "0x${config.colorScheme.palette.base02}";
blue = "0x${config.colorScheme.palette.base04}";
magenta = "0x${config.colorScheme.palette.base06}";
cyan = "0x${config.colorScheme.palette.base0F}";
white = "0x${config.colorScheme.palette.base07}";
};
};
};
};
};
}

View File

@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.applications.common;
in {
options = {
settings.applications.common.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable common applications
'';
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
vlc
bitwarden
pavucontrol
];
};
}

View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.applications.devenv;
in {
options = {
settings.applications.devenv.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable common applications
'';
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
unstable.devenv
cloc
];
programs.direnv = {
enable = true;
enableBashIntegration = true;
};
};
}

View File

@ -0,0 +1,171 @@
{ config, lib, pkgs, ... }:
# about:policies
# Check about:support for extension/add-on ID strings.
# Check about:config for options.
with lib;
let
cfg = config.settings.applications.firefox;
in {
options = {
settings.applications.firefox.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable firefox
'';
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
unstable.firefoxpwa
];
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.unstable.firefoxpwa ];
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "newpage";
ExtensionSettings = {
"nl-NL@dictionaries.addons.mozilla.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/woordenboek-nederlands/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
"firefoxpwa@filips.si" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/pwas-for-firefox/latest.xpi";
installation_mode = "force_installed";
};
"markdown-viewer@outofindex.com" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/markdown-viewer-chrome/latest.xpi";
installation_mode = "force_installed";
};
};
};
profiles.xeovalyte = {
bookmarks = [
{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "Brightspace";
bookmarks = [
{
name = "Books";
url = "https://drive.google.com/drive/folders/1L5OTbn5p3i7_Nc80hc5PztiEGHKwi-I4";
}
{
name = "LCB";
url = "https://brightspace.tudelft.nl/d2l/le/content/681010/Home";
}
{
name = "Calculus";
url = "https://brightspace.tudelft.nl/d2l/le/content/681024/Home";
}
{
name = "IP1";
url = "https://brightspace.tudelft.nl/d2l/le/content/681020/Home";
}
];
}
];
}
];
search.engines = {
"Nix" = {
urls = [{
template = "https://mynixos.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nix" ];
};
"SearXNG" = {
urls = [{
template = "https:/search.xeovalyte.dev/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@searxng" ];
};
"Startpage" = {
urls = [{
template = "https:/startpage.com/sp/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@sp" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
search.force = true;
search.default = "SearXNG";
settings = {
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.download.useDownloadDir" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"dom.security.https_only_mode" = true;
"privacy.trackingProtection.enabled" = true;
"browser.toolbars.bookmarks.visibility" = "newtab";
"browser.translations.neverTranslateLanguages" = "nl";
"browser.newtabpage.pinned" = [
{
label = "Server";
url = "https://home.xeovalyte.dev";
}
{
label = "Youtube";
url = "https://youtube.com";
}
{
label = "My TU Delft";
url = "https://my.tudelft.nl/";
}
];
"signon.rememberSignons" = false;
};
};
};
};
}

View File

@ -0,0 +1,46 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.git;
in {
options = {
settings.applications.git.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable git version control
'';
};
settings.applications.git.lazygit.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable lazygit
'';
default = true;
};
};
config = mkIf cfg.enable {
programs.lazygit = {
enable = true;
settings = {
services = {
"gitea.xeovalyte.dev" = "gitea:gitea.xeovalyte.dev";
};
};
};
programs.git = mkIf cfg.lazygit.enable {
enable = true;
userEmail = "me+gitea@xeovalyte.dev";
userName = "xeovalyte";
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
user.signingkey = "~/.ssh/gitea.pub";
};
};
};
}

View File

@ -0,0 +1,218 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.applications.helix;
in {
options = {
settings.applications.helix.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable helix text editor
'';
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
unstable.marksman
unstable.markdown-oxide
unstable.svls
unstable.nil
unstable.nixpkgs-fmt
unstable.tectonic
unstable.texlab
dprint
];
home.file.".config/.dprint.json".text =''
{
"markdown": {
"lineWidth":120,
},
"excludes": [],
"plugins": [
"https://plugins.dprint.dev/markdown-0.16.1.wasm"
]
}
'';
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
defaultEditor = true;
settings = {
theme = "base16";
editor.cursor-shape = {
insert = "bar";
};
};
languages = {
# Rust
language-server.rust-analyzer.config = {
cargo = {
features = "all";
};
};
# Systemverilog
language-server.svls = {
command = "svls";
};
language-server.texlab = {
config = {
texlab.chktex = {
onOpenAndSave = true;
onEdit = true;
};
texlab.forwardSearch = {
executable = "zathura";
args = [
"--synctex-forward"
"%l:%c:%f"
"%p"
];
};
texlab.build = {
auxDirectory = "build";
logDirectory = "build";
pdfDirectory = "build";
forwardSearchAfter = true;
onSave = true;
executable = "tectonic";
args = [
"-X"
"compile"
"--synctex"
"--keep-logs"
"--keep-intermediates"
"--outdir=build"
"%f"
];
};
};
};
language = [
{
name = "verilog";
language-servers = [ "svls" ];
}
{
name = "html";
language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ];
}
{
name = "css";
language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ];
}
{
name = "markdown";
auto-format = true;
language-servers = [ "markdown-oxide" ];
formatter.command = "dprint";
formatter.args = ["fmt" "--stdin" "md" "--config" "/home/xeovalyte/.config/.dprint.json"];
}
{
name = "typst";
auto-format = false;
formatter.command = "${pkgs.typstfmt}/bin/typstfmt";
}
];
};
themes = {
base16 = let
base00 = "#${config.colorScheme.palette.base00}";
base01 = "#${config.colorScheme.palette.base01}";
base02 = "#${config.colorScheme.palette.base02}";
base03 = "#${config.colorScheme.palette.base03}";
base04 = "#${config.colorScheme.palette.base04}";
base05 = "#${config.colorScheme.palette.base05}";
base06 = "#${config.colorScheme.palette.base06}";
base07 = "#${config.colorScheme.palette.base07}";
base08 = "#${config.colorScheme.palette.base08}";
base09 = "#${config.colorScheme.palette.base09}";
base0A = "#${config.colorScheme.palette.base0A}";
base0B = "#${config.colorScheme.palette.base0B}";
base0C = "#${config.colorScheme.palette.base0C}";
base0D = "#${config.colorScheme.palette.base0D}";
base0E = "#${config.colorScheme.palette.base0E}";
base0F = "#${config.colorScheme.palette.base0F}";
in {
"attributes" = base09;
"comment" = { fg = base03; modifiers = ["italic"]; };
"constant" = base09;
"constant.character.escape" = base0C;
"constant.numeric" = base09;
"constructor" = base0D;
"debug" = base03;
"diagnostic" = { modifiers = ["underlined"]; };
"diff.delta" = base09;
"diff.minus" = base08;
"diff.plus" = base0B;
"error" = base08;
"function" = base0D;
"hint" = base03;
"info" = base0D;
"keyword" = base0E;
"label" = base0E;
"namespace" = base0E;
"operator" = base05;
"special" = base0D;
"string" = base0B;
"type" = base0A;
"variable" = base08;
"variable.other.member" = base0B;
"warning" = base09;
"markup.bold" = { fg = base0A; modifiers = ["bold"]; };
"markup.heading" = base0D;
"markup.italic" = { fg = base0E; modifiers = ["italic"]; };
"markup.link.text" = base08;
"markup.link.url" = { fg = base09; modifiers = ["underlined"]; };
"markup.list" = base08;
"markup.quote" = base0C;
"markup.raw" = base0B;
"markup.strikethrough" = { modifiers = ["crossed_out"]; };
"diagnostic.hint" = { underline = { style = "curl"; }; };
"diagnostic.info" = { underline = { style = "curl"; }; };
"diagnostic.warning" = { underline = { style = "curl"; }; };
"diagnostic.error" = { underline = { style = "curl"; }; };
# "ui.background" = { bg = base00; };
"ui.bufferline.active" = { fg = base00; bg = base03; modifiers = ["bold"]; };
"ui.bufferline" = { fg = base04; bg = base00; };
"ui.cursor" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursor.insert" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursorline.primary" = { fg = base05; bg = base01; };
"ui.cursor.match" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursor.select" = { fg = base0A; modifiers = ["reversed"]; };
"ui.gutter" = { bg = base00; };
"ui.help" = { fg = base06; bg = base01; };
"ui.linenr" = { fg = base03; bg = base00; };
"ui.linenr.selected" = { fg = base04; bg = base01; modifiers = ["bold"]; };
"ui.menu" = { fg = base05; bg = base01; };
"ui.menu.scroll" = { fg = base03; bg = base01; };
"ui.menu.selected" = { fg = base01; bg = base04; };
"ui.popup" = { bg = base01; };
"ui.selection" = { bg = base02; };
"ui.selection.primary" = { bg = base02; };
"ui.statusline" = { fg = base04; bg = base01; };
"ui.statusline.inactive" = { bg = base01; fg = base03; };
"ui.statusline.insert" = { fg = base00; bg = base0B; };
"ui.statusline.normal" = { fg = base00; bg = base03; };
"ui.statusline.select" = { fg = base00; bg = base0F; };
"ui.text" = base05;
"ui.text.focus" = base05;
"ui.virtual.indent-guide" = { fg = base03; };
"ui.virtual.inlay-hint" = { fg = base01; };
"ui.virtual.ruler" = { bg = base01; };
"ui.window" = { bg = base01; };
};
};
};
};
}

View File

@ -0,0 +1,37 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.ssh;
in {
options = {
settings.applications.ssh.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable ssh and configure some endpoints
'';
};
};
config = mkIf cfg.enable {
programs.ssh = {
enable = true;
matchBlocks = {
archserver = {
hostname = "192.168.1.20";
user = "xeovalyte";
identityFile = "~/.ssh/archserver";
};
"gitea.xeovalyte.dev" = {
hostname = "gitea.xeovalyte.dev";
port = 2222;
user = "git";
identityFile = "~/.ssh/gitea";
};
};
addKeysToAgent = "yes";
};
};
}

View File

@ -0,0 +1,101 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.applications.thunderbird;
in {
options = {
settings.applications.thunderbird.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable thunderbird mail
'';
};
};
config = mkIf cfg.enable {
programs.thunderbird = {
enable = true;
package = pkgs.unstable.thunderbird;
profiles = {
default = {
isDefault = true;
};
};
};
accounts.email.accounts = {
ziggo = {
imap = {
host = "imap.ziggo.nl";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "smtp.ziggo.nl";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
address = "timo.boomers@ziggo.nl";
realName = "Timo Boomers";
userName = "timo.boomers@ziggo.nl";
primary = true;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
tudelft = {
imap = {
host = "outlook.office365.com";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "smtp.office365.com";
port = 587;
tls = {
enable = true;
useStartTls = false;
};
};
address = "tboomers@tudelft.nl";
realName = "Timo Boomers";
userName = "tboomers@tudelft.nl";
primary = false;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
xeovalyte = {
imap = {
host = "mail.xeovalyte.dev";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "mail.xeovalyte.dev";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
address = "timo@xeovalyte.dev";
aliases = [ "me@xeovalyte.dev" "contact@xeovalyte.dev" ];
realName = "Timo Boomers";
userName = "me@xeovalyte.dev";
primary = false;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
};
};
}

View File

@ -0,0 +1,35 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.yazi;
in {
options = {
settings.applications.yazi.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable yazi terminal file manager
'';
};
};
config = mkIf cfg.enable {
programs.yazi = {
enable = true;
enableZshIntegration = true;
settings = {
opener = {
open = [
{ run = "xdg-open $@"; desc = "xdg"; orphan = true; }
];
};
open = {
prepend_rules = [
{ name = "*.rnote"; use = "open"; }
];
};
};
};
};
}

View File

@ -0,0 +1,92 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.applications.zellij;
in {
options = {
settings.applications.zellij.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable zellij tool
'';
};
};
config = mkIf cfg.enable {
programs.zellij = {
enable = true;
};
home.file.zellij = {
target = ".config/zellij/config.kdl";
text = ''
pane_frames false
keybinds {
normal {
bind "Ctrl e" { ToggleFloatingPanes; SwitchToMode "normal"; }
bind "Alt 1" { GoToTab 1; }
bind "Alt 2" { GoToTab 2; }
bind "Alt 3" { GoToTab 3; }
bind "Alt 4" { GoToTab 4; }
bind "Alt 5" { GoToTab 5; }
}
}
'';
};
home.file.zellij-layout-default = {
target = ".config/zellij/layouts/default.kdl";
text = ''
layout {
pane
floating_panes {
pane {
width "80%"
height "80%"
x "10%"
y "10%"
}
}
}
'';
};
home.file.zellij-layout-dioxus = {
target = ".config/zellij/layouts/dioxus.kdl";
text = ''
layout {
tab {
pane {
command "hx"
args "."
focus true
}
floating_panes {
pane {
width "80%"
height "80%"
x "10%"
y "10%"
}
}
}
tab {
pane {
command "dx"
args "serve"
}
}
tab {
pane {
command "devenv"
args "up"
}
}
}
'';
};
};
}

View File

@ -0,0 +1,49 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.applications.zsh;
in {
options = {
settings.applications.zsh.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable zsh shell
'';
};
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
eza
bat
];
home.shellAliases = {
ls = "eza";
};
programs.bash = {
enable = false;
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
programs.skim = {
enable = true;
enableZshIntegration = true;
};
};
}

View File

@ -1,9 +0,0 @@
{ ... }:
{
imports = [
./git.nix
./shell.nix
./helix.nix
];
}

View File

@ -1,23 +0,0 @@
{ pkgs, ... }:
{
programs.lazygit = {
enable = true;
settings = {
services = {
"gitea.xeovalyte.dev" = "gitea:gitea.xeovalyte.dev";
};
};
};
programs.git = {
enable = true;
userEmail = "me+gitea@xeovalyte.dev";
userName = "xeovalyte";
extraConfig = {
commit.gpgsign = true;
gpg.format = "ssh";
user.signingkey = "~/.ssh/gitea.pub";
};
};
}

View File

@ -1,203 +0,0 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs; [
unstable.marksman
unstable.markdown-oxide
unstable.svls
unstable.nil
unstable.nixpkgs-fmt
unstable.tectonic
unstable.texlab
dprint
];
home.file.".config/.dprint.json".text =''
{
"markdown": {
"lineWidth":120,
},
"excludes": [],
"plugins": [
"https://plugins.dprint.dev/markdown-0.16.1.wasm"
]
}
'';
programs.helix = {
enable = true;
package = pkgs.unstable.helix;
defaultEditor = true;
settings = {
theme = "base16";
editor.cursor-shape = {
insert = "bar";
};
};
languages = {
# Rust
language-server.rust-analyzer.config = {
cargo = {
features = "all";
};
};
# Systemverilog
language-server.svls = {
command = "svls";
};
language-server.texlab = {
config = {
texlab.chktex = {
onOpenAndSave = true;
onEdit = true;
};
texlab.forwardSearch = {
executable = "zathura";
args = [
"--synctex-forward"
"%l:%c:%f"
"%p"
];
};
texlab.build = {
auxDirectory = "build";
logDirectory = "build";
pdfDirectory = "build";
forwardSearchAfter = true;
onSave = true;
executable = "tectonic";
args = [
"-X"
"compile"
"--synctex"
"--keep-logs"
"--keep-intermediates"
"--outdir=build"
"%f"
];
};
};
};
language = [
{
name = "verilog";
language-servers = [ "svls" ];
}
{
name = "html";
language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ];
}
{
name = "css";
language-servers = [ "vscode-html-language-server" "tailwindcss-ls" ];
}
{
name = "markdown";
auto-format = true;
language-servers = [ "markdown-oxide" ];
formatter.command = "dprint";
formatter.args = ["fmt" "--stdin" "md" "--config" "/home/xeovalyte/.config/.dprint.json"];
}
{
name = "typst";
auto-format = false;
formatter.command = "${pkgs.typstfmt}/bin/typstfmt";
}
];
};
themes = {
base16 = let
base00 = "#${config.colorScheme.palette.base00}";
base01 = "#${config.colorScheme.palette.base01}";
base02 = "#${config.colorScheme.palette.base02}";
base03 = "#${config.colorScheme.palette.base03}";
base04 = "#${config.colorScheme.palette.base04}";
base05 = "#${config.colorScheme.palette.base05}";
base06 = "#${config.colorScheme.palette.base06}";
base07 = "#${config.colorScheme.palette.base07}";
base08 = "#${config.colorScheme.palette.base08}";
base09 = "#${config.colorScheme.palette.base09}";
base0A = "#${config.colorScheme.palette.base0A}";
base0B = "#${config.colorScheme.palette.base0B}";
base0C = "#${config.colorScheme.palette.base0C}";
base0D = "#${config.colorScheme.palette.base0D}";
base0E = "#${config.colorScheme.palette.base0E}";
base0F = "#${config.colorScheme.palette.base0F}";
in {
"attributes" = base09;
"comment" = { fg = base03; modifiers = ["italic"]; };
"constant" = base09;
"constant.character.escape" = base0C;
"constant.numeric" = base09;
"constructor" = base0D;
"debug" = base03;
"diagnostic" = { modifiers = ["underlined"]; };
"diff.delta" = base09;
"diff.minus" = base08;
"diff.plus" = base0B;
"error" = base08;
"function" = base0D;
"hint" = base03;
"info" = base0D;
"keyword" = base0E;
"label" = base0E;
"namespace" = base0E;
"operator" = base05;
"special" = base0D;
"string" = base0B;
"type" = base0A;
"variable" = base08;
"variable.other.member" = base0B;
"warning" = base09;
"markup.bold" = { fg = base0A; modifiers = ["bold"]; };
"markup.heading" = base0D;
"markup.italic" = { fg = base0E; modifiers = ["italic"]; };
"markup.link.text" = base08;
"markup.link.url" = { fg = base09; modifiers = ["underlined"]; };
"markup.list" = base08;
"markup.quote" = base0C;
"markup.raw" = base0B;
"markup.strikethrough" = { modifiers = ["crossed_out"]; };
"diagnostic.hint" = { underline = { style = "curl"; }; };
"diagnostic.info" = { underline = { style = "curl"; }; };
"diagnostic.warning" = { underline = { style = "curl"; }; };
"diagnostic.error" = { underline = { style = "curl"; }; };
# "ui.background" = { bg = base00; };
"ui.bufferline.active" = { fg = base00; bg = base03; modifiers = ["bold"]; };
"ui.bufferline" = { fg = base04; bg = base00; };
"ui.cursor" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursor.insert" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursorline.primary" = { fg = base05; bg = base01; };
"ui.cursor.match" = { fg = base0A; modifiers = ["reversed"]; };
"ui.cursor.select" = { fg = base0A; modifiers = ["reversed"]; };
"ui.gutter" = { bg = base00; };
"ui.help" = { fg = base06; bg = base01; };
"ui.linenr" = { fg = base03; bg = base00; };
"ui.linenr.selected" = { fg = base04; bg = base01; modifiers = ["bold"]; };
"ui.menu" = { fg = base05; bg = base01; };
"ui.menu.scroll" = { fg = base03; bg = base01; };
"ui.menu.selected" = { fg = base01; bg = base04; };
"ui.popup" = { bg = base01; };
"ui.selection" = { bg = base02; };
"ui.selection.primary" = { bg = base02; };
"ui.statusline" = { fg = base04; bg = base01; };
"ui.statusline.inactive" = { bg = base01; fg = base03; };
"ui.statusline.insert" = { fg = base00; bg = base0B; };
"ui.statusline.normal" = { fg = base00; bg = base03; };
"ui.statusline.select" = { fg = base00; bg = base0F; };
"ui.text" = base05;
"ui.text.focus" = base05;
"ui.virtual.indent-guide" = { fg = base03; };
"ui.virtual.inlay-hint" = { fg = base01; };
"ui.virtual.ruler" = { bg = base01; };
"ui.window" = { bg = base01; };
};
};
};
}

View File

@ -1,34 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
eza
bat
];
home.shellAliases = {
ls = "eza";
};
programs.bash = {
enable = false;
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
};
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
};
programs.skim = {
enable = true;
enableZshIntegration = true;
};
}

View File

@ -1,87 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
unstable.devenv
cloc
];
programs.direnv = {
enable = true;
enableBashIntegration = true;
};
programs.zellij = {
enable = true;
# enableBashIntegration = true;
};
home.file.zellij = {
target = ".config/zellij/config.kdl";
text = ''
pane_frames false
keybinds {
normal {
bind "Ctrl e" { ToggleFloatingPanes; SwitchToMode "normal"; }
bind "Alt 1" { GoToTab 1; }
bind "Alt 2" { GoToTab 2; }
bind "Alt 3" { GoToTab 3; }
bind "Alt 4" { GoToTab 4; }
bind "Alt 5" { GoToTab 5; }
}
}
'';
};
home.file.zellij-layout-default = {
target = ".config/zellij/layouts/default.kdl";
text = ''
layout {
pane
floating_panes {
pane {
width "80%"
height "80%"
x "10%"
y "10%"
}
}
}
'';
};
home.file.zellij-layout-dioxus = {
target = ".config/zellij/layouts/dioxus.kdl";
text = ''
layout {
tab {
pane {
command "hx"
args "."
focus true
}
floating_panes {
pane {
width "80%"
height "80%"
x "10%"
y "10%"
}
}
}
tab {
pane {
command "dx"
args "serve"
}
}
tab {
pane {
command "devenv"
args "up"
}
}
}
'';
};
}

View File

@ -1,24 +0,0 @@
local api = vim.api
api.nvim_create_autocmd(
"FileType",
{ pattern = "markdown", command = "setlocal spell" }
)
api.nvim_create_autocmd(
"FileType",
{ pattern = "markdown", command = "setlocal complete+=kspell" }
)
api.nvim_create_autocmd({
"BufNewFile", "BufRead"
},
{ pattern = "*.mcfunction", command = "set filetype=mcfunction" }
)
api.nvim_create_autocmd({
"VimEnter"
},
{ callback = require('lualine').setup }
)

View File

@ -1,4 +0,0 @@
require('onedark').setup {
style = 'deep'
}
require('onedark').load()

View File

@ -1,132 +0,0 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
home.packages = with pkgs; [
ripgrep
marksman
wl-clipboard
nodejs_20
];
programs.neovim =
let
toLua = str: "lua << EOF\n${str}\nEOF\n";
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
in
{
enable = true;
coc = {
enable = false;
settings = {
languageserver = {
arduino = {
command = ["steam-run" "arduino-language-server"];
rootPatterns = ["*.ino"];
filetypes = ["arduino"];
args = ["-cli" "steam-run" "arduino-cli" "-clangd" "steam-run" "clangd" "-cli-config" "/home/xeovalyte/.arduino15/arduino-cli.yaml"];
};
};
};
};
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
extraLuaConfig = ''
${builtins.readFile ./options.lua}
${builtins.readFile ./keymaps.lua}
${builtins.readFile ./autocmd.lua}
'';
plugins = with pkgs.vimPlugins; [
nvim-web-devicons
{
plugin = nvim-autopairs;
config = toLua "require(\"nvim-autopairs\").setup{}";
}
{
plugin = telescope-nvim;
}
plenary-nvim
{
plugin = nvim-lspconfig;
config = toLuaFile ./plugins/lsp.lua;
}
neodev-nvim
mason-nvim
mason-lspconfig-nvim
which-key-nvim
rustaceanvim
lsp-inlayhints-nvim
nvim-dap
{
plugin = markdown-preview-nvim;
config = toLuaFile ./plugins/markdown-preview.lua;
}
{
plugin = nvim-cmp;
config = toLuaFile ./plugins/cmp.lua;
}
cmp_luasnip
cmp-nvim-lsp
luasnip
friendly-snippets
{
plugin = nvim-tree-lua;
config = toLuaFile ./plugins/nvim-tree.lua;
}
{
plugin = toggleterm-nvim;
config = toLuaFile ./plugins/toggleterm.lua;
}
{
plugin = (nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-bash
p.tree-sitter-json
p.tree-sitter-rust
p.tree-sitter-vue
p.tree-sitter-arduino
p.tree-sitter-html
p.tree-sitter-css
p.tree-sitter-javascript
]));
config = toLuaFile ./plugins/treesitter.lua;
}
{
plugin = onedark-nvim;
config = toLuaFile ./colorscheme.lua;
}
{
plugin = presence-nvim;
config = toLua "require(\"presence\").setup()";
}
{
plugin = lualine-nvim;
config = toLuaFile ./plugins/lualine.lua;
}
{
plugin =harpoon;
config = toLuaFile ./plugins/harpoon.lua;
}
];
};
}

View File

@ -1,90 +0,0 @@
local function map(mode, lhs, rhs, opts)
opts = opts or {}
opts.silent = opts.silent ~= false
if opts.remap and not vim.g.vscode then
opts.remap = nil
end
vim.keymap.set(mode, lhs, rhs, opts)
end
-- better up/down
map({ "n", "x" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
map({ "n", "x" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
-- Move to window using the <ctrl> hjkl keys
map("n", "<C-h>", "<C-w>h", { desc = "Go to left window", remap = true })
map("n", "<C-j>", "<C-w>j", { desc = "Go to lower window", remap = true })
map("n", "<C-k>", "<C-w>k", { desc = "Go to upper window", remap = true })
map("n", "<C-l>", "<C-w>l", { desc = "Go to right window", remap = true })
-- Resize window using <ctrl> arrow keys
map("n", "<C-Up>", "<cmd>resize +2<cr>", { desc = "Increase window height" })
map("n", "<C-Down>", "<cmd>resize -2<cr>", { desc = "Decrease window height" })
map("n", "<C-Left>", "<cmd>vertical resize -2<cr>", { desc = "Decrease window width" })
map("n", "<C-Right>", "<cmd>vertical resize +2<cr>", { desc = "Increase window width" })
-- Move Lines
map("n", "<A-j>", "<cmd>m .+1<cr>==", { desc = "Move down" })
map("n", "<A-k>", "<cmd>m .-2<cr>==", { desc = "Move up" })
map("i", "<A-j>", "<esc><cmd>m .+1<cr>==gi", { desc = "Move down" })
map("i", "<A-k>", "<esc><cmd>m .-2<cr>==gi", { desc = "Move up" })
map("v", "<A-j>", ":m '>+1<cr>gv=gv", { desc = "Move down" })
map("v", "<A-k>", ":m '<-2<cr>gv=gv", { desc = "Move up" })
-- Clear search with <esc>
map({ "i", "n" }, "<esc>", "<cmd>noh<cr><esc>", { desc = "Escape and clear hlsearch" })
-- Clear search, diff update and redraw
-- taken from runtime/lua/_editor.lua
map(
"n",
"<leader>ur",
"<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>",
{ desc = "Redraw / clear hlsearch / diff update" }
)
-- https://github.com/mhinz/vim-galore#saner-behavior-of-n-and-n
map("n", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("x", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("o", "n", "'Nn'[v:searchforward]", { expr = true, desc = "Next search result" })
map("n", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("x", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
map("o", "N", "'nN'[v:searchforward]", { expr = true, desc = "Prev search result" })
-- Add undo break-points
map("i", ",", ",<c-g>u")
map("i", ".", ".<c-g>u")
map("i", ";", ";<c-g>u")
-- save file
map({ "i", "x", "n", "s" }, "<C-s>", "<cmd>w<cr><esc>", { desc = "Save file" })
--keywordprg
map("n", "<leader>K", "<cmd>norm! K<cr>", { desc = "Keywordprg" })
-- better indenting
map("v", "<", "<gv")
map("v", ">", ">gv")
-- new file
map("n", "<leader>fn", "<cmd>enew<cr>", { desc = "New File" })
-- Toggle NeoTree
map("n", "<leader>e", "<cmd>NvimTreeToggle<cr>", { desc = "Toggle file explorer" })
-- Telescope
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "Telescope find files" })
map("n", "<leader>fg", "<cmd>Telescope live_grep<cr>", { desc = "Telescope find files" })
map("n", "<leader>fb", "<cmd>Telescope buffers<cr>", { desc = "Telescope find files" })
-- LSP
map("n", "gl", "<cmd>lua vim.diagnostic.open_float()<cr>", { desc = "Show diagnostics" })
map("n", "gd", "<cmd>lua vim.lsp.buf.definition()<cr>", { desc = "Show diagnostics" })
map("n", "gD", "<cmd>lua vim.lsp.buf.declaration()<cr>", { desc = "Show diagnostics" })
map("n", "K", "<cmd>lua vim.lsp.buf.hover()<cr>", { desc = "Show diagnostics" })
-- Buffers
map("n", "<Tab>", "<cmd>bn<cr>", { desc = "Cycle to next buffer" })
map("n", "<S-Tab>", "<cmd>bp<cr>", { desc = "Cycle to previous buffer" })
map("n", "bq", "<cmd>b#|bd#<cr>", { desc = "Close current buffer" })
map("n", "<leader>bq", "<cmd>BufferLineCloseOthers<cr>", { desc = "Close all other buffers" })

View File

@ -1,57 +0,0 @@
vim.g.mapleader = " "
vim.g.maplocalleader = "\\"
local opt = vim.opt
opt.autowrite = true -- Enable auto write
opt.clipboard = "unnamedplus" -- Sync with system clipboard
opt.completeopt = "menu,menuone,noselect"
opt.conceallevel = 3 -- Hide * markup for bold and italic
opt.confirm = true -- Confirm to save changes before exiting modified buffer
opt.cursorline = true -- Enable highlighting of the current line
opt.expandtab = true -- Use spaces instead of tabs
opt.formatoptions = "jcroqlnt" -- tcqj
opt.grepformat = "%f:%l:%c:%m"
opt.grepprg = "rg --vimgrep"
opt.ignorecase = true -- Ignore case
opt.inccommand = "nosplit" -- preview incremental substitute
opt.laststatus = 0
opt.list = true -- Show some invisible characters (tabs...
opt.mouse = "a" -- Enable mouse mode
opt.number = true -- Print line number
opt.pumblend = 10 -- Popup blend
opt.pumheight = 10 -- Maximum number of entries in a popup
opt.relativenumber = true -- Relative line numbers
opt.scrolloff = 4 -- Lines of context
opt.sessionoptions = { "buffers", "curdir", "tabpages", "winsize" }
opt.shiftround = true -- Round indent
opt.shiftwidth = 2 -- Size of an indent
opt.shortmess:append({ W = true, I = true, c = true })
opt.showmode = true -- Dont show mode since we have a statusline
opt.sidescrolloff = 8 -- Columns of context
opt.signcolumn = "yes" -- Always show the signcolumn, otherwise it would shift the text each time
opt.smartcase = true -- Don't ignore case with capitals
opt.smartindent = true -- Insert indents automatically
opt.spelllang = { "en", "nl" }
opt.spell = false -- Enable spell
opt.splitbelow = true -- Put new windows below current
opt.splitright = true -- Put new windows right of current
opt.tabstop = 2 -- Number of spaces tabs count for
opt.termguicolors = true -- True color support
opt.timeoutlen = 300
opt.undofile = true
opt.undolevels = 10000
opt.updatetime = 200 -- Save swap file and trigger CursorHold
opt.wildmode = "longest:full,full" -- Command-line completion mode
opt.winminwidth = 5 -- Minimum window width
opt.wrap = false -- Disable line wrap
if vim.fn.has("nvim-0.9.0") == 1 then
opt.splitkeep = "screen"
opt.shortmess:append({ C = true })
end
-- Fix markdown indentation settings
vim.g.markdown_recommended_style = 0
vim.cmd [[autocmd BufWritePre * lua vim.lsp.buf.format()]]

View File

@ -1,12 +0,0 @@
require('bufferline').setup{
options = {
offsets = {
{
filetype = "NvimTree",
text = "File Explorer",
highlight = "Directory",
separator = true -- use a "true" to enable the default, or set your own character
}
}
}
}

View File

@ -1,46 +0,0 @@
local cmp = require('cmp')
local luasnip = require('luasnip')
require('luasnip.loaders.from_vscode').lazy_load()
luasnip.config.setup {}
cmp.setup {
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end,
},
mapping = cmp.mapping.preset.insert {
['<C-n>'] = cmp.mapping.select_next_item(),
['<C-p>'] = cmp.mapping.select_prev_item(),
['<C-d>'] = cmp.mapping.scroll_docs(-4),
['<C-f>'] = cmp.mapping.scroll_docs(4),
['<C-Space>'] = cmp.mapping.complete {},
['<CR>'] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Replace,
select = true,
},
['<Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_next_item()
elseif luasnip.expand_or_locally_jumpable() then
luasnip.expand_or_jump()
else
fallback()
end
end, { 'i', 's' }),
['<S-Tab>'] = cmp.mapping(function(fallback)
if cmp.visible() then
cmp.select_prev_item()
elseif luasnip.locally_jumpable(-1) then
luasnip.jump(-1)
else
fallback()
end
end, { 'i', 's' }),
},
sources = {
{ name = 'nvim_lsp' },
{ name = 'luasnip' },
},
}

View File

@ -1,10 +0,0 @@
local mark = require('harpoon.mark')
local ui = require('harpoon.ui')
vim.keymap.set("n", "<leader>q", mark.add_file)
vim.keymap.set("n", "<C-e>", ui.toggle_quick_menu)
vim.keymap.set("n", "<C-h>", function() ui.nav_file(1) end)
vim.keymap.set("n", "<C-t>", function() ui.nav_file(2) end)
vim.keymap.set("n", "<C-n>", function() ui.nav_file(3) end)
vim.keymap.set("n", "<C-s>", function() ui.nav_file(4) end)

View File

@ -1,57 +0,0 @@
require("mason").setup{
PATH = "append",
}
require("mason-lspconfig").setup()
require('neodev').setup()
require('lsp-inlayhints').setup()
local lspconfig = require('lspconfig')
vim.g.rustaceanvim = {
tools = {
hover_actions = {
auto_focus = true,
},
},
server = {
on_attach = function(client, bufnr)
require("lsp-inlayhints").on_attach(client, bufnr)
require("lsp-inlayhints").show()
end,
default_settings = {
['rust-analyzer'] = {
cargo = {
features = "all"
},
},
},
},
}
lspconfig.tsserver.setup{}
lspconfig.spyglassmc_language_server.setup{
cmd = {
"/home/xeovalyte/.npm-global/bin/spyglassmc-language-server", "--stdio"
}
}
lspconfig.arduino_language_server.setup{
cmd = {
"steam-run","arduino-language-server",
"-cli-config", "/home/xeovalyte/.arduino15/arduino-cli.yaml",
"-cli", "/usr/bin/arduino-cli",
"-clangd", "steam-run clangd"
}
}
lspconfig.tailwindcss.setup{
filetypes = {
"rust",
"css",
}
}
lspconfig.volar.setup{}
lspconfig.marksman.setup{}

View File

@ -1,40 +0,0 @@
require('lualine').setup {
options = {
icons_enabled = true,
theme = 'auto',
component_separators = { left = '', right = ''},
section_separators = { left = '', right = ''},
disabled_filetypes = {
statusline = {},
winbar = {},
},
ignore_focus = {},
always_divide_middle = true,
globalstatus = true,
refresh = {
statusline = 1000,
tabline = 1000,
winbar = 1000,
}
},
sections = {
lualine_a = {'mode'},
lualine_b = {'branch', 'diff', 'diagnostics'},
lualine_c = {'filename'},
lualine_x = {'encoding', 'fileformat', 'filetype'},
lualine_y = {'progress'},
lualine_z = {'location'}
},
inactive_sections = {
lualine_a = {},
lualine_b = {},
lualine_c = {'filename'},
lualine_x = {'location'},
lualine_y = {},
lualine_z = {}
},
tabline = {},
winbar = {},
inactive_winbar = {},
extensions = {}
}

View File

@ -1,2 +0,0 @@
vim.g.mkdp_auto_start = 0
vim.g.mkdp_auto_close = 0

View File

@ -1,20 +0,0 @@
local function my_on_attach(bufnr)
local api = require "nvim-tree.api"
local function opts(desc)
return { desc = "nvim-tree: " .. desc, buffer = bufnr, noremap = true, silent = true, nowait = true }
end
-- default mappings
api.config.mappings.default_on_attach(bufnr)
-- custom mappings
vim.keymap.set('n', '<C-t>', api.tree.change_root_to_parent, opts('Up'))
vim.keymap.set('n', '?', api.tree.toggle_help, opts('Help'))
vim.keymap.set('n', '.', api.tree.change_root_to_node, opts('CD'))
end
-- pass to setup along with your other options
require("nvim-tree").setup {
on_attach = my_on_attach,
}

View File

@ -1,7 +0,0 @@
require("toggleterm").setup{
open_mapping = [[<c-\>]],
direction = 'float',
float_opts = {
border = 'curved'
}
}

View File

@ -1,9 +0,0 @@
require("nvim-treesitter.configs").setup{
ensure_installed = {},
auto_install = false,
highlight = { enable = true },
indent = { enable = true },
}

View File

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
programs.ssh = {
enable = true;
matchBlocks = {
archserver = {
hostname = "192.168.1.20";
user = "xeovalyte";
identityFile = "~/.ssh/archserver";
};
"gitea.xeovalyte.dev" = {
hostname = "gitea.xeovalyte.dev";
port = 2222;
user = "git";
identityFile = "~/.ssh/gitea";
};
};
addKeysToAgent = "yes";
};
}

View File

@ -1,20 +0,0 @@
{ pkgs, ... }:
{
programs.yazi = {
enable = true;
enableZshIntegration = true;
settings = {
opener = {
open = [
{ run = "xdg-open $@"; desc = "xdg"; orphan = true; }
];
};
open = {
prepend_rules = [
{ name = "*.rnote"; use = "open"; }
];
};
};
};
}

24
modules/home/default.nix Normal file
View File

@ -0,0 +1,24 @@
{ ... }:
{
imports = [
./applications/alacritty.nix
./applications/common.nix
./applications/devenv.nix
./applications/firefox.nix
./applications/git.nix
./applications/helix.nix
./applications/zsh.nix
./applications/ssh.nix
./applications/thunderbird.nix
./applications/yazi.nix
./applications/zellij.nix
./services/nextcloud.nix
./theming/fonts.nix
./theming/nix-colors.nix
./desktop-environments/hyprland/default.nix
];
}

View File

@ -0,0 +1,214 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.settings.desktop-environments.hyprland;
in {
options = {
settings.desktop-environments.hyprland.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable hyprland window manager configuration
'';
};
};
imports = [
./waybar.nix
./fixes.nix
./dunst.nix
./rofi.nix
];
config = mkIf cfg.enable {
home.packages = with pkgs; [
alacritty
wev
brightnessctl
playerctl
wl-clipboard
grimblast
nwg-bar
powertop
lxqt.lxqt-policykit
networkmanagerapplet
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor = lib.mkIf (config.host == "xv-laptop") [
"eDP-1,preferred,3840x0,1.333"
"DP-10,preferred,0x0,1"
"DP-9,preferred,1920x0,1"
];
exec-once = [
"waybar"
"lxqt-policykit-agent"
"nm-applet"
"blueman-applet"
];
env = lib.mkIf (config.host == "xv-desktop") [
"LIBVA_DRIVER_NAME,nvidia"
"XDG_SESSION_TYPE,wayland"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
"$mod" = "SUPER";
input = {
follow_mouse = 2;
touchpad = {
natural_scroll = true;
scroll_factor = 0.5;
clickfinger_behavior = true;
};
};
general = {
gaps_in = "5";
gaps_out = "10";
border_size = "2";
"col.active_border" = "rgba(00bfffee) rgba(36b7e2ee) 45deg";
"col.inactive_border" = "rgba(0a3543aa)";
layout = "dwindle";
};
decoration = {
rounding = "5";
blur.enabled = "false";
};
gestures = {
workspace_swipe = "on";
workspace_swipe_distance = "200";
};
misc = {
vfr = "true";
vrr = 2;
force_default_wallpaper = "0";
};
xwayland = {
force_zero_scaling = true;
};
workspace = lib.mkMerge [[
]
(lib.mkIf (config.host == "xv-desktop") [
"1, monitor:DP-1"
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:DP-1"
"5, monitor:DP-1"
"6, monitor:HDMI-A-1"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
"10, monitor:HDMI-A-1"
])
(lib.mkIf (config.host == "xv-laptop") [
"1, monitor:DP-10"
"2, monitor:DP-10"
"3, monitor:DP-10"
"4, monitor:DP-10"
"5, monitor:DP-9"
"6, monitor:DP-9"
"7, monitor:DP-9"
"8, monitor:eDP-1"
"9, monitor:eDP-1"
"10, monitor:eDP-1"
])];
bind = [
"$mod, Q, exec, alacritty"
"$mod, SPACE, exec, rofi -show drun"
",Print, exec, grimblast copy area"
"$mod,ESCAPE, exec, nwg-bar"
"$mod, P, exit"
"$mod, C, killactive"
"$mod SHIFT, C, exec, hyprctl kill"
"$mod, V, togglefloating"
"$mod, F, fullscreen, 0"
"$mod, M, fullscreen, 1"
"$mod SHIFT, L, exec, hyprlock"
"$mod, S, exec, systemctl suspend"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod ALT, h, resizeactive, -20 0"
"$mod ALT, l, resizeactive, 20 0"
"$mod ALT, k, resizeactive, 0 -20"
"$mod ALT, j, resizeactive, 0 20"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
];
bindle = [
# Volume control
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
# Brightness control
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl= [
# Toggle audio mute
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Media control
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
};
}

View File

@ -0,0 +1,7 @@
{ config, ... }:
{
services.dunst = {
enable = config.settings.desktop-environments.hyprland.enable;
};
}

View File

@ -1,7 +1,7 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
programs.rofi = { programs.rofi = {
enable = true; enable = config.settings.desktop-environments.hyprland.enable;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
theme = let theme = let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;

View File

@ -2,7 +2,7 @@
{ {
programs.waybar = { programs.waybar = {
enable = true; enable = config.settings.desktop-environments.hyprland.enable;
settings = { settings = {
mainBar = { mainBar = {
layer = "top"; layer = "top";

View File

@ -1,47 +0,0 @@
{ config, ... }:
{
programs.alacritty = {
enable = true;
settings = {
font = {
normal = { family = "DejaVuSansM Nerd Font"; style = "Regular"; };
};
window = {
opacity = 0.8;
padding = { x = 10; y = 10; };
};
colors = {
draw_bold_text_with_bright_colors = false;
primary = {
background = "0x${config.colorScheme.palette.base00}";
foreground = "0x${config.colorScheme.palette.base05}";
};
cursor = {
text = "0x${config.colorScheme.palette.base00}";
cursor = "0x${config.colorScheme.palette.base05}";
};
normal = {
black = "0x${config.colorScheme.palette.base00}";
red = "0x${config.colorScheme.palette.base08}";
green = "0x${config.colorScheme.palette.base0B}";
yellow = "0x${config.colorScheme.palette.base0A}";
blue = "0x${config.colorScheme.palette.base0D}";
magenta = "0x${config.colorScheme.palette.base0E}";
cyan = "0x${config.colorScheme.palette.base0C}";
white = "0x${config.colorScheme.palette.base05}";
};
bright = {
black = "0x${config.colorScheme.palette.base03}";
red = "0x${config.colorScheme.palette.base09}";
green = "0x${config.colorScheme.palette.base01}";
yellow = "0x${config.colorScheme.palette.base02}";
blue = "0x${config.colorScheme.palette.base04}";
magenta = "0x${config.colorScheme.palette.base06}";
cyan = "0x${config.colorScheme.palette.base0F}";
white = "0x${config.colorScheme.palette.base07}";
};
};
};
};
}

View File

@ -1,15 +0,0 @@
{ pkgs, ...}:
{
imports = [
./alacritty.nix
./firefox.nix
./fonts.nix
];
home.packages = with pkgs; [
vlc
bitwarden
pavucontrol
];
}

View File

@ -1,154 +0,0 @@
{ inputs, pkgs, ... }:
{
# about:policies
# Check about:support for extension/add-on ID strings.
# Check about:config for options.
home.packages = with pkgs; [
unstable.firefoxpwa
];
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.unstable.firefoxpwa ];
policies = {
DisableTelemetry = true;
DisableFirefoxStudies = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
};
DisablePocket = true;
DisableFirefoxAccounts = true;
DisableAccounts = true;
DontCheckDefaultBrowser = true;
DisplayBookmarksToolbar = "newpage";
ExtensionSettings = {
"nl-NL@dictionaries.addons.mozilla.org" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/woordenboek-nederlands/latest.xpi";
installation_mode = "force_installed";
};
"uBlock0@raymondhill.net" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
installation_mode = "force_installed";
};
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
installation_mode = "force_installed";
};
"firefoxpwa@filips.si" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/pwas-for-firefox/latest.xpi";
installation_mode = "force_installed";
};
"markdown-viewer@outofindex.com" = {
install_url = "https://addons.mozilla.org/firefox/downloads/latest/markdown-viewer-chrome/latest.xpi";
installation_mode = "force_installed";
};
};
};
profiles.xeovalyte = {
bookmarks = [
{
name = "Toolbar";
toolbar = true;
bookmarks = [
{
name = "Brightspace";
bookmarks = [
{
name = "Books";
url = "https://drive.google.com/drive/folders/1L5OTbn5p3i7_Nc80hc5PztiEGHKwi-I4";
}
{
name = "LCB";
url = "https://brightspace.tudelft.nl/d2l/le/content/681010/Home";
}
{
name = "Calculus";
url = "https://brightspace.tudelft.nl/d2l/le/content/681024/Home";
}
{
name = "IP1";
url = "https://brightspace.tudelft.nl/d2l/le/content/681020/Home";
}
];
}
];
}
];
search.engines = {
"Nix" = {
urls = [{
template = "https://mynixos.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nix" ];
};
"SearXNG" = {
urls = [{
template = "https:/search.xeovalyte.dev/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@searxng" ];
};
"Startpage" = {
urls = [{
template = "https:/startpage.com/sp/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
];
}];
definedAliases = [ "@sp" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"eBay".metaData.hidden = true;
};
search.force = true;
search.default = "SearXNG";
settings = {
"browser.disableResetPrompt" = true;
"browser.download.panel.shown" = true;
"browser.download.useDownloadDir" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.shell.defaultBrowserCheckCount" = 1;
"dom.security.https_only_mode" = true;
"privacy.trackingProtection.enabled" = true;
"browser.toolbars.bookmarks.visibility" = "newtab";
"browser.translations.neverTranslateLanguages" = "nl";
"browser.newtabpage.pinned" = [
{
label = "Server";
url = "https://home.xeovalyte.dev";
}
{
label = "Youtube";
url = "https://youtube.com";
}
{
label = "My TU Delft";
url = "https://my.tudelft.nl/";
}
];
"signon.rememberSignons" = false;
};
};
};
}

View File

@ -1,14 +0,0 @@
{ pkgs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
noto-fonts
fira-code
font-awesome
dejavu_fonts
roboto
(nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
}

View File

@ -1,197 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./waybar.nix
./fixes.nix
./dunst.nix
./rofi.nix
];
home.packages = with pkgs; [
alacritty
wev
brightnessctl
playerctl
wl-clipboard
grimblast
nwg-bar
powertop
lxqt.lxqt-policykit
networkmanagerapplet
];
wayland.windowManager.hyprland = {
enable = true;
settings = {
monitor = lib.mkIf (config.host == "xv-laptop") [
"eDP-1,preferred,3840x0,1.333"
"DP-10,preferred,0x0,1"
"DP-9,preferred,1920x0,1"
];
exec-once = [
"waybar"
"lxqt-policykit-agent"
"nm-applet"
"blueman-applet"
];
env = lib.mkIf (config.host == "xv-desktop") [
"LIBVA_DRIVER_NAME,nvidia"
"XDG_SESSION_TYPE,wayland"
"GBM_BACKEND,nvidia-drm"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
];
"$mod" = "SUPER";
input = {
follow_mouse = 2;
touchpad = {
natural_scroll = true;
scroll_factor = 0.5;
clickfinger_behavior = true;
};
};
general = {
gaps_in = "5";
gaps_out = "10";
border_size = "2";
"col.active_border" = "rgba(00bfffee) rgba(36b7e2ee) 45deg";
"col.inactive_border" = "rgba(0a3543aa)";
layout = "dwindle";
};
decoration = {
rounding = "5";
blur.enabled = "false";
};
gestures = {
workspace_swipe = "on";
workspace_swipe_distance = "200";
};
misc = {
vfr = "true";
vrr = 2;
force_default_wallpaper = "0";
};
xwayland = {
force_zero_scaling = true;
};
workspace = lib.mkMerge [[
]
(lib.mkIf (config.host == "xv-desktop") [
"1, monitor:DP-1"
"2, monitor:DP-1"
"3, monitor:DP-1"
"4, monitor:DP-1"
"5, monitor:DP-1"
"6, monitor:HDMI-A-1"
"7, monitor:HDMI-A-1"
"8, monitor:HDMI-A-1"
"9, monitor:HDMI-A-1"
"10, monitor:HDMI-A-1"
])
(lib.mkIf (config.host == "xv-laptop") [
"1, monitor:DP-10"
"2, monitor:DP-10"
"3, monitor:DP-10"
"4, monitor:DP-10"
"5, monitor:DP-9"
"6, monitor:DP-9"
"7, monitor:DP-9"
"8, monitor:eDP-1"
"9, monitor:eDP-1"
"10, monitor:eDP-1"
])];
bind = [
"$mod, Q, exec, alacritty"
"$mod, SPACE, exec, rofi -show drun"
",Print, exec, grimblast copy area"
"$mod,ESCAPE, exec, nwg-bar"
"$mod, P, exit"
"$mod, C, killactive"
"$mod SHIFT, C, exec, hyprctl kill"
"$mod, V, togglefloating"
"$mod, F, fullscreen, 0"
"$mod, M, fullscreen, 1"
"$mod SHIFT, L, exec, hyprlock"
"$mod, S, exec, systemctl suspend"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
"$mod ALT, h, resizeactive, -20 0"
"$mod ALT, l, resizeactive, 20 0"
"$mod ALT, k, resizeactive, 0 -20"
"$mod ALT, j, resizeactive, 0 20"
"$mod, 1, workspace, 1"
"$mod, 2, workspace, 2"
"$mod, 3, workspace, 3"
"$mod, 4, workspace, 4"
"$mod, 5, workspace, 5"
"$mod, 6, workspace, 6"
"$mod, 7, workspace, 7"
"$mod, 8, workspace, 8"
"$mod, 9, workspace, 9"
"$mod, 0, workspace, 10"
"$mod SHIFT, 1, movetoworkspace, 1"
"$mod SHIFT, 2, movetoworkspace, 2"
"$mod SHIFT, 3, movetoworkspace, 3"
"$mod SHIFT, 4, movetoworkspace, 4"
"$mod SHIFT, 5, movetoworkspace, 5"
"$mod SHIFT, 6, movetoworkspace, 6"
"$mod SHIFT, 7, movetoworkspace, 7"
"$mod SHIFT, 8, movetoworkspace, 8"
"$mod SHIFT, 9, movetoworkspace, 9"
"$mod SHIFT, 0, movetoworkspace, 10"
];
bindle = [
# Volume control
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
# Brightness control
",XF86MonBrightnessUp, exec, brightnessctl set 5%+"
",XF86MonBrightnessDown, exec, brightnessctl set 5%-"
];
bindl= [
# Toggle audio mute
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
# Media control
",XF86AudioPlay, exec, playerctl play-pause"
",XF86AudioNext, exec, playerctl next"
",XF86AudioPrev, exec, playerctl previous"
];
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
];
};
};
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
services.dunst = {
enable = true;
};
}

View File

@ -1,8 +0,0 @@
{ input, pkgs, lib, ... }:
{
home.packages = with pkgs; [
unstable.modrinth-app
];
}

View File

@ -1,8 +0,0 @@
{ ... }:
{
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
}

View File

@ -1,86 +0,0 @@
{ pkgs, ... }:
{
programs.thunderbird = {
enable = true;
package = pkgs.unstable.thunderbird;
profiles = {
default = {
isDefault = true;
};
};
};
accounts.email.accounts = {
ziggo = {
imap = {
host = "imap.ziggo.nl";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "smtp.ziggo.nl";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
address = "timo.boomers@ziggo.nl";
realName = "Timo Boomers";
userName = "timo.boomers@ziggo.nl";
primary = true;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
tudelft = {
imap = {
host = "outlook.office365.com";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "smtp.office365.com";
port = 587;
tls = {
enable = true;
useStartTls = false;
};
};
address = "tboomers@tudelft.nl";
realName = "Timo Boomers";
userName = "tboomers@tudelft.nl";
primary = false;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
xeovalyte = {
imap = {
host = "mail.xeovalyte.dev";
port = 993;
tls = {
enable = true;
};
};
smtp = {
host = "mail.xeovalyte.dev";
port = 587;
tls = {
enable = true;
useStartTls = true;
};
};
address = "timo@xeovalyte.dev";
aliases = [ "me@xeovalyte.dev" "contact@xeovalyte.dev" ];
realName = "Timo Boomers";
userName = "me@xeovalyte.dev";
primary = false;
thunderbird.enable = true;
thunderbird.profiles = [ "default" ];
};
};
}

View File

@ -0,0 +1,23 @@
{ config, lib, ... }:
with lib;
let
cfg = config.settings.services.nextcloud-sync;
in {
options = {
settings.services.nextcloud-sync.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable Nextcloud syncronisation
'';
};
};
config = mkIf cfg.enable {
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
};
}

View File

@ -0,0 +1,29 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.settings.theming.fonts;
in {
options = {
settings.theming.fonts.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable fonts
'';
};
};
config = mkIf cfg.enable {
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
noto-fonts
fira-code
font-awesome
dejavu_fonts
roboto
(nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
};
}

View File

@ -1,15 +1,27 @@
{ config, nix-colors, pkgs, lib, ... }: { config, nix-colors, pkgs, lib, ... }:
with lib;
let let
cfg = config.settings.theming.nix-colors;
inherit inherit
(nix-colors.lib-contrib { inherit pkgs; }) (nix-colors.lib-contrib { inherit pkgs; })
gtkThemeFromScheme; gtkThemeFromScheme;
in in {
{ options = {
settings.theming.nix-colors.enable = lib.mkOption {
type = lib.types.bool;
description = ''
Enable nix colors configuration
'';
};
};
imports = [ imports = [
nix-colors.homeManagerModules.default nix-colors.homeManagerModules.default
]; ];
config = { config = mkIf cfg.enable {
colorScheme = nix-colors.colorSchemes.da-one-sea; colorScheme = nix-colors.colorSchemes.da-one-sea;
gtk = lib.mkIf (config.headless == false) { gtk = lib.mkIf (config.headless == false) {