Skip to content

About

My configs for NixOS

Resources

Stars

13 stars

Watchers

1 watching

Forks

Repository files navigation

My NixOS dotfiles

If you don't know what is NixOS, please read this. TLDR: I can rebuild my system from scratch with a few commands on a new PC.

Please do not fork and use the system as is, it is customized specifically for me and me only. The project is licensed under MIT No Attribution, so you are free to copy parts from here and there.

Installation

I prefer to install NixOS from ISO with some GUI, though any should work as well.

nix-env -iA nixos.git nixos.neovim
git clone https://github.com/PerchunPak/nixos-dotfiles
cd nixos-dotfiles
# Format disk; if needed, change the device in systems/x86_64-linux/perchun-pc/default.nix
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount --flake .#perchun-pc
sudo nixos-generate-config --root /mnt
sudo rm -rf /mnt/etc/nixos
sudo cp -r ~/nixos-dotfiles /mnt/etc/nixos
sudo mkdir -p /mnt/persist/home/perchun /mnt/persist/system
sudo chown 1000:100 /mnt/persist/home/perchun
sudo nixos-install --root /mnt --flake /mnt/etc/nixos#perchun-pc

Restore bootloader

When I boot Windows, it LOVES to delete my bootloader

nix-env -iA nixos.btrfs-progs
sudo cryptsetup luksOpen /dev/nvme0n1p2 foo
sudo mount --mkdir /dev/mapper/root_vg-root /mnt
sudo mount --mkdir -t btrfs -o subvol=nix /dev/mapper/root_vg-root /mnt/root/nix
sudo mount --mkdir -t btrfs -o subvol=persist /dev/mapper/root_vg-root /mnt/root/persist
sudo mount --mkdir /dev/nvme0n1p1 /mnt/root/boot
sudo nixos-enter --root /mnt/root
NIXOS_INSTALL_BOOTLOADER=1 /run/current-system/bin/switch-to-configuration boot

About

My configs for NixOS

Resources

Stars

13 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages