🚚 [shared] Added shared config that shared desktop config inherits from
This commit is contained in:
15
shared/desktop/home-manager/cursors.nix
Normal file
15
shared/desktop/home-manager/cursors.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.cursors = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
accent = "dark";
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
x11.enable = true;
|
||||
size = 16;
|
||||
};
|
||||
}
|
23
shared/desktop/home-manager/default-applications.nix
Normal file
23
shared/desktop/home-manager/default-applications.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
let
|
||||
browser = "zen.desktop";
|
||||
imageViewer = "imv.desktop";
|
||||
pdfReader = "sioyek.desktop";
|
||||
in
|
||||
{
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
"image/jpg" = imageViewer;
|
||||
"image/jpeg" = imageViewer;
|
||||
"image/png" = imageViewer;
|
||||
"image/gif" = imageViewer;
|
||||
"application/pdf" = pdfReader;
|
||||
};
|
||||
};
|
||||
}
|
52
shared/desktop/home-manager/default.nix
Normal file
52
shared/desktop/home-manager/default.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
common,
|
||||
systemConfig,
|
||||
...
|
||||
}:
|
||||
let
|
||||
dir = common.dir;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(lib.custom.relativeToBase "home-manager")
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
./cursors.nix
|
||||
./default-applications.nix
|
||||
./development
|
||||
./freetube.nix
|
||||
./gtk.nix
|
||||
./gpg.nix
|
||||
./kitty.nix
|
||||
./media
|
||||
./nextcloud.nix
|
||||
./rofi
|
||||
./hyprland
|
||||
./shell
|
||||
./sioyek.nix
|
||||
./spicetify.nix
|
||||
./zen
|
||||
];
|
||||
|
||||
home = {
|
||||
username = systemConfig.username;
|
||||
homeDirectory = dir.home;
|
||||
|
||||
sessionVariables = {
|
||||
XDG_PICTURES_DIR = dir.pictures; # Define the default dir for pictures
|
||||
};
|
||||
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = systemConfig.version;
|
||||
};
|
||||
|
||||
# Adds pkgs.unstable in order to fetch packages from unstable repositories
|
||||
nixpkgs.overlays = [ outputs.overlays.unstable-packages ];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
9
shared/desktop/home-manager/development/default.nix
Normal file
9
shared/desktop/home-manager/development/default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./helix.nix
|
||||
./zed.nix
|
||||
];
|
||||
# TODO set Wayland vmOptions in Jetbrains products, Requires current installed version in path
|
||||
# -Dawt.toolkit.name=WLToolKit
|
||||
}
|
35
shared/desktop/home-manager/development/git.nix
Normal file
35
shared/desktop/home-manager/development/git.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
git-crypt
|
||||
gitmoji-cli
|
||||
];
|
||||
|
||||
programs.git =
|
||||
let
|
||||
package = pkgs.git.override { withLibsecret = true; };
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
package = package;
|
||||
userName = "Martin Berg Alstad";
|
||||
userEmail = "git@martials.no";
|
||||
|
||||
aliases = {
|
||||
amend = "commit --amend";
|
||||
cm = "commit";
|
||||
s = "status";
|
||||
p = "push";
|
||||
};
|
||||
|
||||
signing.signByDefault = true;
|
||||
|
||||
extraConfig = {
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
safe.directory = "/etc/nixos";
|
||||
credential.helper = "${package}/bin/git-credential-libsecret";
|
||||
};
|
||||
};
|
||||
}
|
103
shared/desktop/home-manager/development/helix.nix
Normal file
103
shared/desktop/home-manager/development/helix.nix
Normal file
@ -0,0 +1,103 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
catppuccin.helix = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.shellAliases.edit = "hx";
|
||||
helix =
|
||||
let
|
||||
prettier = format: {
|
||||
command = "prettier";
|
||||
args = [
|
||||
"--stdin-filepath"
|
||||
"file.${format}"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
extraPackages = with pkgs; [
|
||||
# Markdown
|
||||
marksman
|
||||
markdown-oxide
|
||||
# Html, css, Json, Eslint
|
||||
vscode-langservers-extracted
|
||||
# Yaml
|
||||
ansible-language-server
|
||||
yaml-language-server
|
||||
];
|
||||
settings = {
|
||||
editor = {
|
||||
auto-save = {
|
||||
after-delay.enable = true;
|
||||
focus-lost = true;
|
||||
};
|
||||
cursor-shape = {
|
||||
normal = "block";
|
||||
insert = "bar";
|
||||
select = "underline";
|
||||
};
|
||||
lsp = {
|
||||
display-inlay-hints = true;
|
||||
display-messages = true;
|
||||
};
|
||||
};
|
||||
keys.normal = {
|
||||
C-f = ":format";
|
||||
};
|
||||
};
|
||||
|
||||
languages.language = [
|
||||
{
|
||||
name = "css";
|
||||
formatter = prettier "css";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "json";
|
||||
language-servers = [
|
||||
"vscode-json-language-server"
|
||||
];
|
||||
formatter = prettier "json";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "jsonc";
|
||||
language-servers = [
|
||||
];
|
||||
formatter = prettier "jsonc";
|
||||
file-types = [
|
||||
"jsonc"
|
||||
];
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "markdown";
|
||||
formatter = prettier "md";
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "nix";
|
||||
formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
|
||||
auto-format = true;
|
||||
}
|
||||
{
|
||||
name = "yaml";
|
||||
formatter = prettier "yaml";
|
||||
auto-format = true;
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
}
|
56
shared/desktop/home-manager/development/zed.nix
Normal file
56
shared/desktop/home-manager/development/zed.nix
Normal file
@ -0,0 +1,56 @@
|
||||
{ pkgs, theme, ... }:
|
||||
|
||||
{
|
||||
programs.zed-editor = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.zed-editor;
|
||||
extensions = [
|
||||
"html"
|
||||
"catppuccin"
|
||||
"catppuccin-icons"
|
||||
"toml"
|
||||
"nix"
|
||||
"git-firefly"
|
||||
"just"
|
||||
];
|
||||
userSettings =
|
||||
let
|
||||
font = "${theme.nerdFont} Nerd Font";
|
||||
fontSize = 14;
|
||||
in
|
||||
{
|
||||
assistant = {
|
||||
default_model = {
|
||||
provider = "ollama";
|
||||
model = "deepseek-r1:8b";
|
||||
};
|
||||
version = "2";
|
||||
};
|
||||
autosave = "on_focus_change";
|
||||
auto_update = false;
|
||||
base_keymap = "JetBrains";
|
||||
buffer_font_family = font;
|
||||
features = {
|
||||
edit_completion_provider = "zed";
|
||||
};
|
||||
icon_theme = {
|
||||
mode = theme.mode;
|
||||
light = "Catppuccin Latte";
|
||||
dark = "Catppuccin Mocha";
|
||||
};
|
||||
ui_font_family = font;
|
||||
ui_font_size = fontSize;
|
||||
buffer_font_size = fontSize;
|
||||
tabs = {
|
||||
file_icons = true;
|
||||
git_status = true;
|
||||
};
|
||||
theme = {
|
||||
mode = theme.mode;
|
||||
light = "Catppuccin Latte";
|
||||
dark = "Catppuccin Mocha";
|
||||
};
|
||||
lsp.nil.initialization_options.formatting.command = [ "nixfmt" ];
|
||||
};
|
||||
};
|
||||
}
|
53
shared/desktop/home-manager/freetube.nix
Normal file
53
shared/desktop/home-manager/freetube.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
catppuccin.freetube.enable = true;
|
||||
|
||||
programs.freetube = {
|
||||
enable = true;
|
||||
package = pkgs.unstable.freetube;
|
||||
settings = {
|
||||
allowDashAv1Formats = true;
|
||||
checkForUpdates = false;
|
||||
currentLocale = "en-GB";
|
||||
defaultTheatreMode = true;
|
||||
defaultQuality = "1080";
|
||||
displayVideoPlayButton = false;
|
||||
region = "NO";
|
||||
useSponsorBlock = true;
|
||||
|
||||
sponsorBlockSponsor = {
|
||||
color = "CatppuccinMochaGreen";
|
||||
skip = "autoSkip";
|
||||
};
|
||||
sponsorBlockSelfPromo = {
|
||||
color = "CatppuccinMochaYellow";
|
||||
skip = "showInSeekBar";
|
||||
};
|
||||
sponsorBlockInteraction = {
|
||||
color = "CatppuccinMochaPink";
|
||||
skip = "showInSeekBar";
|
||||
};
|
||||
sponsorBlockIntro = {
|
||||
color = "CatppuccinMochaSapphire";
|
||||
skip = "doNothing";
|
||||
};
|
||||
sponsorBlockOutro = {
|
||||
color = "CatppuccinMochaBlue";
|
||||
skip = "doNothing";
|
||||
};
|
||||
sponsorBlockRecap = {
|
||||
color = "CatppuccinMochaMauve";
|
||||
skip = "doNothing";
|
||||
};
|
||||
sponsorBlockMusicOffTopic = {
|
||||
color = "CatppuccinMochaFlamingo";
|
||||
skip = "doNothing";
|
||||
};
|
||||
sponsorBlockFiller = {
|
||||
color = "CatppuccinMochaMauve";
|
||||
skip = "doNothing";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
10
shared/desktop/home-manager/gpg.nix
Normal file
10
shared/desktop/home-manager/gpg.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
};
|
||||
}
|
20
shared/desktop/home-manager/gtk.nix
Normal file
20
shared/desktop/home-manager/gtk.nix
Normal file
@ -0,0 +1,20 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
# TODO deprecated, remove
|
||||
catppuccin.gtk = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
icon.enable = true;
|
||||
};
|
||||
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Prefer dark mode for all GTK apps
|
||||
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
};
|
||||
};
|
||||
|
||||
gtk.enable = true;
|
||||
}
|
102
shared/desktop/home-manager/hyprland/binds.nix
Normal file
102
shared/desktop/home-manager/hyprland/binds.nix
Normal file
@ -0,0 +1,102 @@
|
||||
{ common, ... }:
|
||||
let
|
||||
app = common.default;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$shiftMod" = "$mainMod SHIFT";
|
||||
"$ctrlMod" = "$mainMod CTRL";
|
||||
"$menu" = "rofi -show drun";
|
||||
|
||||
bind = [
|
||||
"$mainMod, Q, exec, ${app.terminal}"
|
||||
"$mainMod, C, killactive,"
|
||||
"$shiftMod, M, exit,"
|
||||
"$mainMod, E, exec, ${app.fileManager}"
|
||||
"$mainMod, V, togglefloating,"
|
||||
"$mainMod, R, exec, $menu"
|
||||
"$mainMod, P, pseudo," # dwindle
|
||||
"$mainMod, J, togglesplit," # dwindle
|
||||
"$mainMod, B, exec, ${app.browser}"
|
||||
"$mainMod, L, exec, ${app.lockScreen}"
|
||||
"$mainMod, K, exec, [float] ${app.calculator}"
|
||||
"$mainMod, ESCAPE, exec, hyprpanel t dashboardmenu"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"$mainMod, left, movefocus, l"
|
||||
"$mainMod, right, movefocus, r"
|
||||
"$mainMod, up, movefocus, u"
|
||||
"$mainMod, down, movefocus, d"
|
||||
|
||||
# Move window with ctrl + mainMod + arrow keys
|
||||
"$ctrlMod, left, movewindow, l"
|
||||
"$ctrlMod, right, movewindow, r"
|
||||
"$ctrlMod, up, movewindow, u"
|
||||
"$ctrlMod, down, movewindow, d"
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"$mainMod, 1, workspace, 1"
|
||||
"$mainMod, 2, workspace, 2"
|
||||
"$mainMod, 3, workspace, 3"
|
||||
"$mainMod, 4, workspace, 4"
|
||||
"$mainMod, 5, workspace, 5"
|
||||
"$mainMod, 6, workspace, 6"
|
||||
"$mainMod, 7, workspace, 7"
|
||||
"$mainMod, 8, workspace, 8"
|
||||
"$mainMod, 9, workspace, 9"
|
||||
"$mainMod, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"$shiftMod, 1, movetoworkspace, 1"
|
||||
"$shiftMod, 2, movetoworkspace, 2"
|
||||
"$shiftMod, 3, movetoworkspace, 3"
|
||||
"$shiftMod, 4, movetoworkspace, 4"
|
||||
"$shiftMod, 5, movetoworkspace, 5"
|
||||
"$shiftMod, 6, movetoworkspace, 6"
|
||||
"$shiftMod, 7, movetoworkspace, 7"
|
||||
"$shiftMod, 8, movetoworkspace, 8"
|
||||
"$shiftMod, 9, movetoworkspace, 9"
|
||||
"$shiftMod, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
"$mainMod, S, togglespecialworkspace, magic"
|
||||
"$shiftMod, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"$mainMod, mouse_down, workspace, e+1"
|
||||
"$mainMod, mouse_up, workspace, e-1"
|
||||
];
|
||||
|
||||
binde = [
|
||||
# Resize the focused window
|
||||
"$shiftMod, right, resizeactive, 20 0"
|
||||
"$shiftMod, left, resizeactive, -20 0"
|
||||
"$shiftMod, up, resizeactive, 0 -20"
|
||||
"$shiftMod, down, resizeactive, 0 20"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
|
||||
bindl = [
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPause, exec, playerctl play-pause"
|
||||
", XF86AudioPlay, exec, playerctl play-pause"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
|
||||
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
|
||||
];
|
||||
};
|
||||
}
|
17
shared/desktop/home-manager/hyprland/default.nix
Normal file
17
shared/desktop/home-manager/hyprland/default.nix
Normal file
@ -0,0 +1,17 @@
|
||||
# Home configurations for Hyprland. For system configs, see ./shared/modules/hyprland
|
||||
{
|
||||
imports = [
|
||||
./binds.nix
|
||||
./hypridle
|
||||
./hyprlock
|
||||
./hyprpanel
|
||||
./hyprpaper.nix
|
||||
./hyprshot.nix
|
||||
./settings.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = [ "--all" ]; # Import environment into systemd
|
||||
};
|
||||
}
|
38
shared/desktop/home-manager/hyprland/hypridle/default.nix
Normal file
38
shared/desktop/home-manager/hyprland/hypridle/default.nix
Normal file
@ -0,0 +1,38 @@
|
||||
let
|
||||
# Time in seconds
|
||||
lockAfter = 1200;
|
||||
screenOffAfter = 1500;
|
||||
suspendAfter = 7200;
|
||||
in
|
||||
{
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
lock_cmd = "pidof hyprlock || hyprlock"; # Avoid running multiple instances of hyprlock
|
||||
};
|
||||
|
||||
listener = [
|
||||
# Lock
|
||||
{
|
||||
timeout = lockAfter;
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
# Turn off screens
|
||||
{
|
||||
timeout = screenOffAfter;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
# Suspend
|
||||
{
|
||||
timeout = suspendAfter;
|
||||
on-timeout = "systemctl suspend"; # suspend pc
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
|
||||
}
|
87
shared/desktop/home-manager/hyprland/hyprlock/default.nix
Normal file
87
shared/desktop/home-manager/hyprland/hyprlock/default.nix
Normal file
@ -0,0 +1,87 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"$font" = "${theme.nerdFont} Nerd Font";
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "${theme.wallpaper.lockscreen}";
|
||||
}
|
||||
];
|
||||
|
||||
# GENERAL
|
||||
general = {
|
||||
disable_loading_bar = true; # TODO removed in hyprlock 0.8
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
# LAYOUT
|
||||
label = [
|
||||
{
|
||||
text = "$LAYOUT";
|
||||
color = "${theme.textRgb}";
|
||||
font_size = 25;
|
||||
font_family = "$font";
|
||||
position = "30, -30";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
# TIME
|
||||
{
|
||||
text = "$TIME";
|
||||
color = "${theme.textRgb}";
|
||||
font_size = 90;
|
||||
font_family = "$font";
|
||||
position = "-30, 0";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
# DATE
|
||||
{
|
||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
||||
color = "${theme.textRgb}";
|
||||
font_size = 25;
|
||||
font_family = "$font";
|
||||
position = "-30, -150";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
# USER AVATAR
|
||||
image = {
|
||||
path = builtins.toString theme.avatar.image;
|
||||
size = 100;
|
||||
border_color = "${theme.blueRgb}";
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
# INPUT FIELD
|
||||
input-field = {
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
outer_color = "${theme.blueRgb}";
|
||||
inner_color = "${theme.surface0Rgb}";
|
||||
font_color = "${theme.textRgb}";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "<span foreground=\"##${theme.textAlpha}\"> Logged in as <span foreground=\"##${theme.blueAlpha}\">$USER</span></span>";
|
||||
hide_input = false;
|
||||
check_color = "${theme.blueRgb}";
|
||||
fail_color = "${theme.redRgb}";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "${theme.yellowRgb}";
|
||||
position = "0, -47"; # TODO change to use % at 25.05
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
127
shared/desktop/home-manager/hyprland/hyprpanel/default.nix
Normal file
127
shared/desktop/home-manager/hyprland/hyprpanel/default.nix
Normal file
@ -0,0 +1,127 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
common,
|
||||
theme,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
|
||||
|
||||
programs.hyprpanel = {
|
||||
enable = true;
|
||||
# Add hyprpanel to the Hyprland config 'exec-once'.
|
||||
hyprland.enable = true;
|
||||
# Fix the overwrite issue with HyprPanel.
|
||||
overwrite.enable = true;
|
||||
|
||||
# Override the final config with an arbitrary set.
|
||||
# Useful for overriding colors in your selected theme.
|
||||
# TODO fixes theming bugs in recent versions, should be removed when fixed
|
||||
override = {
|
||||
theme = {
|
||||
bar.transparent = true;
|
||||
font = {
|
||||
name = "${theme.nerdFont} NF";
|
||||
size = "15px";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Configure and theme almost all options from the GUI.
|
||||
# Options that require '{}' or '[]' are not yet implemented,
|
||||
# except for the layout above.
|
||||
# See 'https://hyprpanel.com/configuration/settings.html'.
|
||||
# Default: <same as gui>
|
||||
settings = {
|
||||
bar = {
|
||||
clock.format = "%a %b %d %H:%M";
|
||||
customModules.kbLayout.leftClick = "hyprctl switchxkblayout keychron-keychron-k8-pro next";
|
||||
launcher.autoDetectIcon = true;
|
||||
network.label = false;
|
||||
volume =
|
||||
let
|
||||
step = "1";
|
||||
in
|
||||
{
|
||||
scrollDown = "${pkgs.hyprpanel}/bin/hyprpanel 'vol -${step}'";
|
||||
scrollUp = "${pkgs.hyprpanel}/bin/hyprpanel 'vol +${step}'";
|
||||
};
|
||||
workspaces = {
|
||||
show_icons = false;
|
||||
show_numbered = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Configure bar layouts for monitors.
|
||||
layout = {
|
||||
"bar.layouts" = {
|
||||
"*" = {
|
||||
left = [
|
||||
"dashboard"
|
||||
"workspaces"
|
||||
"windowtitle"
|
||||
];
|
||||
middle = [ "media" ];
|
||||
right = [
|
||||
"kbinput"
|
||||
"volume"
|
||||
"network"
|
||||
"systray"
|
||||
"clock"
|
||||
"notifications"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
menus = {
|
||||
clock = {
|
||||
time = {
|
||||
military = true;
|
||||
hideSeconds = true;
|
||||
};
|
||||
weather = {
|
||||
unit = "metric";
|
||||
location = "Bergen, Norway";
|
||||
key = with lib.custom; getSecret (relativeToRoot "shared/secrets/weather-api-key");
|
||||
};
|
||||
};
|
||||
|
||||
dashboard = {
|
||||
directories.enabled = false;
|
||||
powermenu.avatar.image = "${theme.avatar.image}";
|
||||
shortcuts.left = {
|
||||
shortcut1 = {
|
||||
command = common.default.browser;
|
||||
icon = ""; # TODO replace with Zen icon
|
||||
tooltip = "Zen Browser";
|
||||
};
|
||||
shortcut2 = {
|
||||
command = "spotify";
|
||||
icon = "";
|
||||
tooltip = "Spotify";
|
||||
};
|
||||
## shortcut3 === discord
|
||||
## shortcut4 === rofi -show drun
|
||||
};
|
||||
stats.enable_gpu = true;
|
||||
};
|
||||
};
|
||||
|
||||
scalingPriority = "hyprland";
|
||||
|
||||
theme = {
|
||||
bar.transparent = true;
|
||||
font = {
|
||||
name = "${theme.nerdFont} NF";
|
||||
size = "16px";
|
||||
};
|
||||
};
|
||||
|
||||
wallpaper.enable = false;
|
||||
};
|
||||
};
|
||||
}
|
31
shared/desktop/home-manager/hyprland/hyprpaper.nix
Normal file
31
shared/desktop/home-manager/hyprland/hyprpaper.nix
Normal file
@ -0,0 +1,31 @@
|
||||
# Wallpapers
|
||||
{
|
||||
pkgs,
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
defaultWallpaper = builtins.toString theme.wallpaper.default;
|
||||
in
|
||||
{
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
splash_offset = 2.0;
|
||||
|
||||
preload = [
|
||||
defaultWallpaper
|
||||
];
|
||||
|
||||
wallpaper = [
|
||||
",${defaultWallpaper}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
18
shared/desktop/home-manager/hyprland/hyprshot.nix
Normal file
18
shared/desktop/home-manager/hyprland/hyprshot.nix
Normal file
@ -0,0 +1,18 @@
|
||||
{ common, ... }:
|
||||
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = "SUPER";
|
||||
"$shiftMod" = "$mainMod SHIFT";
|
||||
|
||||
env = [
|
||||
"HYPRSHOT_DIR,${common.dir.pictures}/screenshots" # Store screenshots here
|
||||
];
|
||||
|
||||
bind = [
|
||||
"$mainMod, PRINT, exec, hyprshot -m window" # Window
|
||||
", PRINT, exec, hyprshot -m output" # Monitor
|
||||
"$shiftMod, PRINT, exec, hyprshot -m region" # Region
|
||||
];
|
||||
};
|
||||
}
|
132
shared/desktop/home-manager/hyprland/settings.nix
Normal file
132
shared/desktop/home-manager/hyprland/settings.nix
Normal file
@ -0,0 +1,132 @@
|
||||
{
|
||||
lib,
|
||||
common,
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
let
|
||||
app = common.default;
|
||||
in
|
||||
{
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
", preferred, auto, 1"
|
||||
];
|
||||
|
||||
# Autostart
|
||||
exec-once = [
|
||||
app.browser
|
||||
app.terminal
|
||||
"systemctl --user start hyprpolkitagent"
|
||||
];
|
||||
|
||||
env = [
|
||||
"ELECTRON_OZONE_PLATFORM_HINT,auto" # Tell Electron apps to use Wayland
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 5;
|
||||
gaps_out = 20;
|
||||
border_size = 2;
|
||||
"col.active_border" = lib.mkDefault "${theme.mauveRgb} ${theme.tealRgb} 45deg";
|
||||
"col.inactive_border" = lib.mkDefault "rgba(${theme.surface2Alpha}aa)";
|
||||
resize_on_border = true;
|
||||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0;
|
||||
inactive_opacity = 1.0;
|
||||
|
||||
shadow = {
|
||||
enabled = true;
|
||||
range = 4;
|
||||
render_power = 3;
|
||||
color = lib.mkDefault theme.baseRgb;
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 3;
|
||||
passes = 1;
|
||||
|
||||
vibrancy = 0.1696;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes, please :)";
|
||||
|
||||
bezier = [
|
||||
"easeOutQuint,0.23,1,0.32,1"
|
||||
"easeInOutCubic,0.65,0.05,0.36,1"
|
||||
"linear,0,0,1,1"
|
||||
"almostLinear,0.5,0.5,0.75,1.0"
|
||||
"quick,0.15,0,0.1,1"
|
||||
];
|
||||
|
||||
animation = [
|
||||
"global, 1, 10, default"
|
||||
"border, 1, 5.39, easeOutQuint"
|
||||
"windows, 1, 4.79, easeOutQuint"
|
||||
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
|
||||
"windowsOut, 1, 1.49, linear, popin 87%"
|
||||
"fadeIn, 1, 1.73, almostLinear"
|
||||
"fadeOut, 1, 1.46, almostLinear"
|
||||
"fade, 1, 3.03, quick"
|
||||
"layers, 1, 3.81, easeOutQuint"
|
||||
"layersIn, 1, 4, easeOutQuint, fade"
|
||||
"layersOut, 1, 1.5, linear, fade"
|
||||
"fadeLayersIn, 1, 1.79, almostLinear"
|
||||
"fadeLayersOut, 1, 1.39, almostLinear"
|
||||
"workspaces, 1, 1.94, almostLinear, fade"
|
||||
"workspacesIn, 1, 1.21, almostLinear, fade"
|
||||
"workspacesOut, 1, 1.94, almostLinear, fade"
|
||||
];
|
||||
};
|
||||
|
||||
dwindle = {
|
||||
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = true; # You probably want this
|
||||
};
|
||||
|
||||
master.new_status = "master";
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
};
|
||||
|
||||
debug.disable_logs = false;
|
||||
|
||||
input = {
|
||||
kb_layout = common.keymaps.layout;
|
||||
kb_options = common.keymaps.options;
|
||||
follow_mouse = 1;
|
||||
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||
touchpad.natural_scroll = false;
|
||||
};
|
||||
|
||||
gestures.workspace_swipe = false;
|
||||
|
||||
device = {
|
||||
name = "logitech-g502-hero-gaming-mouse";
|
||||
sensitivity = -0.10;
|
||||
};
|
||||
|
||||
windowrulev2 = [
|
||||
# Ignore maximize requests from apps
|
||||
"suppressevent maximize, class:.*"
|
||||
# Fix some dragging issues with XWayland
|
||||
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
||||
# Avoid locking in fullscreen
|
||||
"idleinhibit fullscreen, class:^(*)$"
|
||||
"idleinhibit fullscreen, title:^(*)$"
|
||||
"idleinhibit fullscreen, fullscreen:1"
|
||||
];
|
||||
};
|
||||
}
|
23
shared/desktop/home-manager/kitty.nix
Normal file
23
shared/desktop/home-manager/kitty.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{ common, theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.kitty = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs = {
|
||||
# Transfer shell config to target device
|
||||
fish.shellAliases.ssh = "kitty +kitten ssh";
|
||||
kitty = {
|
||||
enable = common.default.terminal == "kitty";
|
||||
font.name = theme.nerdFont;
|
||||
settings = {
|
||||
background_blur = 5;
|
||||
background_opacity = 0.8;
|
||||
confirm_os_window_close = 0;
|
||||
window_padding_width = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
shared/desktop/home-manager/media/default.nix
Normal file
6
shared/desktop/home-manager/media/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./imv.nix
|
||||
./mpv.nix
|
||||
];
|
||||
}
|
10
shared/desktop/home-manager/media/imv.nix
Normal file
10
shared/desktop/home-manager/media/imv.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.imv = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.imv.enable = true;
|
||||
}
|
27
shared/desktop/home-manager/media/mpv.nix
Normal file
27
shared/desktop/home-manager/media/mpv.nix
Normal file
@ -0,0 +1,27 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.mpv = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish.shellAliases.mpvl = "mpv --profile=loop";
|
||||
mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
hwdec = "auto-safe";
|
||||
vo = "gpu";
|
||||
profile = "gpu-hq";
|
||||
gpu-context = "wayland";
|
||||
};
|
||||
profiles = {
|
||||
loop = {
|
||||
loop-playlist = "inf";
|
||||
loop-file = "inf";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
6
shared/desktop/home-manager/nextcloud.nix
Normal file
6
shared/desktop/home-manager/nextcloud.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
}
|
112
shared/desktop/home-manager/rofi/catppuccin-mocha.rasi
Normal file
112
shared/desktop/home-manager/rofi/catppuccin-mocha.rasi
Normal file
@ -0,0 +1,112 @@
|
||||
* {
|
||||
bg-col: #1e1e2e;
|
||||
bg-col-light: #1e1e2e;
|
||||
border-col: #1e1e2e;
|
||||
selected-col: #1e1e2e;
|
||||
blue: #89b4fa;
|
||||
fg-col: #cdd6f4;
|
||||
fg-col2: #f38ba8;
|
||||
grey: #6c7086;
|
||||
|
||||
width: 750;
|
||||
font: "JetBrainsMono Nerd Font 12";
|
||||
}
|
||||
|
||||
element-text, element-icon, mode-switcher {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
window {
|
||||
height: 360px;
|
||||
border: 3px;
|
||||
border-radius: 5px;
|
||||
border-color: @border-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
children: [prompt,entry];
|
||||
background-color: @bg-col;
|
||||
border-radius: 5px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: @blue;
|
||||
padding: 6px;
|
||||
text-color: @bg-col;
|
||||
border-radius: 3px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
}
|
||||
|
||||
entry {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 10px;
|
||||
text-color: @fg-col;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
listview {
|
||||
border: 0px 0px 0px;
|
||||
padding: 6px 0px 0px;
|
||||
margin: 10px 0px 0px 20px;
|
||||
columns: 2;
|
||||
lines: 5;
|
||||
background-color: @bg-col;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 5px;
|
||||
background-color: @bg-col;
|
||||
text-color: @fg-col;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
size: 25px;
|
||||
}
|
||||
|
||||
element selected {
|
||||
background-color: @selected-col;
|
||||
text-color: @fg-col2;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
spacing: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
background-color: @bg-col-light;
|
||||
text-color: @grey;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
button selected {
|
||||
background-color: @bg-col;
|
||||
text-color: @blue;
|
||||
}
|
||||
|
||||
message {
|
||||
background-color: @bg-col-light;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
textbox {
|
||||
padding: 6px;
|
||||
margin: 20px 0px 0px 20px;
|
||||
text-color: @blue;
|
||||
background-color: @bg-col-light;
|
||||
}
|
21
shared/desktop/home-manager/rofi/config.rasi
Normal file
21
shared/desktop/home-manager/rofi/config.rasi
Normal file
@ -0,0 +1,21 @@
|
||||
configuration {
|
||||
disable-history: false;
|
||||
display-Network: " Network";
|
||||
display-drun: " Apps ";
|
||||
display-run: " Run ";
|
||||
display-window: " Window";
|
||||
display-ssh: " SSH";
|
||||
display-rofimoji: " 😎 Emojis";
|
||||
drun-display-format: "{icon} {name}";
|
||||
font: "JetBrains Mono 12";
|
||||
hide-scrollbar: true;
|
||||
icon-theme: "Oranchelo";
|
||||
location: 0;
|
||||
modi: [run,drun,window,ssh,rofimoji];
|
||||
show-icons: true;
|
||||
sidebar-mode: true;
|
||||
terminal: "kitty";
|
||||
xoffset: 0;
|
||||
yoffset: 0;
|
||||
}
|
||||
@theme "catppuccin-mocha"
|
37
shared/desktop/home-manager/rofi/default.nix
Normal file
37
shared/desktop/home-manager/rofi/default.nix
Normal file
@ -0,0 +1,37 @@
|
||||
# App runner
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
rofi-wayland
|
||||
rofimoji
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
home.file = {
|
||||
".config/rofi/config.rasi".source = ./config.rasi;
|
||||
".config/rofi/scripts/rofimoji".source = "${pkgs.rofimoji}/bin/rofimoji";
|
||||
".local/share/rofi/themes/catppuccin-mocha.rasi".source = ./catppuccin-mocha.rasi;
|
||||
".config/rofimoji.rc".source = ./rofimoji.rc;
|
||||
};
|
||||
|
||||
# TODO Use programs.rofi. Theme is not applied correctly
|
||||
# programs.rofi = {
|
||||
# enable = true;
|
||||
# theme = lib.mkDefault "catppuccin-mocha";
|
||||
# extraConfig = {
|
||||
# modi = "run,drun,window";
|
||||
# icon-theme = "Oranchelo";
|
||||
# show-icons = true;
|
||||
# terminal = "kitty";
|
||||
# drun-display-format = "{icon} {name}";
|
||||
# disable-history = false;
|
||||
# hide-scrollbar = true;
|
||||
# display-drun = " Apps ";
|
||||
# display-run = " Run ";
|
||||
# display-window = " Window";
|
||||
# display-Network = " Network";
|
||||
# sidebar-mode = true;
|
||||
# };
|
||||
# };
|
||||
}
|
3
shared/desktop/home-manager/rofi/rofimoji.rc
Normal file
3
shared/desktop/home-manager/rofi/rofimoji.rc
Normal file
@ -0,0 +1,3 @@
|
||||
action = copy
|
||||
files = [emojis, math]
|
||||
skin-tone = moderate
|
10
shared/desktop/home-manager/shell/btop.nix
Normal file
10
shared/desktop/home-manager/shell/btop.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.btop = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.btop.enable = true;
|
||||
}
|
BIN
shared/desktop/home-manager/shell/cava/cava.png
Normal file
BIN
shared/desktop/home-manager/shell/cava/cava.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
26
shared/desktop/home-manager/shell/cava/default.nix
Normal file
26
shared/desktop/home-manager/shell/cava/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
## Audio visualizer
|
||||
{ pkgs, theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.cava = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
package = pkgs.cava;
|
||||
};
|
||||
|
||||
xdg.desktopEntries.cava = {
|
||||
name = "Cava";
|
||||
genericName = "Audio visualizer";
|
||||
terminal = true;
|
||||
exec = "${pkgs.cava}/bin/cava";
|
||||
icon = ./cava.png; # TODO icon not displaying in runner
|
||||
categories = [
|
||||
"Audio"
|
||||
"AudioVideo"
|
||||
];
|
||||
};
|
||||
}
|
12
shared/desktop/home-manager/shell/default.nix
Normal file
12
shared/desktop/home-manager/shell/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
imports = [
|
||||
./btop.nix
|
||||
./cava
|
||||
./eza.nix
|
||||
./fastfetch.nix
|
||||
./fish.nix
|
||||
./fzf.nix
|
||||
./yazi
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
12
shared/desktop/home-manager/shell/eza.nix
Normal file
12
shared/desktop/home-manager/shell/eza.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
programs = {
|
||||
eza = {
|
||||
enable = true;
|
||||
colors = "always";
|
||||
enableFishIntegration = true;
|
||||
git = true;
|
||||
icons = "always";
|
||||
};
|
||||
fish.shellAliases.ls = "eza";
|
||||
};
|
||||
}
|
63
shared/desktop/home-manager/shell/fastfetch.nix
Normal file
63
shared/desktop/home-manager/shell/fastfetch.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
fish.shellAliases.fetch = "fastfetch";
|
||||
|
||||
fastfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
logo = {
|
||||
source = "${lib.custom.relativeToRoot "shared/assets/Catppuccin.png"}";
|
||||
type = "kitty";
|
||||
height = 18;
|
||||
padding.top = 2;
|
||||
};
|
||||
display.separator = " ";
|
||||
modules =
|
||||
let
|
||||
keyColor = "34";
|
||||
module = type: key: {
|
||||
inherit type key keyColor;
|
||||
};
|
||||
formatModule = type: key: format: {
|
||||
inherit
|
||||
type
|
||||
key
|
||||
format
|
||||
keyColor
|
||||
;
|
||||
};
|
||||
in
|
||||
[
|
||||
"break"
|
||||
"break"
|
||||
{
|
||||
type = "title";
|
||||
keyWidth = 10;
|
||||
}
|
||||
"break"
|
||||
(module "os" " ")
|
||||
(module "kernel" " ")
|
||||
(formatModule "packages" " " "{} (nixpkgs)")
|
||||
(module "shell" " ")
|
||||
(module "terminal" " ")
|
||||
(module "wm" " ")
|
||||
(module "theme" " ")
|
||||
(module "cursor" " ")
|
||||
(module "terminalfont" " ")
|
||||
(module "uptime" " ")
|
||||
(formatModule "datetime" " " "{1}-{3}-{11}")
|
||||
(module "cpu" " ")
|
||||
(module "gpu" " ")
|
||||
(module "sound" " ")
|
||||
(module "lm" " ")
|
||||
"break"
|
||||
"colors"
|
||||
"break"
|
||||
"break"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
55
shared/desktop/home-manager/shell/fish.nix
Normal file
55
shared/desktop/home-manager/shell/fish.nix
Normal file
@ -0,0 +1,55 @@
|
||||
{ pkgs, theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin = {
|
||||
fish = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
# Start starship when creating a new shell
|
||||
interactiveShellInit = ''
|
||||
starship init fish | source
|
||||
${pkgs.fortune}/bin/fortune | ${pkgs.cowsay}/bin/cowsay -f tux
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
# !! to get the previous command
|
||||
# https://github.com/BrewingWeasel/fishbang
|
||||
name = "fishbang";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "BrewingWeasel";
|
||||
repo = "fishbang";
|
||||
rev = "50389667eb9ac79edcff9b987c83e1de8ac93921";
|
||||
hash = "sha256-IneNWyfo29C7FDA5b6pTZRX3HpP6y/dRM6GXuLq2+zc=";
|
||||
};
|
||||
}
|
||||
];
|
||||
shellAliases = {
|
||||
nix-shell = "nix-shell --run fish"; # Start nix-shells using fish
|
||||
};
|
||||
};
|
||||
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
directory.substitutions = {
|
||||
"Documents" = " ";
|
||||
"Downloads" = " ";
|
||||
"Music" = " ";
|
||||
"Pictures" = " ";
|
||||
"Git" = " ";
|
||||
"nextcloud" = " ";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
13
shared/desktop/home-manager/shell/fzf.nix
Normal file
13
shared/desktop/home-manager/shell/fzf.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.fzf = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
}
|
63
shared/desktop/home-manager/shell/yazi/default.nix
Normal file
63
shared/desktop/home-manager/shell/yazi/default.nix
Normal file
@ -0,0 +1,63 @@
|
||||
{
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
catppuccin.yazi = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
accent = "blue";
|
||||
};
|
||||
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
keymap = {
|
||||
manager.prepend_keymap = [
|
||||
{
|
||||
run = "hidden toggle";
|
||||
on = [ "<C-h>" ];
|
||||
desc = "Toggle hidden files";
|
||||
}
|
||||
];
|
||||
};
|
||||
settings = {
|
||||
manager = {
|
||||
ratio = [
|
||||
2
|
||||
4
|
||||
2
|
||||
];
|
||||
sort_by = "natural";
|
||||
sort_sensitive = true;
|
||||
sort_reverse = false;
|
||||
sort_dir_first = true;
|
||||
linemode = "none";
|
||||
show_symlink = true;
|
||||
};
|
||||
|
||||
preview = {
|
||||
image_filter = "lanczos3";
|
||||
image_quality = 90;
|
||||
tab_size = 1;
|
||||
max_width = 600;
|
||||
max_height = 900;
|
||||
cache_dir = "";
|
||||
ueberzug_scale = 1;
|
||||
ueberzug_offset = [
|
||||
0
|
||||
0
|
||||
0
|
||||
0
|
||||
];
|
||||
};
|
||||
|
||||
tasks = {
|
||||
micro_workers = 5;
|
||||
macro_workers = 10;
|
||||
bizarre_retry = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
10
shared/desktop/home-manager/shell/zoxide.nix
Normal file
10
shared/desktop/home-manager/shell/zoxide.nix
Normal file
@ -0,0 +1,10 @@
|
||||
# cd alternative
|
||||
{
|
||||
programs = {
|
||||
fish.shellAliases.cd = "z";
|
||||
zoxide = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
13
shared/desktop/home-manager/sioyek.nix
Normal file
13
shared/desktop/home-manager/sioyek.nix
Normal file
@ -0,0 +1,13 @@
|
||||
# PDF Viewer
|
||||
{ theme, ... }:
|
||||
|
||||
{
|
||||
catppuccin.sioyek = {
|
||||
enable = true;
|
||||
flavor = theme.flavor;
|
||||
};
|
||||
|
||||
programs.sioyek = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
35
shared/desktop/home-manager/spicetify.nix
Normal file
35
shared/desktop/home-manager/spicetify.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
theme,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||
programs.spicetify =
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
adblock
|
||||
fullAppDisplay
|
||||
hidePodcasts
|
||||
shuffle # shuffle+ (special characters are sanitized out of extension names)
|
||||
];
|
||||
enabledCustomApps = with spicePkgs.apps; [
|
||||
newReleases
|
||||
ncsVisualizer
|
||||
];
|
||||
enabledSnippets = with spicePkgs.snippets; [
|
||||
pointer
|
||||
];
|
||||
|
||||
theme = lib.mkForce spicePkgs.themes.catppuccin;
|
||||
colorScheme = lib.mkForce theme.flavor;
|
||||
};
|
||||
}
|
5
shared/desktop/home-manager/zen/default.nix
Normal file
5
shared/desktop/home-manager/zen/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{ pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [ inputs.zen-browser.packages.${system}.default ]; # Beta
|
||||
}
|
Reference in New Issue
Block a user