new formatting, nixvim is working

This commit is contained in:
vali 2024-05-22 14:29:45 +02:00
commit 88db34c822
88 changed files with 1994 additions and 1845 deletions

View file

@ -1,6 +1,10 @@
{ {
description = "My NixOS config flake"; description = "My NixOS config flake";
outputs = inputs@{ self, nixpkgs, ... }: { outputs = inputs @ {
self,
nixpkgs,
...
}: {
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
nixosConfigurations = import ./hosts {inherit inputs;}; nixosConfigurations = import ./hosts {inherit inputs;};
}; };
@ -63,6 +67,5 @@
url = "github:nix-community/fenix"; url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
} }

View file

@ -1,5 +1,4 @@
{ inputs, ... }: {inputs, ...}: let
let
inherit (inputs) self; inherit (inputs) self;
inherit (self) lib; inherit (self) lib;
in { in {
@ -15,5 +14,4 @@ in {
inputs.nixvim.nixosModules.nixvim inputs.nixvim.nixosModules.nixvim
]; ];
}; };
} }

View file

@ -1,10 +1,13 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")]; imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"];
[ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"]; boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
@ -15,8 +18,7 @@
options = ["noatime" "nodiratime" "discard"]; options = ["noatime" "nodiratime" "discard"];
}; };
boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = boot.initrd.luks.devices."luks-c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f".device = "/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f";
"/dev/disk/by-uuid/c03fc486-bdd7-46bf-ac2f-1a55fe1abd6f";
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D299-5174"; device = "/dev/disk/by-uuid/D299-5174";

View file

@ -1,5 +1,8 @@
{ inputs, pkgs, ... }: {
let inputs,
pkgs,
...
}: let
fenix = inputs.fenix.packages.${pkgs.system}; fenix = inputs.fenix.packages.${pkgs.system};
nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system}; nixpkgs-wayland = inputs.nixpkgs-wayland.packages.${pkgs.system};
in { in {

View file

@ -1,7 +1,6 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix # Taken from: https://github.com/hlissner/dotfiles/blob/master/lib/options.nix
{ lib, ... }: {lib, ...}: let
inherit (lib) mkOption types;
let inherit (lib) mkOption types;
in { in {
mkOpt = type: default: mkOption {inherit type default;}; mkOpt = type: default: mkOption {inherit type default;};

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.fish; cfg = config.modules.programs.fish;
username = config.modules.other.system.username; username = config.modules.other.system.username;
# not needed because I'm using nh os switch # not needed because I'm using nh os switch
@ -55,7 +59,8 @@ in {
src = pkgs.fishPlugins.tide.src; src = pkgs.fishPlugins.tide.src;
} }
]; ];
shellAbbrs = { shellAbbrs =
{
c = "clear"; c = "clear";
cc = "cd ~ && clear"; cc = "cd ~ && clear";
mv = "mv -iv"; mv = "mv -iv";
@ -72,7 +77,8 @@ in {
e = "emacs"; e = "emacs";
update = ''nh os switch "${gitPath}"''; update = ''nh os switch "${gitPath}"'';
flake = "cd '${gitPath}'"; flake = "cd '${gitPath}'";
} // cfg.extraAliases; }
// cfg.extraAliases;
}; };
}; };
}; };

View file

