tweaked home/scripts

This commit is contained in:
serenity-F 2024-12-27 01:37:40 +10:00
parent eb37dc4b82
commit c0119e640c
2 changed files with 6 additions and 4 deletions

View file

@ -1,9 +1,6 @@
{ pkgs, config, flakePath, ... }:
{ pkgs, hostname, flakePath, ... }:
let
hostname = "${config.networking.hostName}";
nixsyu = pkgs.writeShellScriptBin "nixsyu" ''
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
'';

View file

@ -1,5 +1,9 @@
{ inputs, outputs, pkgs, flakePath, disksPath, primaryUser, ... }:
let
hostname = "${config.networking.hostName}";
in
{
imports = [
@ -48,6 +52,7 @@
extraSpecialArgs = { # passes in specialArgs from flake.nix
inherit inputs outputs;
inherit primaryUser;
inherit hostname;
inherit flakePath disksPath;
};
users = {