mirror of
https://github.com/librephoenix/nixos-config
synced 2025-07-06 06:52:13 +05:30
Boilerplate reduction (I understand strings in nix now!)
This commit is contained in:
parent
c7f3327147
commit
b4a0d72a92
17 changed files with 136 additions and 144 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, myName, myDotfilesDir, ... }:
|
||||
{ config, lib, pkgs, username, dotfilesDir, ... }:
|
||||
|
||||
let
|
||||
# This sets up my "phoenix" script with my configuration paths
|
||||
|
@ -6,12 +6,12 @@ let
|
|||
myPhoenixScript = ''
|
||||
if [ "$1" = "sync" ]; then
|
||||
if [ "$2" != "user" ]; then
|
||||
pushd ''+myDotfilesDir+'';
|
||||
pushd ''+dotfilesDir+'';
|
||||
sudo nixos-rebuild switch --flake .#;
|
||||
popd;
|
||||
elif [ "2" != "system" ]; then
|
||||
pushd ''+myDotfilesDir+'';
|
||||
home-manager switch --flake .#''+myName+'';
|
||||
pushd ''+dotfilesDir+'';
|
||||
home-manager switch --flake .#''+username+'';
|
||||
popd;
|
||||
which xmobar &> /dev/null && killall xmobar;
|
||||
which xmonad &> /dev/null && xmonad --recompile && xmonad --restart;
|
||||
|
@ -19,7 +19,7 @@ let
|
|||
[ -f ~/.fehbg-stylix ] &> /dev/null && ~/.fehbg-stylix;
|
||||
fi
|
||||
elif [ "$1" = "update" ]; then
|
||||
pushd ''+myDotfilesDir+'';
|
||||
pushd ''+dotfilesDir+'';
|
||||
nix flake update;
|
||||
popd;
|
||||
if [ -d ~/.emacs.d/eaf/app/browser ]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue