scripts
This commit is contained in:
@@ -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
|
||||
'')
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
search = {
|
||||
default = "ddg";
|
||||
privateDefault = "ddg";
|
||||
force = true;
|
||||
};
|
||||
bookmarks = {
|
||||
force = true;
|
||||
|
||||
@@ -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
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
18
home-manager/users/nathan/programs/hyprlock/default.nix
Normal file
18
home-manager/users/nathan/programs/hyprlock/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
home-manager/users/nathan/programs/hyprpanel/default.nix
Normal file
15
home-manager/users/nathan/programs/hyprpanel/default.nix
Normal 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;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -8,7 +8,6 @@
|
||||
config = lib.mkIf config.homeconfig.wal.enable {
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
inputs.nixvim.packages.${pkgs.system}.pywal
|
||||
|
||||
pywal16
|
||||
|
||||
@@ -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 ];
|
||||
};
|
||||
}
|
||||
@@ -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 ''
|
||||
|
||||
@@ -2,11 +2,14 @@
|
||||
|
||||
imports = [
|
||||
./bat
|
||||
./bash
|
||||
./eza
|
||||
./fzf
|
||||
./tmux
|
||||
./kitty
|
||||
./zoxide
|
||||
./zsh
|
||||
./ssh
|
||||
./ohmyposh
|
||||
];
|
||||
}
|
||||
|
||||
132
home-manager/users/nathan/programs/terminal/ohmyposh/default.nix
Normal file
132
home-manager/users/nathan/programs/terminal/ohmyposh/default.nix
Normal 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}"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ config, lib, pkgs, ... }: {
|
||||
|
||||
programs.ssh = {
|
||||
|
||||
enable = true;
|
||||
|
||||
};
|
||||
}
|
||||
@@ -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}"
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./mpd
|
||||
./wayvnc
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user