mirror of
https://github.com/willemml/dotfiles.nix.git
synced 2025-04-12 11:17:17 +00:00
apps for nixos and darwin switch
This commit is contained in:
parent
0f8e618b69
commit
27a1707ff1
4 changed files with 39 additions and 3 deletions
17
apps/darwin-switch.nix
Normal file
17
apps/darwin-switch.nix
Normal 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
17
apps/nixos-switch.nix
Normal 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 . "$@"
|
||||
'';
|
||||
}
|
|
@ -24,10 +24,10 @@
|
|||
];
|
||||
|
||||
systems = [
|
||||
# "x86_64-linux"
|
||||
# "x86_64-darwin"
|
||||
# "x86_64-linux"
|
||||
# "x86_64-darwin"
|
||||
"aarch64-darwin"
|
||||
# "aarch64-linux"
|
||||
# "aarch64-linux"
|
||||
];
|
||||
|
||||
perSystem = {
|
||||
|
|
|
@ -35,4 +35,6 @@
|
|||
'';
|
||||
|
||||
time.timeZone = "America/Vancouver";
|
||||
|
||||
users.users.willem.shell = pkgs.zsh;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue