This commit is contained in:
2025-08-31 13:27:12 -05:00
parent 9698873c0b
commit 85c96cd78b
15 changed files with 219 additions and 190 deletions

View File

@@ -68,15 +68,16 @@
if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ${config.home.homeDirectory}/.config/background cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ${config.home.homeDirectory}/.config/background
chmod 600 ${config.home.homeDirectory}/.config/background chmod 600 ${config.home.homeDirectory}/.config/background
hyprctl dispatch exec "setWallpaper ${config.home.homeDirectory}/.config/background"
fi fi
hyprctl dispatch exec "setWallpaper ${config.home.homeDirectory}/.config/background"
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr
hyprctl dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui hyprctl dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui
hyprctl dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent hyprctl dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent
hyprctl setcursor Bibata-Modern-Classic 16 hyprctl setcursor Bibata-Modern-Classic 16
sleep 3 sleep 5
hyprctl reload hyprctl reload
hyprctl dispatch exec "hyprpanel -q; hyprpanel"
hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar
#tmux new-session -s hyprland #tmux new-session -s hyprland
'') '')

View File

@@ -1,19 +1,19 @@
{ config, lib, pkgs, inputs, ... }: { { config, lib, pkgs, inputs, ... }: {
imports = [ imports = [
./ags
./git ./git
./nh ./nh
./hyprland ./hyprland
./hyprpanel
./terminal ./terminal
./rofi ./rofi
./pywal ./pywal
./swaylock ./hyprlock
./calcurse ./calcurse
./firefox ./firefox
]; ];
config = { config = lib.mkIf (config.homeconfig.host != "android") {
home.packages = lib.mkIf (!config.homeconfig.wal.enable) [ home.packages = lib.mkIf (!config.homeconfig.wal.enable) [
inputs.nixvim.packages.${pkgs.system}.default inputs.nixvim.packages.${pkgs.system}.default

View File

@@ -31,6 +31,7 @@
search = { search = {
default = "ddg"; default = "ddg";
privateDefault = "ddg"; privateDefault = "ddg";
force = true;
}; };
bookmarks = { bookmarks = {
force = true; force = true;

View File

@@ -15,6 +15,18 @@
pyprland pyprland
]; ];
home.activation.extraHyprFile = lib.hm.dag.entryAfter ["writeBoundary"] ''
if [[ ! -f ${config.home.homeDirectory}/.config/hypr/otf.conf ]]; then
touch ${config.home.homeDirectory}/.config/hypr/otf.conf
fi
if [[ ! -f ${config.home.homeDirectory}/.config/background ]]; then
cp ${config.home.homeDirectory}/Pictures/Wallpaper/bluescape.jpg ${config.home.homeDirectory}/.config/background
chmod 600 ${config.home.homeDirectory}/.config/background
fi
'';
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
@@ -24,18 +36,29 @@
variables = [ "--all" ]; variables = [ "--all" ];
}; };
extraConfig = let extraConfig = (if config.homeconfig.host == "laptop" then ''
monitor = if config.homeconfig.host == "laptop" then '' monitor=eDP-1,1920x1080@300,0x0,1
monitor=eDP-1,1920x1080@60,0x0,1 bind = CTRL SHIFT, XF86Launch2, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
'' else if config.homeconfig.host == "homebox" then '' '' else if config.homeconfig.host == "homebox" then ''
monitor=HDMI-A-2,1920x1080@60,0x0,1 monitor=HDMI-A-2,1920x1080@60,0x0,1
monitor=HEADLESS-2,1920x1080@60,0x0,1 monitor=HEADLESS-2,1920x1080@60,0x0,1
exec-once=hyprctl output create headless HEADLESS-2 exec-once=hyprctl output create headless HEADLESS-2
exec-once=hyprctl keyword monitor HDMI-A-2,disable exec-once=hyprctl keyword monitor HDMI-A-2,disable
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2 exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
'' else ''''; '' else if config.homeconfig.host == "container" then ''
in monitor + '' monitor=HEADLESS-2,1920x1080@60,0x0,1
source = /home/nathan/.config/hypr/main.conf exec-once=hyprctl output create headless HEADLESS-2
exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2
'' else ''
monitor= , prefered, auto, 1
'') + (if config.homeconfig.hyprpanel.enable then ''
bind = , Print, exec, bash -c ${pkgs.hyprpanel}/share/scripts/screenshot.sh"
'' else ''
bind = , Print, exec, grim -g "$(slurp)"
'') + ''
source = ${config.home.homeDirectory}/.config/hypr/main.conf
exec-shutdown = if [[ -f ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid ]]; then rm ${config.home.homeDirectory}/.local/share/calcurse/.calcurse.pid; fi
''; '';
}; };

View File

@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }: {
options.homeconfig.hyprlock.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.hyprlock.enable {
programs.hyprlock = {
enable = true;
};
services.hypridle = {
enable = true;
};
};
}

View File

@@ -0,0 +1,15 @@
{ config, lib, ... }: {
options.homeconfig.hyprpanel.enable = with lib; mkOption {
type = with types; bool;
default = false;
};
config = lib.mkIf config.homeconfig.hyprpanel.enable {
programs.hyprpanel = {
enable = true;
};
};
}

View File

@@ -8,7 +8,6 @@
config = lib.mkIf config.homeconfig.wal.enable { config = lib.mkIf config.homeconfig.wal.enable {
home.packages = with pkgs; [ home.packages = with pkgs; [
inputs.nixvim.packages.${pkgs.system}.pywal inputs.nixvim.packages.${pkgs.system}.pywal
pywal16 pywal16

View File

@@ -1,12 +0,0 @@
{ config, lib, pkgs, ... }: {
options.homeconfig.swaylock.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
config = lib.mkIf config.homeconfig.swaylock.enable {
home.packages = with pkgs; [ swaylock-effects ];
};
}

View File

@@ -5,7 +5,6 @@
programs.bash = { programs.bash = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
blesh.enable = true;
shellAliases = { shellAliases = {
ls = "eza"; ls = "eza";
@@ -18,7 +17,11 @@
}; };
initContent = if config.homeconfig.wal.enable then (lib.mkBefore '' bashrcExtra = ''
source ${pkgs.blesh}/share/blesh/ble.sh
'';
initExtra = if config.homeconfig.wal.enable then (lib.mkBefore ''
cat ${config.home.homeDirectory}/.cache/wal/sequences cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
'') else (lib.mkBefore '' '') else (lib.mkBefore ''

View File

@@ -2,11 +2,14 @@
imports = [ imports = [
./bat ./bat
./bash
./eza ./eza
./fzf ./fzf
./tmux ./tmux
./kitty ./kitty
./zoxide ./zoxide
./zsh ./zsh
./ssh
./ohmyposh
]; ];
} }

View File

@@ -0,0 +1,132 @@
{ config, lib, pkgs, ... }: {
home.packages = with pkgs; [
oh-my-posh
];
programs.zsh = {
initContent = if config.homeconfig.wal.enable then (lib.mkBefore ''
cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
'') else (lib.mkBefore ''
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
'');
};
home.file.".config/wal/templates/ohmyposh.toml".text = ''
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
final_space = true
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'os'
style = 'diamond'
trailing_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
template = ' {{{{ .Icon }}}} '
[[blocks.segments]]
type = 'session'
style = 'diamond'
trailing_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
[[blocks.segments]]
type = 'path'
style = 'diamond'
trailing_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .Path }}}}'
[blocks.segments.properties]
style = 'full'
[[blocks]]
type = 'prompt'
overflow = 'hidden'
alignment = 'right'
[[blocks.segments]]
type = 'executiontime'
style = 'diamond'
leading_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .FormattedMs }}}}'
[[blocks.segments]]
type = 'time'
style = 'diamond'
leading_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
[[blocks.segments]]
type = 'shell'
style = 'diamond'
leading_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'text'
style = 'plain'
background = 'transparent'
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[transient_prompt]
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
background = 'transparent'
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[secondary_prompt]
background = 'transparent'
forground = 'p:c14'
template = " "
[palette]
c0 = "{color0}"
c1 = "{color1}"
c2 = "{color2}"
c3 = "{color3}"
c4 = "{color4}"
c5 = "{color5}"
c6 = "{color6}"
c7 = "{color7}"
c8 = "{color8}"
c9 = "{color9}"
c10 = "{color10}"
c11 = "{color11}"
c12 = "{color12}"
c13 = "{color13}"
c14 = "{color14}"
c15 = "{color15}"
'';
}

View File

@@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }: {
programs.ssh = {
enable = true;
};
}

View File

@@ -1,9 +1,5 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
home.packages = with pkgs; [
oh-my-posh
];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@@ -23,6 +19,8 @@
vi = "nvim"; vi = "nvim";
vim = "nvim"; vim = "nvim";
python = "python3.13";
python3 = "python3.13";
}; };
history = { history = {
@@ -31,128 +29,5 @@
ignoreSpace = true; ignoreSpace = true;
share = true; share = true;
}; };
initContent = if config.homeconfig.wal.enable then (lib.mkBefore ''
cat ${config.home.homeDirectory}/.cache/wal/sequences
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)"
'') else (lib.mkBefore ''
eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)"
'');
}; };
home.file.".config/wal/templates/ohmyposh.toml".text = ''
#:schema https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json
version = 2
final_space = true
console_title_template = '{{{{ .Shell }}}} in {{{{ .Folder }}}}'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'os'
style = 'diamond'
trailing_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
template = ' {{{{ .Icon }}}} '
[[blocks.segments]]
type = 'session'
style = 'diamond'
trailing_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
template = '{{{{ .UserName }}}}@{{{{ .HostName }}}}'
[[blocks.segments]]
type = 'path'
style = 'diamond'
trailing_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .Path }}}}'
[blocks.segments.properties]
style = 'full'
[[blocks]]
type = 'prompt'
overflow = 'hidden'
alignment = 'right'
[[blocks.segments]]
type = 'executiontime'
style = 'diamond'
leading_diamond = ''
background = 'p:c4'
foreground = 'p:c13'
template = '{{{{ .FormattedMs }}}}'
[[blocks.segments]]
type = 'time'
style = 'diamond'
leading_diamond = ''
background = 'p:c2'
foreground = 'p:c14'
[[blocks.segments]]
type = 'shell'
style = 'diamond'
leading_diamond = ''
background = 'p:c1'
foreground = 'p:c12'
[[blocks]]
type = 'prompt'
alignment = 'left'
newline = true
[[blocks.segments]]
type = 'text'
style = 'plain'
background = 'transparent'
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[transient_prompt]
foreground_templates = [
"{{{{ if gt .Code 0 }}}}p:c13{{{{end}}}}",
"{{{{ if eq .Code 0 }}}}p:c14{{{{end}}}}",
]
background = 'transparent'
template = "{{{{ if gt .Code 0 }}}}! {{{{else}}}} {{{{end}}}}"
[secondary_prompt]
background = 'transparent'
forground = 'p:c14'
template = " "
[palette]
c0 = "{color0}"
c1 = "{color1}"
c2 = "{color2}"
c3 = "{color3}"
c4 = "{color4}"
c5 = "{color5}"
c6 = "{color6}"
c7 = "{color7}"
c8 = "{color8}"
c9 = "{color9}"
c10 = "{color10}"
c11 = "{color11}"
c12 = "{color12}"
c13 = "{color13}"
c14 = "{color14}"
c15 = "{color15}"
'';
} }

View File

@@ -1,6 +1,5 @@
{ ... }: { { ... }: {
imports = [ imports = [
./mpd ./mpd
./wayvnc
]; ];
} }

View File

@@ -1,36 +0,0 @@
{ config, lib, pkgs, inputs, ... }: {
options.homeconfig.wayvnc.enable = lib.options.mkOption {
type = lib.types.bool;
default = false;
};
disabledModules = [
];
imports = [
(import "${inputs.home-manager-us}/modules/services/wayvnc.nix" {
inherit config;
inherit lib;
pkgs = (import inputs.nixpkgs-us { system = "x86_64-linux"; });
})
];
config = lib.mkIf config.homeconfig.wayvnc.enable {
home.packages = with pkgs; [
novnc
];
services.wayvnc = {
enable = true;
autoStart = true;
settings = {
address = "0.0.0.0";
port = 5900;
};
};
};
}