tweaked home/scripts
This commit is contained in:
parent
eb37dc4b82
commit
c0119e640c
2 changed files with 6 additions and 4 deletions
|
|
@ -1,9 +1,6 @@
|
||||||
{ pkgs, config, flakePath, ... }:
|
{ pkgs, hostname, flakePath, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
hostname = "${config.networking.hostName}";
|
|
||||||
|
|
||||||
nixsyu = pkgs.writeShellScriptBin "nixsyu" ''
|
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
|
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
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
{ inputs, outputs, pkgs, flakePath, disksPath, primaryUser, ... }:
|
{ inputs, outputs, pkgs, flakePath, disksPath, primaryUser, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
hostname = "${config.networking.hostName}";
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -48,6 +52,7 @@
|
||||||
extraSpecialArgs = { # passes in specialArgs from flake.nix
|
extraSpecialArgs = { # passes in specialArgs from flake.nix
|
||||||
inherit inputs outputs;
|
inherit inputs outputs;
|
||||||
inherit primaryUser;
|
inherit primaryUser;
|
||||||
|
inherit hostname;
|
||||||
inherit flakePath disksPath;
|
inherit flakePath disksPath;
|
||||||
};
|
};
|
||||||
users = {
|
users = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue