first successfull boot of reinstalled foureighty
This commit is contained in:
parent
1680829616
commit
d6a58e53a2
3 changed files with 20 additions and 25 deletions
|
@ -32,6 +32,7 @@ parted /dev/nvme0n1 -- rm 1
|
||||||
parted /dev/nvme0n1 -- rm 2
|
parted /dev/nvme0n1 -- rm 2
|
||||||
parted /dev/nvme0n1 -- rm 3
|
parted /dev/nvme0n1 -- rm 3
|
||||||
parted /dev/nvme0n1 -- rm 4
|
parted /dev/nvme0n1 -- rm 4
|
||||||
|
parted /dev/nvme0n1 -- rm 5
|
||||||
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 1GiB
|
parted /dev/nvme0n1 -- mkpart ESP fat32 1MiB 1GiB
|
||||||
parted /dev/nvme0n1 -- set 1 esp on
|
parted /dev/nvme0n1 -- set 1 esp on
|
||||||
parted /dev/nvme0n1 -- mkpart primary 1GiB 100%
|
parted /dev/nvme0n1 -- mkpart primary 1GiB 100%
|
||||||
|
@ -69,7 +70,9 @@ remote (nvme):
|
||||||
mkfs.fat -F 32 -n boot /dev/nvme0n1p1
|
mkfs.fat -F 32 -n boot /dev/nvme0n1p1
|
||||||
mkfs.btrfs -L nixos /dev/mapper/crypt
|
mkfs.btrfs -L nixos /dev/mapper/crypt
|
||||||
sleep 1
|
sleep 1
|
||||||
mount /dev/mapper/crypt /mnt
|
cryptsetup luksClose crypt
|
||||||
|
cryptsetup luksOpen /dev/nvme0n1p2 crypt
|
||||||
|
mount /dev/disk/by-label/nixos /mnt
|
||||||
mkdir -p /mnt/boot
|
mkdir -p /mnt/boot
|
||||||
mount /dev/disk/by-label/boot /mnt/boot
|
mount /dev/disk/by-label/boot /mnt/boot
|
||||||
nixos-generate-config --root /mnt
|
nixos-generate-config --root /mnt
|
||||||
|
@ -90,14 +93,14 @@ mkdir -p /mnt/home/cyryl/dev/dotfiles/
|
||||||
tar -xvf /tmp/dotfiles.tar.gz -C /mnt/home/cyryl/dev/dotfiles
|
tar -xvf /tmp/dotfiles.tar.gz -C /mnt/home/cyryl/dev/dotfiles
|
||||||
cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/cyryl/dev/dotfiles/nixos/boxes/hostname/
|
cp /mnt/etc/nixos/hardware-configuration.nix /mnt/home/cyryl/dev/dotfiles/nixos/boxes/hostname/
|
||||||
nix-shell -p nixUnstable git
|
nix-shell -p nixUnstable git
|
||||||
nixos-install --flake '.#hostname-bootstrap'
|
nixos-install --flake '.#bootstrap'
|
||||||
reboot
|
reboot
|
||||||
```
|
```
|
||||||
|
|
||||||
ctrl-alt-f1 root login:
|
ctrl-alt-f1 root login:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nixos-rebuild switch
|
# nixos-rebuild switch
|
||||||
passwd cyryl
|
passwd cyryl
|
||||||
chown cyryl -R /home/cyryl
|
chown cyryl -R /home/cyryl
|
||||||
reboot
|
reboot
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
networking.hostName = "foureighty";
|
networking.hostName = "foureighty";
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../boot.nix
|
../../boot.nix
|
||||||
../../common.nix
|
../../common.nix
|
||||||
|
@ -18,6 +19,12 @@
|
||||||
../../mercurial
|
../../mercurial
|
||||||
];
|
];
|
||||||
|
|
||||||
|
zramSwap = {
|
||||||
|
enable = true;
|
||||||
|
algorithm = "zstd";
|
||||||
|
memoryPercent = 75;
|
||||||
|
};
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
|
boot.kernelPackages = pkgs.linuxPackages_latest_hardened;
|
||||||
time.timeZone = "Europe/London";
|
time.timeZone = "Europe/London";
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,6 @@
|
||||||
{ config, lib, pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
|
|
||||||
];
|
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
kernel.sysctl = {
|
|
||||||
"vm.swappiness" = 95;
|
|
||||||
};
|
|
||||||
|
|
||||||
kernelModules = [ "kvm-intel" ];
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
|
||||||
initrd = {
|
initrd = {
|
||||||
|
@ -21,29 +12,23 @@
|
||||||
loader.systemd-boot.enable = true;
|
loader.systemd-boot.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."crypt".device = "replaceme";
|
boot.initrd.luks.devices."crypt".device = "/dev/disk/by-uuid/c2deaeaa-cb76-4d29-a603-0cf42f6e829f";
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "replaceme";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "replaceme";
|
device = "/dev/disk/by-uuid/FC06-82E6";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/cb12122c-f0ef-4c43-bac1-6b8410a51a54";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.video.hidpi.enable = lib.mkDefault true;
|
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||||
|
|
||||||
zramSwap = {
|
|
||||||
enable = true;
|
|
||||||
algorithm = "zstd";
|
|
||||||
memoryPercent = 75;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.maxJobs = 2;
|
nix.maxJobs = 2;
|
||||||
nix.buildCores = 6;
|
nix.buildCores = 6;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue