Created basic NixOS and home-manager flake
This commit is contained in:
parent
17687db113
commit
06e98520af
9 changed files with 420 additions and 0 deletions
63
hosts/Orchid/hardware-configuration.nix
Normal file
63
hosts/Orchid/hardware-configuration.nix
Normal file
|
@ -0,0 +1,63 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
# Import kernel modules
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Partition map for Orchid
|
||||
#NAME SIZE TYPE MOUNTPOINTS LABEL FILESYSTEM
|
||||
#sda 238.5G disk
|
||||
#├─sda1 512M part /boot BOOT vfat
|
||||
#└─sda2 REST part NixOS luks2
|
||||
# └─Orchid REST crypt / Orchid btrfs
|
||||
# /nix
|
||||
# /home
|
||||
|
||||
# Label of the luks2 partition
|
||||
boot.initrd.luks.devices."Orchid".device = "/dev/disk/by-label/NixOS";
|
||||
|
||||
# Declares all filesystems
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/Orchid";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-label/Orchid";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-label/Orchid";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
# You can declare swap devices down below
|
||||
swapDevices = [ ];
|
||||
|
||||
# This option enables DHCP for all interfaces
|
||||
# It is recommended to declare this for each individual interface, but it shouldn't hurt keeping it like this
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
# Declare the default host platform and microcode for intel cpus (amd is missing!)
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue