more bcachefs changes
This commit is contained in:
parent
e329c27056
commit
69ead0a340
17
common.nix
17
common.nix
|
@ -62,12 +62,6 @@ in
|
||||||
# enable fast dbus
|
# enable fast dbus
|
||||||
services.dbus.implementation = "broker";
|
services.dbus.implementation = "broker";
|
||||||
|
|
||||||
# ensure we scrub the btrfs sometimes
|
|
||||||
services.btrfs.autoScrub = {
|
|
||||||
enable = true;
|
|
||||||
interval = "weekly";
|
|
||||||
};
|
|
||||||
|
|
||||||
# allow all firmware
|
# allow all firmware
|
||||||
hardware.enableAllFirmware = true;
|
hardware.enableAllFirmware = true;
|
||||||
|
|
||||||
|
@ -80,8 +74,9 @@ in
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
# enable with public key only auth
|
# enable with public key only auth
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PasswordAuthentication = false;
|
settings.PasswordAuthentication = true;
|
||||||
settings.KbdInteractiveAuthentication = false;
|
settings.KbdInteractiveAuthentication = true;
|
||||||
|
ettings.PermitRootLogin = "yes";
|
||||||
|
|
||||||
# only ed25519 keys, make them persistent
|
# only ed25519 keys, make them persistent
|
||||||
hostKeys = [{
|
hostKeys = [{
|
||||||
|
@ -458,10 +453,10 @@ in
|
||||||
|
|
||||||
users.users.root = {
|
users.users.root = {
|
||||||
# init password
|
# init password
|
||||||
hashedPassword = builtins.readFile "/data/nixos/password.secret";
|
hashedPassword = builtins.readFile "/mnt/data/nixos/password.secret";
|
||||||
|
|
||||||
# use same keys as my main user
|
# use same keys as my main user
|
||||||
openssh.authorizedKeys.keys = pkgs.lib.splitString "\n" (builtins.readFile "/home/cullmann/.ssh/authorized_keys");
|
# openssh.authorizedKeys.keys = pkgs.lib.splitString "\n" (builtins.readFile "/home/cullmann/.ssh/authorized_keys");
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.root = {
|
home-manager.users.root = {
|
||||||
|
@ -490,7 +485,7 @@ in
|
||||||
extraGroups = [ "vboxusers" "wheel" ];
|
extraGroups = [ "vboxusers" "wheel" ];
|
||||||
|
|
||||||
# init password
|
# init password
|
||||||
hashedPassword = builtins.readFile "/data/nixos/password.secret";
|
hashedPassword = builtins.readFile "/mnt/data/nixos/password.secret";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.cullmann = {
|
home-manager.users.cullmann = {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
# Shared config of all machines
|
# Shared config of all machines
|
||||||
/data/nixos/common.nix
|
/mnt/data/nixos/common.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
# amd graphics
|
# amd graphics
|
||||||
|
|
|
@ -13,30 +13,28 @@
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "none";
|
{ device = "none";
|
||||||
fsType = "tmpfs";
|
fsType = "tmpfs";
|
||||||
|
neededForBoot = true;
|
||||||
options = [ "defaults" "size=8G" "mode=755" ];
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/F404-531A";
|
{ device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part1";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
neededForBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# system
|
|
||||||
boot.initrd.luks.devices."crypt-system".device = "/dev/disk/by-uuid/22c208e6-579b-4d34-8f83-83aa4a7ab1c3";
|
|
||||||
|
|
||||||
# vms
|
|
||||||
boot.initrd.luks.devices."crypt-vms".device = "/dev/disk/by-id/ata-CT2000MX500SSD1_2138E5D5061F";
|
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{ device = "/dev/mapper/crypt-system";
|
{ device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part2";
|
||||||
fsType = "btrfs";
|
fsType = "bcachefs";
|
||||||
options = [ "subvol=nix" "noatime" "nodiratime" ];
|
neededForBoot = true;
|
||||||
|
options = [ "noatime" "nodiratime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/data" =
|
fileSystems."/data" =
|
||||||
{ device = "/dev/mapper/crypt-system";
|
{ device = "/dev/disk/by-id/nvme-CT4000P3PSSD8_2325E6E63746-part3";
|
||||||
fsType = "btrfs";
|
fsType = "bcachefs";
|
||||||
options = [ "subvol=data" "noatime" "nodiratime" ];
|
neededForBoot = true;
|
||||||
|
options = [ "noatime" "nodiratime" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
|
@ -57,13 +55,13 @@
|
||||||
options = [ "bind" ];
|
options = [ "bind" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home/cullmann/vms" =
|
# fileSystems."/home/cullmann/vms" =
|
||||||
{
|
# {
|
||||||
depends = [ "/home" ];
|
# depends = [ "/home" ];
|
||||||
device = "/dev/mapper/crypt-vms";
|
# device = "/dev/mapper/crypt-vms";
|
||||||
fsType = "btrfs";
|
# fsType = "btrfs";
|
||||||
options = [ "noatime" "nodiratime" ];
|
# options = [ "noatime" "nodiratime" ];
|
||||||
};
|
# };
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
|
@ -31,7 +31,11 @@ sudo dd if=result/iso/nixos-24.05.20240108.317484b-x86_64-linux.iso of=/dev/sda
|
||||||
|
|
||||||
efibootmgr
|
efibootmgr
|
||||||
efibootmgr -b 0 -B
|
efibootmgr -b 0 -B
|
||||||
...
|
efibootmgr -b 1 -B
|
||||||
|
efibootmgr -b 2 -B
|
||||||
|
efibootmgr -b 3 -B
|
||||||
|
efibootmgr -b 4 -B
|
||||||
|
efibootmgr
|
||||||
|
|
||||||
#
|
#
|
||||||
# install script below
|
# install script below
|
||||||
|
@ -108,9 +112,11 @@ nixos-generate-config --root /mnt
|
||||||
cp /mnt/etc/nixos/hardware-configuration.nix /tmp
|
cp /mnt/etc/nixos/hardware-configuration.nix /tmp
|
||||||
cp /mnt/etc/nixos/configuration.nix /tmp
|
cp /mnt/etc/nixos/configuration.nix /tmp
|
||||||
|
|
||||||
# copy data
|
# copy config data
|
||||||
|
|
||||||
rsync --checksum -vaR --delete /data /mnt
|
# patch some paths there
|
||||||
|
|
||||||
|
sudo scp -r /data/nixos root@192.168.13.100:/mnt/data
|
||||||
|
|
||||||
# install
|
# install
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue