Merge branch 'flake-parts'

This commit is contained in:
ooks-io 2024-05-19 16:06:41 +12:00
commit b221fb4781
230 changed files with 609 additions and 878 deletions

View file

@ -1,18 +0,0 @@
{ lib, ... }:
{
imports = [
./monitors
./nix
./userDirs
./home
./mimeApps
];
options.homeModules.config = {
nix.enable = lib.mkEnableOption "enable nix configuration module";
home.enable = lib.mkEnableOption "enable home configuration module";
userDirs.enable = lib.mkEnableOption "enable userDirs configuration module";
mimeApps.enable = lib.mkEnableOption "enable mimeApps configuration module";
};
}

View file

@ -1,29 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.config.home;
in
{
config = lib.mkIf cfg.enable {
programs.home-manager.enable = true;
home = {
username = lib.mkDefault "ooks";
homeDirectory = lib.mkDefault "/home/${config.home.username}";
stateVersion = lib.mkDefault "22.05";
sessionPath = [ "${config.home.homeDirectory}/.local/bin" ];
sessionVariables = {
TZ = "Pacific/Auckland";
};
};
# to save space
manual = {
html.enable = false;
json.enable = false;
manpages.enable = true;
};
};
}

View file

@ -1,40 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.config.mimeApps;
browser = ["${config.home.sessionVariables.BROWSER}.desktop"];
zathura = ["org.pwmt.zethura.desktop.desktop"];
associations = {
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/ftp" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/unknown" = browser;
"application/x-extension-htm" = browser;
"application/x-extension-html" = browser;
"application/x-extension-shtml" = browser;
"application/xhtml+xml" = browser;
"application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser;
"audio/*" = ["mpv.desktop"];
"video/*" = ["mpv.dekstop"];
"image/*" = ["imv.desktop"];
"application/json" = browser;
"application/pdf" = zathura;
"x-scheme-handler/discord" = ["vesktop.desktop"];
};
in
{
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.xdg-utils ];
xdg.mimeApps = {
enable = true;
associations.added = associations;
defaultApplications = associations;
};
};
}

View file

@ -1,62 +0,0 @@
{ lib, config, ... }:
let
inherit (lib) mkOption types;
cfg = config.monitors;
in
{
options.monitors = mkOption {
type = types.listOf (types.submodule {
options = {
name = mkOption {
type = types.str;
example = "DP-1";
};
primary = mkOption {
type = types.bool;
default = false;
};
width = mkOption {
type = types.int;
example = 1920;
};
height = mkOption {
type = types.int;
example = 1080;
};
refreshRate = mkOption {
type = types.int;
default = 60;
};
x = mkOption {
type = types.int;
default = 0;
};
y = mkOption {
type = types.int;
default = 0;
};
transform = mkOption {
type = types.int;
default = 0;
};
enabled = mkOption {
type = types.bool;
default = true;
};
workspace = mkOption {
type = types.nullOr types.str;
default = null;
};
};
});
default = [ ];
};
config = {
assertions = [{
assertion = ((lib.length config.monitors) != 0) ->
((lib.length (lib.filter (m: m.primary) config.monitors)) == 1);
message = "Exactly one monitor must be set to primary.";
}];
};
}

View file

@ -1,26 +0,0 @@
{ lib, config, pkgs, outputs, ... }:
let
cfg = config.homeModules.config.nix;
in
{
config = lib.mkIf cfg.enable {
nixpkgs = {
overlays = builtins.attrValues outputs.overlays;
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
nix = {
package = lib.mkDefault pkgs.nix;
settings = {
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
warn-dirty = false;
};
};
};
}

View file

@ -1,27 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.config.userDirs;
in
{
config = lib.mkIf cfg.enable {
xdg = {
enable = true;
configHome = "${config.home.homeDirectory}/.config";
cacheHome = "${config.home.homeDirectory}/.cache";
dataHome = "${config.home.homeDirectory}/.local/share";
stateHome = "${config.home.homeDirectory}/.local/state";
userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home.homeDirectory}/Desktop";
documents = "${config.home.homeDirectory}/Documents";
music = "${config.home.homeDirectory}/Media/Music";
videos = "${config.home.homeDirectory}/Media/Videos";
pictures = "${config.home.homeDirectory}/Media/Pictures";
};
};
};
}

View file

@ -1,10 +0,0 @@
{
imports = [
./editor # Still need to implement nvim
./fileManager
./multiplexer # Still need to implement tmux and screen
./prompt # only Starship is currently implemented
./shell
./utility
];
}

View file

@ -1,27 +0,0 @@
{ lib, ... }:
{
imports = [
./helix
./nvim
];
options.homeModules.console.editor = {
helix = {
enable = lib.mkEnableOption "Enable helix text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set helix as the default text editor in environment variables";
};
};
nvim = {
enable = lib.mkEnableOption "Enable nvim text editor";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set nvim as the default text editor in environment variables";
};
};
};
}

View file

@ -1,68 +0,0 @@
{ inputs, config, pkgs, lib, ... }:
let
cfg = config.homeModules.console.editor.helix;
inherit (config) colorscheme;
in
{
imports = [
./languages.nix
];
config = lib.mkIf cfg.enable {
programs.helix = {
enable = true;
defaultEditor = lib.mkIf cfg.default true;
package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (old: {
makeWrapperArgs = with pkgs;
old.makeWrapperArgs
or []
++ [
"--suffix"
"PATH"
":"
(lib.makeBinPath [
clang-tools
marksman
nil
nodePackages.bash-language-server
nodePackages.vscode-css-languageserver-bin
nodePackages.vscode-langservers-extracted
shellcheck
])
];
});
settings = {
theme = colorscheme.slug;
editor = {
color-modes = true;
middle-click-paste = false;
line-number = "relative";
indent-guides.render = true;
true-color = true;
cursorline = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
statusline = {
left = [ "mode" "spinner" ];
center = [ "file-name" ];
right = [ "diagnostics" "selections" "position" "file-encoding" "file-line-ending" "file-type" ];
};
lsp = {
display-messages = true;
display-inlay-hints = true;
};
};
keys.normal.space.u = {
f = ":format";
w = ":set whitespace.render all";
W = ":set whitespace.render none";
};
};
themes = import ./theme.nix { inherit colorscheme; };
};
};
}

View file

@ -1,142 +0,0 @@
{ pkgs, lib, config, ... }:
let
cfg = config.homeModules.console.editor.helix;
in
{
config = lib.mkIf cfg.enable {
programs.helix.languages = {
language = let
deno = lang: {
command = "${pkgs.deno}/bin/deno";
args = ["fmt" "-" "--ext" lang];
};
prettier = lang: {
command = "${pkgs.nodePackages.prettier}/bin/prettier";
args = ["--parser" lang];
};
prettierLangs = map (e: {
name = e;
formatter = prettier e;
});
langs = ["css" "scss" "html"];
in
[
{
name = "bash";
auto-format = true;
formatter = {
command = "${pkgs.shfmt}/bin/shfmt";
args = ["-i" "2"];
};
}
{
name = "clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = ["clj" "cljs" "cljc" "clje" "cljr" "cljx" "edn" "boot" "yuck"];
}
{
name = "javascript";
auto-format = true;
language-servers = ["dprint" "typescript-language-server"];
}
{
name = "json";
formatter = deno "json";
}
{
name = "markdown";
auto-format = true;
formatter = deno "md";
}
]
++ prettierLangs langs;
language-server = {
bash-language-server = {
command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server";
args = ["start"];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
};
deno-lsp = {
command = "${pkgs.deno}/bin/deno";
args = ["lsp"];
environment.NO_COLOR = "1";
config.deno = {
enable = true;
lint = true;
unstable = true;
suggest = {
completeFunctionCalls = false;
imports = {hosts."https://deno.land" = true;};
};
inlayHints = {
enumMemberValues.enabled = true;
functionLikeReturnTypes.enabled = true;
parameterNames.enabled = "all";
parameterTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
variableTypes.enabled = true;
};
};
};
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
dprint = {
command = lib.getExe pkgs.dprint;
args = ["lsp"];
};
typescript-language-server = {
command = "${pkgs.nodePackages.typescript-language-server}/bin/typescript-language-server";
args = ["--stdio"];
config = let
inlayHints = {
includeInlayEnumMemberValueHints = true;
includeInlayFunctionLikeReturnTypeHints = true;
includeInlayFunctionParameterTypeHints = true;
includeInlayParameterNameHints = "all";
includeInlayParameterNameHintsWhenArgumentMatchesName = true;
includeInlayPropertyDeclarationTypeHints = true;
includeInlayVariableTypeHints = true;
};
in {
typescript-language-server.source = {
addMissingImports.ts = true;
fixAll.ts = true;
organizeImports.ts = true;
removeUnusedImports.ts = true;
sortImports.ts = true;
};
typescript = {inherit inlayHints;};
javascript = {inherit inlayHints;};
hostInfo = "helix";
};
};
vscode-css-language-server = {
command = "${pkgs.nodePackages.vscode-css-languageserver-bin}/bin/css-languageserver";
args = ["--stdio"];
config = {
provideFormatter = true;
css.validate.enable = true;
scss.validate.enable = true;
};
};
};
};
};
}

View file

@ -1,73 +0,0 @@
{ colorscheme }: {
"${colorscheme.slug}" = {
palette = builtins.mapAttrs (name: value: "#${value}") colorscheme.colors; # Add leading '#'
"attributes" = "base09";
"comment" = { fg = "base03"; modifiers = [ "italic" ]; };
"constant" = "base09";
"constant.character.escape" = "base0C";
"constant.numeric" = "base09";
"constructor" = "base0D";
"debug" = "base03";
"diagnostic" = { modifiers = [ "underlined" ]; };
"diagnostic.error" = { underline = { style = "curl"; }; };
"diagnostic.hint" = { underline = { style = "curl"; }; };
"diagnostic.info" = { underline = { style = "curl"; }; };
"diagnostic.warning" = { underline = { style = "curl"; }; };
"diff.delta" = "base09";
"diff.minus" = "base08";
"diff.plus" = "base0B";
"error" = "base08";
"function" = "base0D";
"hint" = "base03";
"info" = "base0D";
"keyword" = "base0E";
"label" = "base0E";
"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" ]; };
"namespace" = "base0E";
"operator" = "base05";
"special" = "base0D";
"string" = "base0B";
"type" = "base0A";
"ui.background" = { bg = "base00"; };
"ui.bufferline" = { fg = "base04"; bg = "base00"; };
"ui.bufferline.active" = { fg = "base00"; bg = "base03"; modifiers = [ "bold" ]; };
"ui.cursor" = { fg = "base04"; modifiers = [ "reversed" ]; };
"ui.cursor.insert" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursor.match" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursor.select" = { fg = "base0A"; modifiers = [ "underlined" ]; };
"ui.cursorline.primary" = { fg = "base05"; bg = "base01"; };
"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 = "base0B"; bg = "base02"; };
"ui.statusline.inactive" = { bg = "base01"; fg = "base02"; };
"ui.statusline.insert" = { fg = "base00"; bg = "base0B"; };
"ui.statusline.normal" = { fg = "base00"; bg = "base04"; };
"ui.statusline.select" = { fg = "base00"; bg = "base0E"; };
"ui.text" = "base05";
"ui.text.focus" = "base05";
"ui.virtual.indent-guide" = { fg = "base03"; };
"ui.virtual.ruler" = { bg = "base01"; };
"ui.virtual.whitespace" = { fg = "base01"; };
"ui.window" = { bg = "base01"; };
"variable" = "base08";
"variable.other.member" = "base08";
"warning" = "base09";
};
}

View file

@ -1,57 +0,0 @@
{ config, lib, inputs, pkgs, ... }:
let
inherit (config.colorscheme) colors;
cfg = config.homeModules.console.editor.nvim;
in
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
./settings.nix
./keymapping.nix
./plugins
];
config = lib.mkIf cfg.enable {
programs.neovim = {
viAlias = true;
vimAlias = true;
};
programs.nixvim = {
enable = true;
plugins = {
which-key = {
enable = true;
keyLabels = {
" " = "<space>";
};
};
};
colorschemes.base16 = {
enable = true;
colorscheme = config.colorscheme.slug;
customColorScheme = {
base00 = "#${colors.base00}";
base01 = "#${colors.base01}";
base02 = "#${colors.base02}";
base03 = "#${colors.base03}";
base04 = "#${colors.base04}";
base05 = "#${colors.base05}";
base06 = "#${colors.base06}";
base07 = "#${colors.base07}";
base08 = "#${colors.base08}";
base09 = "#${colors.base09}";
base0A = "#${colors.base0A}";
base0B = "#${colors.base0B}";
base0C = "#${colors.base0C}";
base0D = "#${colors.base0D}";
base0E = "#${colors.base0E}";
base0F = "#${colors.base0F}";
};
};
};
};
}

View file

@ -1,50 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim;
in
{
config = lib.mkIf cfg.enable {
programs.nixvim = {
globals = {
mapleader = " ";
maplocalleader = " ";
};
keymaps = let
normal =
lib.mapAttrsToList
(key: action: {
mode = "n";
inherit action key;
})
{
"<Space>" = "<NOP>";
"esc" = ":noh<CR>";
"Y" = "$y";
};
visual =
lib.mapAttrsToList
(key: action: {
mode = "v";
inherit action key;
})
{
# better indenting
">" = ">gv";
"<" = "<gv";
"<TAB>" = ">gv";
"<S-TAB>" = "<gv";
# move selected line / block of text in visual mode
"K" = ":m '<-2<CR>gv=gv";
"J" = ":m '>+1<CR>gv=gv";
};
in
config.nixvim.helpers.keymaps.mkKeymaps
{options.silent = true;}
(normal ++ visual);
};
};
}

View file

@ -1,28 +0,0 @@
{ lib, ... }:
{
imports = [
./indent.nix
./telescope.nix
./lualine.nix
];
options.homeModules.console.editor.nvim.plugins = {
indentBlankline = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable indent-blankline nvim plugin module";
};
lualine = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable lualine nvim plugin module";
};
telescope = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable telescope nvim plugin module";
};
};
}

View file

@ -1,13 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim.plugins;
in
{
config = lib.mkIf cfg.indentBlankline {
programs.nixvim.plugins.indent-blankline = {
enable = true;
};
};
}

View file

@ -1,23 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim.plugins;
in
{
config = lib.mkIf cfg.lualine {
programs.nixvim.plugins.lualine = {
enable = true;
theme = "base16";
globalstatus = true;
sections = {
lualine_a = ["mode"];
lualine_b = ["branch"];
lualine_c = ["filename" "diff"];
lualine_x = ["diagnostics"];
lualine_y = ["fileformat"];
lualine_z = ["filetype"];
};
};
};
}

View file

@ -1,41 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.editor.nvim.plugins;
in
{
config = lib.mkIf cfg.telescope {
programs.nixvim = {
plugins.telescope = {
enable = true;
extensions = {
fzf-native.enable = true;
frecency.enable = true;
};
keymaps = {
"<leader>ff" = "find_files";
"<leader>fg" = "live_grep";
"<leader>b" = "buffers";
"<leader>fh" = "help_tags";
"<leader>fd" = "diagnostics";
"<C-p>" = "git_files";
"<leader>p" = "oldfiles";
"<C-f>" = "live_grep";
};
keymapsSilent = true;
defaults = {
file_ignore_patterns = [
"^.git/"
"^data/"
];
set_env.COLORTERM = "truecolor";
};
};
};
};
}

View file

@ -1,60 +0,0 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors;
cfg = config.homeModules.console.editor.nvim;
in
{
config = lib.mkIf cfg.enable {
programs.nixvim = {
options = {
relativenumber = true;
number = true;
hidden = true;
mouse = "a";
mousemodel = "extend";
undofile = true;
swapfile = false;
incsearch = true;
ignorecase = true;
smartcase = true;
fileencoding = "utf-8";
termguicolors = true;
autoindent = true;
shiftwidth = 2;
smartindent = true;
expandtab = true;
updatetime = 100;
};
clipboard = {
register = "unnamedplus";
providers.wl-copy.enable = true;
};
colorschemes.base16 = {
enable = true;
colorscheme = config.colorscheme.slug;
customColorScheme = {
base00 = "#${colors.base00}";
base01 = "#${colors.base01}";
base02 = "#${colors.base02}";
base03 = "#${colors.base03}";
base04 = "#${colors.base04}";
base05 = "#${colors.base05}";
base06 = "#${colors.base06}";
base07 = "#${colors.base07}";
base08 = "#${colors.base08}";
base09 = "#${colors.base09}";
base0A = "#${colors.base0A}";
base0B = "#${colors.base0B}";
base0C = "#${colors.base0C}";
base0D = "#${colors.base0D}";
base0E = "#${colors.base0E}";
base0F = "#${colors.base0F}";
};
};
};
};
}

View file

@ -1,28 +0,0 @@
{ lib, ... }:
{
imports = [
./lf #configuration still needs some work
# ./ranger
];
options.homeModules.console.fileManager = {
lf = {
enable = lib.mkEnableOption "Enable lf file manager";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set lf as the default terminal file manager";
};
};
ranger = {
enable = lib.mkEnableOption "Enable ranger file manager";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set ranger as the default terminal file manager";
};
};
};
}

View file

@ -1,65 +0,0 @@
{ pkgs, lib, config, ... }:
#TODO - mkif wayland for previewer
# - manage previewer dependencies better
# - ripdrag support
# - color parity with eza
let
cfg = config.homeModules.console.fileManager.lf;
in
{
config = lib.mkIf cfg.enable {
home.sessionVariables.FILEMANAGER = lib.mkIf cfg.default "lf";
xdg.configFile."lf/icons".source = ./icons;
programs.lf = {
enable = true;
settings = {
hidden = true;
ignorecase = true;
drawbox = true;
icons = true;
};
previewer = {
keybinding = "i";
source = "${pkgs.ctpv}/bin/ctpv";
};
commands = {
fzf-lf = ''
''${{
res="$(find -L . \( -path '*/\.*' -o -fstype 'dev' -o -fstype 'proc' \) -prune -o -print 2> /dev/null | sed 1d | cut -b3- | fzf +m)"
if [ -d "$res" ] ; then
cmd="cd"
elif [ -f "$res" ] ; then
cmd="select"
else
exit 0
fi
lf -remote "send $id $cmd \"$res\""
}}
'';
mkdir = ''
''${{
printf "Directory Name: "
read DIR
mkdir $DIR
}}
'';
};
keybindings = {
c = "mkdir";
"<a-f>" = "fzf-lf";
};
extraConfig = ''
&${pkgs.ctpv}/bin/ctpv -s $id
cmd on-quit %${pkgs.ctpv}/bin/ctpv -e $id
set cleaner ${pkgs.ctpv}/bin/ctpvclear
set sixel true
'';
};
home.packages = with pkgs; [ chafa ctpv glow ];
};
}

View file

@ -1,17 +0,0 @@
{ lib, config, ... }:
{
imports = [
./zellij
#./screen
./tmux
];
options.homeModules.console.multiplexer = {
zellij = {
enable = lib.mkEnableOption "Enable zellij multiplexer";
};
tmux = {
enable = lib.mkEnableOption "Enable tmux multiplexer";
};
};
}

View file

@ -1,58 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.homeModules.console.multiplexer.tmux;
inherit (config.colorscheme) colors;
in
{
config = lib.mkIf cfg.enable {
programs.tmux = {
enable = true;
shell = "${pkgs.fish}/bin/fish";
prefix = "C-space";
baseIndex = 1;
keyMode = "vi";
escapeTime = 0;
mouse = true;
plugins = with pkgs; [
{
plugin = tmuxPlugins.mode-indicator;
}
];
extraConfig = /* sh */ ''
# General Settings
set -g set-clipboard on
#Appearance
set -g status-position top
set -g status-style "fg=#${colors.base05} bg=#${colors.base00}"
#Windows
set -g status-justify "centre"
setw -g window-status-current-format "#[bg=#${colors.base0B},fg=#${colors.base00},bold] #W "
setw -g window-status-format "#[bg=#${colors.base03},fg=#${colors.base05}] #W "
#Left
set -g status-left " #{tmux_mode_indicator} #[bg=#${colors.base0B},fg=#${colors.base00}] #S"
set -g status-right '%Y-%m-%d %H:%M #{tmux_mode_indicator}'
#Move to Pane
bind -n M-Left select-pane -L
bind -n M-h select-pane -L
bind -n M-Right select-pane -R
bind -n M-l select-pane -R
bind -n M-Up select-pane -U
bind -n M-k select-pane -U
bind -n M-Down select-pane -D
bind -n M-j select-pane -D
#Split Pane
bind -n M-- split-window -h
bind -n M-= split-window -v
#Resize Pane
bind -n C-M-Up resize-pane -U 5
bind -n C-M-Down resize-pane -D 5
bind -n C-M-Left resize-pane -L 5
bind -n C-M-Right resize-pane -R 5
#Move to Window
bind -n M-1
'';
};
};
}

View file

@ -1,61 +0,0 @@
{ lib, config, pkgs, ... }:
let
inherit (config) colorscheme;
inherit (colorscheme) colors;
cfg = config.homeModules.console.multiplexer.zellij;
in
{
config = lib.mkIf cfg.enable {
programs.zellij = {
enable = true;
settings = {
theme = "${colorscheme.slug}";
default_shell = "fish";
default_layout = "default";
pane_frames = false;
themes = {
"${colorscheme.slug}" = {
fg = "#${colors.base05}";
bg = "#${colors.base00}";
black = "#${colors.base00}";
red = "#${colors.base08}";
green = "#${colors.base0B}";
yellow = "#${colors.base0A}";
blue = "#${colors.base0D}";
magenta = "#${colors.base0E}";
cyan = "#${colors.base0C}";
white = "#${colors.base05}";
orange = "#${colors.base09}";
};
};
};
};
# Layouts
# Default layout
xdg.configFile."zellij/layouts/default.kdl" = import ./layouts/defaultLayout.nix { inherit pkgs config; };
# Layout for bash scripts
xdg.configFile."zellij/layouts/script.kdl" = import ./layouts/scriptLayout.nix { inherit pkgs config; };
# Layout for configuring my flake
xdg.configFile."zellij/layouts/flake.kdl" = import ./layouts/flakeLayout.nix { inherit pkgs config; };
# Additional keybinds
xdg.configFile."zellij/config.kdl".text = /* kdl */ ''
keybinds {
shared_except "locked" {
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; }
bind "Alt 6" { GoToTab 6; }
bind "Alt 7" { GoToTab 7; }
bind "Alt 8" { GoToTab 8; }
bind "Alt 9" { GoToTab 9; }
}
}
'';
};
}

View file

@ -1,60 +0,0 @@
{ pkgs, config, ... }:
let
inherit (config.colorscheme) colors;
in
{
text = /* kdl */ ''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {command_git_branch} {datetime}"
format_center "#[fg=#${colors.base0D},bold] {tabs}"
format_space ""
border_enabled "true"
border_char ""
border_format "#[fg=#${colors.base05}]{char}"
border_position "bottom"
hide_frame_for_single_pane "true"
mode_normal "#[fg=#${colors.base0D}] "
mode_tmux "#[fg=#${colors.base0E}] "
mode_pane "#[fg=#${colors.base08}] "
mode_tab "#[fg=#${colors.base08}] "
mode_rename_tab "#[fg=#${colors.base08}] "
mode_rename_pane "#[fg=#${colors.base08}] "
mode_session "#[fg=#${colors.base08}] "
mode_locked "#[fg=#${colors.base05}] "
mode_move "#[fg=#${colors.base0B}] "
mode_resize "#[fg=#${colors.base0B}] "
mode_prompt "#[fg=#${colors.base0A}] "
mode_search "#[fg=#${colors.base0A}] "
mode_enter_search "#[fg=#${colors.base0A}] "
tab_normal "#[bg=#${colors.base01}] {name} "
tab_active "#[bg=#${colors.base02}] {name} "
tab_separator " "
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
command_git_branch_format "#[fg=#${colors.base0C}] {stdout} "
command_git_branch_interval "10"
command_git_branch_rendermode "static"
datetime "#[fg=#${colors.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
tab name="terminal" focus=true {
pane name="term" focus=true
}
}
'';
}

View file

@ -1,66 +0,0 @@
{ pkgs, config, ... }:
let
inherit (config.colorscheme) colors;
in
{
text = /* kdl */ ''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {command_git_branch} {datetime}"
format_center "#[fg=#${colors.base0D},bold] {tabs}"
format_space ""
border_enabled "true"
border_char ""
border_format "#[fg=#${colors.base05}]{char}"
border_position "bottom"
hide_frame_for_single_pane "true"
mode_normal "#[fg=#${colors.base0D}] "
mode_tmux "#[fg=#${colors.base0E}] "
mode_pane "#[fg=#${colors.base08}] "
mode_tab "#[fg=#${colors.base08}] "
mode_rename_tab "#[fg=#${colors.base08}] "
mode_rename_pane "#[fg=#${colors.base08}] "
mode_session "#[fg=#${colors.base08}] "
mode_locked "#[fg=#${colors.base05}] "
mode_move "#[fg=#${colors.base0B}] "
mode_resize "#[fg=#${colors.base0B}] "
mode_prompt "#[fg=#${colors.base0A}] "
mode_search "#[fg=#${colors.base0A}] "
mode_enter_search "#[fg=#${colors.base0A}] "
tab_normal "#[bg=#${colors.base01}] {name} "
tab_active "#[bg=#${colors.base02}] {name} "
tab_separator " "
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
command_git_branch_format "#[fg=#${colors.base0C}] {stdout} "
command_git_branch_interval "10"
command_git_branch_rendermode "static"
datetime "#[fg=#${colors.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
tab name="terminal" focus=true {
pane name="term" cwd="$FLAKE" focus=true
}
tab name="editor" {
pane name="edit" edit="$FLAKE"
}
tab name="git" {
pane name="git" cwd="$FLAKE" command="lazygit"
}
}
'';
}

View file

@ -1,64 +0,0 @@
{ pkgs, config, ... }:
let
inherit (config.colorscheme) colors;
in
{
text = /* kdl */ ''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {command_git_branch} {datetime}"
format_center "#[fg=#${colors.base0D},bold] {tabs}"
format_space ""
border_enabled "true"
border_char ""
border_format "#[fg=#${colors.base05}]{char}"
border_position "bottom"
hide_frame_for_single_pane "true"
mode_normal "#[fg=#${colors.base0D}] "
mode_tmux "#[fg=#${colors.base0E}] "
mode_pane "#[fg=#${colors.base08}] "
mode_tab "#[fg=#${colors.base08}] "
mode_rename_tab "#[fg=#${colors.base08}] "
mode_rename_pane "#[fg=#${colors.base08}] "
mode_session "#[fg=#${colors.base08}] "
mode_locked "#[fg=#${colors.base05}] "
mode_move "#[fg=#${colors.base0B}] "
mode_resize "#[fg=#${colors.base0B}] "
mode_prompt "#[fg=#${colors.base0A}] "
mode_search "#[fg=#${colors.base0A}] "
mode_enter_search "#[fg=#${colors.base0A}] "
tab_normal "#[bg=#${colors.base01}] {name} "
tab_active "#[bg=#${colors.base02}] {name} "
tab_separator " "
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
command_git_branch_format "#[fg=#${colors.base0C}] {stdout} "
command_git_branch_interval "10"
command_git_branch_rendermode "static"
datetime "#[fg=#${colors.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
tab name="edit" focus=true {
pane edit="./" name="edit" focus=true size="85%" borderless=true
pane name="term" focus=false size="15%" borderless=false
}
tab name="git" focus=false {
pane name="git" focus=false command="lazygit"
}
}
'';
}

View file

@ -1,12 +0,0 @@
{ lib, ... }:
{
imports = [
./starship
];
options.homeModules.console.prompt = {
starship = {
enable = lib.mkEnableOption "Enable starship prompt";
};
};
}

View file

@ -1,110 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.prompt.starship;
in
{
config = lib.mkIf cfg.enable {
programs.starship = {
enable = true;
settings = {
format =
let
git = "$git_branch$git_commit$git_state$git_status";
cloud = "$aws$gcloud$openstack";
in
''
($nix_shell)$directory(${git})(- ${cloud})$jobs$character
'';
fill = {
symbol = " ";
disabled = false;
};
# Core
username = {
format = "[$user]($style)";
show_always = true;
};
hostname = {
format = "[@$hostname]($style) ";
ssh_only = false;
style = "bold green";
};
shlvl = {
format = "[$shlvl]($style) ";
style = "bold cyan";
threshold = 2;
repeat = true;
disabled = false;
};
cmd_duration = {
format = "took [$duration]($style) ";
};
directory = {
format = "[$path]($style)( [$read_only]($read_only_style)) ";
};
nix_shell = {
format = "[($name \\(develop\\) <- )$symbol]($style) ";
impure_msg = "";
symbol = " ";
style = "bold red";
};
character = {
error_symbol = "[](bold red)";
success_symbol = "[](bold green)";
vimcmd_symbol = "[](bold yellow)";
vimcmd_visual_symbol = "[](bold cyan)";
vimcmd_replace_symbol = "[](bold purple)";
vimcmd_replace_one_symbol = "[](bold purple)";
};
time = {
format = "\\\[[$time]($style)\\\]";
disabled = false;
};
# Cloud
gcloud = {
format = "on [$symbol$active(/$project)(\\($region\\))]($style)";
};
aws = {
format = "on [$symbol$profile(\\($region\\))]($style)";
};
# Icon changes only \/
aws.symbol = " ";
conda.symbol = " ";
dart.symbol = " ";
directory.read_only = " ";
docker_context.symbol = " ";
elixir.symbol = " ";
elm.symbol = " ";
gcloud.symbol = " ";
git_branch.symbol = " ";
golang.symbol = " ";
hg_branch.symbol = " ";
java.symbol = " ";
julia.symbol = " ";
memory_usage.symbol = "󰍛 ";
nim.symbol = "󰆥 ";
nodejs.symbol = " ";
package.symbol = "󰏗 ";
perl.symbol = " ";
php.symbol = " ";
python.symbol = " ";
ruby.symbol = " ";
rust.symbol = " ";
scala.symbol = " ";
shlvl.symbol = "";
swift.symbol = "󰛥 ";
terraform.symbol = "󱁢";
};
};
};
}

View file

@ -1,9 +0,0 @@
{ config, lib, ... }:
let
cfg = config.homeModules.console.shell.bash;
in
{
config = lib.mkIf cfg.enable {
programs.bash.enable = true;
};
}

View file

@ -1,17 +0,0 @@
{ lib, ... }:
{
imports = [
./fish
./bash
./zsh
];
options.homeModules.console.shell = {
fish = {
enable = lib.mkEnableOption "Enable fish configuration";
};
bash = {
enable = lib.mkEnableOption "Enable bash configuration";
};
};
}

View file

@ -1,80 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.console.shell.fish;
inherit (lib) mkIf;
hasPackage = pname: lib.any (p: p ? pname && p.pname == pname) config.home.packages;
hasEza = hasPackage "eza";
hasBat = hasPackage "bat";
in
{
config = {
programs.fish = mkIf cfg.enable {
enable = true;
shellAbbrs = {
fe = "cd $FLAKE; $EDITOR $FLAKE";
f = "cd $FLAKE";
s = "cd $SCRIPTS";
tree = mkIf hasEza "eza -T --icons --group-directories-first";
ls = mkIf hasEza "eza -a --icons --group-directories-first";
lsd = mkIf hasEza "eza -al --icons --group-directories-first";
lst = mkIf hasEza "eza -T -L 5 --icons --group-directories-first";
lsta = mkIf hasEza "eza -T --icons --group-directories-first";
cat = mkIf hasBat "bat";
};
functions = {
fish_greeting = "";
fish_flake_edit = ''
cd $FLAKE
hx $FLAKE
'';
fish_hello_world = ''
echo "Hello World"; string repeat -N \n --count=(math (count (fish_prompt)) - 1); commandline -f repaint
'';
fish_user_key_bindings = ''
bind --preset -M insert \cf fish_flake_edit
bind --preset -M insert \ec fzf_cd_widget
'';
};
interactiveShellInit =
# Use vim bindings and cursors
''
fish_vi_key_bindings
set fish_cursor_default block blink
set fish_cursor_insert line blink
set fish_cursor_replace_one underscore blink
set fish_cursor_visual block
'' +
# Use terminal colors
''
set -U fish_color_autosuggestion brblack
set -U fish_color_cancel -r
set -U fish_color_command brgreen
set -U fish_color_comment brmagenta
set -U fish_color_cwd green
set -U fish_color_cwd_root red
set -U fish_color_end brmagenta
set -U fish_color_error brred
set -U fish_color_escape brcyan
set -U fish_color_history_current --bold
set -U fish_color_host normal
set -U fish_color_match --background=brblue
set -U fish_color_normal normal
set -U fish_color_operator cyan
set -U fish_color_param brblue
set -U fish_color_quote yellow
set -U fish_color_redirection bryellow
set -U fish_color_search_match 'bryellow' '--background=brblack'
set -U fish_color_selection 'white' '--bold' '--background=brblack'
set -U fish_color_status red
set -U fish_color_user brgreen
set -U fish_color_valid_path --underline
set -U fish_pager_color_completion normal
set -U fish_pager_color_description yellow
set -U fish_pager_color_prefix 'white' '--bold' '--underline'
set -U fish_pager_color_progress 'brwhite' '--background=cyan'
'';
};
};
}

