Add attic to the rebuild scripts
This commit is contained in:
parent
75662dc389
commit
9f4f397075
|
@ -1,7 +1,30 @@
|
||||||
{ config, nixosConfig, ... }:
|
{
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
nixosConfig,
|
||||||
|
pkgs,
|
||||||
|
system,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
rebuild = pkgs.writeShellApplication {
|
||||||
|
name = "rebuild";
|
||||||
|
runtimeInputs = [
|
||||||
|
pkgs.nixos-rebuild
|
||||||
|
inputs.attic.packages.${system}.attic-client
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
nixos-rebuild -j auto switch --use-remote-sudo
|
||||||
|
if command -v attic &> /dev/null; then
|
||||||
|
attic push prod /run/current-system
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Home Manager needs a bit of information about you and the
|
# Home Manager needs a bit of information about you and the
|
||||||
# paths it should manage.
|
# paths it should manage.
|
||||||
|
home.packages = [ rebuild ];
|
||||||
programs = {
|
programs = {
|
||||||
dircolors = {
|
dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -14,9 +37,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
|
nix-generations = "sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
|
||||||
rebuild = ''
|
|
||||||
nixos-rebuild -j auto switch --use-remote-sudo
|
|
||||||
'';
|
|
||||||
htop = "btm";
|
htop = "btm";
|
||||||
find-garbage = "ls -l /nix/var/nix/gcroots/auto/ | sort | grep '/home/'";
|
find-garbage = "ls -l /nix/var/nix/gcroots/auto/ | sort | grep '/home/'";
|
||||||
vm = "vim";
|
vm = "vim";
|
||||||
|
|
|
@ -2,8 +2,24 @@
|
||||||
config,
|
config,
|
||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
|
system,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
let
|
||||||
|
hm-rebuild = pkgs.writeShellApplication {
|
||||||
|
name = "hm-rebuild";
|
||||||
|
runtimeInputs = [
|
||||||
|
pkgs.nixos-rebuild
|
||||||
|
inputs.attic.packages.${system}.attic-client
|
||||||
|
];
|
||||||
|
text = ''
|
||||||
|
home-manager switch
|
||||||
|
if command -v attic &> /dev/null; then
|
||||||
|
attic push prod /run/current-system
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [ ./headless.nix ];
|
imports = [ ./headless.nix ];
|
||||||
|
|
||||||
|
@ -25,6 +41,7 @@
|
||||||
bottom
|
bottom
|
||||||
gyre-fonts
|
gyre-fonts
|
||||||
highlight
|
highlight
|
||||||
|
hm-rebuild
|
||||||
keychain
|
keychain
|
||||||
killall
|
killall
|
||||||
mosh
|
mosh
|
||||||
|
@ -80,7 +97,6 @@
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
work-management = "mosh --ssh='ssh -i ~/.ssh/zweili.key' zweili@10.49.0.100 -- tmux new -A -s 0";
|
work-management = "mosh --ssh='ssh -i ~/.ssh/zweili.key' zweili@10.49.0.100 -- tmux new -A -s 0";
|
||||||
work-vm = ''ssh andreas@localhost -p 2222 -t "$@" "tmux new -A -s 0"'';
|
work-vm = ''ssh andreas@localhost -p 2222 -t "$@" "tmux new -A -s 0"'';
|
||||||
hm-rebuild = "home-manager switch";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue