(desktop) Gen 446: Cleaned up broken inputs, altered 'nixswitch' to be interchangeable between hosts, added 'host' attr
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
|
||||
{ pkgs, self, ... }:
|
||||
{ host, inputs, username, nur, pkgs, self, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
{ inputs, pkgs, config, self, username, ... }:
|
||||
{ host, inputs, pkgs, config, self, username, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./../../modules/sys
|
||||
./hardware.nix
|
||||
(import ./nixswitch.nix { self = self; pkgs = pkgs; })
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
||||
18
hosts/laptop/nixswitch.nix
Normal file
18
hosts/laptop/nixswitch.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ self, pkgs }:
|
||||
|
||||
|
||||
pkgs.writeShellScriptBin "nixswitch" (''
|
||||
#!/run/current-system/sw/bin/bash
|
||||
|
||||
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
|
||||
builtin cd "$HOME/sysflakes" || exit
|
||||
|
||||
nix flake update
|
||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse-desktop"
|
||||
if [ $? -eq 0 ]; then
|
||||
scheck && runbg aplay ${self}/media/sound/update.wav
|
||||
else
|
||||
scheck && runbg aplay ${self}/media/sound/error.wav
|
||||
fi
|
||||
builtin cd "$OLDPWD" || exit
|
||||
'')
|
||||
Reference in New Issue
Block a user