Last active
August 3, 2026 04:28
-
-
Save dragan/d14211f173084a9a7dba17289af3aad4 to your computer and use it in GitHub Desktop.
configuration.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { config, pkgs, ... }: | |
| { | |
| networking.hostName = "darius"; | |
| networking.useDHCP = true; | |
| fileSystems."/" = { | |
| device = "none"; | |
| fsType = "tmpfs"; | |
| options = [ "defaults" "size=8G" "mode=755" ]; | |
| }; | |
| fileSystems."/nix" = { | |
| device = "/dev/encrypted/root"; | |
| fsType = "btrfs"; | |
| options = [ "subvol=nix" "compress=zstd" "noatime" "ssd" ]; | |
| }; | |
| fileSystems."/persist" = { | |
| device = "/dev/encrypted/root"; | |
| fsType = "btrfs"; | |
| options = [ "subvol=persist" "compress=zstd" "noatime" ]; | |
| neededForBoot = true; | |
| }; | |
| fileSystems."/home" = { | |
| device = "/dev/encrypted/home"; | |
| fsType = "btrfs"; | |
| options = [ "subvol=home" "compress=zstd" "noatime" "ssd" ]; | |
| }; | |
| fileSystems."/boot" = { | |
| device = "/dev/disk/by-partlabel/efi-system-partition"; | |
| fsType = "vfat"; | |
| }; | |
| swapDevices = [ | |
| { device = "/dev/encrypted/swap"; } | |
| ]; | |
| boot.loader.grub = { | |
| enable = true; | |
| device = "/dev/nvme0n1"; | |
| efiSupport = true; | |
| efiInstallAsRemovable = false; | |
| useOSProber = false; | |
| }; | |
| boot.loader.efi.canTouchEfiVariables = true; | |
| boot.initrd.availableKernelModules = [ | |
| "nvme" | |
| "xhci_pci" | |
| "usb_storage" | |
| "sd_mod" | |
| "sr_mod" | |
| "virtio_blk" | |
| "virtio_scsi" | |
| "ahci" | |
| ]; | |
| boot.initrd.luks.devices."encrypted" = { | |
| device = "/dev/disk/by-partlabel/internal"; | |
| preLVM = true; | |
| }; | |
| nix.settings.experimental-features = [ "nix-command" "flakes" ]; | |
| time.timeZone = "America/Los_Angeles"; | |
| i18n.defaultLocale = "en_US.UTF-8"; | |
| users.users.dragan = { | |
| isNormalUser = true; | |
| description = "Dragan"; | |
| extraGroups = [ "wheel" "networkmanager" ]; | |
| initialPassword = "temporary-password-change-after-first-boot"; | |
| }; | |
| security.sudo.wheelNeedsPassword = false; | |
| environment.systemPackages = with pkgs; [ | |
| vim | |
| wget | |
| git | |
| ]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment