refactor: complete rewrite
This commit is contained in:
parent
19a4bbda3c
commit
8e81943cf9
399 changed files with 3396 additions and 8042 deletions
6
modules/home/base/default.nix
Normal file
6
modules/home/base/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./userDirs.nix
|
||||
./home-manager.nix
|
||||
];
|
||||
}
|
||||
26
modules/home/base/home-manager.nix
Normal file
26
modules/home/base/home-manager.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkDefault;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
in {
|
||||
programs.home-manager.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home = {
|
||||
username = admin.name;
|
||||
homeDirectory = "/home/${config.home.username}";
|
||||
stateVersion = mkDefault "22.05";
|
||||
sessionPath = ["${config.home.homeDirectory}/.local/bin"];
|
||||
};
|
||||
|
||||
# to save space
|
||||
manual = {
|
||||
html.enable = false;
|
||||
json.enable = false;
|
||||
manpages.enable = false;
|
||||
};
|
||||
}
|
||||
24
modules/home/base/userDirs.nix
Normal file
24
modules/home/base/userDirs.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{config, ...}: {
|
||||
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";
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
XDG_CODE_DIR = "${config.home.homeDirectory}/Code";
|
||||
XDG_RECORDINGS_DIR = "${config.xdg.userDirs.videos}/Recordings";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home/console/default.nix
Normal file
6
modules/home/console/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./shell
|
||||
./tools
|
||||
];
|
||||
}
|
||||
13
modules/home/console/shell/bash/default.nix
Normal file
13
modules/home/console/shell/bash/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
cfg = osConfig.ooknet.console.shell.bash;
|
||||
in {
|
||||
config = mkIf (cfg.enable || admin.shell == "bash") {
|
||||
programs.bash.enable = true;
|
||||
};
|
||||
}
|
||||
7
modules/home/console/shell/default.nix
Normal file
7
modules/home/console/shell/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./fish
|
||||
./zsh
|
||||
./bash
|
||||
];
|
||||
}
|
||||
24
modules/home/console/shell/fish/aliases.nix
Normal file
24
modules/home/console/shell/fish/aliases.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe;
|
||||
inherit (pkgs) bat eza dust nh;
|
||||
in {
|
||||
programs.fish = {
|
||||
shellAliases = {
|
||||
cat = "${getExe bat}";
|
||||
ls = "${getExe eza} -a --icons --group-directories-first";
|
||||
lst = "${getExe eza} -T -L 5 --icons --group-directories-first";
|
||||
du = "${getExe dust}";
|
||||
gitroot = "cd (git rev-parse --show-toplevel)";
|
||||
};
|
||||
shellAbbrs = {
|
||||
f = "cd $FLAKE";
|
||||
fe = "$EDITOR $FLAKE";
|
||||
|
||||
nswitch = "${getExe nh} os switch";
|
||||
};
|
||||
};
|
||||
}
|
||||
10
modules/home/console/shell/fish/binds.nix
Normal file
10
modules/home/console/shell/fish/binds.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.fish = {
|
||||
functions = {
|
||||
fish_user_key_bindings = ''
|
||||
bind --preset -M insert \cf nvim '+Telescope find_files' $FLAKE
|
||||
bind --preset -M insert \ec fzf_cd_widget
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
66
modules/home/console/shell/fish/default.nix
Normal file
66
modules/home/console/shell/fish/default.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
|
||||
cfg = config.ooknet.home.fish;
|
||||
in {
|
||||
imports = [
|
||||
./plugins.nix
|
||||
./binds.nix
|
||||
./aliases.nix
|
||||
];
|
||||
|
||||
options.ooknet.home.fish.enable = mkEnableOption "";
|
||||
|
||||
config = mkIf (cfg.enable || admin.shell == "fish") {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
# disable the default greeting
|
||||
functions = {fish_greeting = "";};
|
||||
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'
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/home/console/shell/fish/plugins.nix
Normal file
18
modules/home/console/shell/fish/plugins.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{pkgs, ...}: {
|
||||
programs.fish = {
|
||||
plugins = [
|
||||
{
|
||||
name = "done";
|
||||
inherit (pkgs.fishPlugins.done) src;
|
||||
}
|
||||
{
|
||||
name = "autopair";
|
||||
inherit (pkgs.fishPlugins.autopair) src;
|
||||
}
|
||||
{
|
||||
name = "colored-man-pages";
|
||||
inherit (pkgs.fishPlugins.colored-man-pages) src;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
32
modules/home/console/shell/zsh/default.nix
Normal file
32
modules/home/console/shell/zsh/default.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
|
||||
cfg = config.ooknet.home.zsh;
|
||||
in {
|
||||
imports = [
|
||||
./plugins.nix
|
||||
];
|
||||
|
||||
options.ooknet.home.zsh.enable = mkEnableOption "";
|
||||
|
||||
config = mkIf (cfg.enable || admin.shell == "zsh") {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
autocd = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history = {
|
||||
expireDuplicatesFirst = true;
|
||||
path = "${config.xdg.dataHome}/zsh_history";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/console/shell/zsh/plugins.nix
Normal file
14
modules/home/console/shell/zsh/plugins.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{pkgs, ...}: {
|
||||
programs.zsh.plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
{
|
||||
name = "zsh-autopair";
|
||||
file = "autopair.zsh";
|
||||
src = "${pkgs.zsh-autopair}/share/zsh/zsh-autopair";
|
||||
}
|
||||
];
|
||||
}
|
||||
29
modules/home/console/tools/bat.nix
Normal file
29
modules/home/console/tools/bat.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) attrValues;
|
||||
cfg = osConfig.ooknet.console.tools.bat;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
extraPackages = attrValues {
|
||||
inherit
|
||||
(pkgs.bat-extras)
|
||||
batgrep
|
||||
prettybat
|
||||
batwatch
|
||||
batman
|
||||
;
|
||||
};
|
||||
config = {
|
||||
# TODO: custom theme
|
||||
theme = "base16";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/console/tools/btop.nix
Normal file
14
modules/home/console/tools/btop.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.btop;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.btop = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/home/console/tools/default.nix
Normal file
17
modules/home/console/tools/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
imports = [
|
||||
./bat.nix
|
||||
./btop.nix
|
||||
./git.nix
|
||||
./fzf.nix
|
||||
./ssh.nix
|
||||
./eza.nix
|
||||
./utils.nix
|
||||
./ffmpeg.nix
|
||||
./direnv.nix
|
||||
./starship.nix
|
||||
./nixIndex.nix
|
||||
./multiplexer
|
||||
./editor
|
||||
];
|
||||
}
|
||||
15
modules/home/console/tools/direnv.nix
Normal file
15
modules/home/console/tools/direnv.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.direnv;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/home/console/tools/editor/default.nix
Normal file
5
modules/home/console/tools/editor/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./neovim.nix
|
||||
];
|
||||
}
|
||||
17
modules/home/console/tools/editor/neovim.nix
Normal file
17
modules/home/console/tools/editor/neovim.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
self',
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet) console;
|
||||
|
||||
cfg = osConfig.ooknet.console.tools.nvim;
|
||||
in {
|
||||
config = mkIf (cfg.enable || console.editor == "nvim") {
|
||||
home.packages = [self'.packages.ook-vim];
|
||||
home.sessionVariables.EDITOR = mkIf (console.editor == "nvim") "nvim";
|
||||
};
|
||||
}
|
||||
|
||||
16
modules/home/console/tools/eza.nix
Normal file
16
modules/home/console/tools/eza.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.eza;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
git = true;
|
||||
icons = "auto";
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/console/tools/ffmpeg.nix
Normal file
14
modules/home/console/tools/ffmpeg.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.ffmpeg;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
# TODO: configure scripts
|
||||
home.packages = [pkgs.ffmpeg];
|
||||
};
|
||||
}
|
||||
25
modules/home/console/tools/fzf.nix
Normal file
25
modules/home/console/tools/fzf.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
cfg = osConfig.ooknet.console.tools.fzf;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = mkIf (admin.shell == "fish") 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 {}'"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/home/console/tools/git.nix
Normal file
26
modules/home/console/tools/git.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
cfg = osConfig.ooknet.console.tools.git;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
userName = admin.gitName;
|
||||
userEmail = admin.gitEmail;
|
||||
ignores = [".direnv" "result"];
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
home.packages = attrValues {
|
||||
inherit (pkgs) lazygit gh;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/home/console/tools/multiplexer/default.nix
Normal file
5
modules/home/console/tools/multiplexer/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./zellij
|
||||
];
|
||||
}
|
||||
199
modules/home/console/tools/multiplexer/zellij/default.nix
Normal file
199
modules/home/console/tools/multiplexer/zellij/default.nix
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
{
|
||||
osConfig,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) slug palette;
|
||||
inherit (osConfig.ooknet) console;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
inherit (lib) mkIf;
|
||||
|
||||
cfg = osConfig.ooknet.console.tools.zellij;
|
||||
in {
|
||||
config = mkIf (cfg.enable || console.multiplexer == "zellij") {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "${slug}";
|
||||
default_shell = "${admin.shell}";
|
||||
default_layout = "default";
|
||||
pane_frames = false;
|
||||
scrollback_editor = "${console.editor}";
|
||||
themes = {
|
||||
"${slug}" = {
|
||||
fg = "#${palette.base05}";
|
||||
bg = "#${palette.base00}";
|
||||
black = "#${palette.base00}";
|
||||
red = "#${palette.base08}";
|
||||
green = "#${palette.base0B}";
|
||||
yellow = "#${palette.base0A}";
|
||||
blue = "#${palette.base0D}";
|
||||
magenta = "#${palette.base0E}";
|
||||
cyan = "#${palette.base0C}";
|
||||
white = "#${palette.base05}";
|
||||
orange = "#${palette.base09}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Layouts
|
||||
xdg.configFile = {
|
||||
# Default layout
|
||||
"zellij/layouts/default.kdl" = import ./layouts/defaultLayout.nix {inherit pkgs config osConfig;};
|
||||
# Layout for bash scripts
|
||||
"zellij/layouts/script.kdl" = import ./layouts/scriptLayout.nix {inherit pkgs config osConfig;};
|
||||
# Layout for configuring my flake
|
||||
"zellij/layouts/flake.kdl" = import ./layouts/flakeLayout.nix {inherit pkgs config osConfig;};
|
||||
# Additional keybinds
|
||||
"zellij/config.kdl".text =
|
||||
# kdl
|
||||
''
|
||||
keybinds clear-defaults=true {
|
||||
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; }
|
||||
bind "Alt -" { Resize "Decrease" ; }
|
||||
bind "Alt =" { Resize "Increase" ; }
|
||||
}
|
||||
|
||||
locked {
|
||||
bind "Alt g" { SwitchToMode "Normal" ; }
|
||||
}
|
||||
|
||||
resize {
|
||||
bind "Alt r" { SwitchToMode "Normal" ; }
|
||||
bind "h" "Left" { Resize "Increase Left" ; }
|
||||
bind "j" "Down" { Resize "Increase Down" ; }
|
||||
bind "k" "Up" { Resize "Increase Up" ; }
|
||||
bind "l" "Right" { Resize "Increase Right" ; }
|
||||
}
|
||||
|
||||
pane {
|
||||
bind "Alt p" { SwitchToMode "Normal" ; }
|
||||
bind "c" { Clear ; }
|
||||
bind "e" { TogglePaneEmbedOrFloating ; SwitchToMode "Normal" ; }
|
||||
bind "f" { ToggleFocusFullscreen ; SwitchToMode "Normal" ; }
|
||||
bind "j" "Down" { NewPane "Down" ; SwitchToMode "Normal" ; }
|
||||
bind "l" "Right" { NewPane "Right" ; SwitchToMode "Normal" ; }
|
||||
bind "n" { NewPane ; SwitchToMode "Normal" ; }
|
||||
bind "p" { SwitchFocus ; SwitchToMode "Normal" ; }
|
||||
bind "r" { SwitchToMode "RenamePane" ; PaneNameInput 0 ; }
|
||||
bind "w" { ToggleFloatingPanes ; SwitchToMode "Normal" ; }
|
||||
bind "x" { CloseFocus ; SwitchToMode "Normal" ; }
|
||||
bind "z" { TogglePaneFrames ; SwitchToMode "Normal" ; }
|
||||
}
|
||||
move {
|
||||
bind "Alt m" { SwitchToMode "Normal"; }
|
||||
bind "h" "Left" { MovePane "Left" ; }
|
||||
bind "j" "Down" { MovePane "Down" ; }
|
||||
bind "k" "Up" { MovePane "Up" ; }
|
||||
bind "l" "Right" { MovePane "Right" ; }
|
||||
}
|
||||
tab {
|
||||
bind "Alt t" { SwitchToMode "Normal" ; }
|
||||
bind "b" { BreakPane; SwitchToMode "Normal" ; }
|
||||
bind "h" { MoveTab "Left" ; }
|
||||
bind "l" { MoveTab "Right" ; }
|
||||
bind "n" { NewTab ; SwitchToMode "Normal" ; }
|
||||
bind "r" { SwitchToMode "RenameTab" ; TabNameInput 0 ; }
|
||||
bind "x" { CloseTab ; SwitchToMode "Normal" ; }
|
||||
bind "1" { GoToTab 1 ; SwitchToMode "Normal" ; }
|
||||
bind "2" { GoToTab 2 ; SwitchToMode "Normal" ; }
|
||||
bind "3" { GoToTab 3 ; SwitchToMode "Normal" ; }
|
||||
bind "4" { GoToTab 4 ; SwitchToMode "Normal" ; }
|
||||
bind "5" { GoToTab 5 ; SwitchToMode "Normal" ; }
|
||||
bind "6" { GoToTab 6 ; SwitchToMode "Normal" ; }
|
||||
bind "7" { GoToTab 7 ; SwitchToMode "Normal" ; }
|
||||
bind "8" { GoToTab 8 ; SwitchToMode "Normal" ; }
|
||||
bind "9" { GoToTab 9 ; SwitchToMode "Normal" ; }
|
||||
}
|
||||
scroll {
|
||||
bind "Alt s" { SwitchToMode "Normal" ; }
|
||||
bind "e" { EditScrollback; SwitchToMode "Normal" ; }
|
||||
bind "d" { HalfPageScrollDown ; }
|
||||
bind "u" { HalfPageScrollUp ; }
|
||||
bind "j" "Down" { ScrollDown ; }
|
||||
bind "k" "Up" { ScrollUp ; }
|
||||
bind "Home" { ScrollToTop ; SwitchToMode "Normal" ; }
|
||||
bind "End" { ScrollToBottom ; SwitchToMode "Normal" ; }
|
||||
bind "PageDown" { PageScrollDown ; }
|
||||
bind "PageUp" { PageScrollUp ; }
|
||||
bind "s" { SwitchToMode "EnterSearch" ; SearchInput 0 ; }
|
||||
}
|
||||
search {
|
||||
bind "Alt s" { SwitchToMode "Normal" ; }
|
||||
bind "n" { Search "down" ; }
|
||||
bind "p" { Search "up" ; }
|
||||
bind "c" { SearchToggleOption "CaseSensitivity" ; }
|
||||
bind "w" { SearchToggleOption "Wrap" ; }
|
||||
bind "o" { SearchToggleOption "WholeWord" ; }
|
||||
}
|
||||
entersearch {
|
||||
bind "Alt c" "Esc" { SwitchToMode "Scroll" ; }
|
||||
bind "Enter" { SwitchToMode "Search" ; }
|
||||
}
|
||||
renametab {
|
||||
bind "Alt c" { SwitchToMode "Normal" ; }
|
||||
bind "Esc" { UndoRenameTab ; SwitchToMode "Tab" ; }
|
||||
}
|
||||
renamepane {
|
||||
bind "Alt c" { SwitchToMode "Normal"; }
|
||||
bind "Esc" { UndoRenamePane; SwitchToMode "Pane"; }
|
||||
}
|
||||
session {
|
||||
bind "Alt o" { SwitchToMode "Normal" ; }
|
||||
bind "d" { Detach ; }
|
||||
bind "w" {
|
||||
LaunchOrFocusPlugin "session-manager" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
};
|
||||
SwitchToMode "Normal"
|
||||
}
|
||||
}
|
||||
shared_except "locked" {
|
||||
bind "Alt g" { SwitchToMode "Locked" ; }
|
||||
bind "Alt q" { Quit ; }
|
||||
bind "Alt h" "Alt Left" { MoveFocusOrTab "Left" ; }
|
||||
bind "Alt l" "Alt Right" { MoveFocusOrTab "Right" ; }
|
||||
bind "Alt j" "Alt Down" { MoveFocus "Down" ; }
|
||||
bind "Alt k" "Alt Up" { MoveFocus "Up" ; }
|
||||
bind "Alt [" { PreviousSwapLayout ; }
|
||||
bind "Alt ]" { NextSwapLayout ; }
|
||||
}
|
||||
shared_except "normal" "locked" {
|
||||
bind "Enter" "Esc" { SwitchToMode "Normal" ; }
|
||||
}
|
||||
shared_except "pane" "locked" {
|
||||
bind "Alt p" { SwitchToMode "Pane" ; }
|
||||
}
|
||||
shared_except "resize" "locked" {
|
||||
bind "Alt r" { SwitchToMode "Resize" ; }
|
||||
}
|
||||
shared_except "scroll" "locked" {
|
||||
bind "Alt s" { SwitchToMode "Scroll" ; }
|
||||
}
|
||||
shared_except "session" "locked" {
|
||||
bind "Alt o" { SwitchToMode "Session" ; }
|
||||
}
|
||||
shared_except "tab" "locked" {
|
||||
bind "Alt t" { SwitchToMode "Tab" ; }
|
||||
}
|
||||
shared_except "move" "locked" {
|
||||
bind "Alt m" { SwitchToMode "Move" ; }
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
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=#${palette.base0D},bold] {tabs}"
|
||||
format_space ""
|
||||
|
||||
border_enabled "true"
|
||||
border_char "─"
|
||||
border_format "#[fg=#${palette.base05}]{char}"
|
||||
border_position "bottom"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[fg=#${palette.base0D}] "
|
||||
mode_tmux "#[fg=#${palette.base0E}] "
|
||||
mode_pane "#[fg=#${palette.base08}] "
|
||||
mode_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_pane "#[fg=#${palette.base08}] "
|
||||
mode_session "#[fg=#${palette.base08}] "
|
||||
mode_locked "#[fg=#${palette.base05}] "
|
||||
mode_move "#[fg=#${palette.base0B}] "
|
||||
mode_resize "#[fg=#${palette.base0B}] "
|
||||
mode_prompt "#[fg=#${palette.base0A}] "
|
||||
mode_search "#[fg=#${palette.base0A}] "
|
||||
mode_enter_search "#[fg=#${palette.base0A}] "
|
||||
|
||||
tab_normal "#[bg=#${palette.base01}] {name} "
|
||||
tab_active "#[bg=#${palette.base02}] {name} "
|
||||
tab_separator " "
|
||||
|
||||
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
|
||||
command_git_branch_format "#[fg=#${palette.base0C}] {stdout} "
|
||||
command_git_branch_interval "10"
|
||||
command_git_branch_rendermode "static"
|
||||
|
||||
datetime "#[fg=#${palette.base05},bold] {format} "
|
||||
datetime_format "%I:%M %p"
|
||||
datetime_timezone "${osConfig.time.timeZone}"
|
||||
}
|
||||
}
|
||||
children
|
||||
}
|
||||
tab name="terminal" focus=true {
|
||||
pane name="term" focus=true
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
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=#${palette.base0D},bold] {tabs}"
|
||||
format_space ""
|
||||
|
||||
border_enabled "true"
|
||||
border_char "─"
|
||||
border_format "#[fg=#${palette.base05}]{char}"
|
||||
border_position "bottom"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[fg=#${palette.base0D}] "
|
||||
mode_tmux "#[fg=#${palette.base0E}] "
|
||||
mode_pane "#[fg=#${palette.base08}] "
|
||||
mode_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_pane "#[fg=#${palette.base08}] "
|
||||
mode_session "#[fg=#${palette.base08}] "
|
||||
mode_locked "#[fg=#${palette.base05}] "
|
||||
mode_move "#[fg=#${palette.base0B}] "
|
||||
mode_resize "#[fg=#${palette.base0B}] "
|
||||
mode_prompt "#[fg=#${palette.base0A}] "
|
||||
mode_search "#[fg=#${palette.base0A}] "
|
||||
mode_enter_search "#[fg=#${palette.base0A}] "
|
||||
|
||||
tab_normal "#[bg=#${palette.base01}] {name} "
|
||||
tab_active "#[bg=#${palette.base02}] {name} "
|
||||
tab_separator " "
|
||||
|
||||
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
|
||||
command_git_branch_format "#[fg=#${palette.base0C}] {stdout} "
|
||||
command_git_branch_interval "10"
|
||||
command_git_branch_rendermode "static"
|
||||
|
||||
datetime "#[fg=#${palette.base05},bold] {format} "
|
||||
datetime_format "%I:%M %p"
|
||||
datetime_timezone "${osConfig.time.timeZone}"
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
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=#${palette.base0D},bold] {tabs}"
|
||||
format_space ""
|
||||
|
||||
border_enabled "true"
|
||||
border_char "─"
|
||||
border_format "#[fg=#${palette.base05}]{char}"
|
||||
border_position "bottom"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[fg=#${palette.base0D}] "
|
||||
mode_tmux "#[fg=#${palette.base0E}] "
|
||||
mode_pane "#[fg=#${palette.base08}] "
|
||||
mode_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_tab "#[fg=#${palette.base08}] "
|
||||
mode_rename_pane "#[fg=#${palette.base08}] "
|
||||
mode_session "#[fg=#${palette.base08}] "
|
||||
mode_locked "#[fg=#${palette.base05}] "
|
||||
mode_move "#[fg=#${palette.base0B}] "
|
||||
mode_resize "#[fg=#${palette.base0B}] "
|
||||
mode_prompt "#[fg=#${palette.base0A}] "
|
||||
mode_search "#[fg=#${palette.base0A}] "
|
||||
mode_enter_search "#[fg=#${palette.base0A}] "
|
||||
|
||||
tab_normal "#[bg=#${palette.base01}] {name} "
|
||||
tab_active "#[bg=#${palette.base02}] {name} "
|
||||
tab_separator " "
|
||||
|
||||
command_git_branch_command "git rev-parse --abbrev-ref HEAD"
|
||||
command_git_branch_format "#[fg=#${palette.base0C}] {stdout} "
|
||||
command_git_branch_interval "10"
|
||||
command_git_branch_rendermode "static"
|
||||
|
||||
datetime "#[fg=#${palette.base05},bold] {format} "
|
||||
datetime_format "%I:%M %p"
|
||||
datetime_timezone "${osConfig.time.timeZone}"
|
||||
}
|
||||
}
|
||||
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"
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
22
modules/home/console/tools/nixIndex.nix
Normal file
22
modules/home/console/tools/nixIndex.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.nixIndex;
|
||||
in {
|
||||
imports = [inputs.nix-index-db.hmModules.nix-index];
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
nix-index = {
|
||||
enable = true;
|
||||
symlinkToCacheHome = true;
|
||||
};
|
||||
command-not-found.enable = false;
|
||||
nix-index-database.comma.enable = true;
|
||||
};
|
||||
home.sessionVariables.NIX_AUTO_RUN = "1";
|
||||
};
|
||||
}
|
||||
23
modules/home/console/tools/ssh.nix
Normal file
23
modules/home/console/tools/ssh.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.ooknet.console.tools.ssh;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
compression = true;
|
||||
hashKnownHosts = true;
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
user = "git";
|
||||
hostname = "github.com";
|
||||
identityFile = "${osConfig.age.secrets.github_key.path}";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
75
modules/home/console/tools/starship.nix
Normal file
75
modules/home/console/tools/starship.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = osConfig.ooknet.console.tools.starship;
|
||||
inherit (lib) concatStrings mkIf;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
format = concatStrings [
|
||||
"$username"
|
||||
"$hostname"
|
||||
"$nix_shell"
|
||||
"$shlvl"
|
||||
"$directory"
|
||||
"$git_branch"
|
||||
"$git_commit"
|
||||
"$git_state"
|
||||
"$git_status"
|
||||
"$jobs"
|
||||
"$character"
|
||||
];
|
||||
|
||||
directory = {
|
||||
truncation_length = 0;
|
||||
truncate_to_repo = true;
|
||||
};
|
||||
|
||||
fill = {
|
||||
symbol = " ";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
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)";
|
||||
};
|
||||
|
||||
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 = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
modules/home/console/tools/utils.nix
Normal file
63
modules/home/console/tools/utils.nix
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
self',
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) attrValues;
|
||||
|
||||
cfg = osConfig.ooknet.console.tools.utils;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
bc # Calculator
|
||||
|
||||
# file utility
|
||||
|
||||
duf
|
||||
du-dust
|
||||
fd
|
||||
ripgrep
|
||||
# archive
|
||||
|
||||
zip
|
||||
unzip
|
||||
unrar
|
||||
# file transfer
|
||||
|
||||
rsync
|
||||
wget
|
||||
httpie # Better curl
|
||||
|
||||
# resource manager
|
||||
|
||||
powertop
|
||||
#shell scripting
|
||||
|
||||
gum
|
||||
# audio ctrl
|
||||
|
||||
pamixer
|
||||
diffsitter # Better diff
|
||||
jq # JSON pretty printer and manipulator
|
||||
tldr # Community maintained help pages
|
||||
progress
|
||||
killall
|
||||
acpi
|
||||
# Notifications
|
||||
|
||||
libnotify
|
||||
# Nix tooling
|
||||
|
||||
alejandra
|
||||
;
|
||||
|
||||
#AI
|
||||
inherit (self'.packages) repopack;
|
||||
};
|
||||
};
|
||||
}
|
||||
8
modules/home/default.nix
Normal file
8
modules/home/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
programs.home-manager.enable = true;
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
home = {
|
||||
stateVersion = "22.05";
|
||||
};
|
||||
}
|
||||
7
modules/home/workstation/appearance/cursor.nix
Normal file
7
modules/home/workstation/appearance/cursor.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{osConfig, ...}: {
|
||||
home.pointerCursor = {
|
||||
inherit (osConfig.ooknet.appearance.cursor) package name size;
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
};
|
||||
}
|
||||
8
modules/home/workstation/appearance/default.nix
Normal file
8
modules/home/workstation/appearance/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./qt.nix
|
||||
./gtk.nix
|
||||
./fonts.nix
|
||||
./cursor.nix
|
||||
];
|
||||
}
|
||||
17
modules/home/workstation/appearance/fonts.nix
Normal file
17
modules/home/workstation/appearance/fonts.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance.fonts) monospace regular;
|
||||
in {
|
||||
fonts.fontconfig.enable = true;
|
||||
home.packages = [
|
||||
monospace.package
|
||||
regular.package
|
||||
|
||||
pkgs.noto-fonts
|
||||
pkgs.noto-fonts-cjk
|
||||
pkgs.noto-fonts-emoji
|
||||
];
|
||||
}
|
||||
45
modules/home/workstation/appearance/gtk.nix
Normal file
45
modules/home/workstation/appearance/gtk.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance) fonts;
|
||||
|
||||
gtkCss = import ./gtkCss.nix {inherit osConfig;};
|
||||
in {
|
||||
config = rec {
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
name = fonts.regular.family;
|
||||
size = 12;
|
||||
};
|
||||
theme = {
|
||||
name = "adw-gtk3";
|
||||
package = pkgs.adw-gtk3;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Gruvbox-Plus-Dark";
|
||||
package = pkgs.gruvbox-plus-icons;
|
||||
};
|
||||
gtk3.extraCss = gtkCss;
|
||||
gtk4.extraCss = gtkCss;
|
||||
|
||||
# Dark system theme
|
||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
|
||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
|
||||
};
|
||||
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
#TODO: add gtk css configuration
|
||||
|
||||
services.xsettingsd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"Net/ThemeName" = gtk.theme.name;
|
||||
"Net/IconThemeName" = gtk.iconTheme.name;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
94
modules/home/workstation/appearance/gtkCss.nix
Normal file
94
modules/home/workstation/appearance/gtkCss.nix
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
{osConfig}: let
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
in
|
||||
with palette;
|
||||
#css
|
||||
''
|
||||
|
||||
@define-color accent_color #${green};
|
||||
@define-color accent_bg_color #${text};
|
||||
@define-color accent_fg_color #${mantle};
|
||||
@define-color destructive_color #${blue};
|
||||
@define-color destructive_bg_color #${dull-blue};
|
||||
@define-color destructive_fg_color #${text};
|
||||
@define-color success_color #${cyan};
|
||||
@define-color success_bg_color #${green};
|
||||
@define-color success_fg_color #${text};
|
||||
@define-color warning_color #${yellow};
|
||||
@define-color warning_bg_color #${red};
|
||||
@define-color warning_fg_color #${text};
|
||||
@define-color error_color #${red};
|
||||
@define-color error_bg_color #${dull-red};
|
||||
@define-color error_fg_color #${text};
|
||||
@define-color window_bg_color #${crust};
|
||||
@define-color window_fg_color #${text};
|
||||
@define-color view_bg_color #${mantle};
|
||||
@define-color view_fg_color #${text};
|
||||
@define-color sidebar_bg_color #${crust};
|
||||
@define-color sidebar_fg_color #${text};
|
||||
@define-color sidebar_backdrop_color @window_bg_color;
|
||||
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
|
||||
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
|
||||
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
|
||||
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
|
||||
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
|
||||
@define-color headerbar_bg_color #${base};
|
||||
@define-color headerbar_fg_color #${text};
|
||||
@define-color headerbar_border_color #${text};
|
||||
@define-color headerbar_backdrop_color @window_bg_color;
|
||||
@define-color headerbar_shade_color rgba(0, 0, 0, 0.36);
|
||||
@define-color card_bg_color rgba(255, 255, 255, 0.08);
|
||||
@define-color card_fg_color #${text};
|
||||
@define-color card_shade_color rgba(0, 0, 0, 0.36);
|
||||
@define-color dialog_bg_color #${mantle};
|
||||
@define-color dialog_fg_color #${text};
|
||||
@define-color popover_bg_color #${mantle};
|
||||
@define-color popover_fg_color #${text};
|
||||
@define-color shade_color rgba(0,0,0,0.36);
|
||||
@define-color scrollbar_outline_color rgba(0,0,0,0.5);
|
||||
@define-color blue_1 #${blue};
|
||||
@define-color blue_2 #${blue};
|
||||
@define-color blue_3 #${blue};
|
||||
@define-color blue_4 #${blue};
|
||||
@define-color blue_5 #${blue};
|
||||
@define-color green_1 #b8bb26;
|
||||
@define-color green_2 #b8bb26;
|
||||
@define-color green_3 #b8bb26;
|
||||
@define-color green_4 #b8bb26;
|
||||
@define-color green_5 #b8bb26;
|
||||
@define-color yellow_1 #fabd2f;
|
||||
@define-color yellow_2 #fabd2f;
|
||||
@define-color yellow_3 #fabd2f;
|
||||
@define-color yellow_4 #fabd2f;
|
||||
@define-color yellow_5 #fabd2f;
|
||||
@define-color orange_1 #fe8019;
|
||||
@define-color orange_2 #fe8019;
|
||||
@define-color orange_3 #fe8019;
|
||||
@define-color orange_4 #fe8019;
|
||||
@define-color orange_5 #fe8019;
|
||||
@define-color red_1 #fb4934;
|
||||
@define-color red_2 #fb4934;
|
||||
@define-color red_3 #fb4934;
|
||||
@define-color red_4 #fb4934;
|
||||
@define-color red_5 #fb4934;
|
||||
@define-color purple_1 #d3869b;
|
||||
@define-color purple_2 #d3869b;
|
||||
@define-color purple_3 #d3869b;
|
||||
@define-color purple_4 #d3869b;
|
||||
@define-color purple_5 #d3869b;
|
||||
@define-color brown_1 #d65d0e;
|
||||
@define-color brown_2 #d65d0e;
|
||||
@define-color brown_3 #d65d0e;
|
||||
@define-color brown_4 #d65d0e;
|
||||
@define-color brown_5 #d65d0e;
|
||||
@define-color light_1 #${base05};
|
||||
@define-color light_2 #${base06};
|
||||
@define-color light_3 #${base07};
|
||||
@define-color light_4 #${base07};
|
||||
@define-color light_5 #${base07};
|
||||
@define-color dark_1 #${base00};
|
||||
@define-color dark_2 #${base01};
|
||||
@define-color dark_3 #${base02};
|
||||
@define-color dark_4 #${base03};
|
||||
@define-color dark_5 #${base04};
|
||||
''
|
||||
16
modules/home/workstation/appearance/qt.nix
Normal file
16
modules/home/workstation/appearance/qt.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{pkgs, ...}: {
|
||||
qt = {
|
||||
enable = true;
|
||||
style.name = "gtk2";
|
||||
platformTheme.name = "gtk2";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libsForQt5.qt5.qtwayland
|
||||
kdePackages.qtwayland
|
||||
qt6.qtwayland
|
||||
kdePackages.qqc2-desktop-style
|
||||
libsForQt5.qtstyleplugins
|
||||
qt6Packages.qt6gtk2
|
||||
];
|
||||
}
|
||||
41
modules/home/workstation/binds.nix
Normal file
41
modules/home/workstation/binds.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
mkBind = message:
|
||||
lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "${pkgs.libnotify}/bin/notify-send --urgency=normal 'Warning' '${message}'";
|
||||
};
|
||||
in {
|
||||
options.ooknet.binds = {
|
||||
browser = mkBind "No browser is enabled";
|
||||
terminal = mkBind "No terminal is enabled";
|
||||
terminalLaunch = mkBind "Failed to launch tui";
|
||||
fileManager = mkBind "No file manager is enabled.";
|
||||
notes = mkBind "No Notes app is enabled";
|
||||
discord = mkBind "No Discord app is enabled";
|
||||
steam = mkBind "Steam is not enabled";
|
||||
powerMenu = mkBind "No power menu is enabled";
|
||||
lock = mkBind "No screen locker enabled";
|
||||
password = mkBind "No password manager enabled";
|
||||
zellijMenu = mkBind "Zellij Menu is not enabled";
|
||||
factorio = mkBind "Gaming module is not enabled";
|
||||
volume = {
|
||||
up = mkBind "Volume binding not found...";
|
||||
down = mkBind "Volume binding not found...";
|
||||
mute = mkBind "Volume binding not found...";
|
||||
};
|
||||
brightness = {
|
||||
up = mkBind "Brightness binding not found...";
|
||||
down = mkBind "Brightness binding not found...";
|
||||
};
|
||||
spotify = {
|
||||
launch = mkBind "Spotify is not enabled";
|
||||
next = mkBind "Spotify is not enabled";
|
||||
previous = mkBind "Spotify is not enabled";
|
||||
play = mkBind "Spotify is not enabled";
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/home/workstation/browser/default.nix
Normal file
5
modules/home/workstation/browser/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./firefox
|
||||
];
|
||||
}
|
||||
71
modules/home/workstation/browser/firefox/default.nix
Normal file
71
modules/home/workstation/browser/firefox/default.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs',
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkMerge;
|
||||
inherit (osConfig.ooknet.host) admin;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) default;
|
||||
|
||||
addons = inputs'.firefox-addons.packages;
|
||||
cfg = osConfig.ooknet.workstation.programs.firefox;
|
||||
firefoxMime = {
|
||||
"text/html" = ["firefox.desktop"];
|
||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
||||
"x-scheme-handler/ftp" = ["firefox.desktop"];
|
||||
"x-scheme-handler/about" = ["firefox.desktop"];
|
||||
"x-scheme-handler/unknown" = ["firefox.desktop"];
|
||||
"application/x-extension-htm" = ["firefox.desktop"];
|
||||
"application/x-extension-html" = ["firefox.desktop"];
|
||||
"application/x-extension-shtml" = ["firefox.desktop"];
|
||||
"application/xhtml+xml" = ["firefox.desktop"];
|
||||
"application/x-extension-xhtml" = ["firefox.desktop"];
|
||||
"application/x-extension-xht" = ["firefox.desktop"];
|
||||
"application/json" = ["firefox.desktop"];
|
||||
};
|
||||
in {
|
||||
imports = [./tridactyl.nix];
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.enable || default.browser == "firefox") {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts = [pkgs.tridactyl-native];
|
||||
profiles.${admin.name} = {
|
||||
id = 0;
|
||||
isDefault = true;
|
||||
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/ooksfox.nix {inherit fonts palette;};
|
||||
userContent = import ./theme/penguinFoxContent.nix;
|
||||
};
|
||||
profiles.testing = {
|
||||
id = 1;
|
||||
extensions = with addons; [
|
||||
ublock-origin
|
||||
tridactyl
|
||||
darkreader
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (default.browser == "firefox") {
|
||||
home.sessionVariables.BROWSER = "firefox";
|
||||
ooknet.binds.browser = "firefox";
|
||||
xdg.mimeApps = {
|
||||
associations.added = firefoxMime;
|
||||
defaultApplications = firefoxMime;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
72
modules/home/workstation/browser/firefox/settings/ooksJs.nix
Normal file
72
modules/home/workstation/browser/firefox/settings/ooksJs.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
#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;
|
||||
|
||||
#Appearance
|
||||
"browser.uidensity" = 1;
|
||||
"browser.compactmode.show" = true;
|
||||
|
||||
#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;
|
||||
}
|
||||
152
modules/home/workstation/browser/firefox/theme/ooksfox.nix
Normal file
152
modules/home/workstation/browser/firefox/theme/ooksfox.nix
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
{
|
||||
palette,
|
||||
fonts,
|
||||
...
|
||||
}:
|
||||
with palette;
|
||||
#css
|
||||
''
|
||||
/* minimal firefox css ooks */
|
||||
|
||||
/* ===== Color Variables and Root Styles ===== */
|
||||
:root {
|
||||
/* Fonts */
|
||||
--font-mono: ${fonts.monospace.family}, monospace;
|
||||
}
|
||||
|
||||
/* ===== General UI Modifications ===== */
|
||||
/* Hide status panel */
|
||||
#statuspanel { display: none !important; }
|
||||
|
||||
/* Remove border radius from menus */
|
||||
menupopup, panel { --panel-border-radius: 0px !important; }
|
||||
menu, menuitem, menucaption { border-radius: 0px !important; }
|
||||
|
||||
/* Hide navigation context menu items */
|
||||
menupopup > #context-navigation,
|
||||
menupopup > #context-sep-navigation { display: none !important; }
|
||||
|
||||
/* Hide various toolbar buttons */
|
||||
#forward-button,
|
||||
#reload-button,
|
||||
#stop-button,
|
||||
#home-button,
|
||||
#library-button,
|
||||
#PanelUI-button,
|
||||
#unified-extensions-button,
|
||||
#star-button,
|
||||
#reader-mode-button,
|
||||
#save-to-pocket-button,
|
||||
#tracking-protection-icon-container,
|
||||
#page-action-buttons,
|
||||
#fxa-toolbar-menu-button,
|
||||
#identity-box { display: none !important; }
|
||||
|
||||
/* Hide customizable UI springs */
|
||||
#customizableui-special-spring1,
|
||||
#customizableui-special-spring2 { display: none; }
|
||||
|
||||
/* Hide Personal Toolbar */
|
||||
#PersonalToolbar { display: none !important; }
|
||||
|
||||
/* ===== URL Bar Styling ===== */
|
||||
|
||||
#urlbar-container {
|
||||
margin-left: 0 !important;
|
||||
margin-right: 0 !important;
|
||||
padding-top: 0 !important;
|
||||
padding-bottom: 0!important;
|
||||
}
|
||||
|
||||
#urlbar-background {
|
||||
border: solid 1px !important;
|
||||
border-radius: 0 !important;
|
||||
outline: none !important;
|
||||
background: #${crust} !important;
|
||||
}
|
||||
|
||||
#navigator-toolbox {
|
||||
border: none !important;
|
||||
border-bottom: solid 1px !important;\
|
||||
}
|
||||
|
||||
/* Hide URL bar go button */
|
||||
.urlbar-go-button { display: none !important; }
|
||||
|
||||
/* Remove navigation bar background */
|
||||
#nav-bar.browser-toolbar { background: none !important; }
|
||||
|
||||
/* Position and style navigation bar */
|
||||
|
||||
#nav-bar {
|
||||
text-align: center;
|
||||
min-height: 0 !important;
|
||||
max-height: 0 !important;
|
||||
height: 0 !important;
|
||||
}
|
||||
|
||||
/* Expand navigation bar on focus */
|
||||
#nav-bar:focus-within {
|
||||
max-height: 40px !important;
|
||||
height: 60px !important;
|
||||
min-height: 15px !important;
|
||||
}
|
||||
|
||||
/* ===== Tab Bar Styling ===== */
|
||||
/* Hide title bar buttons and spacer */
|
||||
.titlebar-close,
|
||||
.titlebar-spacer { display: none !important; }
|
||||
|
||||
/* Remove tab margin */
|
||||
#titlebar {
|
||||
--proton-tab-block-margin: 0px !important;
|
||||
--tab-block-margin: 0px !important;
|
||||
}
|
||||
|
||||
/* Remove tab shadows */
|
||||
#tabbrowser-tabs:not([noshadowfortests]) .tab-background:is([selected], [multiselected]) {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* Hide tab-related buttons */
|
||||
#alltabs-button,
|
||||
#tabs-newtab-button,
|
||||
#firefox-view-button,
|
||||
#new-tab-button,
|
||||
.tab-close-button { display: none !important; }
|
||||
|
||||
/* Style tabs */
|
||||
tab {
|
||||
font-family: var(--font-mono);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Set tab and tab bar height */
|
||||
#TabsToolbar, .tabbrowser-tab {
|
||||
max-height: 35px !important;
|
||||
background: #${crust} !important;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* Center tabs when not overflowing */
|
||||
#tabbrowser-arrowscrollbox:not([overflowing]) {
|
||||
--uc-flex-justify: center;
|
||||
}
|
||||
|
||||
scrollbox[orient="horizontal"] {
|
||||
justify-content: var(--uc-flex-justify, initial);
|
||||
}
|
||||
|
||||
/* Style selected tabs */
|
||||
#tabbrowser-tabs .tabbrowser-tab[selected] .tab-content {
|
||||
border: solid 1px var(--base05) !important;
|
||||
color: var(--base07);
|
||||
background: var(--base02)
|
||||
}
|
||||
|
||||
/* Style non-selected tabs */
|
||||
tab:not([selected="true"]) {
|
||||
/* border: solid 1px var(--base05) !important; */
|
||||
background: var(--base01) !important;
|
||||
}
|
||||
''
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
/*
|
||||
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}}}
|
||||
''
|
||||
227
modules/home/workstation/browser/firefox/tridactyl.nix
Normal file
227
modules/home/workstation/browser/firefox/tridactyl.nix
Normal file
|
|
@ -0,0 +1,227 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) default;
|
||||
cfg = osConfig.ooknet.workstation.programs.firefox;
|
||||
in {
|
||||
config = mkIf (default.browser == "firefox" || cfg.enable) {
|
||||
xdg.configFile = {
|
||||
"tridactyl/tridactylrc".text = ''
|
||||
set searchurls.nix https://sourcegraph.com/search?q=context:global+lang:nix %s
|
||||
|
||||
colorscheme ooknet
|
||||
|
||||
unbind --mode=normal t
|
||||
unbind --mode=normal gt
|
||||
|
||||
bind / fillcmdline find
|
||||
bind n findnext 1
|
||||
bind N findnext -1
|
||||
|
||||
bind gtr open http://192.168.1.210:9091/transmission/web/
|
||||
bind ttr tabopen http://192.168.1.210:9091/transmission/web/
|
||||
|
||||
bind gem open https://gmail.com
|
||||
bind tem tabopen https://gmail.com
|
||||
|
||||
bind gjf open http://192.168.1.210:8096
|
||||
bind tjf tabopen http://192.168.1.210:8096
|
||||
'';
|
||||
|
||||
# based off base16 themes
|
||||
# source: <https://github.com/bezmi/base16-tridactyl>
|
||||
"tridactyl/themes/ooknet.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
:root {
|
||||
--font: ${fonts.monospace.family};
|
||||
--bg: #${palette.base00};
|
||||
--fg: #${palette.base05};
|
||||
--red: #${palette.base08};
|
||||
--green: #${palette.base0B};
|
||||
--blue: #${palette.base0D};
|
||||
--yellow: #${palette.base0A};
|
||||
--purple: #${palette.base0E};
|
||||
--orange: #${palette.base09};
|
||||
--cyan: #${palette.base0C};
|
||||
--comment: #${palette.base04};
|
||||
--selectedline: #${palette.base02};
|
||||
|
||||
|
||||
--tridactyl-fg: var(--fg);
|
||||
--tridactyl-bg: var(--bg);
|
||||
|
||||
--tridactyl-url-fg: var(--green);
|
||||
--tridactyl-url-bg: var(--bg);
|
||||
|
||||
--tridactyl-highlight-box-bg: var(--selectedline);
|
||||
--tridactyl-highlight-box-fg: var(--fg);
|
||||
|
||||
--tridactyl-of-fg: var(--fg);
|
||||
--tridactyl-of-bg: var(--selectedline);
|
||||
|
||||
--tridactyl-cmdl-fg: var(--bg);
|
||||
--tridactyl-cmdl-font-family: var(--selectedline);
|
||||
|
||||
--tridactyl-cmplt-font-family: var(--font);
|
||||
|
||||
--tridactyl-hintspan-font-family: var(--font);
|
||||
--tridactyl-hintspan-fg: var(--bg) !important;
|
||||
--tridactyl-hintspan-bg: var(--orange) !important;
|
||||
|
||||
--tridactyl-hint-active-fg: none;
|
||||
--tridactyl-hint-active-bg: var(--tridactyl-bg);
|
||||
--tridactyl-hint-active-outline: var(--green);
|
||||
--tridactyl-hint-bg: none;
|
||||
--tridactyl-hint-outline: none;
|
||||
}
|
||||
|
||||
#tridactyl-colon::before {
|
||||
content: " ";
|
||||
font-family: var(--font);
|
||||
font-size: 1.5rem;
|
||||
color: var(--green);
|
||||
display: inline;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#command-line-holder {
|
||||
order: 1;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 2px solid var(--tridactyl-fg);
|
||||
background: var(--tridactyl-bg);
|
||||
}
|
||||
|
||||
#tridactyl-input {
|
||||
padding: 1rem;
|
||||
color: var(--tridactyl-fg);
|
||||
width: 90%;
|
||||
font-family: var(--font);
|
||||
font-size: 1.5rem;
|
||||
line-height: 1.5;
|
||||
background: var(--tridactyl-bg);
|
||||
padding-left: unset;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
|
||||
#completions table {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 200;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
padding: 1rem;
|
||||
padding-top: 1rem;
|
||||
padding-bottom: 1rem;
|
||||
}
|
||||
|
||||
#completions > div {
|
||||
max-height: calc(20 * var(--option-height));
|
||||
min-height: calc(10 * var(--option-height));
|
||||
}
|
||||
|
||||
#completions {
|
||||
--option-height: 1.4em;
|
||||
color: var(--tridactyl-fg);
|
||||
background: var(--tridactyl-bg);
|
||||
display: inline-block;
|
||||
font-size: unset;
|
||||
font-weight: 200;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
border-top: unset;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
#completions .HistoryCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
#completions .HistoryCompletionSource table {
|
||||
width: 100%;
|
||||
font-size: 9pt;
|
||||
border-spacing: 0;
|
||||
table-layout: fixed;
|
||||
}
|
||||
|
||||
#completions .BmarkCompletionSource {
|
||||
max-height: unset;
|
||||
min-height: unset;
|
||||
}
|
||||
|
||||
#completions table tr td.prefix,
|
||||
#completions table tr td.privatewindow,
|
||||
#completions table tr td.container,
|
||||
#completions table tr td.icon {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#completions .BufferCompletionSource table {
|
||||
width: unset;
|
||||
font-size: unset;
|
||||
border-spacing: unset;
|
||||
table-layout: unset;
|
||||
}
|
||||
|
||||
#completions table tr .title {
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
#completions table tr {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#completions .sectionHeader {
|
||||
background: unset;
|
||||
font-weight: bold;
|
||||
border-bottom: unset;
|
||||
padding: 1rem !important;
|
||||
padding-left: unset;
|
||||
padding-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
#cmdline_iframe {
|
||||
position: fixed !important;
|
||||
bottom: unset;
|
||||
top: 25% !important;
|
||||
left: 10% !important;
|
||||
z-index: 2147483647 !important;
|
||||
width: 80% !important;
|
||||
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 20px !important;
|
||||
}
|
||||
|
||||
.TridactylStatusIndicator {
|
||||
position: fixed !important;
|
||||
bottom: 0 !important;
|
||||
background: var(--tridactyl-bg) !important;
|
||||
border: unset !important;
|
||||
border: 1px var(--green) solid !important;
|
||||
font-size: 12pt !important;
|
||||
padding: 0.8ex !important;
|
||||
}
|
||||
|
||||
#completions .focused {
|
||||
background: var(--green);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
#completions .focused .url {
|
||||
background: var(--green);
|
||||
color: var(--bg);
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/home/workstation/communication/default.nix
Normal file
5
modules/home/workstation/communication/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./vesktop
|
||||
];
|
||||
}
|
||||
171
modules/home/workstation/communication/vesktop/default.nix
Normal file
171
modules/home/workstation/communication/vesktop/default.nix
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
{
|
||||
config,
|
||||
osConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
|
||||
vesktopMime = {"x-scheme-handler/discord" = ["vesktop.desktop"];};
|
||||
in {
|
||||
config = mkIf (elem "communication" profiles) {
|
||||
# <https://github.com/AlephNought0/Faery/blob/main/Home/Programs/Vesktop/patchedvesktop.patch>
|
||||
home.packages = [
|
||||
(pkgs.vesktop.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [./vesktop-patch.patch];
|
||||
}))
|
||||
];
|
||||
|
||||
xdg.configFile."vesktop/themes/nix.css".text =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
/**
|
||||
* @name nix-colors-minimal
|
||||
* @author aoku
|
||||
* @description minimal theme designed with nix colors
|
||||
*/
|
||||
|
||||
:root {
|
||||
--nix-bg1: #${palette.base00};
|
||||
--nix-bg2: #${palette.base01};
|
||||
--nix-bg3: #${palette.base02};
|
||||
|
||||
--nix-fg1: #${palette.base05};
|
||||
--nix-fg2: #${palette.base07};
|
||||
--nix-fg3: #${palette.base03};
|
||||
--nix-link: #${palette.base0D};
|
||||
|
||||
--nix-accent: #${palette.base08};
|
||||
--nix-hi: #${palette.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;
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
ooknet.binds.discord = "vesktop";
|
||||
xdg.mimeApps = {
|
||||
associations.added = vesktopMime;
|
||||
defaultApplications = vesktopMime;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
diff --git a/src/main/index.ts b/src/main/index.ts
|
||||
index 2e0d6f7..70dabba 100644
|
||||
--- a/src/main/index.ts
|
||||
+++ b/src/main/index.ts
|
||||
@@ -35,7 +35,7 @@ function init() {
|
||||
if (hardwareAcceleration === false) {
|
||||
app.disableHardwareAcceleration();
|
||||
} else {
|
||||
- enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder");
|
||||
+ enabledFeatures.push("VaapiVideoDecodeLinuxGL", "VaapiVideoEncoder", "VaapiVideoDecoder", "VulkanFromANGLE", "DefaultANGLEVulkan", "VaapiIgnoreDriverChecks", "PlatformHEVCDecoderSupport", "VaapiVP8Encoder", "VaapiVP9Encoder", "VaapiAV1Encoder", "WaylandWindowDecorations", "UseOzonePlatform", "WebRTCPipeWireCapturer");
|
||||
}
|
||||
|
||||
if (disableSmoothScroll) {
|
||||
@@ -48,6 +48,26 @@ function init() {
|
||||
app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||
app.commandLine.appendSwitch("disable-background-timer-throttling");
|
||||
app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
||||
+ app.commandLine.appendSwitch("disable-renderer-backgrounding");
|
||||
+ app.commandLine.appendSwitch("disable-background-timer-throttling");
|
||||
+ app.commandLine.appendSwitch("disable-backgrounding-occluded-windows");
|
||||
+ app.commandLine.appendSwitch("enable-zero-copy");
|
||||
+ app.commandLine.appendSwitch("use-gl=angle");
|
||||
+ app.commandLine.appendSwitch("use-angle=gl");
|
||||
+ app.commandLine.appendSwitch("use-vulkan");
|
||||
+ app.commandLine.appendSwitch("enable-oop-rasterization");
|
||||
+ app.commandLine.appendSwitch("enable-raw-draw");
|
||||
+ app.commandLine.appendSwitch("enable-gpu-rasterization");
|
||||
+ app.commandLine.appendSwitch("enable-gpu-compositing");
|
||||
+ app.commandLine.appendSwitch("enable-native-gpu-memory-buffers");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-2d-canvas");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-video-decode");
|
||||
+ app.commandLine.appendSwitch("enable-accelerated-mjpeg-decode");
|
||||
+ app.commandLine.appendSwitch("disable-gpu-vsync");
|
||||
+ app.commandLine.appendSwitch("disable-frame-rate-limit");
|
||||
+ app.commandLine.appendSwitch("ozone-platform-hint=auto");
|
||||
+ app.commandLine.appendSwitch("enable-webrtc-pipewire-capturer");
|
||||
+ app.commandLine.appendSwitch("ozone-platform=wayland");
|
||||
if (process.platform === "win32") {
|
||||
disabledFeatures.push("CalculateNativeWinOcclusion");
|
||||
}
|
||||
|
||||
diff --git a/src/renderer/components/ScreenSharePicker.tsx b/src/renderer/components/ScreenSharePicker.tsx
|
||||
index c7403b9..9b454e6 100644
|
||||
--- a/src/renderer/components/ScreenSharePicker.tsx
|
||||
+++ b/src/renderer/components/ScreenSharePicker.tsx
|
||||
@@ -84,9 +84,9 @@ addPatch({
|
||||
const width = Math.round(height * (16 / 9));
|
||||
|
||||
Object.assign(opts, {
|
||||
- bitrateMin: 500000,
|
||||
- bitrateMax: 8000000,
|
||||
- bitrateTarget: 600000
|
||||
+ bitrateMin: 10000000,
|
||||
+ bitrateMax: 60000000,
|
||||
+ bitrateTarget: 32000000
|
||||
});
|
||||
if (opts?.encode) {
|
||||
Object.assign(opts.encode, {
|
||||
|
||||
diff --git a/src/main/settings.ts b/src/main/settings.ts
|
||||
index 6fad97f..dfc64e3 100644
|
||||
--- a/src/main/settings.ts
|
||||
+++ b/src/main/settings.ts
|
||||
@@ -26,8 +26,10 @@ function loadSettings<T extends object = any>(file: string, name: string) {
|
||||
|
||||
const store = new SettingsStore(settings);
|
||||
store.addGlobalChangeListener(o => {
|
||||
- mkdirSync(dirname(file), { recursive: true });
|
||||
- writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ try {
|
||||
+ mkdirSync(dirname(file), { recursive: true });
|
||||
+ writeFileSync(file, JSON.stringify(o, null, 4));
|
||||
+ } catch {}
|
||||
});
|
||||
|
||||
return store;
|
||||
5
modules/home/workstation/creative/default.nix
Normal file
5
modules/home/workstation/creative/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./inkscape.nix
|
||||
];
|
||||
}
|
||||
13
modules/home/workstation/creative/inkscape.nix
Normal file
13
modules/home/workstation/creative/inkscape.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
in {
|
||||
config = mkIf (elem "creative" profiles) {
|
||||
home.packages = [pkgs.inkscape-with-extensions];
|
||||
};
|
||||
}
|
||||
15
modules/home/workstation/default.nix
Normal file
15
modules/home/workstation/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
imports = [
|
||||
./appearance
|
||||
./communication
|
||||
./browser
|
||||
./hyprland
|
||||
./terminal
|
||||
./tools
|
||||
./media
|
||||
./productivity
|
||||
./creative
|
||||
./binds.nix
|
||||
./gaming
|
||||
];
|
||||
}
|
||||
19
modules/home/workstation/gaming/bottles.nix
Normal file
19
modules/home/workstation/gaming/bottles.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
in {
|
||||
config = mkIf (elem "gaming" profiles) {
|
||||
home.packages = attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
bottles
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/home/workstation/gaming/default.nix
Normal file
20
modules/home/workstation/gaming/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) elem mkIf;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
in {
|
||||
imports = [
|
||||
./wow.nix
|
||||
./wine.nix
|
||||
./bottles.nix
|
||||
];
|
||||
config = mkIf (elem "gaming" profiles) {
|
||||
ooknet.binds = {
|
||||
steam = "steam";
|
||||
factorio = "steam steam://rungameid/427520";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/home/workstation/gaming/wine.nix
Normal file
22
modules/home/workstation/gaming/wine.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
in {
|
||||
config = mkIf (elem "gaming" profiles) {
|
||||
home.packages = attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
winetricks
|
||||
protontricks
|
||||
protonup-qt
|
||||
;
|
||||
inherit (pkgs.wineWowPackages) waylandFull;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/home/workstation/gaming/wow.nix
Normal file
19
modules/home/workstation/gaming/wow.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
in {
|
||||
config = mkIf (elem "gaming" profiles) {
|
||||
home.packages = attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
wowup-cf
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
modules/home/workstation/hyprland/components/default.nix
Normal file
13
modules/home/workstation/hyprland/components/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
imports = [
|
||||
./rofi.nix
|
||||
./mako.nix
|
||||
./tools.nix
|
||||
./waybar.nix
|
||||
./hypridle.nix
|
||||
./hyprlock.nix
|
||||
./hyprpaper.nix
|
||||
./gammastep.nix
|
||||
./polkit.nix
|
||||
];
|
||||
}
|
||||
25
modules/home/workstation/hyprland/components/gammastep.nix
Normal file
25
modules/home/workstation/hyprland/components/gammastep.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
enableVerboseLogging = true;
|
||||
|
||||
provider = "manual";
|
||||
latitude = -30.0;
|
||||
longitude = 150.0;
|
||||
|
||||
temperature = {
|
||||
day = 6000;
|
||||
night = 4000;
|
||||
};
|
||||
settings.general.adjustment-method = "wayland";
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/home/workstation/hyprland/components/hypridle.nix
Normal file
31
modules/home/workstation/hyprland/components/hypridle.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
inputs',
|
||||
osConfig,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) getExe mkIf;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
|
||||
hyprlock = getExe config.programs.hyprlock.package;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
package = inputs'.hypridle.packages.hypridle;
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = hyprlock;
|
||||
ignore_dbus_inhibit = false;
|
||||
};
|
||||
listener = [
|
||||
{
|
||||
timout = 300;
|
||||
on-timeout = hyprlock;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
79
modules/home/workstation/hyprland/components/hyprlock.nix
Normal file
79
modules/home/workstation/hyprland/components/hyprlock.nix
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
inherit (lib) mkIf;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
ooknet.binds.lock = "hyprlock";
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = inputs'.hyprlock.packages.hyprlock;
|
||||
|
||||
settings = {
|
||||
enable = true;
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
no_fade_in = true;
|
||||
};
|
||||
backgrounds = [
|
||||
{
|
||||
monitor = "";
|
||||
path = "";
|
||||
color = "0xff${palette.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${palette.base02}";
|
||||
inner_color = "0xff${palette.base00}";
|
||||
font_color = "0xff${palette.base05}";
|
||||
}
|
||||
];
|
||||
labels = [
|
||||
{
|
||||
monitor = "";
|
||||
text = " ";
|
||||
position = {
|
||||
x = 0;
|
||||
y = 80;
|
||||
};
|
||||
color = "0xff${palette.base08}";
|
||||
font_size = 30;
|
||||
font_family = "${fonts.monospace.family}";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
position = {
|
||||
x = 0;
|
||||
y = -80;
|
||||
};
|
||||
color = "0xff${palette.base0B}";
|
||||
font_size = 20;
|
||||
font_family = "${fonts.monospace.family}";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
21
modules/home/workstation/hyprland/components/hyprpaper.nix
Normal file
21
modules/home/workstation/hyprland/components/hyprpaper.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
wallpaperPath = osConfig.ooknet.appearance.wallpaper.path;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||
preload = ${wallpaperPath}
|
||||
wallpaper = , ${wallpaperPath}
|
||||
splash = false
|
||||
ipc = off
|
||||
'';
|
||||
};
|
||||
}
|
||||
38
modules/home/workstation/hyprland/components/mako.nix
Normal file
38
modules/home/workstation/hyprland/components/mako.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
inherit (lib) mkIf;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
services.mako = {
|
||||
enable = true;
|
||||
font = "${fonts.regular.family} 12";
|
||||
padding = "10,10";
|
||||
anchor = "top-right";
|
||||
width = 300;
|
||||
height = 100;
|
||||
borderSize = 2;
|
||||
defaultTimeout = 3000;
|
||||
backgroundColor = "#${palette.base00}dd";
|
||||
borderColor = "#${palette.base05}dd";
|
||||
textColor = "#${palette.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=#${palette.base08}dd
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/home/workstation/hyprland/components/polkit.nix
Normal file
31
modules/home/workstation/hyprland/components/polkit.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
systemd.user.services = {
|
||||
polkit-pantheon-authentication-agent-1 = {
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
82
modules/home/workstation/hyprland/components/rofi.nix
Normal file
82
modules/home/workstation/hyprland/components/rofi.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "${fonts.monospace.family}";
|
||||
package = pkgs.rofi-wayland;
|
||||
terminal = "${config.home.sessionVariables.TERMINAL}";
|
||||
theme = {
|
||||
"*" = {
|
||||
background = mkLiteral "#${palette.base00}";
|
||||
foreground = mkLiteral "#${palette.base05}";
|
||||
selected = mkLiteral "#${palette.base0B}";
|
||||
message = mkLiteral "#${palette.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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
33
modules/home/workstation/hyprland/components/tools.nix
Normal file
33
modules/home/workstation/hyprland/components/tools.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
home = {
|
||||
packages = attrValues {
|
||||
inherit
|
||||
(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"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
162
modules/home/workstation/hyprland/components/waybar.nix
Normal file
162
modules/home/workstation/hyprland/components/waybar.nix
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (osConfig.ooknet.hardware) monitors;
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
inherit (lib) mkIf head;
|
||||
|
||||
monitorWidth = (head monitors).width - 20;
|
||||
in {
|
||||
config = mkIf (environment == "hyprland") {
|
||||
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 #${palette.base05};
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: transparent;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#workspaces {
|
||||
background-color: #${palette.base00};
|
||||
padding-right: 10px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding-left: 10px;
|
||||
border: 2px solid #${palette.base05};
|
||||
border-right: 0px;
|
||||
border-top-left-radius: 10px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
padding-left: 10px;
|
||||
border-top: 2px solid #${palette.base05};
|
||||
border-bottom: 2px solid #${palette.base05};
|
||||
border-left: 0px;
|
||||
}
|
||||
|
||||
#battery.good {
|
||||
color: #${palette.base0B};
|
||||
}
|
||||
#battery.warning {
|
||||
color: #${palette.base0A};
|
||||
}
|
||||
#battery.critical {
|
||||
color: #${palette.base08};
|
||||
}
|
||||
|
||||
#tray {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
border: 2px solid #${palette.base05};
|
||||
border-left: 0;
|
||||
border-top-right-radius: 10px;
|
||||
}
|
||||
|
||||
#workspace button,
|
||||
#workspaces button.active,
|
||||
#workspaces button.visible {
|
||||
color: #${palette.base0B};
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
color: #${palette.base08};
|
||||
}
|
||||
|
||||
#custom-hyprrecord {
|
||||
color: #${palette.base08};
|
||||
padding-right: 20px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
49
modules/home/workstation/hyprland/default.nix
Normal file
49
modules/home/workstation/hyprland/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
inputs',
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.workstation) environment;
|
||||
inherit (osConfig.ooknet.hardware) gpu;
|
||||
inherit (lib) mkIf;
|
||||
in {
|
||||
imports = [
|
||||
./settings
|
||||
./components
|
||||
];
|
||||
|
||||
config = mkIf (environment == "hyprland") {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = inputs'.hyprland.packages.hyprland;
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = ["--all"];
|
||||
};
|
||||
};
|
||||
home.sessionVariables =
|
||||
{
|
||||
CLUTTER_BACKEND = "wayland";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GDK_BACKEND = "wayland";
|
||||
QT_QPA_PLATFORM = "wayland";
|
||||
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||
DISABLE_QT5_COMPAT = "0";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
MOZ_DBUS_REMOTE = "1";
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
XDG_SESSION_DESKTOP = "Hyprland";
|
||||
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||
}
|
||||
// mkIf (gpu.type == "nvidia") {
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
46
modules/home/workstation/hyprland/settings/appearance.nix
Normal file
46
modules/home/workstation/hyprland/settings/appearance.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{osConfig, ...}: let
|
||||
inherit (osConfig.ooknet.appearance) colorscheme cursor;
|
||||
inherit (colorscheme) palette;
|
||||
in {
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
# cursor = {
|
||||
# inactive_timeout = 4;
|
||||
# };
|
||||
general = {
|
||||
gaps_in = 10;
|
||||
gaps_out = 10;
|
||||
border_size = 2;
|
||||
"col.active_border" = "0xff${palette.base05}";
|
||||
"col.inactive_border" = "0xff${palette.base02}";
|
||||
};
|
||||
|
||||
exec-once = [
|
||||
"hyprctl setcursor ${cursor.name} ${toString cursor.size}"
|
||||
];
|
||||
|
||||
decoration = {
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
fullscreen_opacity = 1.0;
|
||||
|
||||
rounding = 0;
|
||||
|
||||
blur = {
|
||||
enabled = false;
|
||||
ignore_opacity = true;
|
||||
};
|
||||
|
||||
drop_shadow = true;
|
||||
shadow_range = 12;
|
||||
shadow_offset = "3 3";
|
||||
"col.shadow" = "0x44000000";
|
||||
"col.shadow_inactive" = "0x66000000";
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
114
modules/home/workstation/hyprland/settings/binds.nix
Normal file
114
modules/home/workstation/hyprland/settings/binds.nix
Normal file
|
|
@ -0,0 +1,114 @@
|
|||
{config, ...}: let
|
||||
inherit (config.ooknet) binds;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
bind = [
|
||||
# Program Launch
|
||||
"SUPER, b, exec, ${binds.browser}"
|
||||
"SUPER, return, exec, ${binds.terminal}"
|
||||
"SUPER, e, exec, ${binds.terminalLaunch} $EDITOR"
|
||||
"SUPERSHIFT, P, exec, ${binds.password}"
|
||||
"SUPER, d, exec, ${binds.discord}"
|
||||
"SUPERSHIFT, e, exec, ${binds.fileManager}"
|
||||
"SUPERSHIFT, S, exec, ${binds.steam}"
|
||||
"SUPERSHIFT, n, exec, ${binds.notes}"
|
||||
"SUPER, escape, exec, ${binds.terminalLaunch} --title=BTOP btop"
|
||||
"SUPER CTRL, return, exec, ${binds.zellijMenu}"
|
||||
"SUPER, delete, exec, ${binds.powerMenu}"
|
||||
"SUPERSHIFT, F, exec, ${binds.factorio}"
|
||||
|
||||
# Spotify PLayer Controls
|
||||
"SUPER, M, exec, ${binds.spotify.launch}"
|
||||
"SUPER, bracketright, exec, ${binds.spotify.next}"
|
||||
"SUPER, bracketleft, exec, ${binds.spotify.previous}"
|
||||
"SUPER, backslash, exec, ${binds.spotify.play}"
|
||||
|
||||
# Brightness
|
||||
",XF86MonBrightnessUp, exec, ${binds.brightness.up}"
|
||||
",XF86MonBrightnessDown, exec, ${binds.brightness.down}"
|
||||
|
||||
# Volume
|
||||
",XF86AudioRaiseVolume, exec, ${binds.volume.up}"
|
||||
",XF86AudioLowerVolume, exec, ${binds.volume.down}"
|
||||
",XF86AudioMute, exec, ${binds.volume.mute}"
|
||||
|
||||
# Window Management
|
||||
"SUPER, Q, killactive"
|
||||
"SUPER CTRL, backspace, killactive"
|
||||
"SUPERSHIFT ALT, delete, exec, hyprkillsession"
|
||||
"SUPER, F, fullscreen"
|
||||
"SUPER CTRL, F, fullscreenstate"
|
||||
"SUPER, Space, togglefloating"
|
||||
"SUPER, P, pseudo" # dwindle
|
||||
"SUPER, S, togglesplit" # dwindle
|
||||
|
||||
# Focus Arrows
|
||||
"SUPER, left, movefocus,l"
|
||||
"SUPER, right, movefocus,r"
|
||||
"SUPER, up, movefocus,u"
|
||||
"SUPER, down, movefocus,d"
|
||||
|
||||
# Focus Vim
|
||||
"SUPER, h, movefocus,l"
|
||||
"SUPER, l, movefocus,r"
|
||||
"SUPER, k, movefocus,u"
|
||||
"SUPER, j, movefocus,d"
|
||||
|
||||
# Move Arrows
|
||||
"SUPERSHIFT, left, movewindow,l"
|
||||
"SUPERSHIFT, right, movewindow,r"
|
||||
"SUPERSHIFT, up, movewindow,u"
|
||||
"SUPERSHIFT, down, movewindow,d"
|
||||
|
||||
# Move Vim
|
||||
"SUPERSHIFT, h, movewindow,l"
|
||||
"SUPERSHIFT, l, movewindow,r"
|
||||
"SUPERSHIFT, k, movewindow,u"
|
||||
"SUPERSHIFT, j, movewindow,d"
|
||||
|
||||
#Resize
|
||||
"SUPER CTRL, left, resizeactive,-20 0"
|
||||
"SUPERCTRL, right, resizeactive,20 0"
|
||||
"SUPER CTRL, up, resizeactive,0 -20"
|
||||
"SUPERCTRL, down, resizeactive,0 20"
|
||||
|
||||
# Switch workspace
|
||||
"SUPER, 1, workspace,1"
|
||||
"SUPER, 2, workspace,2"
|
||||
"SUPER, 3, workspace,3"
|
||||
"SUPER, 4, workspace,4"
|
||||
"SUPER, 5, workspace,5"
|
||||
"SUPER, 6, workspace,6"
|
||||
"SUPER, 7, workspace,7"
|
||||
"SUPER, 8, workspace,8"
|
||||
"SUPER, 9, workspace,9"
|
||||
"SUPER, 0, workspace,10"
|
||||
"SUPER, period, workspace,e+1"
|
||||
"SUPER, comma, workspace,e-1"
|
||||
"SUPER, tab, focusCurrentOrLast"
|
||||
|
||||
# Move workspace
|
||||
"SUPERSHIFT, 1, movetoworkspace,1"
|
||||
"SUPERSHIFT, 2, movetoworkspace,2"
|
||||
"SUPERSHIFT, 3, movetoworkspace,3"
|
||||
"SUPERSHIFT, 4, movetoworkspace,4"
|
||||
"SUPERSHIFT, 5, movetoworkspace,5"
|
||||
"SUPERSHIFT, 6, movetoworkspace,6"
|
||||
"SUPERSHIFT, 7, movetoworkspace,7"
|
||||
"SUPERSHIFT, 8, movetoworkspace,8"
|
||||
"SUPERSHIFT, 9, movetoworkspace,9"
|
||||
"SUPERSHIFT, 0, movetoworkspace,10"
|
||||
|
||||
# Lock Screen
|
||||
"SUPER, Backspace, exec, ${binds.lock}"
|
||||
];
|
||||
# Mouse
|
||||
bindm = [
|
||||
"SUPER, mouse:272, movewindow"
|
||||
"SUPER, mouse:273, resizewindow"
|
||||
];
|
||||
# bindr = [
|
||||
# "SUPER, SUPER_L, exec, killall rofi || rofi -show drun"
|
||||
# ];
|
||||
};
|
||||
}
|
||||
12
modules/home/workstation/hyprland/settings/default.nix
Normal file
12
modules/home/workstation/hyprland/settings/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
imports = [
|
||||
./misc.nix
|
||||
./exec.nix
|
||||
./input.nix
|
||||
./binds.nix
|
||||
./rules.nix
|
||||
./monitor.nix
|
||||
./gestures.nix
|
||||
./appearance.nix
|
||||
];
|
||||
}
|
||||
12
modules/home/workstation/hyprland/settings/exec.nix
Normal file
12
modules/home/workstation/hyprland/settings/exec.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
exec = [
|
||||
#"${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"
|
||||
];
|
||||
exec-once = [
|
||||
"${pkgs._1password-gui}/bin/1password --silent"
|
||||
# "${pkgs.live-buds-cli}/bin/earbuds -d"
|
||||
# "waybar"
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/home/workstation/hyprland/settings/gestures.nix
Normal file
6
modules/home/workstation/hyprland/settings/gestures.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings.gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_forever = true;
|
||||
};
|
||||
}
|
||||
8
modules/home/workstation/hyprland/settings/input.nix
Normal file
8
modules/home/workstation/hyprland/settings/input.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings.input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
touchpad.natural_scroll = "no";
|
||||
mouse_refocus = false;
|
||||
};
|
||||
}
|
||||
15
modules/home/workstation/hyprland/settings/misc.nix
Normal file
15
modules/home/workstation/hyprland/settings/misc.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings.misc = {
|
||||
mouse_move_enables_dpms = true;
|
||||
key_press_enables_dpms = true;
|
||||
disable_hyprland_logo = true;
|
||||
disable_splash_rendering = true;
|
||||
|
||||
enable_swallow = true;
|
||||
|
||||
# TODO: use terminal/file-explorer module
|
||||
swallow_regex = "foot|nemo";
|
||||
|
||||
focus_on_activate = true;
|
||||
};
|
||||
}
|
||||
30
modules/home/workstation/hyprland/settings/monitor.nix
Normal file
30
modules/home/workstation/hyprland/settings/monitor.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) concatMap;
|
||||
inherit (osConfig.ooknet.hardware) monitors;
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor =
|
||||
concatMap (
|
||||
m: let
|
||||
resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}";
|
||||
position = "${toString m.x}x${toString m.y}";
|
||||
basicConfig = "${m.name},${
|
||||
if m.enabled
|
||||
then "${resolution},${position},1"
|
||||
else "disable"
|
||||
}";
|
||||
in
|
||||
[basicConfig]
|
||||
++ (
|
||||
if m.transform != 0
|
||||
then ["${m.name},transform,${toString m.transform}"]
|
||||
else []
|
||||
)
|
||||
)
|
||||
monitors;
|
||||
};
|
||||
}
|
||||
24
modules/home/workstation/hyprland/settings/rules.nix
Normal file
24
modules/home/workstation/hyprland/settings/rules.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
windowrulev2 = [
|
||||
"float,move 191 15,size 924 396,class:^(1Password)$"
|
||||
|
||||
"float, title:^(Picture-in-Picture)$"
|
||||
"pin, title:^(Picture-in-Picture)$"
|
||||
|
||||
"float,move 237 175, size 1200 720,title:^(File Upload)$"
|
||||
|
||||
"workspace 4, title:^(Vesktop)$"
|
||||
|
||||
# Floating BTOP
|
||||
"float,title:^(BTOP)$"
|
||||
"size 85%,title:^(BTOP)$"
|
||||
"pin,title:^(BTOP)$"
|
||||
"center,title:^(BTOP)$"
|
||||
"stayfocused,title:^(BTOP)$"
|
||||
|
||||
# Tearing
|
||||
"immediate, title:^(TEKKEN™8)$"
|
||||
];
|
||||
};
|
||||
}
|
||||
7
modules/home/workstation/media/default.nix
Normal file
7
modules/home/workstation/media/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./image.nix
|
||||
./music.nix
|
||||
./video.nix
|
||||
];
|
||||
}
|
||||
23
modules/home/workstation/media/image.nix
Normal file
23
modules/home/workstation/media/image.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
imvMime = {
|
||||
"image/*" = ["imv.desktop"];
|
||||
};
|
||||
in {
|
||||
config = mkIf (elem "media" profiles) {
|
||||
programs = {
|
||||
imv = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
xdg.mimeApps = {
|
||||
associations.added = imvMime;
|
||||
defaultApplications = imvMime;
|
||||
};
|
||||
};
|
||||
}
|
||||
148
modules/home/workstation/media/music.nix
Normal file
148
modules/home/workstation/media/music.nix
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
{
|
||||
osConfig,
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf getExe elem;
|
||||
inherit (builtins) attrValues;
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
inherit (osConfig.networking) hostName;
|
||||
inherit (osConfig.ooknet.console.tools) zellij;
|
||||
inherit (osConfig.ooknet.console) multiplexer;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
inherit (config.ooknet) binds;
|
||||
in {
|
||||
config = mkIf (elem "media" profiles) {
|
||||
home.packages = attrValues {
|
||||
inherit
|
||||
(pkgs)
|
||||
termusic
|
||||
alsa-utils
|
||||
mpv
|
||||
;
|
||||
};
|
||||
|
||||
ooknet.binds.spotify = {
|
||||
launch = "${binds.terminalLaunch} spotify_player";
|
||||
next = "spotify_player playback next";
|
||||
previous = "spotify_player playback previous";
|
||||
play = "spotify_player playback play-pause";
|
||||
};
|
||||
|
||||
programs = {
|
||||
spotify-player = {
|
||||
enable = true;
|
||||
settings = {
|
||||
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 = "${hostName}";
|
||||
play_icon = "▶";
|
||||
pause_icon = "▌▌";
|
||||
liked_icon = "♥";
|
||||
playback_window_position = "Top";
|
||||
cover_img_length = 9;
|
||||
cover_img_width = 5;
|
||||
playback_window_width = 6;
|
||||
|
||||
device = {
|
||||
name = "${hostName}";
|
||||
device_type = "speaker";
|
||||
volume = 100;
|
||||
bitrate = 320;
|
||||
audio_cache = false;
|
||||
normalization = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general.framerate = 60;
|
||||
color = {
|
||||
gradient = 1;
|
||||
gradient_count = 5;
|
||||
gradient_color_1 = "'#${palette.base0A}'";
|
||||
gradient_color_2 = "'#${palette.base0B}'";
|
||||
gradient_color_3 = "'#${palette.base0C}'";
|
||||
gradient_color_4 = "'#${palette.base0D}'";
|
||||
gradient_color_5 = "'#${palette.base0E}'";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."zellij/layouts/music.kdl".text =
|
||||
mkIf (zellij.enable || multiplexer == "zellij")
|
||||
/*
|
||||
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=#${palette.base0D}]{char}"
|
||||
border_position "bottom"
|
||||
|
||||
hide_frame_for_single_pane "true"
|
||||
|
||||
mode_normal "#[fg=${palette.base0D}]"
|
||||
|
||||
tab_normal "#[bg=#${palette.base01}] {name} "
|
||||
tab_active "#[bg=#${palette.base02}] {name} "
|
||||
tab_separator " "
|
||||
|
||||
datetime "#[fg=#${palette.base05},bold] {format} "
|
||||
datetime_format "%I:%M %p"
|
||||
datetime_timezone "${osConfig.time.timeZone}"
|
||||
}
|
||||
}
|
||||
children
|
||||
}
|
||||
|
||||
tab name="spotify" focus=true {
|
||||
pane name="spotify" {
|
||||
borderless true
|
||||
command "${getExe pkgs.spotify-player}"
|
||||
focus true
|
||||
}
|
||||
pane name="Visualizer" {
|
||||
borderless false
|
||||
split_direction "horizontal"
|
||||
size "20%"
|
||||
command "${getExe pkgs.cava}"
|
||||
}
|
||||
}
|
||||
}
|
||||
'';
|
||||
|
||||
home.shellAliases = mkIf (zellij.enable || multiplexer == "zellij") {
|
||||
zjm = "zellij --layout music";
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/home/workstation/media/video.nix
Normal file
24
modules/home/workstation/media/video.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) elem mkIf;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
mpvMime = {
|
||||
"audio/*" = ["mpv.desktop"];
|
||||
"video/*" = ["mpv.desktop"];
|
||||
};
|
||||
in {
|
||||
config = mkIf (elem "media" profiles) {
|
||||
home.packages = [pkgs.jellyfin-media-player];
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.mimeApps = {
|
||||
associations.added = mpvMime;
|
||||
defaultApplications = mpvMime;
|
||||
};
|
||||
};
|
||||
}
|
||||
6
modules/home/workstation/productivity/default.nix
Normal file
6
modules/home/workstation/productivity/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./zathura.nix
|
||||
./obsidian.nix
|
||||
];
|
||||
}
|
||||
30
modules/home/workstation/productivity/obsidian.nix
Normal file
30
modules/home/workstation/productivity/obsidian.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem hm;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
# admin = osConfig.ooknet.host.admin;
|
||||
# TODO: use admin.githubUsername
|
||||
notesRepo = "git@github.com:ooks-io/notes.git";
|
||||
notesPath = "${config.xdg.userDirs.documents}/notes";
|
||||
in {
|
||||
config = mkIf (elem "productivity" profiles) {
|
||||
home.packages = [pkgs.obsidian];
|
||||
home.activation.cloneObsidianVault =
|
||||
hm.dag.entryAfter ["installPackages"]
|
||||
/*
|
||||
shell
|
||||
*/
|
||||
''
|
||||
if ! [ -d "${notesPath}" ]; then
|
||||
$DRY_RUN_CMD git clone ${notesRepo} ${notesPath}
|
||||
fi
|
||||
'';
|
||||
|
||||
ooknet.binds.notes = "obsidian";
|
||||
};
|
||||
}
|
||||
47
modules/home/workstation/productivity/zathura.nix
Normal file
47
modules/home/workstation/productivity/zathura.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
inherit (osConfig.ooknet.appearance.colorscheme) palette;
|
||||
inherit (osConfig.ooknet.appearance) fonts;
|
||||
inherit (osConfig.ooknet.workstation) profiles;
|
||||
|
||||
zathuraMime = {"application/pdf" = ["org.pwmt.zathura.desktop"];};
|
||||
in {
|
||||
config = mkIf (elem "productivity" profiles) {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
font = "${fonts.regular.family} 14";
|
||||
recolor = true;
|
||||
selection-clipboard = "clipboard";
|
||||
default-bg = "#${palette.base00}";
|
||||
default-fg = "#${palette.base01}";
|
||||
statusbar-bg = "#${palette.base02}";
|
||||
statusbar-fg = "#${palette.base04}";
|
||||
inputbar-bg = "#${palette.base00}";
|
||||
inputbar-fg = "#${palette.base07}";
|
||||
notification-bg = "#${palette.base00}";
|
||||
notification-fg = "#${palette.base07}";
|
||||
notification-error-bg = "#${palette.base00}";
|
||||
notification-error-fg = "#${palette.base08}";
|
||||
notification-warning-bg = "#${palette.base00}";
|
||||
notification-warning-fg = "#${palette.base08}";
|
||||
highlight-color = "#${palette.base0A}";
|
||||
highlight-active-color = "#${palette.base0D}";
|
||||
completion-bg = "#${palette.base01}";
|
||||
completion-fg = "#${palette.base05}";
|
||||
completions-highlight-bg = "#${palette.base0D}";
|
||||
completions-highlight-fg = "#${palette.base07}";
|
||||
recolor-lightcolor = "#${palette.base00}";
|
||||
recolor-darkcolor = "#${palette.base06}";
|
||||
};
|
||||
};
|
||||
xdg.mimeApps = {
|
||||
associations.added = zathuraMime;
|
||||
defaultApplications = zathuraMime;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/home/workstation/terminal/default.nix
Normal file
5
modules/home/workstation/terminal/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./foot.nix
|
||||
];
|
||||
}
|
||||
82
modules/home/workstation/terminal/foot.nix
Normal file
82
modules/home/workstation/terminal/foot.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (osConfig.ooknet.appearance) colorscheme fonts;
|
||||
inherit (colorscheme) palette;
|
||||
inherit (lib) mkMerge mkIf;
|
||||
inherit (osConfig.ooknet.workstation) default;
|
||||
cfg = osConfig.ooknet.workstation.programs.foot;
|
||||
in {
|
||||
config = mkMerge [
|
||||
(mkIf (cfg.enable || default.terminal == "foot") {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
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 = "${palette.base05}";
|
||||
background = "${palette.base00}";
|
||||
regular0 = "${palette.base00}"; # black
|
||||
regular1 = "${palette.red}"; # red
|
||||
regular2 = "${palette.green}"; # green
|
||||
regular3 = "${palette.yellow}"; # yellow
|
||||
regular4 = "${palette.blue}"; # blue
|
||||
regular5 = "${palette.purple}"; # magenta
|
||||
regular6 = "${palette.cyan}"; # cyan
|
||||
regular7 = "${palette.base05}"; # white
|
||||
bright0 = "${palette.base03}"; # bright black
|
||||
bright1 = "${palette.bright-red}"; # bright red
|
||||
bright2 = "${palette.bright-green}"; # bright green
|
||||
bright3 = "${palette.bright-yellow}"; # bright yellow
|
||||
bright4 = "${palette.bright-blue}"; # bright blue
|
||||
bright5 = "${palette.bright-purple}"; # bright magenta
|
||||
bright6 = "${palette.bright-cyan}"; # bright cyan
|
||||
bright7 = "${palette.base07}"; # bright white
|
||||
"16" = "${palette.base09}";
|
||||
"17" = "${palette.base0F}";
|
||||
"18" = "${palette.base01}";
|
||||
"19" = "${palette.base02}";
|
||||
"20" = "${palette.base04}";
|
||||
"21" = "${palette.base06}";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf (default.terminal == "foot") {
|
||||
home.sessionVariables = {
|
||||
TERMINAL = "foot";
|
||||
TERM = "foot";
|
||||
};
|
||||
ooknet.binds.terminal = "foot";
|
||||
ooknet.binds.terminalLaunch = "foot";
|
||||
})
|
||||
];
|
||||
}
|
||||
12
modules/home/workstation/tools/1password.nix
Normal file
12
modules/home/workstation/tools/1password.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
osConfig,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.programs._1password;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
ooknet.binds.password = "1password";
|
||||
};
|
||||
}
|
||||
9
modules/home/workstation/tools/default.nix
Normal file
9
modules/home/workstation/tools/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
imports = [
|
||||
./ookpower.nix
|
||||
./1password.nix
|
||||
./ookvolume.nix
|
||||
./kdeconnect.nix
|
||||
./ookbrightness.nix
|
||||
];
|
||||
}
|
||||
15
modules/home/workstation/tools/kdeconnect.nix
Normal file
15
modules/home/workstation/tools/kdeconnect.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
cfg = osConfig.programs.kdeconnect;
|
||||
in {
|
||||
config = mkIf cfg.enable {
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
indicator = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
50
modules/home/workstation/tools/ookbrightness.nix
Normal file
50
modules/home/workstation/tools/ookbrightness.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
inherit (osConfig.ooknet.hardware) features;
|
||||
ookbrightness = pkgs.writeShellApplication {
|
||||
name = "ookbrightness";
|
||||
runtimeInputs = with pkgs; [brillo libnotify];
|
||||
text =
|
||||
/*
|
||||
bash
|
||||
*/
|
||||
''
|
||||
BRIGHTNESS=$(brillo -G | awk -F'.' '{print$1}')
|
||||
notify() {
|
||||
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $BRIGHTNESS%"
|
||||
}
|
||||
option() {
|
||||
case "$1" in
|
||||
up)
|
||||
brillo -q -u 30000 -A 5
|
||||
;;
|
||||
down)
|
||||
brillo -q -u 30000 -U 5
|
||||
;;
|
||||
*)
|
||||
echo "Invalid argument"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
main() {
|
||||
option "$@"
|
||||
notify
|
||||
}
|
||||
main "$@"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
config = mkIf (elem "backlight" features) {
|
||||
home.packages = [ookbrightness];
|
||||
ooknet.binds.brightness = {
|
||||
up = "ookbrightness up";
|
||||
down = "ookbrightness down";
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/home/workstation/tools/ookpower.nix
Normal file
14
modules/home/workstation/tools/ookpower.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
inputs',
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.programs) rofi;
|
||||
in {
|
||||
config = mkIf rofi.enable {
|
||||
home.packages = [inputs'.ooks-scripts.packages.powermenu];
|
||||
ooknet.binds.powerMenu = "powermenu -c dmenu";
|
||||
};
|
||||
}
|
||||
48
modules/home/workstation/tools/ookvolume.nix
Normal file
48
modules/home/workstation/tools/ookvolume.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) elem;
|
||||
inherit (osConfig.ooknet.hardware) features;
|
||||
ookvolume = pkgs.writeShellApplication {
|
||||
name = "ookvolume";
|
||||
runtimeInputs = with pkgs; [pamixer libnotify];
|
||||
text = ''
|
||||
notify() {
|
||||
volume=$(pamixer --get-volume-human)
|
||||
notify-send --app-name="system-notify" -h string:x-canonical-private-synchronous:sys-notify " $volume"
|
||||
}
|
||||
option() {
|
||||
case "$1" in
|
||||
up)
|
||||
pamixer --increase 5
|
||||
;;
|
||||
down)
|
||||
pamixer --decrease 5
|
||||
;;
|
||||
mute)
|
||||
pamixer --toggle-mute
|
||||
;;
|
||||
*) echo "Invalid option" ;;
|
||||
esac
|
||||
}
|
||||
main() {
|
||||
option "$@"
|
||||
notify
|
||||
}
|
||||
main "$@"
|
||||
'';
|
||||
};
|
||||
in {
|
||||
config = mkIf (elem "audio" features) {
|
||||
home.packages = [ookvolume];
|
||||
ooknet.binds.volume = {
|
||||
up = "ookvolume up";
|
||||
down = "ookvolume down";
|
||||
mute = "ookvolume mute";
|
||||
};
|
||||
};
|
||||
}
|
||||
5
modules/nixos/appearance/default.nix
Normal file
5
modules/nixos/appearance/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./options.nix
|
||||
];
|
||||
}
|
||||
74
modules/nixos/appearance/options.nix
Normal file
74
modules/nixos/appearance/options.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) isString hasPrefix removePrefix mkOption mkOptionType;
|
||||
inherit (lib.types) enum str nullOr package path int attrsOf coercedTo;
|
||||
hexColorType = mkOptionType {
|
||||
name = "hex-color";
|
||||
descriptionClass = "noun";
|
||||
description = "RGB color in hex format";
|
||||
check = x: isString x && !(hasPrefix "#" x);
|
||||
};
|
||||
|
||||
mkFontOption = {
|
||||
family = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
};
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
|
||||
cfg = config.ooknet.appearance;
|
||||
in {
|
||||
# imports = [./palettes];
|
||||
options.ooknet.appearance = {
|
||||
fonts = {
|
||||
monospace = mkFontOption;
|
||||
regular = mkFontOption;
|
||||
};
|
||||
wallpaper = {
|
||||
path = mkOption {
|
||||
type = path;
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
cursor = {
|
||||
package = mkOption {
|
||||
type = package;
|
||||
default = null;
|
||||
};
|
||||
name = mkOption {
|
||||
type = str;
|
||||
default = "";
|
||||
};
|
||||
size = mkOption {
|
||||
type = int;
|
||||
default = 22;
|
||||
};
|
||||
};
|
||||
# Credit to github:misterio77/nix-colors
|
||||
colorscheme = {
|
||||
name = mkOption {
|
||||
type = enum ["gruvbox-material-medium"];
|
||||
default = "gruvbox-material-medium";
|
||||
};
|
||||
variant = mkOption {
|
||||
type = enum ["dark" "light"];
|
||||
default = "dark";
|
||||
};
|
||||
slug = mkOption {
|
||||
type = str;
|
||||
default = "${toString cfg.colorscheme.name}-${toString cfg.colorscheme.variant}";
|
||||
};
|
||||
palette = mkOption {
|
||||
type = attrsOf (coercedTo str (removePrefix "#") hexColorType);
|
||||
default = (import ./palettes/${config.ooknet.appearance.colorscheme.slug}.nix).colorscheme.palette;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
{
|
||||
colorscheme = {
|
||||
palette = {
|
||||
crust = "#282828";
|
||||
mantle = "#32302f";
|
||||
base = "#3a3735";
|
||||
surface-0 = "#45403d";
|
||||
surface-1 = "#504945";
|
||||
surface-2 = "#5A524C";
|
||||
overlay-0 = "#696059";
|
||||
overlay-1 = "#70665C";
|
||||
overlay-2 = "#7C6F64";
|
||||
subtext-0 = "#928374";
|
||||
subtext-1 = "#A89984";
|
||||
text = "#d4be98";
|
||||
|
||||
red = "#ea6962";
|
||||
dull-red = "#D87974";
|
||||
bright-red = "#F47771";
|
||||
orange = "#e78a4e";
|
||||
dull-orange = "#D39063";
|
||||
bright-orange = "#F3995E";
|
||||
yellow = "#d8a657";
|
||||
dull-yellow = "#c2A16B";
|
||||
bright-yellow = "#E5B361";
|
||||
green = "#a9b665";
|
||||
dull-green = "#989F7A";
|
||||
bright-green = "#B8C86A";
|
||||
cyan = "#89b482";
|
||||
dull-cyan = "#93A790";
|
||||
bright-cyan = "#92C78A";
|
||||
blue = "#7daea3";
|
||||
dull-blue = "#939A98";
|
||||
bright-blue = "#85C1B4";
|
||||
purple = "#d3869b";
|
||||
dull-purple = "#C397A3";
|
||||
bright-purple = "#E193A8";
|
||||
|
||||
base00 = "#282828";
|
||||
base01 = "#32302f";
|
||||
base02 = "#504945";
|
||||
base03 = "#7C6F64";
|
||||
base04 = "#A89984";
|
||||
base05 = "#D4BE98";
|
||||
base06 = "#DDc7a1";
|
||||
base07 = "#FBF1C7";
|
||||
base08 = "#EA6962";
|
||||
base09 = "#E78A4E";
|
||||
base0A = "#d8a657";
|
||||
base0B = "#A9B665";
|
||||
base0C = "#89B482";
|
||||
base0D = "#7DAEA3";
|
||||
base0E = "#D3869B";
|
||||
base0F = "#E37B35";
|
||||
base10 = "#141617";
|
||||
base11 = "#050505";
|
||||
base12 = "#F47771";
|
||||
base13 = "#D8A657";
|
||||
base14 = "#B7C86A";
|
||||
base15 = "#92C78A";
|
||||
base16 = "#85C1B4";
|
||||
base17 = "#E193A8";
|
||||
};
|
||||
};
|
||||
}
|
||||
49
modules/nixos/base/admin.nix
Normal file
49
modules/nixos/base/admin.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
inputs',
|
||||
self',
|
||||
self,
|
||||
keys,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.ooknet.host) role admin;
|
||||
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
config = {
|
||||
users.users.${admin.name} = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.${admin.shell};
|
||||
initialPassword = "password";
|
||||
openssh.authorizedKeys.keys = [keys.users."${admin.name}"];
|
||||
extraGroups =
|
||||
[
|
||||
"wheel"
|
||||
"video"
|
||||
"audio"
|
||||
]
|
||||
++ ifTheyExist [
|
||||
"git"
|
||||
"media"
|
||||
"network"
|
||||
"libvirtd"
|
||||
"streamer"
|
||||
"torrenter"
|
||||
];
|
||||
};
|
||||
home-manager = mkIf (role == "workstation" || admin.homeManager) {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "hm.old";
|
||||
verbose = true;
|
||||
extraSpecialArgs = {inherit inputs inputs' self self';};
|
||||
users.${admin.name} = {
|
||||
imports = ["${self}/modules/home/base"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
modules/nixos/base/boot.nix
Normal file
31
modules/nixos/base/boot.nix
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkDefault;
|
||||
in {
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot = {
|
||||
enable = mkDefault true;
|
||||
consoleMode = "max";
|
||||
editor = false;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
efi.canTouchEfiVariables = mkDefault true;
|
||||
};
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"btrfs"
|
||||
"sd_mod"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
modules/nixos/base/default.nix
Normal file
14
modules/nixos/base/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
imports = [
|
||||
./nix.nix
|
||||
./boot.nix
|
||||
./admin.nix
|
||||
./locale.nix
|
||||
./options.nix
|
||||
./secrets.nix
|
||||
./openssh.nix
|
||||
./tailscale.nix
|
||||
./networking.nix
|
||||
./security
|
||||
];
|
||||
}
|
||||
9
modules/nixos/base/locale.nix
Normal file
9
modules/nixos/base/locale.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
time.timeZone = "Pacific/Auckland";
|
||||
location.provider = "geoclue2";
|
||||
services.geoclue2.enable = true;
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
supportedLocales = ["en_US.UTF-8/UTF-8"];
|
||||
};
|
||||
}
|
||||
45
modules/nixos/base/networking.nix
Normal file
45
modules/nixos/base/networking.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib) mkForce mkDefault;
|
||||
in {
|
||||
imports = [
|
||||
./openssh.nix
|
||||
./tailscale.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
enableIPv6 = true;
|
||||
# disable global dhcp
|
||||
useDHCP = mkForce false;
|
||||
usePredictableInterfaceNames = mkDefault true;
|
||||
nameservers = [
|
||||
#quad9 IPv6
|
||||
"2620:fe::fe"
|
||||
"2620:fe::9"
|
||||
|
||||
#quad9 IPv4
|
||||
"9.9.9.9"
|
||||
"149.112.112.112"
|
||||
];
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
wifi = {
|
||||
macAddress = "random";
|
||||
scanRandMacAddress = true;
|
||||
powersave = true;
|
||||
};
|
||||
unmanaged = ["interface-name:tailscale*"];
|
||||
};
|
||||
};
|
||||
services = {
|
||||
resolved = {
|
||||
enable = true;
|
||||
|
||||
domains = ["~."];
|
||||
fallbackDns = ["9.9.9.9"]; #quad9
|
||||
|
||||
#dnsovertls = "true";
|
||||
};
|
||||
};
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
}
|
||||
69
modules/nixos/base/nix.nix
Normal file
69
modules/nixos/base/nix.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) attrValues;
|
||||
inherit (lib) mkIf mapAttrsToList;
|
||||
inherit (config.ooknet.host) admin;
|
||||
in {
|
||||
environment = {
|
||||
# disable default nix packages
|
||||
# these packages are installed by default [ perl rsync strace ]
|
||||
defaultPackages = [];
|
||||
systemPackages = attrValues {
|
||||
inherit (pkgs) git deadnix statix;
|
||||
inherit (inputs.agenix.packages.${pkgs.system}) default;
|
||||
};
|
||||
};
|
||||
nix = {
|
||||
# package = pkgs.lix;
|
||||
registry = {
|
||||
nixpkgs.flake = inputs.nixpkgs;
|
||||
default.flake = inputs.nixpkgs;
|
||||
};
|
||||
nixPath = mapAttrsToList (name: _: "${name}=${name}") config.nix.registry;
|
||||
settings = {
|
||||
trusted-users = ["@wheel" "root"];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
accept-flake-config = true;
|
||||
auto-optimise-store = true;
|
||||
# cache
|
||||
substituters = [
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://neovim-flake.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"neovim-flake.cachix.org-1:iyQ6lHFhnB5UkVpxhQqLJbneWBTzM8LBYOFPLNH4qZw="
|
||||
];
|
||||
# TODO: setup builders -- builders-use-substitutes = true;
|
||||
};
|
||||
};
|
||||
nixpkgs = {
|
||||
config.allowUnfree = true;
|
||||
# why are we doing this
|
||||
overlays = [
|
||||
# zellij status bar plugin
|
||||
(_final: prev: {
|
||||
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# nix rebuild utililty
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
# sets an environment variable FLAKE that nh will refer to by default
|
||||
flake = mkIf admin.homeManager "/home/${admin.name}/.config/ooknet";
|
||||
# garbage collect
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep 5 --keep-since 14d";
|
||||
};
|
||||
};
|
||||
}
|
||||
82
modules/nixos/base/openssh.nix
Normal file
82
modules/nixos/base/openssh.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
startWhenNeeded = true;
|
||||
ports = [22];
|
||||
settings = {
|
||||
UseDns = true;
|
||||
PubkeyAuthentication = "yes";
|
||||
PermitRootLogin = "no";
|
||||
PermitEmptyPasswords = "no";
|
||||
PasswordAuthentication = false;
|
||||
|
||||
# disable support for .rhost files
|
||||
IgnoreRhosts = "yes";
|
||||
|
||||
# by default openssh uses port 22
|
||||
|
||||
# restict key exchange, cipher, and MAC algorithms, as per <https://www.ssh-audit.com>
|
||||
KexAlgorithms = [
|
||||
"sntrup761x25519-sha512@openssh.com"
|
||||
"curve25519-sha256"
|
||||
"curve25519-sha256@libssh.org"
|
||||
"diffie-hellman-group18-sha512"
|
||||
"diffie-hellman-group-exchange-sha256"
|
||||
"diffie-hellman-group16-sha512"
|
||||
];
|
||||
Ciphers = [
|
||||
"chacha20-poly1305@openssh.com"
|
||||
"aes256-gcm@openssh.com"
|
||||
"aes256-ctr"
|
||||
"aes192-ctr"
|
||||
"aes128-gcm@openssh.com"
|
||||
"aes128-ctr"
|
||||
];
|
||||
Macs = [
|
||||
"hmac-sha2-512-etm@openssh.com"
|
||||
"hmac-sha2-256-etm@openssh.com"
|
||||
"umac-128-etm@openssh.com"
|
||||
];
|
||||
/*
|
||||
HostKeyAlgorithms = [
|
||||
"sk-ssh-ed25519-cert-v01@openssh.com"
|
||||
"ssh-ed25519-cert-v01@openssh.com"
|
||||
"rsa-sha2-512-cert-v01@openssh.com"
|
||||
"sk-ssh-ed25519@openssh.com,ssh-ed25519"
|
||||
"ssh-ed25519"
|
||||
"rsa-sha2-512"
|
||||
"rsa-sha2-256"
|
||||
];
|
||||
CASignatureAlgorithms = [
|
||||
"sk-ssh-ed25519@openssh.com"
|
||||
"ssh-ed25519"
|
||||
"rsa-sha2-512"
|
||||
"rsa-sha2-256"
|
||||
];
|
||||
GSSAPIKexAlgorithms = [
|
||||
"gss-curve25519-sha256-"
|
||||
"gss-group16-sha512"
|
||||
];
|
||||
HostbasedAcceptedAlgorithms = [
|
||||
"sk-ssh-ed25519-cert-v01@openssh.com"
|
||||
"ssh-ed25519-cert-v01@openssh.com"
|
||||
"rsa-sha2-512-cert-v01@openssh.com"
|
||||
"rsa-sha2-256-cert-v01@openssh.com"
|
||||
"sk-ssh-ed25519@openssh.com"
|
||||
"ssh-ed25519,rsa-sha2-512"
|
||||
"rsa-sha2-256"
|
||||
];
|
||||
PubkeyAcceptedAlgorithms = [
|
||||
"sk-ssh-ed25519-cert-v01@openssh.com"
|
||||
"ssh-ed25519-cert-v01@openssh.com"
|
||||
"rsa-sha2-512-cert-v01@openssh.com"
|
||||
"rsa-sha2-256-cert-v01@openssh.com"
|
||||
"sk-ssh-ed25519@openssh.com"
|
||||
"ssh-ed25519"
|
||||
"rsa-sha2-512"
|
||||
"rsa-sha2-256"
|
||||
];
|
||||
*/
|
||||
};
|
||||
};
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue