Enable in NixOS:
boot.extraModprobeConfig = "options kvm_amd nested=1";
Check if correctly set with:
$ cat /sys/module/kvm_amd/parameters/nested| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <assert.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #ifndef _BIT_ARRAYS_ | |
| #define _BIT_ARRAYS_ |
| " Author: Luis Hebendanz | |
| " Description: FASM linter for asmsyntax fasm. | |
| call ale#Set('fasm_fasm_executable', 'fasm') | |
| call ale#Set('fasm_fasm_options', '') | |
| function! ale_linters#fasm#fasm#GetCommand(buffer) abort | |
| "Note that NASM requires a trailing slash for the -I option. | |
| let l:separator = has('win32') ? '\' : '/' | |
| let l:path = fnamemodify(bufname(a:buffer), ':p:h') . l:separator |
| iptables -t mangle -A OUTPUT -m owner --uid-owner music-heaven -j MARK --set-mark 42 | |
| iptables -t nat -A POSTROUTING -o vpn-secure -j MASQUERADE | |
| echo 201 music.out >> /etc/iproute2/rt_tables | |
| ip rule add fwmark 42 table music.out | |
| ip route add default via 10.8.0.249 dev vpn-secure table music.out |
Enable in NixOS:
boot.extraModprobeConfig = "options kvm_amd nested=1";
Check if correctly set with:
$ cat /sys/module/kvm_amd/parameters/nested| cmake_minimum_required(VERSION 3.16) | |
| # Set debug mode | |
| set(CMAKE_BUILD_TYPE Debug) | |
| if (MSVC) | |
| message("Using MSVC") | |
| # warning level 4 and all warnings as errors | |
| add_compile_options(/W4 /WX) | |
| else() |
Reboot the machine and boot from a NixOS usb Stick ISO. Import the zpool with:
$ zpool import -f rpool
$ zpool status
$ zfs listIf you want to resilver a new disk parition it the same way as the other disk! Afterwards execute:
| #!/bin/bash | |
| set -xe | |
| # This script takes as a parameter the name of the VM | |
| # and creates a linked clone | |
| # Ref: https://unix.stackexchange.com/a/33584 | |
| # The scripts assumes that it runs from the same folder | |
| # where the vm image is located and it coincides with the | |
| # image name |
first servers static ip: 1.2.3.4 second servers static ip: 1.2.3.4
Normally you use two different server but I don't want to.
First go to manage domain -> advanced dns -> Personal dnsserver -> Register nameserver -> Click on the plus sign and add ns1.example.com and ns2.example.com with ip 1.2.3.4 and 1.2.3.4
Then go to manage domain -> domain -> nameservers -> add ns1.example.com, ns2.example.com
| #include <stdio.h> | |
| int main(){ | |
| unsigned int cpuid; | |
| asm volatile("cpuid":"=a"(cpuid):"a"(0x1)); | |
| unsigned char base_fam = (cpuid & 0xf00) >> 8; | |
| unsigned char ext_fam = (cpuid & 0xf00000) >> 20; | |
| unsigned char family = base_fam + ext_fam; |