apps for nixos and darwin switch

This commit is contained in:
willemml 2023-03-20 09:43:19 -07:00
parent 0f8e618b69
commit 27a1707ff1
Signed by: willemml
GPG key ID: C3DE5DF6198DACBD
4 changed files with 39 additions and 3 deletions

17
apps/darwin-switch.nix Normal file
View file

@ -0,0 +1,17 @@
# Copyright (c) 2018 Terje Larsen
# This work is licensed under the terms of the MIT license.
# For a copy, see https://opensource.org/licenses/MIT.
# https://github.com/terlar/nix-config/blob/00c8a3622e8bc4cb522bbf335e6ede04ca07da40/apps/nixos-switch.nix
{
writeShellApplication,
gitMinimal,
nixVersions,
nixos-rebuild,
}:
writeShellApplication {
name = "darwin-switch";
runtimeInputs = [gitMinimal nixVersions.stable nixos-rebuild];
text = ''
exec darwin-rebuild switch --flake . "$@"
'';
}

17
apps/nixos-switch.nix Normal file
View file

@ -0,0 +1,17 @@
# Copyright (c) 2018 Terje Larsen
# This work is licensed under the terms of the MIT license.
# For a copy, see https://opensource.org/licenses/MIT.
# https://github.com/terlar/nix-config/blob/00c8a3622e8bc4cb522bbf335e6ede04ca07da40/apps/nixos-switch.nix
{
writeShellApplication,
gitMinimal,
nixVersions,
nixos-rebuild,
}:
writeShellApplication {
name = "nixos-switch";
runtimeInputs = [gitMinimal nixVersions.stable nixos-rebuild];
text = ''
exec sudo nixos-rebuild switch --flake . "$@"
'';
}

View file

@ -24,10 +24,10 @@
];
systems = [
# "x86_64-linux"
# "x86_64-darwin"
# "x86_64-linux"
# "x86_64-darwin"
"aarch64-darwin"
# "aarch64-linux"
# "aarch64-linux"
];
perSystem = {

View file

@ -35,4 +35,6 @@
'';
time.timeZone = "America/Vancouver";
users.users.willem.shell = pkgs.zsh;
}