about summary refs log tree commit diff
path: root/nix/hosts/hacknix/README.md
blob: a695e7e43ec664eedffe56df6a0642311f2adfcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# hacknix

A nixos setup for hacking (pentesting).

This has...

- burp pro installed
- the office ca cert installed
- common tools installed

## Installation

- download the minimal NixOS iso
    - https://channels.nixos.org/nixos-22.11/latest-nixos-minimal-x86_64-linux.iso
- create a new VM in Virtualbox
    - call it whatever you like
    - select the previously downloaded iso image
    - set the type to `linux`
    - set the version to `other`
    - give it some RAM
    - give it some CORES
    - enable EFI!
    - give it some storage
- boot the vm, then...
    - `sudo -i`
    - `parted /dev/sda -- mklabel gpt`
    - `parted /dev/sda -- mklabel primary 512MB 100%`
    - `parted /dev/sda -- mklabel ESP fat32 1MB 512MB`
    - `parted /dev/sda -- mklabel set 3 esp on`
    - `pvcreate /dev/sda1`
    - `vgcreate pool /dev/sda1`
    - `lvcreate -L 30GB -n home pool`
    - `mkfs.ext4 /dev/pool/home`
    - `mount /dev/disk/by-label/nixos /mnt`
    - `mkdir -p /mnt/boot`
    - `mount /dev/disk/by-label/boot /mnt/boot`
    - `nixos-generate-config --root /mnt`
    - edit the nixos configuration (this is just preliminary, we're going to use the one in this repo further on)
    - `nixos-install`
        - set a root password
    - `reboot`
- login
    - `git clone https://<git>/<user>/hacknix /etc/nixos`
        - this will probably fail due to missing certs...
    - `sudo nixos-rebuild switch`