Compare commits
No commits in common. 'c574356ec522bb8c54a92ddccfbc520c18c81748' and '28885995e90b07b30b82cc999197000c6ca905f3' have entirely different histories.
c574356ec5
...
28885995e9
@ -1 +1 @@
|
||||
private
|
||||
notes
|
||||
|
@ -1,26 +0,0 @@
|
||||
let
|
||||
nixpkgsOptions = {};
|
||||
pkgs = (import (fetchTarball "https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz") nixpkgsOptions);
|
||||
presets = {
|
||||
base = (import ./presets/base.nix);
|
||||
kvm = (import ./presets/kvm.nix);
|
||||
};
|
||||
in {
|
||||
network = {
|
||||
inherit pkgs;
|
||||
description = "Cryto";
|
||||
};
|
||||
|
||||
"machine-haless-03.cryto.net" = {
|
||||
system.stateVersion = "19.03";
|
||||
|
||||
imports = [
|
||||
presets.base
|
||||
presets.kvm
|
||||
./hardware-configurations/machine-haless-03.nix
|
||||
];
|
||||
|
||||
services.nginx.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||
};
|
||||
}
|
@ -1,36 +0,0 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
i18n = {
|
||||
consoleFont = "Lat2-Terminus16";
|
||||
consoleKeyMap = "us";
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
curl
|
||||
htop
|
||||
iotop
|
||||
iftop
|
||||
nload
|
||||
lsof
|
||||
];
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzV5dI01NhwuL6ayiO0STcSQiDf7lEtu63NuLZKQUdZVuVHIqyt3Gquks2OI1NZGrJdXA315yw89ZqyMo+z7gSGHEV6P0fAXKW6G78JOFWsA5lGpaLxTsZ6Q7r0Z9FMqDvA5Jlsyznyj9hhO1cz01WPLzB92ypd9ifldtrAQIYQItxGXOuRkBJiShuIRqtr4Q2chXiOoRZKb4v4Gyt/UPxTpvfM/zcOz0zi1d4ijSbLqgIUJhxvrWADfdgEQ77unepDoD+HT51QBX7dj8RuYivxLSA3vpfNeCgt2CYBf6FYnmWkWSnN1RCtQPJNxsMuLzC2ZBbIkz0tDgcIBPbHxGr sven@linux-rfa7.site"
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "00:00";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
version = 2;
|
||||
device = "/dev/sda"; # or "nodev" for efi only
|
||||
};
|
||||
}
|
@ -1 +0,0 @@
|
||||
SSH_USER=root morph deploy "$@" configuration/default.nix switch
|
@ -1,38 +0,0 @@
|
||||
# NOTE: First check that the disk driver is set to virtio!
|
||||
|
||||
fdisk /dev/sda
|
||||
o
|
||||
n p <enter> <enter> +1G
|
||||
# boot partition
|
||||
n p <enter> <enter> <enter>
|
||||
# LVM partition
|
||||
a 1
|
||||
# set bootable
|
||||
w
|
||||
|
||||
# Boot partition
|
||||
mkfs.ext4 -L boot /dev/sda1
|
||||
|
||||
# LVM partition
|
||||
pvcreate /dev/sda2
|
||||
vgcreate vg_main /dev/sda2
|
||||
lvcreate -L 2GB -n lv_swap vg_main
|
||||
lvcreate -l 100%FREE -n lv_root vg_main
|
||||
|
||||
mkswap -L swap /dev/vg_main/lv_swap
|
||||
swapon /dev/vg_main/lv_swap
|
||||
|
||||
mkfs.ext4 -L nixos /dev/vg_main/lv_root
|
||||
|
||||
mount /dev/vg_main/lv_root /mnt
|
||||
mkdir /mnt/boot
|
||||
mount /dev/sda1 /mnt/boot
|
||||
|
||||
# NixOS installation
|
||||
nixos-generate-config --root /mnt
|
||||
curl https://git.cryto.net/joepie91/morph-rc/raw/master/data/dummy-configuration.nix > /mnt/etc/nixos/configuration.nix
|
||||
# NOTE: Potentially update configuration.nix at this point if the primary disk is not /dev/sda!
|
||||
|
||||
nixos-install
|
||||
|
||||
# NOTE: Don't forget to set a better root password over SSH after restarting
|
Loading…
Reference in New Issue