View file

@ -1,28 +0,0 @@
{ lib, ... }:
{
imports = [
./nixIndex
./git
./tools
./ssh
./transientServices
];
options.homeModules.console.utility = {
nixIndex = {
enable = lib.mkEnableOption "Enable nixIndex configuration";
};
git = {
enable = lib.mkEnableOption "Enable git + tools";
};
ssh = {
enable = lib.mkEnableOption "Enable various console ssh";
};
tools = {
enable = lib.mkEnableOption "Enable various console tools";
};
transientServices = {
enable = lib.mkEnableOption "Enable various console transientServices";
};
};
}

View file

@ -1,25 +0,0 @@
{ pkgs, config, lib, ... }:
let
cfg = config.homeModules.console.utility.git;
in
{
config = lib.mkIf cfg.enable {
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = "ooks-io";
userEmail = "ooks@protonmail.com";
extraConfig = {
gpg."ssh".program = "${pkgs._1password-gui}/bin/op-ssh-sign";
};
ignores = [ ".direnv" "result" ];
lfs.enable = true;
};
home.packages = with pkgs; [
git-credential-1password
lazygit
];
};
}

View file

@ -1,38 +0,0 @@
{ pkgs, config, lib, ... }:
let
cfg = config.homeModules.console.utility.nixIndex;
update-script = pkgs.writeShellApplication {
name = "fetch-nix-index-database";
runtimeInputs = with pkgs; [ wget coreutils ];
text = ''
filename="index-x86_64-linux"
mkdir -p ~/.cache/nix-index
cd ~/.cache/nix-index
wget -N "https://github.com/Mic92/nix-index-database/releases/latest/download/$filename"
ln -f "$filename" files
'';
};
in
{
config = lib.mkIf cfg.enable {
programs.nix-index.enable = true;
systemd.user.services.nix-index-database-sync = {
Unit = { Description = "fetch mic92/nix-index-database"; };
Service = {
Type = "oneshot";
ExecStart = "${update-script}/bin/fetch-nix-index-database";
Restart = "on-failure";
RestartSec = "5m";
};
};
systemd.user.timers.nix-index-database-sync = {
Unit = { Description = "Automatic github:mic92/nix-index-database fetching"; };
Timer = {
OnBootSec = "10m";
OnUnitActiveSec = "24h";
};
Install = { WantedBy = [ "timers.target" ]; };
};
};
}

View file

@ -1,24 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.console.utility.ssh;
hasFish = mkIf config.homeModules.console.shell.fish.enable;
inherit (lib) mkIf;
in
{
config = mkIf cfg.enable {
programs.ssh = {
enable = true;
extraConfig = /* config */''
Host *
IdentityAgent "~/.1password/agent.sock"
'';
};
programs.fish.interactiveShellInit = hasFish ''
set -gx SSH_AUTH_SOCK ~/.1password/agent.sock
'';
};
}

View file

@ -1,77 +0,0 @@
{ pkgs, lib, config, ... }:
let
cfg = config.homeModules.console.utility.tools;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
bc # Calculator
# file utility
duf
du-dust
fd
ripgrep
# archive
zip
unzip
unrar
# file transfer
wget
httpie # Better curl
# resource manager
powertop
#shell scripting
gum
# audio ctrl
pamixer
diffsitter # Better diff
jq # JSON pretty printer and manipulator
comma # Install and run with ","
tldr # Community maintained help pages
progress
killall
acpi
# Notifications
libnotify
# Nix tooling
alejandra
];
programs = {
btop.enable = true;
eza.enable = true;
bat = {
enable = true;
config = {
theme = "base16";
pager = "less -FR";
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
fzf = {
enable = true;
enableFishIntegration = lib.mkIf config.homeModules.console.shell.fish.enable true;
defaultCommand = "rg --files --hidden";
changeDirWidgetOptions = [
"--preview 'eza --icons -L 3 -T --color always {} | head -200'"
"--exact"
];
fileWidgetCommand = "rg --files";
fileWidgetOptions = [
"--preview 'bat --color=always {}'"
];
};
};
};
}

View file

@ -1,33 +0,0 @@
# taken from github:NotAShelf/fufexan
{ pkgs, config, lib, ... }:
let
cfg = config.homeModules.console.utility.transientServices;
apply-hm-env = pkgs.writeShellScript "apply-hm-env" ''
${lib.optionalString (config.home.sessionPath != []) ''
export PATH=${builtins.concatStringsSep ":" config.home.sessionPath}:$PATH
''}
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (k: v: ''
export ${k}=${toString v}
'')
config.home.sessionVariables)}
${config.home.sessionVariablesExtra}
exec "$@"
'';
# runs processes as systemd transient services
run-as-service = pkgs.writeShellScriptBin "run-as-service" ''
exec ${pkgs.systemd}/bin/systemd-run \
--slice=app-manual.slice \
--property=ExitType=cgroup \
--user \
--wait \
bash -lc "exec ${apply-hm-env} $@"
'';
in
{
config = lib.mkIf cfg.enable {
home = {
packages = [run-as-service];
};
};
}

View file

@ -1,8 +0,0 @@
{
imports = [
./desktop
./console
./config
./theme
];
}

View file

@ -1,29 +0,0 @@
{ lib, ... }:
{
imports = [
./firefox
# ./schizofox
#./chrome -- still needs to be implemented
#./brave -- still needs tio be implemented
];
options.homeModules.desktop.browser = {
firefox = {
enable = lib.mkEnableOption "Enable firefox browser";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set Firefox as default browser";
};
};
schizofox = {
enable = lib.mkEnableOption "Enable schizofox browser";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set schizofox as default browser";
};
};
};
}

View file

@ -1,31 +0,0 @@
{ pkgs, lib, inputs, config, ... }:
let
addons = inputs.firefox-addons.packages.${pkgs.system};
cfg = config.homeModules.desktop.browser.firefox;
inherit (lib) mkIf;
in
{
config = {
nixpkgs.config.allowUnfree = true;
home.sessionVariables = mkIf cfg.default {
BROWSER = "firefox";
};
programs.firefox = mkIf cfg.enable {
enable = true;
profiles.ooks = {
extensions = with addons; [
ublock-origin
darkreader
tridactyl
# onepassword-password-manager # cannot get this to work unfree issue.
];
settings = import ./settings/ooksJs.nix;
userChrome = import ./theme/penguinFox.nix;
userContent = import ./theme/penguinFoxContent.nix;
};
};
};
}

File diff suppressed because it is too large Load diff

View file

@ -1,68 +0,0 @@
{
#Basic Settings
"browser.disableResetPrompt" = true;
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
"browser.cache.disk.enable" = false;
"browser.cache.memory.enable" = true;
"browser.cache.memory.capacity" = 524288;
"browser.sessionstore.interval" = 15000000;
"extensions.pocket.enabled" = false;
"reader.parse-on-load.enabled" = false;
"accessibility.force_disabled" = 1;
"browser.helperApps.deleteTempFileOnExit" = true;
"browser.uitour.enabled" = false;
#Startup
"browser.newtabpage.activity-stream.showSponsored" = false;
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
"browser.newtabpage.activity-stream.default.sites" = "";
"browser.aboutConfig.showWarning" = false;
#Disable recommendations
"extensions.getAddons.showPane" = false;
"extensions.htmlaboutaddons.recommendations.enabled" = false;
"browser.discovery.enabled" = false;
#Telemetry
"datareporting.policy.dataSubmissionEnabled" = false;
"datareporting.healthreport.uploadEnabled" = false;
"toolkit.telemetry.unified" = false;
"toolkit.telemetry.enabled" = false;
"toolkit.telemetry.server" = "data:,";
"toolkit.telemetry.archive.enabled" = false;
"toolkit.telemetry.newProfilePing.enabled" = false;
"toolkit.telemetry.shutdownPingSender.enabled" = false;
"toolkit.telemetry.updatePing.enabled" = false;
"toolkit.telemetry.bhrPing.enabled" = false;
"toolkit.telemetry.firstShutdownPing.enabled" = false;
"toolkit.telemetry.coverage.opt-out" = true;
"toolkit.coverage.opt-out" = true;
"toolkit.coverage.endpoint.base" = "";
"browser.ping-centre.telemetry" = false;
"browser.newtabpage.activity-stream.feeds.telemetry" = false;
"browser.newtabpage.activity-stream.telemetry" = false;
"toolkit.telemetry.reportingpolicy.firstRun" = false;
"toolkit.telemetry.shutdownPingSender.enabledFirstsession" = false;
"browser.vpn_promo.enabled" = false;
"app.shield.optoutstudies.enabled" = false;
"app.normandy.enabled" = false;
"app.normandy.api_url" = "";
#Crash Reports
"breakpad.reportURL" = "";
"browser.tabs.crashReporting.sendReport" = false;
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
#Other
"captivedetect.canonicalURL" = "";
"network.captive-portal-service.enabled" = false;
"network.connectivity-service.enabled" = false;
#Geolocation
"geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%";
"geo.provider.use_gpsd" = false;
"geo.provider.use_geoclue" = false;
#Calculator
"browser.urlbar.suggest.calculator" = true;
}

View file

