Update copyright year
This commit is contained in:
parent
5d476b1727
commit
59def1c531
2
LICENSE
2
LICENSE
|
@ -1,6 +1,6 @@
|
||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2016-2019 Henrik Lissner.
|
Copyright (c) 2016-2020 Henrik Lissner.
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
37
deploy
37
deploy
|
@ -1,37 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
DOTFILES="$(cd $(dirname "${BASH_SOURCE:-${(%):-%x}}") && pwd -P)"
|
|
||||||
PREFIX="${PREFIX:-/mnt}"
|
|
||||||
NIXOSPREFIX="${PREFIX}/etc/nixos"
|
|
||||||
NIXOSFLAGS="-I 'config=$DOTFILES/config' -I 'packages=$DOTFILES/packages'"
|
|
||||||
HOST=${1:-${HOST:-kuro}}
|
|
||||||
|
|
||||||
if [ $EUID -nq 0 ]; then
|
|
||||||
sudo nix-channel --update
|
|
||||||
sudo nixos-rebuild $NIXOSFLAGS switch
|
|
||||||
else
|
|
||||||
if [ ! -f "$DOTFILES/configuration.$HOST.nix" ]; then
|
|
||||||
>&2 echo "No configuration exists for host '$HOST'"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p "$NIXOSPREFIX"
|
|
||||||
cat << EOF > "$NIXOSPREFIX/configuration.nix"
|
|
||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../dotfiles/configuration.$HOST.nix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
EOF
|
|
||||||
|
|
||||||
nix-channel --add https://nixos.org/channels/nixos-19.09 nixos
|
|
||||||
nix-channel --add https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
|
|
||||||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs-unstable
|
|
||||||
nix-channel --update
|
|
||||||
|
|
||||||
nixos-generate-config --root "$PREFIX"
|
|
||||||
nixos-install --root "$PREFIX" $NIXOSFLAGS
|
|
||||||
fi
|
|
Loading…
Reference in a new issue