big module system implementation

This commit is contained in:
cnst
2024-08-17 18:28:42 +02:00
parent 505afa84d0
commit 7525ab34c1
155 changed files with 2402 additions and 2029 deletions

3
home/modules/utils/ags/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
style.css
style.css.map
types

View File

@@ -0,0 +1,57 @@
{
inputs,
pkgs,
lib,
config,
...
}: let
requiredDeps = with pkgs; [
bash
bun
coreutils
dart-sass
gawk
imagemagick
procps
ripgrep
util-linux
];
guiDeps = with pkgs; [
gnome.gnome-control-center
mission-center
overskride
wlogout
];
dependencies = requiredDeps ++ guiDeps;
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.ags;
in {
imports = [
inputs.ags.homeManagerModules.default
];
options = {
modules.utils.ags.enable = mkEnableOption "Enables ags";
};
config = mkIf cfg.enable {
programs.ags.enable = true;
systemd.user.services.ags = {
Unit = {
Description = "Aylur's Gtk Shell";
PartOf = [
"tray.target"
"graphical-session.target"
];
};
Service = {
Environment = "PATH=/run/wrappers/bin:${lib.makeBinPath dependencies}";
ExecStart = "${cfg.package}/bin/ags";
Restart = "on-failure";
};
Install.WantedBy = ["graphical-session.target"];
};
};
}

View File

@@ -0,0 +1,23 @@
{
inputs,
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.anyrun;
in {
imports = [
inputs.anyrun.homeManagerModules.default
];
options = {
modules.utils.anyrun.enable = mkEnableOption "Enables anyrun";
};
config = mkIf cfg.enable {
programs.anyrun = {
enable = true;
#extraCss = builtins.readFile (./. + "/style-dark.css");
};
};
}

View File

@@ -0,0 +1,21 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.rofi;
in {
options = {
modules.utils.rofi.enable = mkEnableOption "Enables firefox";
};
config = mkIf cfg.enable {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland-unwrapped;
configPath = "home/cnst/.config/rofi/config.rasi";
font = "Rec Mono Linear 11";
};
};
}

View File

@@ -0,0 +1,19 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.waybar;
in {
options = {
modules.utils.waybar.enable = mkEnableOption "Enables waybar";
};
config = mkIf cfg.enable {
programs.waybar = {
enable = true;
package = pkgs.waybar;
};
};
}

View File

@@ -0,0 +1,47 @@
{
pkgs,
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption;
cfg = config.modules.utils.yazi;
in {
imports = [
./theme
];
options = {
modules.utils.yazi.enable = mkEnableOption "Enables yazi";
};
config = mkIf cfg.enable {
programs.yazi = {
enable = true;
package = pkgs.yazi;
enableBashIntegration = config.programs.bash.enable;
enableZshIntegration = config.programs.zsh.enable;
settings = {
manager = {
layout = [1 4 3];
sort_by = "alphabetical";
sort_sensitive = true;
sort_reverse = false;
sort_dir_first = true;
linemode = "none";
show_hidden = false;
show_symlink = true;
};
preview = {
tab_size = 2;
max_width = 600;
max_height = 900;
cache_dir = config.xdg.cacheHome;
};
};
};
};
}

View File

@@ -0,0 +1,13 @@
{
imports = [
./filetype.nix
./help.nix
./icons.nix
./input.nix
./manager.nix
./select.nix
./status.nix
./tasks.nix
./which.nix
];
}

View File

@@ -0,0 +1,59 @@
{
programs.yazi.theme.filetype.rules = [
# Images
{
mime = "image/*";
fg = "#83a598";
}
# Videos
{
mime = "video/*";
fg = "#b8bb26";
}
{
mime = "audio/*";
fg = "#b8bb26";
}
# Archives
{
mime = "application/zip";
fg = "#fe8019";
}
{
mime = "application/gzip";
fg = "#fe8019";
}
{
mime = "application/x-tar";
fg = "#fe8019";
}
{
mime = "application/x-bzip";
fg = "#fe8019";
}
{
mime = "application/x-bzip2";
fg = "#fe8019";
}
{
mime = "application/x-7z-compressed";
fg = "#fe8019";
}
{
mime = "application/x-rar";
fg = "#fe8019";
}
# Fallback
{
name = "*";
fg = "#a89984";
}
{
name = "*/";
fg = "#83a598";
}
];
}

View File

@@ -0,0 +1,15 @@
{
programs.yazi.theme.help = {
on = {fg = "#fe8019";};
exec = {fg = "#83a598";};
desc = {fg = "#928374";};
hovered = {
bg = "#504945";
bold = true;
};
footer = {
fg = "#3c3836";
bg = "#a89984";
};
};
}

View File

@@ -0,0 +1,503 @@
{
programs.yazi.theme.icon.rules = [
# Home
{
name = ".config/";
text = "";
}
{
name = ".ssh/";
text = "󰢬";
}
{
name = "Desktop/";
text = "";
}
{
name = "Development/";
text = "";
}
{
name = "Documents/";
text = "";
}
{
name = "Downloads/";
text = "󰉍";
}
{
name = "Library/";
text = "";
}
{
name = "Movies/";
text = "";
}
{
name = "Music/";
text = "󱍙";
}
{
name = "Pictures/";
text = "󰉏";
}
{
name = "Videos/";
text = "";
}
{
name = "Public/";
text = "";
}
# Git
{
name = ".git/";
text = "";
}
{
name = ".gitignore";
text = "";
}
{
name = ".gitmodules";
text = "";
}
{
name = ".gitattributes";
text = "";
}
# Dotfiles
{
name = ".DS_Store";
text = "";
}
{
name = ".bashrc";
text = "";
}
{
name = ".bashprofile";
text = "";
}
{
name = ".zshrc";
text = "";
}
{
name = ".zshenv";
text = "";
}
{
name = ".zprofile";
text = "";
}
{
name = ".vimrc";
text = "";
}
# Text
{
name = "*.txt";
text = "";
}
{
name = "*.md";
text = "";
}
{
name = "*.rst";
text = "";
}
{
name = "COPYING";
text = "󰿃";
}
{
name = "LICENSE";
text = "󰿃";
}
# Archives
{
name = "*.zip";
text = "";
}
{
name = "*.tar";
text = "";
}
{
name = "*.gz";
text = "";
}
{
name = "*.7z";
text = "";
}
{
name = "*.bz2";
text = "";
}
{
name = "*.xz";
text = "";
}
# Documents
{
name = "*.csv";
text = "";
}
{
name = "*.doc";
text = "";
}
{
name = "*.doct";
text = "";
}
{
name = "*.docx";
text = "";
}
{
name = "*.dot";
text = "";
}
{
name = "*.ods";
text = "";
}
{
name = "*.ots";
text = "";
}
{
name = "*.pdf";
text = "";
}
{
name = "*.pom";
text = "";
}
{
name = "*.pot";
text = "";
}
{
name = "*.ppm";
text = "";
}
{
name = "*.pps";
text = "";
}
{
name = "*.ppt";
text = "";
}
{
name = "*.potx";
text = "";
}
{
name = "*.ppmx";
text = "";
}
{
name = "*.ppsx";
text = "";
}
{
name = "*.pptx";
text = "";
}
{
name = "*.xlc";
text = "";
}
{
name = "*.xlm";
text = "";
}
{
name = "*.xls";
text = "";
}
{
name = "*.xlt";
text = "";
}
{
name = "*.xlsm";
text = "";
}
{
name = "*.xlsx";
text = "";
}
# Audio
{
name = "*.mp3";
text = "";
}
{
name = "*.flac";
text = "";
}
{
name = "*.wav";
text = "";
}
{
name = "*.aac";
text = "";
}
{
name = "*.ogg";
text = "";
}
{
name = "*.m4a";
text = "";
}
{
name = "*.mp2";
text = "";
}
# Movies
{
name = "*.mp4";
text = "";
}
{
name = "*.mkv";
text = "";
}
{
name = "*.avi";
text = "";
}
{
name = "*.mov";
text = "";
}
{
name = "*.webm";
text = "";
}
# Images
{
name = "*.jpg";
text = "";
}
{
name = "*.jpeg";
text = "";
}
{
name = "*.png";
text = "";
}
{
name = "*.gif";
text = "";
}
{
name = "*.webp";
text = "";
}
{
name = "*.avif";
text = "";
}
{
name = "*.bmp";
text = "";
}
{
name = "*.ico";
text = "";
}
{
name = "*.svg";
text = "";
}
{
name = "*.xcf";
text = "";
}
{
name = "*.HEIC";
text = "";
}
# Programming
{
name = "*.c";
text = "";
}
{
name = "*.cpp";
text = "";
}
{
name = "*.h";
text = "";
}
{
name = "*.hpp";
text = "";
}
{
name = "*.rs";
text = "";
}
{
name = "*.go";
text = "";
}
{
name = "*.py";
text = "";
}
{
name = "*.hs";
text = "";
}
{
name = "*.js";
text = "";
}
{
name = "*.ts";
text = "";
}
{
name = "*.tsx";
text = "";
}
{
name = "*.jsx";
text = "";
}
{
name = "*.rb";
text = "";
}
{
name = "*.php";
text = "";
}
{
name = "*.java";
text = "";
}
{
name = "*.sh";
text = "";
}
{
name = "*.fish";
text = "";
}
{
name = "*.swift";
text = "";
}
{
name = "*.vim";
text = "";
}
{
name = "*.lua";
text = "";
}
{
name = "*.html";
text = "";
}
{
name = "*.css";
text = "";
}
{
name = "*.sass";
text = "";
}
{
name = "*.scss";
text = "";
}
{
name = "*.json";
text = "";
}
{
name = "*.toml";
text = "";
}
{
name = "*.yml";
text = "";
}
{
name = "*.yaml";
text = "";
}
{
name = "*.ini";
text = "";
}
{
name = "*.conf";
text = "";
}
{
name = "*.lock";
text = "";
}
{
name = "*.nix";
text = "";
}
{
name = "Containerfile";
text = "󰡨";
}
{
name = "Dockerfile";
text = "󰡨";
}
# Misc
{
name = "*.bin";
text = "";
}
{
name = "*.exe";
text = "";
}
{
name = "*.pkg";
text = "";
}
# Default
{
name = "*";
text = "";
}
{
name = "*/";
text = "";
}
];
}

View File

@@ -0,0 +1,8 @@
{
programs.yazi.theme.input = {
border = {fg = "#bdae93";};
title = {};
value = {};
selected = {reversed = true;};
};
}

View File

@@ -0,0 +1,59 @@
{
programs.yazi.theme.manager = {
cwd = {fg = "#83a598";};
# Hovered
hovered = {
fg = "#282828";
bg = "#83a598";
};
preview_hovered = {underline = true;};
# Find
find_keyword = {
fg = "#b8bb26";
italic = true;
};
find_position = {
fg = "#fe8019";
bg = "reset";
italic = true;
};
# Marker
marker_selected = {
fg = "#b8bb26";
bg = "#b8bb26";
};
marker_copied = {
fg = "#b8bb26";
bg = "#b8bb26";
};
marker_cut = {
fg = "#fb4934";
bg = "#fb4934";
};
# Tab
tab_active = {
fg = "#282828";
bg = "#504945";
};
tab_inactive = {
fg = "#a89984";
bg = "#3c3836";
};
tab_width = 1;
# Border;
border_symbol = "";
border_style = {fg = "#665c54";};
# Offset;
folder_offset = [1 0 1 0];
preview_offset = [1 1 1 1];
# Highlighting;
syntect_theme = "";
};
}

View File

@@ -0,0 +1,7 @@
{
programs.yazi.theme.select = {
border = {fg = "#504945";};
active = {fg = "#fe8019";};
inactive = {};
};
}

View File

@@ -0,0 +1,48 @@
{
programs.yazi.theme.status = {
separator_open = "";
separator_close = "";
separator_style = {
fg = "#3c3836";
bg = "#3c3836";
};
# Mode;
mode_normal = {
fg = "#282828";
bg = "#A89984";
bold = true;
};
mode_select = {
fg = "#282828";
bg = "#b8bb26";
bold = true;
};
mode_unset = {
fg = "#282828";
bg = "#d3869b";
bold = true;
};
# Progress;
progress_label = {
fg = "#ebdbb2";
bold = true;
};
progress_normal = {
fg = "#504945";
bg = "#3c3836";
};
progress_error = {
fg = "#fb4934";
bg = "#3c3836";
};
# Permissions;
permissions_t = {fg = "#504945";};
permissions_r = {fg = "#b8bb26";};
permissions_w = {fg = "#fb4934";};
permissions_x = {fg = "#b8bb26";};
permissions_s = {fg = "#665c54";};
};
}

View File

@@ -0,0 +1,7 @@
{
programs.yazi.theme.tasks = {
border = {fg = "#504945";};
title = {};
hovered = {underline = true;};
};
}

View File

@@ -0,0 +1,10 @@
{
programs.yazi.theme.which = {
mask = {bg = "#3c3836";};
cand = {fg = "#83a598";};
rest = {fg = "#928374";};
desc = {fg = "#fe8019";};
separator = " ";
separator_style = {fg = "#504945";};
};
}