Install Notes #6

Open
opened 2024-06-20 15:07:19 +00:00 by tristan · 3 comments
Owner

Partitions

2TB

2G free -
GROW crypt_ssd_2t_data 1
64GB crypt_ssd_2t_swap 2
64GB free -

4TB

1G free -
1G EFI+boot 1
GROW crypt_ssd_4t_data 2
64GB crypt_ssd_4t_swap 3
64GB free -

Crypts:

cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --hash sha256 --iter-time 2000 --key-size 512 --pbkdf argon2id --use-urandom --verify-passphrase

bcachefs format
--metadata_replicas=2
--data_replicas=1
--background_compression=zstd
--discard
--label=ssd.ssd_2t /dev/mapper/crypt_ssd_2t_data
--label=ssd.ssd_4t /dev/mapper/crypt_ssd_4t_data

Partitions 2TB 2G free - GROW crypt_ssd_2t_data 1 64GB crypt_ssd_2t_swap 2 64GB free - 4TB 1G free - 1G EFI+boot 1 GROW crypt_ssd_4t_data 2 64GB crypt_ssd_4t_swap 3 64GB free - Crypts: cryptsetup luksFormat --type luks2 --cipher aes-xts-plain64 --hash sha256 --iter-time 2000 --key-size 512 --pbkdf argon2id --use-urandom --verify-passphrase bcachefs format \ --metadata_replicas=2 \ --data_replicas=1 \ --background_compression=zstd \ --discard \ --label=ssd.ssd_2t /dev/mapper/crypt_ssd_2t_data \ --label=ssd.ssd_4t /dev/mapper/crypt_ssd_4t_data
Author
Owner
# myiso.nix
{ pkgs, modulesPath, lib, ... }: {
  imports = [
    <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
    <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix>
  ];
  
  # useful stuffs
  environment.systemPackages = [ pkgs.neovim pkgs.fish pkgs.bcachefs-tools pkgs.btrfs-tools ];

  # use the latest Linux kernel
  boot.kernelPackages = pkgs.linuxPackages_latest;

  # support all the fses
  boot.supportedFilesystems = lib.mkForce [ "bcachefs" "btrfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
}
```nix # myiso.nix { pkgs, modulesPath, lib, ... }: { imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix> <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix> ]; # useful stuffs environment.systemPackages = [ pkgs.neovim pkgs.fish pkgs.bcachefs-tools pkgs.btrfs-tools ]; # use the latest Linux kernel boot.kernelPackages = pkgs.linuxPackages_latest; # support all the fses boot.supportedFilesystems = lib.mkForce [ "bcachefs" "btrfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; } ```
Author
Owner

nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=myiso.nix

`nix-build '<nixpkgs/nixos>' -A config.system.build.isoImage -I nixos-config=myiso.nix`
Author
Owner
nixos-generate-config --show-hardware-config --root /mnt
{ config, lib, pkgs, modulesPath, ... }:

{
  imports =
    [ (modulesPath + "/installer/scan/not-detected.nix")
    ];

  boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
  boot.initrd.kernelModules = [ ];
  boot.kernelModules = [ "kvm-amd" ];
  boot.extraModulePackages = [ ];

  swapDevices =
    [ { device = "/dev/disk/by-uuid/a8f478f0-ad5e-47ae-8e18-63060f7e5706"; }
      { device = "/dev/disk/by-uuid/59987b2a-c5c5-4547-95ad-f0d1dcdf8458"; }
    ];

  nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
  hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

[nixos@nixos:~]$ 
```shell nixos-generate-config --show-hardware-config --root /mnt { config, lib, pkgs, modulesPath, ... }: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; swapDevices = [ { device = "/dev/disk/by-uuid/a8f478f0-ad5e-47ae-8e18-63060f7e5706"; } { device = "/dev/disk/by-uuid/59987b2a-c5c5-4547-95ad-f0d1dcdf8458"; } ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } [nixos@nixos:~]$ ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: tristan/nix#6
No description provided.