@ -1,180 +0,0 @@
/* css */
''
/* config */
* {
--animation-speed: 0.2s;
--button-corner-rounding: 30px;
--urlbar-container-height: 40px !important;
--urlbar-min-height: 30px !important;
--urlbar-height: 30px !important;
--urlbar-toolbar-height: 38px !important;
--moz-hidden-unscrollable: scroll !important;
--toolbarbutton-border-radius: 3px !important;
--tabs-border-color: transparent;
}
:root {
--window: -moz-Dialog !important;
--secondary: color-mix(in srgb, currentColor 5%, -moz-Dialog) !important;
--uc-border-radius: 0px;
--uc-status-panel-spacing: 0px;
--uc-page-action-margin: 7px;
}
/* animation and effect */
#nav-bar:not([customizing]) {
visibility: visible;
margin-top: -40px;
transition-delay: 0.1s;
filter: alpha(opacity=0);
opacity: 0;
transition: visibility, ease 0.1s, margin-top, ease 0.1s, opacity, ease 0.1s,
rotate, ease 0.1s !important;
}
#nav-bar:hover,
#nav-bar:focus-within,
#urlbar[focused='true'],
#identity-box[open='true'],
#titlebar:hover + #nav-bar:not([customizing]),
#toolbar-menubar:not([inactive='true']) ~ #nav-bar:not([customizing]) {
visibility: visible;
margin-top: 0px;
filter: alpha(opacity=100);
opacity: 100;
margin-bottom: -0.2px;
}
#PersonalToolbar {
margin-top: 0px;
}
#nav-bar .toolbarbutton-1[open='true'] {
visibility: visible;
opacity: 100;
}
tab:not(:active) .tab-background {
transition: background-color var(--animation-speed) !important;
}
:root:not([customizing]) :hover > .tabbrowser-tab:not(:hover) {
transition: blur, ease 0.1s !important;
}
:root:not([customizing]) :not(:hover) > .tabbrowser-tab {
transition: blur, ease 0.1s !important;
}
#tabbrowser-tabs .tab-label-container[customizing] {
color: transparent;
transition: ease 0.1s;
transition-delay: 0.2s;
}
.tabbrowser-tab:not([pinned]) .tab-icon-image ,.bookmark-item .toolbarbutton-icon{opacity: 0!important; transition: .15s !important; width: 0!important; padding-left: 16px!important}
.tabbrowser-tab:not([pinned]):hover .tab-icon-image,.bookmark-item:hover .toolbarbutton-icon{opacity: 100!important; transition: .15s !important; display: inline-block!important; width: 16px!important; padding-left: 0!important}
.tabbrowser-tab:not([hover]) .tab-icon-image,.bookmark-item:not([hover]) .toolbarbutton-icon{padding-left: 0!important}
/* Removes annoying buttons and spaces */
#firefox-view-button, .titlebar-spacer[type="pre-tabs"], .titlebar-spacer[type="post-tabs"]{display: none !important}
#tabbrowser-tabs{border-inline-start-width: 0!important}
/* Makes some buttons nicer */
#PanelUI-menu-button, #unified-extensions-button, #reload-button, #stop-button {padding: 2px !important}
#reload-button, #stop-button{margin: 1px !important;}
/* Tabs colors */
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[multiselected='true'],
#tabbrowser-tabs:not([movingtab])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab
> .tab-stack
> .tab-background[selected='true'] {
background-image: none !important;
background-color: var(--toolbar-bgcolor) !important;
}
/* Inactive tabs color */
#navigator-toolbox {
background-color: var(--window) !important;
}
/* X-button */
:root {
--show-tab-close-button: none;
--show-tab-close-button-hover: -moz-inline-block;
}
.tabbrowser-tab:not([pinned]) .tab-close-button { display: var(--show-tab-close-button) !important; }
.tabbrowser-tab:not([pinned]):hover .tab-close-button { display: var(--show-tab-close-button-hover) !important }
/* Window colors */
:root {
--lwt-sidebar-background-color: var(--window) !important;
--lwt-toolbar-field-focus: var(--secondary) !important;
}
/* tabbar */
/* Hide the secondary Tab Label
* e.g. playing indicator (the text, not the icon) */
.tab-secondary-label { display: none !important; }
#nav-bar:not([tabs-hidden='true']) {
box-shadow: none;
}
:root {
--toolbarbutton-border-radius: 0 !important;
--tab-border-radius: 0 !important;
--tab-block-margin: 0 !important;
}
.tab-background {
border-right: 0px solid rgba(0, 0, 0, 0) !important;
margin-left: -4px !important;
}
.tabbrowser-tab:is([visuallyselected='true'], [multiselected])
> .tab-stack
> .tab-background {
box-shadow: none !important;
}
.tabbrowser-tab[last-visible-tab='true'] {
padding-inline-end: 0 !important;
}
#tabs-newtab-button {
padding-left: 0 !important;
}
/* remove tab shadow */
.tabbrowser-tab
>.tab-stack
> .tab-background { box-shadow: none !important; }
/* multi tab selection */
#tabbrowser-tabs:not([noshadowfortests]) .tabbrowser-tab:is([multiselected])
> .tab-stack
> .tab-background:-moz-lwtheme { outline-color: var(--toolbarseparator-color) !important; }
/* Hides the list-all-tabs button*/
#alltabs-button { display: var(--uc-show-all-tabs-button) !important; }
/* remove gap after pinned tabs */
#tabbrowser-tabs[haspinnedtabs]:not([positionpinnedtabs])
> #tabbrowser-arrowscrollbox
> .tabbrowser-tab:nth-child(1 of :not([pinned], [hidden])) { margin-inline-start: 0 !important; }
/* Removes annoying border */
#navigator-toolbox{border:none !important;}
/* Removes the annoying rainbow thing from the hamburger */
#appMenu-fxa-separator{border-image:none !important;}
''

View file

@ -1,27 +0,0 @@
/* css */ ''
@-moz-document url-prefix(about:){
/* Removes the scrollbar on some places */
body,html{overflow-y: auto}
/* Devtools */
@-moz-document url-prefix(about:devtools){
#toolbox-container{margin-top: 10px !important}
.devtools-tabbar{background: transparent !important}
.devtools-tab-line{border-radius: 0 0 5px 5px}
.customize-animate-enter-done,.customize-menu,.top-site-outer:hover,button{background-color: transparent!important}}
/* Newtab */
@-moz-document url("about:home"), url("about:newtab"){
.search-wrapper .search-handoff-button .fake-caret {top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.search-wrapper .search-handoff-button .fake-caret{top: 13px !important; inset-inline-start: 48px !important}
.search-wrapper .logo-and-wordmark{opacity: 0.9 !important; order: 1 !important; margin-bottom: 0 !important; flex: 1 !important; flex-basis: 20% !important}
.outer-wrapper .search-wrapper{padding: 0px !important; display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; align-items: center !important; align-content: space-around !important; gap: 20px 10px !important}
.search-wrapper .logo-and-wordmark .logo{background-size: 60px !important; height: 60px !important; width: 60px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.search-wrapper .search-inner-wrapper{min-height: 42px !important; order: 2 !important; flex: 3 !important; flex-basis: 60% !important; top: 4px !important}
.outer-wrapper.ds-outer-wrapper-breakpoint-override.only-search.visible-logo{display: flex !important; padding-top: 0px !important;vertical-align: middle}
.customize-menu{border-radius: 10px 0 0 10px !important}
#root > div{align-items: center; display: flex}}}
''

View file

@ -1,72 +0,0 @@
{ inputs, config, lib, ... }:
let
cfg = config.homeModules.desktop.browser.schizofox;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
{
imports = [inputs.schizofox.homeManagerModule];
config = lib.mkIf cfg.enable {
home.sessionVariables.BROWSER = lib.mkIf cfg.default "firefox";
programs.schizofox = {
enable = true;
theme = {
font = "${fonts.regular.family}";
colors = {
background-darker = "${colors.base00}";
background = "${colors.base01}";
foreground = "${colors.base07}";
};
};
security = {
sanitizeOnShutdown = false;
sandbox = true;
noSessionRestore = false;
userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:106.0) Gecko/20100101 Firefox/106.0";
};
misc = {
drmFix = true;
disableWebgl = false;
};
extensions = {
extraExtensions = let
mkUrl = name: "https://addons.mozilla.org/firefox/downloads/latest/${name}/latest.xpi";
extensions = [
{
id = "1018e4d6-728f-4b20-ad56-37578a4de76";
name = "flagfox";
}
{
id = "{c2c003ee-bd69-42a2-b0e9-6f34222cb046}";
name = "auto-tab-discard";
}
{
id = "{d634138d-c276-4fc8-924b-40a0ea21d284}";
name = "1password-x-password-manager";
}
{
id = "{a4c4eda4-fb84-4a84-b4a1-f7c1cbf2a1ad}";
name = "refined-github-";
}
{
id = "sponsorBlocker@ajay.app";
name = "sponsorblock";
}
{
id = "{tridactyl.vim@cmcaine.co.uk}";
name = "tridactyl-vim";
}
];
extraExtensions = builtins.foldl' (acc: ext: acc // {ext.id = {install_url = mkUrl ext.name;};}) {} extensions;
in
extraExtensions;
};
};
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./discord
];
}

View file

@ -1,153 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.homeModules.desktop.communication.discord;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
inherit (lib) mkIf mkEnableOption;
in
{
options.homeModules.desktop.communication.discord.enable = mkEnableOption "Enable discord home manager module";
config = mkIf cfg.enable {
home.packages = [ pkgs.vesktop ];
xdg.configFile."vesktop/themes/nix.css".text = /* css */ ''
/**
* @name nix-colors-minimal
* @author aoku
* @description minimal theme designed with nix colors
*/
:root {
--nix-bg1: #${colors.base00};
--nix-bg2: #${colors.base01};
--nix-bg3: #${colors.base02};
--nix-fg1: #${colors.base05};
--nix-fg2: #${colors.base07};
--nix-fg3: #${colors.base03};
--nix-link: #${colors.base0D};
--nix-accent: #${colors.base08};
--nix-hi: #${colors.base0B};
--font-mono: ${fonts.monospace.family}, monospace;
--font-regular: ${fonts.regular.family}, sans serif;
/* server collapse */
--sb-collapsed-width: 12px;
--sb-transition-duration: 0s;
}
.theme-dark {
--background-primary: var(--nix-bg1);
--background-secondary: var(--nix-bg1);
--background-secondary-alt: var(--nix-bg1);
--background-accent: var(--nix-accent);
--background-tertiary: var(--nix-bg1);
--background-floating: var(--nix-bg1);
--background-mentioned: var(--nix-bg1);
--background-mentioned-hover: var(--nix-bg1);
--background-mobile: var(--nix-bg1);
--background-mobile-secondary: var(--nix-bg2);
--background-modifier-selected: var(--nix-bg1);
--channeltextarea-background:var(--nix-bg1);
--background-modifier-hover:var(--nix-bg1);
--activity-card-background: var(--nix-bg2);
--header-primary: var(--nix-fg2);
--header-secondary: var(--nix-fg1);
--text-normal: var(--nix-fg1);
--text-muted: var(--nix-fg1);
--text-link: var(--nix-link);
--text-warning: var(--nix-accent);
--font-primary: var(--font-mono);
--font-headline: var(--font-mono);
--font-display: var(--font-mono);
--interactive-normal: var(--nix-fg1); /*base05*/
--interactive-hover: var(--nix-hi); /*base0B*/
--interactive-active: var(--nix-fg2);
--interactive-muted: var(--nix-fg3); /*base03*/
--channels-default: var(--nix-fg1);
--scrollbar-thin-thumb: transparent;
--scrollbar-thin-track: transparent;
--scrollbar-auto-thumb: var(--nix-fg1);
--scrollbar-auto-track:var(--nix-bg1);
--scrollbar-auto-scrollbar-color-thumb: var(--nix-accent);
}
.messagesWrapper_ea2b0b {
font-family: var(--font-regular);
}
.titleWrapper__482dc {
font-family: var(--font-mono);
}
.link__95dc0 /* text channel*/{
border-radius: 0px;
margin-left: -10px;
font-family: var(--font-mono);
}
.container_ca50b9 .avatar_f8541f { /*avatar*/
display: none;
}
.form__13a2c /* text input box resize */ {
height: 50px;
font-family: var(--font-regular);
}
.containerDefault__3187b .wrapper__7bcde:before /* text channel */{
content: "";
display:inline-block;
background: var(--nix-hi);
height: 100%;
position: absolute;
left: 0;
}
/* server collapse */
.guilds__2b93a /* servers */{
overflow: hidden !important;
width: var(--sb-collapsed-width, 75px);
transition: width var(--sb-transition-duration);
}
.guilds__2b93a:hover /* expand server bar on hover */{
width: 70px;
overflow: visible !important;
animation: server-bar-overflow 0s linear 0ms forwards
}
.guilds__2b93a ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-collapsed-left, var(--sb-collapsed-width));
top: var(--sb-collapsed-top, 0px);
bottom: var(--sb-collapsed-bottom, 0px);
right: var(--sb-collapsed-right, 0px);
transition-property: var(--sb-transition-property, left);
transition-duration: var(--sb-transition-duration);
}
.guilds__2b93a:hover ~ .base__3e6af /* friends list, chat */{
position: absolute;
left: var(--sb-left, 70px);
top: var(--sb-top, 0px);
bottom: var(--sb-bottom, 0px);
right: var(--sb-right, 0px);
}
@keyframes server-bar-overflow{
from{
overflow: hidden;
}
to{
overflow: visible;
}
}
'';
};
}

View file

@ -1,13 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.creative.audio.audacity;
inherit (lib) mkIf mkEnableOption;
in
{
options.homeModules.desktop.creative.audio.audacity.enable = mkEnableOption "Enable audacity home module";
config = mkIf cfg.enable {
home.packages = [ pkgs.audacity ];
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./audacity
];
}

View file

@ -1,7 +0,0 @@
{
imports = [
./audio
./image
# ./video
];
}

View file

@ -1,5 +0,0 @@
{
imports = [
./inkscape
];
}

View file

@ -1,14 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.creative.audio.inkscape;
inherit (lib) mkIf mkEnableOption;
in
{
options.homeModules.desktop.creative.audio.inkscape.enable = mkEnableOption "Enable inkscape home module";
config = mkIf cfg.enable {
home.packages = [ pkgs.inkscape-with-extensions ];
};
}

View file

@ -1,14 +0,0 @@
{
imports = [
./browser # done -- firefox still need: chrome, brave
./creative
./communication # only discord implemented
./media # done -- spotify gui still needs to be implemented
./terminal # done -- wezterm still needs to be implemented
./wayland # -- almost done, need to implement eww
./productivity
./gaming
./security
./tools
];
}

View file

@ -1,17 +0,0 @@
{ lib, ... }:
{
imports = [
./factorio
./lutris
./bottles
];
options.homeModules.desktop.gaming = {
factorio = {
enable = lib.mkEnableOption "Enable factorio home module";
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg=config.homeModules.desktop.gaming.factorio;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ factorio ];
};
}

View file

@ -1,24 +0,0 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.homeModules.desktop.gaming.lutris;
in
{
options.homeModules.desktop.gaming.lutris.enable = mkEnableOption "Enable lutris home-manager module";
config = mkIf cfg.enable {
home.packages = with pkgs; [
(lutris.override {
extraPkgs = p: [
p.pixman
p.libjpeg
p.gnome.zenity
p.gamescope
];
})
winetricks
];
};
}

View file

@ -1,7 +0,0 @@
{
imports = [
./video
./image
./music
];
}

View file

@ -1,13 +0,0 @@
{ lib, ... }:
{
imports = [
./imv
];
options.homeModules.desktop.media.image = {
imv = {
enable = lib.mkEnableOption "Enable imv image viewer";
};
};
}

View file

@ -1,13 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.media.image.imv;
in
{
config = lib.mkIf cfg.enable {
programs = {
imv = {
enable = true;
};
};
};
}

View file

@ -1,17 +0,0 @@
{ lib, ... }:
{
imports = [
#./spotify --- still needs to be implemented
./easyeffects
./tui
];
options.homeModules.desktop.media.music = {
tui = {
enable = lib.mkEnableOption "Enable tui music";
};
spotify = {
enable = lib.mkEnableOption "Enable spotify";
};
};
}

View file

@ -1,15 +0,0 @@
{lib, config, ... }:
let
cfg = config.homeModules.desktop.media.music.easyeffects;
inherit (lib) mkIf mkEnableOption;
in
{
options.homeModules.desktop.media.music.easyeffects.enable = mkEnableOption "Enable easy effects home module";
config = mkIf cfg.enable {
services.easyeffects = {
enable = true;
};
};
}

View file

@ -1,122 +0,0 @@
{ pkgs, config, lib, ... }:
let
inherit (config.colorscheme) colors;
cfg = config.homeModules.desktop.media.music.tui;
zellij = config.homeModules.console.multiplexer.zellij;
spotify-cli = pkgs.spotify-player.override {
withImage = false;
withSixel = false;
};
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [
termusic
spotify-cli
alsa-utils
mpv
];
programs.cava = {
enable = true;
settings = {
general.framerate = 60;
color = {
gradient = 1;
gradient_count = 5;
gradient_color_1 = "'#${colors.base0A}'";
gradient_color_2 = "'#${colors.base0B}'";
gradient_color_3 = "'#${colors.base0C}'";
gradient_color_4 = "'#${colors.base0D}'";
gradient_color_5 = "'#${colors.base0E}'";
};
};
};
xdg.configFile."spotify-player/app.toml".text = /* toml */ ''
theme = "default"
client_id = "fc4c3656d7cc4a7ea70c6080965f8b1a"
client_port = 8080
tracks_playback_limit = 50
playback_format = "{track} {artists}\n{album}\n{metadata}"
notify_format = { summary = "{track} {artists}", body = "{album}" }
app_refresh_duration_in_ms = 32
playback_refresh_duration_in_ms = 0
page_size_in_rows = 20
enable_media_control = false
enable_streaming = "Always"
enable_notify = true
enable_cover_image_cache = false
notify_streaming_only = false
default_device = "${config.home.sessionVariables.HN}"
play_icon = ""
pause_icon = ""
liked_icon = ""
playback_window_position = "Top"
cover_img_length = 9
cover_img_width = 5
playback_window_width = 6
[device]
name = "${config.home.sessionVariables.HN}"
device_type = "speaker"
volume = 100
bitrate = 320
audio_cache = false
normalization = false
'';
xdg.configFile."zellij/layouts/music.kdl".text = lib.mkIf zellij.enable /* kdl */ ''
layout {
default_tab_template {
pane size=2 borderless=true {
plugin location="file:${pkgs.zjstatus}/bin/zjstatus.wasm" {
format_left "{mode}"
format_right "{session} {datetime}"
format_center "#[fg=#89B4FA,bold] {tabs}"
format_space ""
border_enabled "true"
border_char ""
border_format "#[fg=#${colors.base0D}]{char}"
border_position "bottom"
hide_frame_for_single_pane "true"
mode_normal "#[fg=${colors.base0D}]󰝚"
tab_normal "#[bg=#${colors.base01}] {name} "
tab_active "#[bg=#${colors.base02}] {name} "
tab_separator " "
datetime "#[fg=#${colors.base05},bold] {format} "
datetime_format "%I:%M %p"
datetime_timezone "${config.home.sessionVariables.TZ}"
}
}
children
}
tab name="spotify" focus=true {
pane name="spotify" {
borderless true
command "spotify_player"
focus true
}
pane name="Visualizer" {
borderless false
split_direction "horizontal"
size "20%"
command "cava"
}
}
}
'';
home.shellAliases = lib.mkIf zellij.enable {
zjm = "zellij --layout music";
};
};
}

View file

@ -1,20 +0,0 @@
{ lib, ... }:
{
imports = [
./youtube
./jellyfin
./mpv
];
options.homeModules.desktop.media.video = {
mpv = {
enable = lib.mkEnableOption "Enable mpv video player";
};
youtube = {
enable = lib.mkEnableOption "Enable youtube tui player";
};
jellyfin = {
enable = lib.mkEnableOption "Enable jellyifn media player";
};
};
}

View file

@ -1,9 +0,0 @@
{ pkgs, lib, config, ... }:
let
cfg = config.homeModules.desktop.media.video.jellyfin;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ jellyfin-media-player ];
};
}

View file

@ -1,13 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.media.video.mpv;
in
{
config = {
programs.mpv = lib.mkIf cfg.enable {
enable = true;
};
home.packages = [ pkgs.ffmpeg ];
};
}

View file

@ -1,12 +0,0 @@
{ lib, config, pkgs, ...}:
let
cfg = config.homeModules.desktop.media.video.youtube;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ youtube-tui ];
programs.yt-dlp = {
enable = true;
};
};
}

View file

@ -1,18 +0,0 @@
{ lib, ... }:
{
imports = [
./obsidian
./zathura
./office
];
options.homeModules.desktop.productivity = {
obsidian = {
enable = lib.mkEnableOption "enable obsidian home module";
};
zathura = {
enable = lib.mkEnableOption "enable zathura home module";
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.productivity.obsidian;
in
{
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ obsidian ];
};
}

View file

@ -1,13 +0,0 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.homeModules.desktop.productivity.office;
in
{
options.homeModules.desktop.productivity.office.enable = mkEnableOption "enable office home module";
config = mkIf cfg.enable {
home.packages = [ pkgs.libreoffice ];
};
}

View file

@ -1,40 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.productivity.zathura;
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
in
{
config = lib.mkIf cfg.enable {
programs.zathura = {
enable = true;
options = {
font = "${fonts.regular.family} 14";
recolor = true;
selection-clipboard = "clipboard";
default-bg = "#${colors.base00}";
default-fg = "#${colors.base01}";
statusbar-bg = "#${colors.base02}";
statusbar-fg = "#${colors.base04}";
inputbar-bg = "#${colors.base00}";
inputbar-fg = "#${colors.base07}";
notification-bg = "#${colors.base00}";
notification-fg = "#${colors.base07}";
notification-error-bg = "#${colors.base00}";
notification-error-fg = "#${colors.base08}";
notification-warning-bg = "#${colors.base00}";
notification-warning-fg = "#${colors.base08}";
highlight-color = "#${colors.base0A}";
highlight-active-color = "#${colors.base0D}";
completion-bg = "#${colors.base01}";
completion-fg = "#${colors.base05}";
completions-highlight-bg = "#${colors.base0D}";
completions-highlight-fg = "#${colors.base07}";
recolor-lightcolor = "#${colors.base00}";
recolor-darkcolor = "#${colors.base06}";
};
};
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./polkit
];
}

View file

@ -1,54 +0,0 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf types mkOption;
inherit (builtins) elem;
cfg = config.homeModules.desktop.security.polkit;
in
{
options.homeModules.desktop.security.polkit = mkOption {
type = types.enum ["gnome" "pantheon"]; # TODO: add kde agent
default = "";
description = "Type of polkit agent module to use";
};
config = {
systemd.user.services = {
polkit-pantheon-authentication-agent-1 = mkIf (elem cfg ["pantheon"]) {
Unit.Description = "polkit-pantheon-authentication-agent-1";
Install = {
WantedBy = [ "graphical-session.target" ];
Wants = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.pantheon.pantheon-agent-polkit}/libexec/policykit-1-pantheon/io.elementary.desktop.agent-polkit";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
polkit-gnome-authentication-agent-1 = mkIf (elem cfg ["gnome"]) {
Unit.Description = "polkit-pantheon-authentication-agent-1";
Install = {
WantedBy = [ "graphical-session.target" ];
Wants = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
};
}

View file

@ -1,43 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.terminal;
in
{
imports = [
./foot
./kitty
];
options.homeModules.desktop.terminal = {
foot = {
enable = lib.mkEnableOption "Enable foot terminal";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set foot as default terminal in environment variables";
};
};
kitty = {
enable = lib.mkEnableOption "Enable kitty terminal";
default = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Set kitty as default terminal in environment variables";
};
};
};
config = {
assertions = [
{
assertion =
(lib.length (lib.filter (x: x) [
cfg.foot.default or false
cfg.kitty.default or false
]) <= 1);
message = "Only one terminal can be default in the configuration";
}
];
};
}

View file

@ -1,71 +0,0 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.terminal.foot;
in
{
config = lib.mkIf cfg.enable {
home.sessionVariables = lib.mkIf cfg.default {
TERMINAL = "foot";
TERM = "foot";
};
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
font = "${fonts.monospace.family}:pixelsize=18:antialias=true";
font-bold = "${fonts.monospace.family}:style=Bold:pixelsize=18:antialias=true";
font-italic = "${fonts.monospace.family}:style=Italic:pixelsize=18:antialias=true";
font-bold-italic = "${fonts.monospace.family}:style=Bold Italic:pixelsize=18:antialias=true";
dpi-aware = "yes";
letter-spacing = "-1px";
bold-text-in-bright = "palette-based";
resize-delay-ms = "80";
pad = "9x9 center";
selection-target = "clipboard";
};
tweak = {
sixel = "yes";
font-monospace-warn = "no";
};
cursor = {
style = "beam";
blink = "yes";
};
colors = {
alpha = 1.0;
foreground = "${colors.base05}";
background = "${colors.base00}";
regular0 = "${colors.base00}"; # black
regular1 = "${colors.base08}"; # red
regular2 = "${colors.base0B}"; # green
regular3 = "${colors.base0A}"; # yellow
regular4 = "${colors.base0D}"; # blue
regular5 = "${colors.base0E}"; # magenta
regular6 = "${colors.base0C}"; # cyan
regular7 = "${colors.base05}"; # white
bright0 = "${colors.base03}"; # bright black
bright1 = "${colors.base08}"; # bright red
bright2 = "${colors.base0B}"; # bright green
bright3 = "${colors.base0A}"; # bright yellow
bright4 = "${colors.base0D}"; # bright blue
bright5 = "${colors.base0E}"; # bright magenta
bright6 = "${colors.base0C}"; # bright cyan
bright7 = "${colors.base07}"; # bright white
"16" = "${colors.base09}";
"17" = "${colors.base0F}";
"18" = "${colors.base01}";
"19" = "${colors.base02}";
"20" = "${colors.base04}";
"21" = "${colors.base06}";
};
};
};
};
}

View file

@ -1,66 +0,0 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.font;
cfg = config.homeModules.desktop.terminal.kitty;
fish = config.homeModules.console.shell.fish;
in
{
config = lib.mkIf cfg.enable {
home.sessionVariables = lib.mkIf cfg.default {
TERMINAL = "kitty -1";
TERM = "kitty -1";
};
programs.kitty = {
enable = true;
font = {
name = fonts.monospace.family;
size = 12;
};
shellIntegration.enableFishIntegration = lib.mkif fish.enable true;
settings = {
scrollback_lines = 4000;
scrollback_pager_history_size = 2048;
window_padding_width = 1;
foreground = "#${colors.base05}";
background = "#${colors.base00}";
background_opacity = "1.0";
selection_background = "#${colors.base05}";
selection_foreground = "#${colors.base00}";
url_color = "#${colors.base04}";
cursor = "#${colors.base05}";
active_border_color = "#${colors.base03}";
inactive_border_color = "#${colors.base01}";
active_tab_background = "#${colors.base00}";
active_tab_foreground = "#${colors.base05}";
inactive_tab_background = "#${colors.base01}";
inactive_tab_foreground = "#${colors.base04}";
tab_bar_background = "#${colors.base01}";
color0 = "#${colors.base00}";
color1 = "#${colors.base08}";
color2 = "#${colors.base0B}";
color3 = "#${colors.base0A}";
color4 = "#${colors.base0D}";
color5 = "#${colors.base0E}";
color6 = "#${colors.base0C}";
color7 = "#${colors.base05}";
color8 = "#${colors.base03}";
color9 = "#${colors.base08}";
color10 = "#${colors.base0B}";
color11 = "#${colors.base0A}";
color12 = "#${colors.base0D}";
color13 = "#${colors.base0E}";
color14 = "#${colors.base0C}";
color15 = "#${colors.base07}";
color16 = "#${colors.base09}";
color17 = "#${colors.base0F}";
color18 = "#${colors.base01}";
color19 = "#${colors.base02}";
color20 = "#${colors.base04}";
color21 = "#${colors.base06}";
};
};
};
}

View file

@ -1,5 +0,0 @@
{
imports = [
./kdeconnect
];
}

View file

@ -1,16 +0,0 @@
{ lib, config, osConfig, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
host = osConfig.systemModules.host;
in
{
config = mkIf (elem "workstation" host.function) {
services.kdeconnect = {
enable = true;
indicator = true;
};
};
}

View file

@ -1,16 +0,0 @@
{ lib, config, inputs, ... }:
let
cfg = config.homeModules.desktop.wayland.bar.ags;
in
{
imports = [ inputs.ags.homeManagerModules.default ];
config = lib.mkIf cfg.enable {
programs.ags = {
enable = true;
};
};
}

View file

@ -1,21 +0,0 @@
{ lib, ... }:
{
imports = [
#./eww
./ags
./waybar
];
options.homeModules.desktop.wayland.bar = {
eww = {
enable = lib.mkEnableOption "Enable Eww bar";
};
ags = {
enable = lib.mkEnableOption "Enable ags bar";
};
waybar = {
enable = lib.mkEnableOption "Enable waybar bar";
};
};
}

View file

@ -1,153 +0,0 @@
{ config, lib, pkgs, inputs, ... }:
let
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.bar.waybar;
monitorWidth = (lib.head config.monitors).width - 20;
inherit (config.colorscheme) colors;
in
{
config = lib.mkIf cfg.enable {
programs.waybar = {
enable = true;
systemd.enable = true;
package = pkgs.waybar;
settings.mainBar = {
layer = "top";
position = "top";
height = 30;
width = monitorWidth;
exclusive = true;
margin-top = 10;
margin-bottom = -12;
modules-left = [ "clock" "battery" "hyprland/workspaces" ];
modules-center = [];
modules-right = [ "custom/hyprrecord" "tray" ];
"hyprland/workspaces" = let
hyprctl = config.wayland.windowManager.hyprland.package + "/bin/hyprctl";
in {
on-click = "activate";
on-scroll-up = "${hyprctl} dispatch workspace m+1";
on-scroll-down = "${hyprctl} dispatch workspace m-1";
format = "{icon}";
active-only = false;
persistent-workspaces = {
"*" = 5;
};
format-icons = {
active = "";
default = "";
urgent = "";
};
all-outputs = false;
};
clock = {
format = "{:%I:%M %p}";
format-alt = "{:%Y-%m-%d}";
};
battery = {
states = {
good = 100;
warning = 35;
critical = 15;
};
bat = "BAT0";
interval = 10;
format-icons = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ];
format = "{icon} {capacity}%";
format-charging = "󱐋{icon} {capacity}%";
tooltip-format = "{timeTo} {power}W";
};
tray = {
icon-size = 21;
spacing = 5;
};
"custom/hyprrecord" = {
format = "{}";
interval = "once";
exec = "echo ";
tooltip = "false";
exec-if = "pgrep wl-screenrec";
on-click = "exec hyprrecord -a --waybar screen copysave video";
signal = 12;
};
};
style = /* css */ ''
* {
font-family: "${fonts.monospace.family}";
font-size: 19px;
border: solid #${colors.base05};
}
window#waybar {
background-color: transparent;
margin: 10px;
}
#clock,
#battery,
#workspaces {
background-color: #${colors.base00};
padding-right: 10px;
}
#clock {
padding-left: 10px;
border: 2px solid #${colors.base05};
border-right: 0px;
border-top-left-radius: 10px;
}
#battery {
padding-left: 10px;
border-top: 2px solid #${colors.base05};
border-bottom: 2px solid #${colors.base05};
border-left: 0px;
}
#battery.good {
color: #${colors.base0B};
}
#battery.warning {
color: #${colors.base0A};
}
#battery.critical {
color: #${colors.base08};
}
#tray {
padding-right: 10px;
padding-left: 10px;
background-color: transparent;
border: 0;
}
#workspaces {
border: 2px solid #${colors.base05};
border-left: 0;
border-top-right-radius: 10px;
}
#workspace button,
#workspaces button.active,
#workspaces button.visible {
color: #${colors.base0B};
}
#workspaces button.urgent {
color: #${colors.base08};
}
#custom-hyprrecord {
color: #${colors.base08};
padding-right: 20px;
}
'';
};
};
}

View file

@ -1,44 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.wayland;
in
{
imports = [
./bar
./lockscreen
./notification
./utility
./windowManager
./launcher
];
options.homeModules.desktop.wayland = {
enable = lib.mkEnableOption "Enable wayland specific confurations";
nvidia = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable nvidia wayland configuration";
};
};
config = lib.mkIf cfg.enable {
xdg.portal.enable = true;
home.sessionVariables = {
CLUTTER_BACKEND = "wayland";
NIXOS_OZONE_WL = "1";
GDK_BACKEND = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
MOZ_ENABLE_WAYLAND = "1";
MOZ_DBUS_REMOTE = "1";
XDG_SESSION_TYPE = "wayland";
SDL_VIDEODRIVER = "wayland";
} // lib.mkIf cfg.nvidia {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
WLR_NO_HARDWARE_CURSORS = "1";
};
};
}

View file

@ -1,34 +0,0 @@
{ config, lib, inputs, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.launcher.anyrun;
in
{
imports = [
inputs.anyrun.homeManagerModules.default
];
config = lib.mkIf cfg.enable {
programs.anyrun = {
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
randr
shell
rink
symbols
];
};
extraCss = /* css */ ''
* {
font-family: JetBrains Mono Nerd Font;
}
'';
};
};
}

View file

@ -1,21 +0,0 @@
{ lib, ... }:
{
imports = [
./anyrun
./rofi
./tofi
];
options.homeModules.desktop.wayland.launcher = {
anyrun = {
enable = lib.mkEnableOption "enable anyrun launcher module";
};
rofi = {
enable = lib.mkEnableOption "enable rofi launcher module";
};
tofi = {
enable = lib.mkEnableOption "enable tofi launcher module";
};
};
}

View file

@ -1,80 +0,0 @@
{ lib, config, pkgs, ... }:
let
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.launcher.rofi;
in
{
config = lib.mkIf cfg.enable {
programs.rofi = {
enable = true;
font = "${fonts.monospace.family}";
package = pkgs.rofi-wayland;
terminal = "${config.home.sessionVariables.TERMINAL}";
theme = let
inherit (config.colorscheme ) colors;
inherit (config.lib.formats.rasi) mkLiteral;
in {
"*" = {
background = mkLiteral "#${colors.base00}";
foreground = mkLiteral "#${colors.base05}";
selected = mkLiteral "#${colors.base0B}";
message = mkLiteral "#${colors.base0D}";
background-color = mkLiteral "@background";
border-color = mkLiteral "@foreground";
text-color = mkLiteral "@foreground";
font = mkLiteral "'${fonts.monospace.family} 14'";
};
"window" = {
width = mkLiteral "15%";
border = mkLiteral "2";
padding = mkLiteral "10";
children = mkLiteral "[message,listview,inputbar]";
};
"message" = {
children = mkLiteral "[textbox]";
};
"textbox" = {
text-color = mkLiteral "@message";
horizontal-align = mkLiteral "0.50";
};
"inputbar" = {
cursor = mkLiteral "pointer";
border = mkLiteral "2";
children = mkLiteral "[textbox-prompt-colon,entry]";
};
"entry" = {
cursor = mkLiteral "false";
};
"textbox-prompt-colon" = {
text-color = mkLiteral "@selected";
expand = mkLiteral "false";
margin = mkLiteral "0 0.3em 0em 0em";
str = mkLiteral "' '";
};
"listview" = {
scrollbar = mkLiteral "true";
fixed-height = mkLiteral "false";
dynamic = mkLiteral "true";
};
"element-text" = {
horizontal-align = mkLiteral "0.50";
};
"element-text selected" = {
text-color = mkLiteral "@selected";
};
};
};
};
}

View file

@ -1,42 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.launcher.tofi;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
{
config = lib.mkIf cfg.enable {
home.packages = [pkgs.tofi];
xdg.configFile."tofi/config".text = /* config */ ''
history = false
clip-to-padding = false
horizontal = true
width = 40%
height = 35
anchor = top-left
margin-top = 5
margin-left = 25%
num-results = 1
border-width = 0
outline-width = 0
result-spacing = 10
selection-background-padding = 30
prompt-padding = 10
font = "${fonts.monospace.family}"
font-size = 14
prompt-text = " "
background-color = #0000
prompt-background = #0000
prompt-color = ${colors.base0B}
input-color = ${colors.base05}
placeholder-color = ${colors.base03}
default-result-color = ${colors.base03}
selection-color = ${colors.base04}
'';
};
}

View file

@ -1,21 +0,0 @@
{ lib, ... }:
{
imports = [
#./gtkLock --- still needs to be implemented
./swaylock
./hyprlock
];
options.homeModules.desktop.wayland.lockscreen = {
swaylock = {
enable = lib.mkEnableOption "Enable Swaylock screen";
};
hyprlock = {
enable = lib.mkEnableOption "Enable hyprlock screen";
};
};
#TODO: make assertion to prevent 2 lockscreens
}

View file

@ -1,77 +0,0 @@
{ lib, config, inputs, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.lockscreen.hyprlock;
fonts = config.homeModules.theme.fonts;
inherit (config.colorscheme) colors;
in
{
imports = [
# inputs.hyprlock.homeManagerModules.default
# inputs.hypridle.homeManagerModules.default
];
config = lib.mkIf cfg.enable {
home.sessionVariables.LOCKER = "hyprlock";
programs.hyprlock = {
settings = {
enable = true;
general = {
hide_cursor = true;
no_fade_in = true;
};
backgrounds = [
{
monitor = "";
path = "";
color = "0xff${colors.base01}";
}
];
input-fields = [
{
size = {
width = 300;
height = 40;
};
position = {
x = 0;
y = 0;
};
outline_thickness = 2;
dots_spacing = 0.2;
fade_on_empty = false;
placeholder_text = "";
outer_color = "0xff${colors.base02}";
inner_color = "0xff${colors.base00}";
font_color = "0xff${colors.base05}";
}
];
labels = [
{
monitor = "";
text = " ";
position = {
x = 0;
y = 80;
};
color = "0xff${colors.base08}";
font_size = 30;
font_family = "${fonts.monospace.family}";
}
{
monitor = "";
text = "$TIME";
position = {
x = 0;
y = -80;
};
color = "0xff${colors.base0B}";
font_size = 20;
font_family = "${fonts.monospace.family}";
}
];
};
};
};
}

View file

@ -1,39 +0,0 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors;
fonts = config.homeModules.theme.fonts;
wallpaperPath = config.homeModules.theme.wallpaper.path;
cfg = config.homeModules.desktop.wayland.lockscreen.swaylock;
in
{
config = lib.mkIf cfg.enable {
home.sessionVariables.LOCKER = "swaylock";
programs.swaylock = {
enable = true;
settings = {
image = "${wallpaperPath}";
font = fonts.monospace.family;
color = "#${colors.base01}";
ring-color = "#${colors.base02}";
inside-wrong-color = "#${colors.base08}";
ring-wrong-color = "#${colors.base08}";
key-hl-color = "#${colors.base0B}";
bs-hl-color = "#${colors.base08}";
ring-ver-color = "#${colors.base09}";
inside-ver-color = "#${colors.base09}";
inside-color = "#${colors.base01}";
text-color = "#${colors.base07}";
text-clear-color = "#${colors.base01}";
text-ver-color = "#${colors.base01}";
text-wrong-color = "#${colors.base01}";
text-caps-lock-color = "#${colors.base07}";
inside-clear-color = "#${colors.base0C}";
ring-clear-color = "#${colors.base0C}";
inside-caps-lock-color = "#${colors.base09}";
ring-caps-lock-color = "#${colors.base02}";
separator-color = "#${colors.base02}";
};
};
};
}

View file

@ -1,14 +0,0 @@
{ lib, ... }:
{
imports = [
./mako
#./dunst -- still needs to be implemented
];
options.homeModules.desktop.wayland.notification = {
mako = {
enable = lib.mkEnableOption "Enable mako notification daemon";
};
};
}

View file

@ -1,40 +0,0 @@
{ config, lib, ... }:
let
inherit (config.colorscheme) colors kind;
fonts = config.homeModules.theme.fonts;
cfg = config.homeModules.desktop.wayland.notification.mako;
in {
config = lib.mkIf cfg.enable {
services.mako = {
enable = true;
iconPath =
if kind == "dark" then
"${config.gtk.iconTheme.package}/share/icons/Papirus-Dark"
else
"${config.gtk.iconTheme.package}/share/icons/Papirus-Light";
font = "${fonts.regular.family} 12";
padding = "10,10";
anchor = "top-right";
width = 300;
height = 100;
borderSize = 2;
defaultTimeout = 3000;
backgroundColor = "#${colors.base00}dd";
borderColor = "#${colors.base05}dd";
textColor = "#${colors.base05}dd";
extraConfig = ''
[app-name="system-notify"]
padding=3,3
width=100
height=100
[urgency=critical]
padding=3,3
width=100
height=100
anchor=top-center
border-color=#${colors.base08}dd
'';
};
};
}

View file

@ -1,17 +0,0 @@
{ lib, ... }:
{
imports = [
./gammastep
./tools
];
options.homeModules.desktop.wayland.utility = {
tools = {
enable = lib.mkEnableOption "Enable wayland specific tools";
};
gammastep = {
enable = lib.mkEnableOption "Enable gammastep module";
};
};
}

View file

@ -1,20 +0,0 @@
{ lib, config, ... }:
let
cfg = config.homeModules.desktop.wayland.utility.gammastep;
in
{
config = lib.mkIf cfg.enable {
services.gammastep = {
enable = true;
enableVerboseLogging = true;
provider = "geoclue2";
temperature = {
day = 6000;
night = 4000;
};
settings.general.adjustment-method = "wayland";
};
};
}

View file

@ -1,27 +0,0 @@
{ lib, config, pkgs, ... }:
let
cfg = config.homeModules.desktop.wayland.utility.tools;
in
{
config = lib.mkIf cfg.enable {
home = {
packages = with pkgs; [
grim
slurp
libnotify
wl-screenrec
wf-recorder
wl-clipboard
];
};
systemd.user.targets.tray = {
Unit = {
Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"];
};
};
};
}

View file

@ -1,14 +0,0 @@
{ lib, ... }:
{
imports = [
./hyprland
];
options.homeModules.desktop.wayland.windowManager = {
hyprland = {
enable = lib.mkEnableOption "Enable Hyprland window-manager";
};
};
}

View file

@ -1,39 +0,0 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.homeModules.desktop.wayland.windowManager.hyprland;
inherit (import ./pkgs {inherit pkgs;}) hyprbrightness hyprvolume;
inherit (inputs.ooks-scripts.packages.${pkgs.system}) powermenu zellijmenu;
in
{
imports = [
inputs.hyprland.homeManagerModules.default
./settings
./extras
];
config = lib.mkIf cfg.enable {
xdg.portal = {
extraPortals = [ pkgs.inputs.hyprland.xdg-desktop-portal-hyprland ];
configPackages = [ pkgs.inputs.hyprland.hyprland ];
};
home.packages = [
pkgs.hyprpicker
hyprvolume
hyprbrightness
# Personal scripts
powermenu
zellijmenu #TODO: only add if zellij enabled
];
wayland.windowManager.hyprland = {
enable = true;
xwayland.enable = true;
systemd = {
enable = true;
variables = ["--all"];
};
};
};
}

View file

@ -1,17 +0,0 @@
{ lib, ... }:
{
imports = [
./hyprcapture
./hyprshade
];
options.homeModules.desktop.wayland.windowManager.hyprland.extras = {
hyprcapture = {
enable = lib.mkEnableOption "Enable hyprcapture screenshot/recording module";
};
hyprshade = {
enable = lib.mkEnableOption "Enable hyprshade tool module";
};
};
}

View file

@ -1,33 +0,0 @@
{ lib, config, pkgs, inputs, ... }:
let
cfg = config.homeModules.desktop.wayland.windowManager.hyprland.extras.hyprcapture;
in
{
config = lib.mkIf cfg.enable {
home.packages = with inputs; [
# Screenshot tool
hyprwm-contrib.packages.${pkgs.system}.grimblast
# Screen recording tool
ooks-scripts.packages.${pkgs.system}.hyprrecord
];
# Add XDG user directories that the scripts use
xdg.userDirs.extraConfig = {
XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings";
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
};
wayland.windowManager.hyprland.settings.bind = [
# Screenshot binds
", Print, exec, grimblast --notify --cursor copysave area"
"SUPER, Print, exec, grimblast --notify --cursor copysave screen"
# Recording binds
"SUPER, r, exec, hyprrecord -a -w video screen copysave"
"SUPER CTRL, r, exec, hyprrecord -a -w video area copysave"
"SUPER ALT, r, exec, hyprrecord -w gif area copysave"
];
};
}

Some files were not shown because too many files have changed in this diff Show more