(desktop) Gen 446: Cleaned up broken inputs, altered 'nixswitch' to be interchangeable between hosts, added 'host' attr

This commit is contained in:
pagedMov
2024-10-13 02:15:56 -04:00
parent 1379e5a8ef
commit 9372e3af0d
14 changed files with 124 additions and 41 deletions

View File

@@ -1,25 +0,0 @@
{ nur, self, inputs, username, system, ... }:
{
imports =
[ (import ./programs/btop.nix) ]
++ [ (import ./programs/yazi.nix) ]
++ [ (import ./programs/kitty.nix) ]
++ [ (import ./programs/fuzzel.nix) ]
++ [ (import ./programs/eza.nix) ]
++ [ (import ./programs/cava.nix) ]
++ [ (import ./programs/bat.nix) ]
++ [ (import ./environment/gtk.nix) ]
++ [ (import ./environment/spicetify.nix) ]
++ [ (import ./environment/starship.nix) ]
++ [ (import ./environment/userpkgs.nix) ]
++ [ (import ./environment/zshell.nix) ]
++ [ (import ./firefox/firefox.nix) ]
++ [ (import ./hyprland) ]
++ [ (import ./scripts) ]
++ [ (import ./swaync/swaync.nix) ]
++ [ (import ./waybar) ];
}

25
modules/home/desktop.nix Normal file
View File

@@ -0,0 +1,25 @@
{ host, nur, self, inputs, username, config, ... }:
{
imports =
[ (import ./programs/btop.nix) ]
++ [ (import ./programs/yazi.nix) ]
++ [ (import ./programs/kitty.nix) ]
++ [ (import ./programs/fuzzel.nix) ]
++ [ (import ./programs/eza.nix) ]
++ [ (import ./programs/cava.nix) ]
++ [ (import ./programs/bat.nix) ]
++ [ (import ./environment/gtk.nix) ]
++ [ (import ./environment/spicetify.nix) ]
++ [ (import ./environment/starship.nix) ]
++ [ (import ./environment/desktop_userpkgs.nix) ]
++ [ (import ./environment/zshell.nix) ]
++ [ (import ./firefox/firefox.nix) ]
++ [ (import ./hyprland) ]
++ [ (import ./scripts ) ]
++ [ (import ./swaync/swaync.nix) ]
++ [ (import ./waybar) ];
}

View File

@@ -0,0 +1,34 @@
{ pkgs, inputs, ... }:
let
nvim = inputs.nvim.packages."x86_64-linux".default;
toilet = inputs.toilet.packages."x86_64-linux".default;
in
{
home.packages = with pkgs; [
gtk3
uhk-agent
sqlite
starship
zathura
imagemagick
yt-dlp
vlc
speedtest-cli
vesktop
obs-studio
neovide
chromium
zsh
zsh-syntax-highlighting
zsh-history-substring-search
zsh-autosuggestions
rustup
libreoffice
handbrake
gtrash
ripgrep
nvim
toilet
python3
];
}

25
modules/home/laptop.nix Normal file
View File

@@ -0,0 +1,25 @@
{ host, nur, self, inputs, username, config, ... }:
{
imports =
[ (import ./programs/btop.nix) ]
++ [ (import ./programs/yazi.nix) ]
++ [ (import ./programs/kitty.nix) ]
++ [ (import ./programs/fuzzel.nix) ]
++ [ (import ./programs/eza.nix) ]
++ [ (import ./programs/cava.nix) ]
++ [ (import ./programs/bat.nix) ]
++ [ (import ./environment/gtk.nix) ]
++ [ (import ./environment/spicetify.nix) ]
++ [ (import ./environment/starship.nix) ]
++ [ (import ./environment/laptop_userpkgs.nix) ]
++ [ (import ./environment/zshell.nix) ]
++ [ (import ./firefox/firefox.nix) ]
++ [ (import ./hyprland) ]
++ [ (import ./scripts ) ]
++ [ (import ./swaync/swaync.nix) ]
++ [ (import ./waybar) ];
}

View File

@@ -1,4 +1,4 @@
{ self, pkgs, ... }:
{ host, self, pkgs, ... }:
let
compress = (import ./commands/compress.nix { self = self; pkgs = pkgs;});
@@ -13,10 +13,8 @@ let
homep = (import ./nix/homep.nix { self = self; pkgs = pkgs;});
homer = (import ./nix/homer.nix { self = self; pkgs = pkgs;});
nsp = (import ./nix/nsp.nix { self = self; pkgs = pkgs;});
nixswitch = (import ./nix/nixswitch.nix { self = self; pkgs = pkgs;});
nixr = (import ./nix/nixr.nix { self = self; pkgs = pkgs;});
nixp = (import ./nix/nixp.nix { self = self; pkgs = pkgs;});
nixcommit = (import ./nix/nixcommit.nix { self = self; pkgs = pkgs;});
lofi = (import ./wm-controls/lofi.nix { self = self; pkgs = pkgs;});
music = (import ./wm-controls/music.nix { self = self; pkgs = pkgs;});
shutdown-script = (import ./wm-controls/shutdown-script.nix { self = self; pkgs = pkgs;});
@@ -25,6 +23,8 @@ let
toggle_float = (import ./wm-controls/toggle_float.nix { self = self; pkgs = pkgs;});
toggle_oppacity = (import ./wm-controls/toggle_oppacity.nix { self = self; pkgs = pkgs;});
toggle_waybar = (import ./wm-controls/toggle_waybar.nix { self = self; pkgs = pkgs;});
nixswitch = (import ./nix/nixswitch.nix { host = host; self = self; pkgs = pkgs;});
nixcommit = (import ./nix/nixcommit.nix { host = host; self = self; pkgs = pkgs;});
in
{
home.packages = [

View File

@@ -1,4 +1,4 @@
{ self, pkgs }:
{ self, pkgs, host}:
pkgs.writeShellScriptBin "nixcommit" (''
@@ -22,7 +22,7 @@ if [ -n "$diffcheck" ]; then
exit
fi
git add .
git commit -m "Gen $gen: $1"
git commit -m "(${host}) Gen $gen: $1"
git push
scheck && runbg aplay ${self}/media/sound/gitpush.wav
builtin cd - || exit

View File

@@ -1,4 +1,4 @@
{ self, pkgs }:
{ host, self, pkgs }:
pkgs.writeShellScriptBin "nixswitch" (''
@@ -8,11 +8,11 @@ scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
builtin cd "$HOME/sysflakes" || exit
nix flake update
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse-desktop"
sudo nixos-rebuild switch --flake "$HOME/sysflakes#${host}"
if [ $? -eq 0 ]; then
scheck && runbg aplay ${self}/media/sound/update.wav
else
scheck && runbg aplay ${self}/media/sound/error.wav
fi
builtin cd "$OLDPWD" || exit
'')
'')