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
./hyprcursor.nix
./hyprlock.nix
#./keybinds.nix
#./xdg-mime.nix
./wlogout.nix
./waybar.nix
./dunst.nix
./wofi.nix
./sway.nix
## Import misc. desktop configs
../scripts/automount
../scripts
];

View file

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

View file

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

View file

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