@ -1,6 +1,9 @@
{ config, lib, pkgs, ... }: {
config,
let lib,
pkgs,
...
}: let
lazyvim-config = pkgs.fetchFromGitHub { lazyvim-config = pkgs.fetchFromGitHub {
owner = "Dragyx"; owner = "Dragyx";
repo = "lazyvim-config"; repo = "lazyvim-config";
@ -28,6 +31,5 @@ in {
recursive = true; recursive = true;
}; };
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ lib, config, ... }: {
with lib; lib,
let cfg = config.modules.programs.nh; config,
...
}:
with lib; let
cfg = config.modules.programs.nh;
in { in {
options.modules.programs.nh.enable = mkEnableOption "nh"; options.modules.programs.nh.enable = mkEnableOption "nh";

View file

@ -1,8 +1,12 @@
# Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix # Taken from: https://github.com/hlissner/dotfiles/blob/master/modules/editors/emacs.nix
{ config, lib, pkgs, inputs, ... }: {
config,
with lib; lib,
let pkgs,
inputs,
...
}:
with lib; let
cfg = config.modules.editors.emacs; cfg = config.modules.editors.emacs;
username = config.modules.other.system.username; username = config.modules.other.system.username;
repoUrl = inputs.doomemacs; repoUrl = inputs.doomemacs;
@ -52,8 +56,7 @@ in {
beancount beancount
]; ];
home-manager.users.${username}.home.sessionPath = home-manager.users.${username}.home.sessionPath = ["/home/vali/.config/emacs/bin"];
[ "/home/vali/.config/emacs/bin" ];
# modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ]; # modules.shell.zsh.rcFiles = [ "${configDir}/emacs/aliases.zsh" ];

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }: {
let config,
lib,
pkgs,
...
}: let
cfg = config.modules.editors.helix; cfg = config.modules.editors.helix;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -17,13 +21,10 @@ in {
soft-wrap.enable = true; soft-wrap.enable = true;
lsp.display-messages = true; lsp.display-messages = true;
cursor-shape = {insert = "bar";}; cursor-shape = {insert = "bar";};
statusline.left = statusline.left = ["mode" "spinner" "version-control" "file-name"];
[ "mode" "spinner" "version-control" "file-name" ];
}; };
keys.normal = { keys.normal = {
C-g = C-g = [":new" ":insert-output lazygit" ":buffer-close!" ":redraw"];
[ ":new" ":insert-output lazygit" ":buffer-close!" ":redraw" ];
C-t = [":new" ":insert-output fish" ":buffer-close!" ":redraw"]; C-t = [":new" ":insert-output fish" ":buffer-close!" ":redraw"];
esc = ["collapse_selection" "keep_primary_selection"]; esc = ["collapse_selection" "keep_primary_selection"];
A-H = "goto_previous_buffer"; A-H = "goto_previous_buffer";
@ -31,11 +32,13 @@ in {
A-w = ":buffer-close"; A-w = ":buffer-close";
}; };
}; };
languages.language = [{ languages.language = [
{
name = "nix"; name = "nix";
auto-format = true; auto-format = true;
formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt"; formatter.command = "${pkgs.nixfmt-classic}/bin/nixfmt";
}]; }
];
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.editors.kakoune; cfg = config.modules.editors.kakoune;
username = config.modules.other.system.username; username = config.modules.other.system.username;
# inherit (inputs.kakoune.packages.${pkgs.system}) kakoun; # inherit (inputs.kakoune.packages.${pkgs.system}) kakoun;
@ -41,8 +45,7 @@ in {
mode = "normal"; mode = "normal";
key = "<esc>"; key = "<esc>";
effect = ";,"; effect = ";,";
docstring = docstring = "Press escape to clear highlighted text and collapse cursors";
"Press escape to clear highlighted text and collapse cursors";
} }
{ {
mode = "normal"; mode = "normal";
@ -119,6 +122,5 @@ in {
''; '';
}; };
}; };
}; };
} }

View file

@ -1,6 +1,11 @@
{ config, lib, pkgs, buildGoModule, ... }: {
with lib; config,
let lib,
pkgs,
buildGoModule,
...
}:
with lib; let
cfg = config.modules.programs.kakoune; cfg = config.modules.programs.kakoune;
username = config.modules.other.system.username; username = config.modules.other.system.username;
kakship = pkgs.rustPlatform.buildRustPackage rec { kakship = pkgs.rustPlatform.buildRustPackage rec {
@ -16,8 +21,7 @@ let
lockFile = "${src}/Cargo.lock"; lockFile = "${src}/Cargo.lock";
outputHashes = { outputHashes = {
"kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U="; "kak-0.1.2" = "sha256-RhtHQkC9yCSJtr/kbC5c9MavbL79acrsiEGXyoAST8U=";
"yew-ansi-0.1.0" = "yew-ansi-0.1.0" = "sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
"sha256-dSaEzqiOon+OqCZKQudzLRNP+Iv97kC+XZcTElKNrzs=";
}; };
}; };

View file

@ -244,7 +244,8 @@
{ {
mode = "n"; mode = "n";
key = "<C-d>"; key = "<C-d>";
action = "<C-d>zz"; action = "<C-d>";
#action = "<C-d>zz";
options = { options = {
desc = "Allow C-d and C-u to keep the cursor in the middle"; desc = "Allow C-d and C-u to keep the cursor in the middle";
}; };
@ -253,7 +254,8 @@
{ {
mode = "n"; mode = "n";
key = "<C-u>"; key = "<C-u>";
action = "<C-u>zz"; #action = "<C-u>zz";
action = "<C-u>";
options = { options = {
desc = "Allow C-d and C-u to keep the cursor in the middle"; desc = "Allow C-d and C-u to keep the cursor in the middle";
}; };

View file

@ -31,10 +31,8 @@
name = "mode"; name = "mode";
fmt = "string.lower"; fmt = "string.lower";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];
@ -43,10 +41,8 @@
name = "branch"; name = "branch";
icon = ""; icon = "";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
"diff" "diff"
@ -63,10 +59,8 @@
}; };
}; };
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];
@ -89,10 +83,8 @@
}; };
}; };
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
separator.left = ""; separator.left = "";
} }
@ -101,10 +93,8 @@
{ {
name = "location"; name = "location";
color = { color = {
fg = fg = "none";
"none"; bg = "none";
bg =
"none";
}; };
} }
]; ];

View file

@ -81,11 +81,11 @@ programs.nixvim = {
} }
{ {
opts = { opts = {
hl = "GruvboxBlue"; hl = "Gruvbox";
position = "center"; position = "center";
}; };
type = "text"; type = "text";
val = "https://github.com/elythh/nixvim"; val = "https://github.com/bloxx12/nichts";
} }
]; ];
}; };

View file

@ -82,7 +82,6 @@
# We don't need to see things like INSERT anymore # We don't need to see things like INSERT anymore
showmode = false; showmode = false;
}; };
}; };
} }

View file

@ -1,7 +1,11 @@
{ config, pkgs, lib, inputs, ... }: {
config,
with lib; pkgs,
let lib,
inputs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.anyrun; cfg = config.modules.programs.anyrun;
in { in {
@ -45,4 +49,3 @@ in {
}; };
}; };
} }

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }: {
let config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.programs.foot; cfg = config.modules.programs.foot;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
@ -36,8 +41,7 @@ in {
pad = "5x5 center"; pad = "5x5 center";
resize-delay-ms = 100; resize-delay-ms = 100;
notify = notify = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
"${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bold-text-in-bright = "no"; bold-text-in-bright = "no";
word-delimiters = '',`|:"'()[]{}<>''; word-delimiters = '',`|:"'()[]{}<>'';
@ -59,8 +63,7 @@ in {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}"; launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh"; label-letters = "sadfjklewcmpgh";
osc8-underline = "always"; osc8-underline = "always";
protocols = protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
"http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = '' uri-characters = ''
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]''; abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+="'()[]'';
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.themes.gtk; cfg = config.modules.themes.gtk;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -47,7 +51,6 @@ in {
home.sessionVariables = { home.sessionVariables = {
#GTK_THEME = "Gruvbox-Dark-BL"; #GTK_THEME = "Gruvbox-Dark-BL";
# GTK_USE_PORTAL = "1"; # GTK_USE_PORTAL = "1";
}; };
}; };
}; };

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.kitty; cfg = config.modules.programs.kitty;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -19,9 +23,7 @@ in {
#background_opacity = "0.9"; #background_opacity = "0.9";
confirm_os_window_close = "0"; confirm_os_window_close = "0";
}; };
}; };
}; };
}; };
} }

View file

@ -1,6 +1,11 @@
{ config, lib, inputs, pkgs, ... }: {
with lib; config,
let lib,
inputs,
pkgs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.minecraft; cfg = config.modules.programs.minecraft;
in { in {

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.mpv; cfg = config.modules.programs.mpv;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
theme = { theme = {
package = pkgs.gruvbox-gtk-theme; package = pkgs.gruvbox-gtk-theme;
name = "Gruvbox-Dark-BL"; name = "Gruvbox-Dark-BL";

View file

@ -1,7 +1,10 @@
{ config, pkgs, lib, ... }: {
config,
with lib; pkgs,
let lib,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.rofi; cfg = config.modules.programs.rofi;
in { in {
@ -9,4 +12,3 @@ in {
config = config =
mkIf cfg.enable {environment.systemPackages = with pkgs; [rofi];}; mkIf cfg.enable {environment.systemPackages = with pkgs; [rofi];};
} }

View file

@ -1,5 +1,9 @@
{ config, inputs, lib, ... }: {
let config,
inputs,
lib,
...
}: let
cfg = config.modules.programs.schizofox; cfg = config.modules.programs.schizofox;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
@ -34,24 +38,21 @@ in {
}; };
search = { search = {
defaultSearchEngine = "DuckDuckGo"; defaultSearchEngine = "DuckDuckGo";
removeEngines = removeEngines = ["Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia"];
[ "Google" "Bing" "Amazon.com" "eBay" "Twitter" "Wikipedia" ];
addEngines = [ addEngines = [
{ {
Name = "NixOS Packages"; Name = "NixOS Packages";
Description = "NixOS Unstable package search"; Description = "NixOS Unstable package search";
Alias = "!np"; Alias = "!np";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
"https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Options"; Name = "NixOS Options";
Description = "NixOS Unstable option search"; Description = "NixOS Unstable option search";
Alias = "!no"; Alias = "!no";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
"https://search.nixos.org/options?channel=unstable&query={searchTerms}";
} }
{ {
Name = "NixOS Wiki"; Name = "NixOS Wiki";
@ -65,32 +66,28 @@ in {
Description = "Home Manager option search"; Description = "Home Manager option search";
Alias = "!hm"; Alias = "!hm";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
"https://mipmip.github.io/home-manager-option-search?query={searchTerms}";
} }
{ {
Name = "Arch Wiki"; Name = "Arch Wiki";
Description = "Arch Wiki search"; Description = "Arch Wiki search";
Alias = "!aw"; Alias = "!aw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.archlinux.org/index.php?search={searchTerms}";
"https://wiki.archlinux.org/index.php?search={searchTerms}";
} }
{ {
Name = "Gentoo Wiki"; Name = "Gentoo Wiki";
Description = "Gentoo Wiki search"; Description = "Gentoo Wiki search";
Alias = "!gw"; Alias = "!gw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.gentoo.org/index.php?search={searchTerms}";
"https://wiki.gentoo.org/index.php?search={searchTerms}";
} }
{ {
Name = "Debian Wiki"; Name = "Debian Wiki";
Description = "Debian Wiki search"; Description = "Debian Wiki search";
Alias = "!dw"; Alias = "!dw";
Method = "GET"; Method = "GET";
URLTemplate = URLTemplate = "https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
"https://wiki.debian.org/FrontPage?action=fullsearch&value={searchTerms}";
} }
{ {
Name = "noogle"; Name = "noogle";
@ -106,15 +103,13 @@ in {
darkreader.enable = true; darkreader.enable = true;
# vimium.enable = true; # vimium.enable = true;
extraExtensions = { extraExtensions = {
"webextension@vimium".install_url = "webextension@vimium".install_url = "https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi";
"https://addons.mozilla.org/firefox/downloads/file/4259790/vimium_ff-2.1.2.xpi";
}; };
}; };
security = { security = {
sanitizeOnShutdown = false; sanitizeOnShutdown = false;
sandbox = true; sandbox = true;
userAgent = userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
}; };
misc = { misc = {

View file

@ -1,5 +1,10 @@
{ config, pkgs, lib, inputs, ... }: {
let config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.modules.programs.spicetify; cfg = config.modules.programs.spicetify;
username = config.modules.other.system.username; username = config.modules.other.system.username;
spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default; spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;

View file

@ -1,6 +1,11 @@
{ config, lib, inputs, pkgs, ... }: {
with lib; config,
let lib,
inputs,
pkgs,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.steam; cfg = config.modules.programs.steam;
in { in {

View file

@ -1,6 +1,10 @@
{ config, pkgs, lib, ... }: {
with lib; config,
let pkgs,
lib,
...
}:
with lib; let
cfg = config.modules.programs.stylix; cfg = config.modules.programs.stylix;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -47,11 +51,10 @@ in {
sizes = { sizes = {
terminal = 14; terminal = 14;
popups = 14; popups = 14;
}; };
monospace = { monospace = {
package = package =
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }); pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];};
name = "JetBrainsMono"; name = "JetBrainsMono";
}; };
serif = { serif = {

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.vesktop; cfg = config.modules.programs.vesktop;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -261,8 +265,7 @@ in {
ServerProfile.enabled = true; ServerProfile.enabled = true;
ShikiCodeblocks = { ShikiCodeblocks = {
enabled = true; enabled = true;
theme = theme = "https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
"https://raw.githubusercontent.com/shikijs/shiki/0b28ad8ccfbf2615f2d9d38ea8255416b8ac3043/packages/shiki/themes/dark-plus.json";
tryHljs = "SECONDARY"; tryHljs = "SECONDARY";
uesDevIcon = "GREYSCALE"; uesDevIcon = "GREYSCALE";
}; };

View file

@ -1,13 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: let
let
vivado-desktop-symbol = pkgs.makeDesktopItem { vivado-desktop-symbol = pkgs.makeDesktopItem {
name = "vivado-2019-2"; name = "vivado-2019-2";
desktopName = "Vivado"; desktopName = "Vivado";
exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado"; exec = "${pkgs.nur.repos.Nick1296.vivado-2019-2}/bin/vivado";
}; };
in { in {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# this propietary software is huge, but I need it for # this propietary software is huge, but I need it for
# university # university

View file

@ -1,5 +1,10 @@
{ config, lib, inputs, pkgs, ... }: {
let config,
lib,
inputs,
pkgs,
...
}: let
cfg = config.modules.programs.waybar; cfg = config.modules.programs.waybar;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
in { in {
@ -14,7 +19,8 @@ in {
layer = "top"; layer = "top";
modules-left = ["custom/launcher" "tray" "hyprland/window"]; modules-left = ["custom/launcher" "tray" "hyprland/window"];
modules-center = ["hyprland/workspaces"]; modules-center = ["hyprland/workspaces"];
modules-right = [ # "custom/dnd" modules-right = [
# "custom/dnd"
"mpd" "mpd"
"cpu" "cpu"
"memory" "memory"
@ -28,8 +34,7 @@ in {
format = " {icon} {volume}%"; format = " {icon} {volume}%";
format-muted = " 󰸈 {volume}%"; format-muted = " 󰸈 {volume}%";
format-icons = {default = ["󰕿" "󰖀" "󰕾"];}; format-icons = {default = ["󰕿" "󰖀" "󰕾"];};
on-click = on-click = "${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
}; };
"hyprland/workspaces" = { "hyprland/workspaces" = {
sort-by-name = true; sort-by-name = true;
@ -141,8 +146,7 @@ in {
actions = {on-click-right = "mode";}; actions = {on-click-right = "mode";};
}; };
mpd = { mpd = {
format = format = "󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
"󰝚 {artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})";
format-disconnected = "󰝚 Disconnected"; format-disconnected = "󰝚 Disconnected";
format-stopped = "󰝚 Stopped"; format-stopped = "󰝚 Stopped";
interval = 1; interval = 1;
@ -458,4 +462,3 @@ in {
}; };
}; };
} }

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.zathura; cfg = config.modules.programs.zathura;
username = config.modules.other.system.username; username = config.modules.other.system.username;
catppuccin = pkgs.fetchFromGitHub { catppuccin = pkgs.fetchFromGitHub {
@ -9,14 +13,12 @@ let
rev = "4eb02fd206de63b2423f6deb58242d352545b52f"; rev = "4eb02fd206de63b2423f6deb58242d352545b52f";
hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI="; hash = "sha256-/vD/hOi6KcaGyAp6Az7jL5/tQSGRzIrf0oHjAJf4QbI=";
}; };
in { in {
options.modules.programs.zathura.enable = mkEnableOption "zathura"; options.modules.programs.zathura.enable = mkEnableOption "zathura";
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager.users.${username} = { home-manager.users.${username} = {
xdg.configFile."zathura/catppuccin-mocha".source = xdg.configFile."zathura/catppuccin-mocha".source = "${catppuccin}/src/catppuccin-mocha";
"${catppuccin}/src/catppuccin-mocha";
programs.zathura = { programs.zathura = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''

View file

@ -1,2 +1 @@
_: {imports = [./home-manager.nix ./system.nix ./xdg.nix];} _: {imports = [./home-manager.nix ./system.nix ./xdg.nix];}

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, self, ... }: {
with lib; config,
let inputs,
lib,
self,
...
}:
with lib; let
cfg = config.modules.other.home-manager; cfg = config.modules.other.home-manager;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {

View file

@ -1,6 +1,10 @@
{ config, lib, ... }: {
with lib; config,
let cfg = config.modules.other.system; lib,
...
}:
with lib; let
cfg = config.modules.other.system;
in { in {
options.modules.other.system = { options.modules.other.system = {
hostname = mkOption { hostname = mkOption {

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: let
let
username = config.modules.other.system.username; username = config.modules.other.system.username;
hmCfg = config.home-manager.users.${username}; hmCfg = config.home-manager.users.${username};
@ -11,7 +10,6 @@ let
text_editor = "helix.desktop"; text_editor = "helix.desktop";
terminal = "foot.desktop"; terminal = "foot.desktop";
in { in {
environment.sessionVariables = {TERMINAL = "${terminal}";}; environment.sessionVariables = {TERMINAL = "${terminal}";};
home-manager.users.${username} = { home-manager.users.${username} = {

View file

@ -1,5 +1,10 @@
{ config, inputs, lib, pkgs, ... }: {
let config,
inputs,
lib,
pkgs,
...
}: let
cfg = config.modules.services.dunst; cfg = config.modules.services.dunst;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, pkgs, ... }: {
with lib; config,
let inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.services.greetd; cfg = config.modules.services.greetd;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;

View file

@ -1,6 +1,10 @@
{ config, lib, ... }: {
with lib; config,
let cfg = config.modules.services.pipewire; lib,
...
}:
with lib; let
cfg = config.modules.services.pipewire;
in { in {
options.modules.services.pipewire.enable = mkEnableOption "pipewire"; options.modules.services.pipewire.enable = mkEnableOption "pipewire";

View file

@ -1,11 +1,14 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.ssh; cfg = config.modules.programs.ssh;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
options.modules.programs.ssh.enable = mkEnableOption "ssh"; options.modules.programs.ssh.enable = mkEnableOption "ssh";
config = mkIf cfg.enable {programs.ssh = {startAgent = true;};}; config = mkIf cfg.enable {programs.ssh = {startAgent = true;};};
} }

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.btop; cfg = config.modules.programs.btop;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {

View file

@ -1,6 +1,10 @@
{ config, lib, pkgs, ... }: {
with lib; config,
let lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.ncmpcpp; cfg = config.modules.programs.ncmpcpp;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -11,20 +15,16 @@ in {
xdg.configFile."ncmpcpp/config".source = ./config; xdg.configFile."ncmpcpp/config".source = ./config;
programs.ncmpcpp = { programs.ncmpcpp = {
enable = true; enable = true;
package = (pkgs.ncmpcpp.override { visualizerSupport = true; }); package = pkgs.ncmpcpp.override {visualizerSupport = true;};
mpdMusicDir = "/home/vali/Nextcloud/Media/Music"; mpdMusicDir = "/home/vali/Nextcloud/Media/Music";
settings = { settings = {
mpd_host = "127.0.0.1"; mpd_host = "127.0.0.1";
mpd_port = "6600"; mpd_port = "6600";
alternative_header_first_line_format = "$5{$b%t$/b}$9"; alternative_header_first_line_format = "$5{$b%t$/b}$9";
alternative_header_second_line_format = alternative_header_second_line_format = "$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}";
"$3by $7{$b%a$/b}$9 $3from $7{$b%b$/b}$9 $5{(%y)}"; song_list_format = " $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)";
song_list_format = song_columns_list_format = "(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}";
" $2%n$(end) $9 $3%a$(end) $(245)-$9 $(246)%t$9 $R{ $5%y$9}$(end) $(246)%lq$(end)"; song_status_format = "$b $8%A $8$3 $3%t $3$5 $5%b $5$2 $2%y $2$8 %g";
song_columns_list_format =
"(3f)[red]{n} (3f)[246]{} (35)[white]{t} (18)[blue]{a} (30)[green]{b} (5f)[yellow]{d} (5f)[red]{y} (7f)[magenta]{l}";
song_status_format =
"$b $8%A $8$3 $3%t $3$5 $5%b $5$2 $2%y $2$8 %g";
playlist_display_mode = "columns"; playlist_display_mode = "columns";
browser_display_mode = "columns"; browser_display_mode = "columns";
search_engine_display_mode = "columns"; search_engine_display_mode = "columns";

View file

@ -1,6 +1,11 @@
{ config, inputs, lib, pkgs, ... }: {
with lib; config,
let inputs,
lib,
pkgs,
...
}:
with lib; let
cfg = config.modules.programs.neovim; cfg = config.modules.programs.neovim;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -157,7 +162,6 @@ in {
enable = true; enable = true;
settings.theme = "dark"; settings.theme = "dark";
}; };
}; };
extraPlugins = with pkgs.vimPlugins; [zen-mode-nvim lazygit-nvim]; extraPlugins = with pkgs.vimPlugins; [zen-mode-nvim lazygit-nvim];

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.newsboat; cfg = config.modules.programs.newsboat;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {
@ -51,13 +54,11 @@ in {
} }
{ {
title = "Veronica Explains"; title = "Veronica Explains";
url = url = "https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ";
"https://www.youtube.com/feeds/videos.xml?channel_id=UCMiyV_Ib77XLpzHPQH_q0qQ";
} }
{ {
title = "Mental Outlaw"; title = "Mental Outlaw";
url = url = "https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA";
"https://www.youtube.com/feeds/videos.xml?channel_id=UC7YOGHUfC1Tb6E4pudI9STA";
} }
{ {
title = "Hacker News"; title = "Hacker News";

View file

@ -1,6 +1,9 @@
{ config, lib, ... }: {
with lib; config,
let lib,
...
}:
with lib; let
cfg = config.modules.programs.yazi; cfg = config.modules.programs.yazi;
username = config.modules.other.system.username; username = config.modules.other.system.username;
in { in {

View file

@ -1,10 +1,14 @@
{ config, pkgs, inputs, ... }: { {
config,
pkgs,
inputs,
...
}: {
imports = [ imports = [
# inputs.niri.nixosModules.niri # inputs.niri.nixosModules.niri
./hypr ./hypr
./variables.nix ./variables.nix
]; ];
# programs.niri.enable = true; # programs.niri.enable = true;
} }

View file

@ -1,18 +1,28 @@
{ config, pkgs, lib, inputs, ... }: {
let config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.modules.wms.wayland.hyprland; cfg = config.modules.wms.wayland.hyprland;
username = config.modules.other.system.username; username = config.modules.other.system.username;
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland; inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
inherit (inputs.anyrun.packages.${pkgs.system}) anyrun; inherit (inputs.anyrun.packages.${pkgs.system}) anyrun;
inherit (inputs.nixpkgs-wayland.packages.${pkgs.system}) inherit
foot swww wlsunset; (inputs.nixpkgs-wayland.packages.${pkgs.system})
foot
swww
wlsunset
;
inherit (inputs.waybar.packages.${pkgs.system}) waybar; inherit (inputs.waybar.packages.${pkgs.system}) waybar;
inherit (inputs.split-monitor-workspaces.packages.${pkgs.system}) inherit
split-monitor-workspaces; (inputs.split-monitor-workspaces.packages.${pkgs.system})
split-monitor-workspaces
;
in { in {
options.modules.wms.wayland.hyprland.enable = lib.mkEnableOption "hyprland"; options.modules.wms.wayland.hyprland.enable = lib.mkEnableOption "hyprland";
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
# xdg Portal # xdg Portal
xdg.portal = { xdg.portal = {
enable = true; enable = true;
@ -220,7 +230,6 @@ in {
"$mainMod, J, movefocus, d" "$mainMod, J, movefocus, d"
"$mainMod, K, movefocus, u" "$mainMod, K, movefocus, u"
"$mainMod, L, movefocus, r" "$mainMod, L, movefocus, r"
]; ];
# Media controls # Media controls
bindl = let bindl = let
@ -294,4 +303,3 @@ in {
environment.systemPackages = with pkgs; [libnotify]; environment.systemPackages = with pkgs; [libnotify];
}; };
} }

View file

@ -1,4 +1,9 @@
{ pkgs, theme, config, ... }: {
pkgs,
theme,
config,
...
}:
with theme.colors; { with theme.colors; {
programs.niri.settings = { programs.niri.settings = {
outputs."eDP-1".position = { outputs."eDP-1".position = {
@ -76,8 +81,10 @@ with theme.colors; {
window-close = smooth; window-close = smooth;
}; };
window-rules = [{ window-rules = [
geometry-corner-radius = let radius = 8.0; {
geometry-corner-radius = let
radius = 8.0;
in { in {
bottom-left = radius; bottom-left = radius;
bottom-right = radius; bottom-right = radius;
@ -85,17 +92,19 @@ with theme.colors; {
top-right = radius; top-right = radius;
}; };
clip-to-geometry = true; clip-to-geometry = true;
}]; }
];
binds = with config.lib.niri.actions; binds = with config.lib.niri.actions; let
let sh = spawn "sh" "-c"; sh = spawn "sh" "-c";
in { in {
"Mod+Return" = { "Mod+Return" = {
action = spawn "${pkgs.foot}/bin/foot"; action = spawn "${pkgs.foot}/bin/foot";
cooldown-ms = 500; cooldown-ms = 500;
}; };
"Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel"; "Mod+Space".action = spawn "${pkgs.fuzzel}/bin/fuzzel";
"Mod+V".action = sh "Mod+V".action =
sh
"${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy"; "${pkgs.cliphist}/bin/cliphist list | fuzzel --dmenu | cliphist decode | wl-copy";
"Mod+Shift+Period".action = spawn "emoji"; "Mod+Shift+Period".action = spawn "emoji";

View file

@ -1,5 +1,9 @@
{ pkgs, lib, theme, ... }: {
let pkgs,
lib,
theme,
...
}: let
mkService = lib.recursiveUpdate { mkService = lib.recursiveUpdate {
Unit.PartOf = ["graphical-session.target"]; Unit.PartOf = ["graphical-session.target"];
Unit.After = ["graphical-session.target"]; Unit.After = ["graphical-session.target"];

View file

@ -1,5 +1,9 @@
{ pkgs, inputs, config, ... }: { {
pkgs,
inputs,
config,
...
}: {
programs.niri = { programs.niri = {
enable = true; enable = true;
package = inputs.niri.packages.${pkgs.system}.niri-unstable; package = inputs.niri.packages.${pkgs.system}.niri-unstable;

View file

@ -1,5 +1,8 @@
{ config, lib, ... }: {
let config,
lib,
...
}: let
cfg = config.modules.wms.wayland; cfg = config.modules.wms.wayland;
hyprland = config.modules.wms.wayland.hyprland; hyprland = config.modules.wms.wayland.hyprland;
in { in {

View file

@ -1,6 +1,11 @@
{ pkgs, lib, config, callPackage, ... }: {
with lib; pkgs,
let lib,
config,
callPackage,
...
}:
with lib; let
username = config.modules.other.system.username; username = config.modules.other.system.username;
cfg = config.modules.programs.awesome; cfg = config.modules.programs.awesome;
in { in {
@ -17,8 +22,7 @@ in {
options = "grp:alt_space_toggle"; options = "grp:alt_space_toggle";
}; };
windowManager.awesome.enable = true; windowManager.awesome.enable = true;
displayManager.setupCommands = displayManager.setupCommands = "${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1";
"${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-1 --rotate normal --output DP-2 --rotate normal --left-of HDMI-1 --output HDMI-0 --right-of HDMI-1";
}; };
}; };
}; };

View file

@ -9,8 +9,7 @@
}; };
boot.plymouth = { boot.plymouth = {
enable = false; enable = false;
font = font = "${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
"${pkgs.jetbrains-mono}/share/fonts/truetype/JetBrainsMono-Regular.ttf";
themePackages = [pkgs.catppuccin-plymouth]; themePackages = [pkgs.catppuccin-plymouth];
theme = "catppuccin-macchiato"; theme = "catppuccin-macchiato";
}; };

View file

@ -1,5 +1,10 @@
{ config, lib, pkgs, ... }: {
let username = config.modules.other.system.username; config,
lib,
pkgs,
...
}: let
username = config.modules.other.system.username;
in { in {
hardware.bluetooth = { hardware.bluetooth = {
enable = true; enable = true;

View file

@ -1,4 +1,9 @@
{ pkgs, config, inputs, ... }: { {
pkgs,
config,
inputs,
...
}: {
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
hardware.opengl = { hardware.opengl = {
enable = true; enable = true;
@ -22,4 +27,3 @@
}; };
}; };
} }

View file

@ -1,5 +1,9 @@
{ config, lib, ... }: {
let username = config.modules.other.system.username; config,
lib,
...
}: let
username = config.modules.other.system.username;
in { in {
networking = { networking = {
networkmanager = { networkmanager = {

View file

@ -1,3 +1,7 @@
{ inputs, lib, ... }: { {
inputs,
lib,
...
}: {
nix.registry = lib.mapAttrs (_: v: {flake = v;}) inputs; nix.registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
} }

View file

@ -1,5 +1,8 @@
{ config, lib, ... }: {
config,
lib,
...
}:
with lib; { with lib; {
options.modules.other.system.monitors = mkOption { options.modules.other.system.monitors = mkOption {
description = "\n List of monitors to use\n "; description = "\n List of monitors to use\n ";
@ -69,5 +72,4 @@ with lib; {
}; };
}); });
}; };
} }

View file

@ -1,6 +1,8 @@
{ inputs, outputs, ... }: {
inputs,
let outputs,
...
}: let
add_nur = self: super: { add_nur = self: super: {
# nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; }; # nur-no-pkgs = import inputs.nur-no-pkgs { pkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; nurpkgs = inputs.nixpkgs.legacyPackages.${profile-config.system}; };
nur = import inputs.nur { nur = import inputs.nur {