slightly tweaked home/scripts

This commit is contained in:
serenity-F 2024-12-27 01:31:27 +10:00
parent 24de6a4f9e
commit 6378d89214
4 changed files with 12 additions and 35 deletions

View file

@ -13,16 +13,11 @@ in {
## Import common desktop configs ## Import common desktop configs
./hyprcursor.nix ./hyprcursor.nix
./hyprlock.nix ./hyprlock.nix
#./keybinds.nix
#./xdg-mime.nix
./wlogout.nix ./wlogout.nix
./waybar.nix ./waybar.nix
./dunst.nix ./dunst.nix
./wofi.nix ./wofi.nix
./sway.nix ./sway.nix
## Import misc. desktop configs
../scripts/automount
../scripts ../scripts
]; ];

View file

@ -1,4 +1,4 @@
{ self, inputs, outputs, lib, config, pkgs, ... }: { lib, pkgs, ... }:
with lib; with lib;
with pkgs; with pkgs;
let let
@ -42,7 +42,7 @@ in {
settings = { }; settings = { };
}; };
config = rec { config = {
output = { output = {
eDP-1 = { eDP-1 = {

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./automount
./startup.nix ./startup.nix
./desktop.nix ./desktop.nix
./nix-utils.nix ./nix-utils.nix

View file

@ -1,25 +1,15 @@
{ pkgs, config, ... }: { pkgs, config, flakePath, ... }:
let let
homedir = config.home.homeDirectory; hostname = config.system.nixos.distroId;
#hostname = config.system.nixos.distroId;
nixsyu = pkgs.writeShellScriptBin "nixsyu" '' nixsyu = pkgs.writeShellScriptBin "nixsyu" ''
cd {$homedir}/flakes/nixdots && sudo nix flake update && sudo nixos-rebuild switch --upgrade-all --flake {$homedir}/flakes/nixdots#{$hostname} --show-trace && sudo nix-collect-garbage -d && sudo nix-store --optimise cd ${flakePath} && sudo nix flake update && sudo nixos-rebuild switch --upgrade-all --flake .#${hostname} --show-trace && sudo nix-collect-garbage -d && sudo nix-store --optimise
''; '';
nixrb = pkgs.writeShellScriptBin "nixrb" '' nixrb = pkgs.writeShellScriptBin "nixrb" ''
sudo nixos-rebuild switch --flake {$homedir}/flakes/nixdots#{$hostname} cd ${flakePath} && sudo nixos-rebuild switch --flake .#${hostname} --show-trace
'';
nixrbt = pkgs.writeShellScriptBin "nixrbt" ''
sudo nixos-rebuild switch --flake {$homedir}/flakes/nixdots#{$hostname} --show-trace
'';
nixupg = pkgs.writeShellScriptBin "nixupg" ''
sudo nixos-rebuild switch --upgrade-all --flake {$homedir}/flakes/nixdots#{$hostname} --show-trace
''; '';
nixcb = pkgs.writeShellScriptBin "nixcb" '' nixcb = pkgs.writeShellScriptBin "nixcb" ''
@ -27,29 +17,20 @@ let
''; '';
nixgc = pkgs.writeShellScriptBin "nixgc" '' nixgc = pkgs.writeShellScriptBin "nixgc" ''
cd {$homedir}/flakes/nixdots/nixos && sudo nix-collect-garbage -d cd ${flakePath} && sudo nix-collect-garbage -d
''; '';
nixu = pkgs.writeShellScriptBin "nixu" '' nixu = pkgs.writeShellScriptBin "nixu" ''
cd {$homedir}/flakes/nixdots && sudo nix flake update cd ${flakePath} && sudo nix flake update
'';
nixe = pkgs.writeShellScriptBin "nixe" ''
$EDITOR {$homedir}/flakes/nixdots
''; '';
in { in {
home.packages = [
home.packages = with pkgs; [
nixsyu nixsyu
nixrbt
nixrb nixrb
nixupg
nixu
nixe
nixgc
nixcb nixcb
nixgc
nixu
]; ];
} }