1
0
localhost/README.md

51 lines
1.4 KiB
Markdown
Raw Normal View History

2019-07-21 12:17:34 +00:00
# Fully reproducible localhost
2019-05-31 00:02:30 +00:00
[Download NixOS installation ISO](https://nixos.org/nixos/download.html)
2019-07-21 17:27:19 +00:00
2019-07-21 20:30:34 +00:00
Notes:
2019-10-13 18:18:22 +00:00
1. I assume that latest **stable** (e.g. 19.09) ISO will be used for installation.
2. Default network configuration is VPN-only, so if you don't have plans to use it you need to change iptables rules (remove `iptables -P OUTPUT DROP` from `networking.nix`) and remove `services.openvpn.servers.vpn` from `networking.nix`.
3. GUI settings is optimized for 3840x2160 on 15".
2019-07-21 20:30:34 +00:00
2019-05-31 00:02:30 +00:00
## Installation
2019-07-21 17:44:58 +00:00
parted /dev/vda mklabel gpt
parted /dev/vda mkpart EFI fat32 0% 512M
parted /dev/vda set 1 esp on
parted /dev/vda mkpart NIX ext4 512M 100%
cryptsetup luksFormat /dev/vda2
cryptsetup open /dev/vda2 nix
mkfs.vfat -F32 /dev/vda1
mkfs.ext4 /dev/mapper/nix
mount /dev/mapper/nix /mnt/
mkdir /mnt/boot
mount /dev/vda1 /mnt/boot
2019-05-31 00:02:30 +00:00
nix-env -iA nixos.gitMinimal
git clone https://code.dumpstack.io/infra/localhost.git /mnt/etc/nixos/
2019-07-21 17:44:58 +00:00
cd /mnt/etc/nixos
2019-07-21 14:22:27 +00:00
cp wireless-networks.nix.example wireless-networks.nix
nano wireless-networks.nix
cp secrets.nix.example secrets.nix
nano secrets.nix
2019-06-26 15:03:24 +00:00
nix-channel --add https://nixos.org/channels/nixos-unstable unstable
nix-channel --update
2019-05-31 00:02:30 +00:00
nixos-generate-config --root /mnt
nixos-install
reboot
2019-07-21 14:22:27 +00:00
## After install
2019-10-13 18:18:22 +00:00
Initial password for `user` is `user`.
2019-07-21 14:22:27 +00:00
2019-07-21 20:30:34 +00:00
sudo nix-channel --add https://nixos.org/channels/nixos-unstable unstable