diff --git a/home-manager/users/nathan/packages/scripts/default.nix b/home-manager/users/nathan/packages/scripts/default.nix index dd3e64f..c6c5722 100644 --- a/home-manager/users/nathan/packages/scripts/default.nix +++ b/home-manager/users/nathan/packages/scripts/default.nix @@ -68,15 +68,16 @@ 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 - hyprctl dispatch exec "setWallpaper ${config.home.homeDirectory}/.config/background" fi + hyprctl dispatch exec "setWallpaper ${config.home.homeDirectory}/.config/background" hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr hyprctl dispatch exec ${pkgs.netbird-ui}/bin/netbird-ui hyprctl dispatch exec ${pkgs.hyprpolkitagent}/libexec/hyprpolkitagent hyprctl setcursor Bibata-Modern-Classic 16 - sleep 3 + sleep 5 hyprctl reload + hyprctl dispatch exec "hyprpanel -q; hyprpanel" hyprctl dispatch exec ${pkgs.pyprland}/bin/pypr toggle calendar #tmux new-session -s hyprland '') diff --git a/home-manager/users/nathan/programs/default.nix b/home-manager/users/nathan/programs/default.nix index bb06206..42dc540 100644 --- a/home-manager/users/nathan/programs/default.nix +++ b/home-manager/users/nathan/programs/default.nix @@ -1,19 +1,19 @@ { config, lib, pkgs, inputs, ... }: { imports = [ - ./ags ./git ./nh ./hyprland + ./hyprpanel ./terminal ./rofi ./pywal - ./swaylock + ./hyprlock ./calcurse ./firefox ]; - config = { + config = lib.mkIf (config.homeconfig.host != "android") { home.packages = lib.mkIf (!config.homeconfig.wal.enable) [ inputs.nixvim.packages.${pkgs.system}.default diff --git a/home-manager/users/nathan/programs/firefox/default.nix b/home-manager/users/nathan/programs/firefox/default.nix index 7367639..28425b3 100644 --- a/home-manager/users/nathan/programs/firefox/default.nix +++ b/home-manager/users/nathan/programs/firefox/default.nix @@ -31,6 +31,7 @@ search = { default = "ddg"; privateDefault = "ddg"; + force = true; }; bookmarks = { force = true; diff --git a/home-manager/users/nathan/programs/hyprland/default.nix b/home-manager/users/nathan/programs/hyprland/default.nix index 99fea6b..dc13f49 100644 --- a/home-manager/users/nathan/programs/hyprland/default.nix +++ b/home-manager/users/nathan/programs/hyprland/default.nix @@ -15,6 +15,18 @@ 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 = { enable = true; @@ -24,18 +36,29 @@ variables = [ "--all" ]; }; - extraConfig = let - monitor = if config.homeconfig.host == "laptop" then '' - monitor=eDP-1,1920x1080@60,0x0,1 + extraConfig = (if config.homeconfig.host == "laptop" then '' + monitor=eDP-1,1920x1080@300,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 '' monitor=HDMI-A-2,1920x1080@60,0x0,1 monitor=HEADLESS-2,1920x1080@60,0x0,1 exec-once=hyprctl output create headless HEADLESS-2 exec-once=hyprctl keyword monitor HDMI-A-2,disable exec-once=${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 -o HEADLESS-2 - '' else ''''; - in monitor + '' - source = /home/nathan/.config/hypr/main.conf + '' else if config.homeconfig.host == "container" then '' + monitor=HEADLESS-2,1920x1080@60,0x0,1 + 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 ''; }; diff --git a/home-manager/users/nathan/programs/hyprlock/default.nix b/home-manager/users/nathan/programs/hyprlock/default.nix new file mode 100644 index 0000000..5125e52 --- /dev/null +++ b/home-manager/users/nathan/programs/hyprlock/default.nix @@ -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; + }; + }; +} diff --git a/home-manager/users/nathan/programs/hyprpanel/default.nix b/home-manager/users/nathan/programs/hyprpanel/default.nix new file mode 100644 index 0000000..afe4ce2 --- /dev/null +++ b/home-manager/users/nathan/programs/hyprpanel/default.nix @@ -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; + + }; + }; +} diff --git a/home-manager/users/nathan/programs/pywal/default.nix b/home-manager/users/nathan/programs/pywal/default.nix index 04b8880..88583a8 100644 --- a/home-manager/users/nathan/programs/pywal/default.nix +++ b/home-manager/users/nathan/programs/pywal/default.nix @@ -8,7 +8,6 @@ config = lib.mkIf config.homeconfig.wal.enable { home.packages = with pkgs; [ - inputs.nixvim.packages.${pkgs.system}.pywal pywal16 diff --git a/home-manager/users/nathan/programs/swaylock/default.nix b/home-manager/users/nathan/programs/swaylock/default.nix deleted file mode 100644 index d2841fb..0000000 --- a/home-manager/users/nathan/programs/swaylock/default.nix +++ /dev/null @@ -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 ]; - }; -} diff --git a/home-manager/users/nathan/programs/terminal/bash/default.nix b/home-manager/users/nathan/programs/terminal/bash/default.nix index fd1a31b..da815da 100644 --- a/home-manager/users/nathan/programs/terminal/bash/default.nix +++ b/home-manager/users/nathan/programs/terminal/bash/default.nix @@ -5,7 +5,6 @@ programs.bash = { enable = true; enableCompletion = true; - blesh.enable = true; shellAliases = { 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 eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" '') else (lib.mkBefore '' diff --git a/home-manager/users/nathan/programs/terminal/default.nix b/home-manager/users/nathan/programs/terminal/default.nix index 52de2fc..0aefcad 100644 --- a/home-manager/users/nathan/programs/terminal/default.nix +++ b/home-manager/users/nathan/programs/terminal/default.nix @@ -2,11 +2,14 @@ imports = [ ./bat + ./bash ./eza ./fzf ./tmux ./kitty ./zoxide ./zsh + ./ssh + ./ohmyposh ]; } diff --git a/home-manager/users/nathan/programs/terminal/ohmyposh/default.nix b/home-manager/users/nathan/programs/terminal/ohmyposh/default.nix new file mode 100644 index 0000000..29d49be --- /dev/null +++ b/home-manager/users/nathan/programs/terminal/ohmyposh/default.nix @@ -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}" + ''; +} diff --git a/home-manager/users/nathan/programs/terminal/ssh/default.nix b/home-manager/users/nathan/programs/terminal/ssh/default.nix new file mode 100644 index 0000000..3a9c962 --- /dev/null +++ b/home-manager/users/nathan/programs/terminal/ssh/default.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, ... }: { + + programs.ssh = { + + enable = true; + + }; +} diff --git a/home-manager/users/nathan/programs/terminal/zsh/default.nix b/home-manager/users/nathan/programs/terminal/zsh/default.nix index bd75dd6..be18b6a 100644 --- a/home-manager/users/nathan/programs/terminal/zsh/default.nix +++ b/home-manager/users/nathan/programs/terminal/zsh/default.nix @@ -1,9 +1,5 @@ { config, lib, pkgs, ... }: { - home.packages = with pkgs; [ - oh-my-posh - ]; - programs.zsh = { enable = true; @@ -23,6 +19,8 @@ vi = "nvim"; vim = "nvim"; + python = "python3.13"; + python3 = "python3.13"; }; history = { @@ -31,128 +29,5 @@ ignoreSpace = 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}" - ''; } diff --git a/home-manager/users/nathan/services/default.nix b/home-manager/users/nathan/services/default.nix index 4ebe959..d2e0900 100644 --- a/home-manager/users/nathan/services/default.nix +++ b/home-manager/users/nathan/services/default.nix @@ -1,6 +1,5 @@ { ... }: { imports = [ ./mpd - ./wayvnc ]; } diff --git a/home-manager/users/nathan/services/wayvnc/default.nix b/home-manager/users/nathan/services/wayvnc/default.nix deleted file mode 100644 index 6755e50..0000000 --- a/home-manager/users/nathan/services/wayvnc/default.nix +++ /dev/null @@ -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; - }; - }; - }; -}