Skip to content

Instantly share code, notes, and snippets.

@nozpheratu
Last active July 14, 2019 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nozpheratu/1819b33ca36fc831aca7dd88ddbb773a to your computer and use it in GitHub Desktop.
Save nozpheratu/1819b33ca36fc831aca7dd88ddbb773a to your computer and use it in GitHub Desktop.
/dev/sdb1: UUID="1970-01-01-00-00-01-00" LABEL="NIXOS_ISO" TYPE="iso9660" PTUUID="c8e0e6ee" PTTYPE="dos" PARTUUID="c8e0e6ee-01"
/dev/loop0: TYPE="squashfs"
/dev/sda1: UUID="85E2-F536" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="37ae1336-a652-43fd-a853-4b254e9abaef"
/dev/sda2: UUID="78c53c41-1379-4bc3-9990-527fd6232ca1" TYPE="crypto_LUKS" PARTLABEL="Linux filesystem" PARTUUID="f7983a37-e4b8-4287-ad6f-4a249c90b9d6"
/dev/sdb2: SEC_TYPE="msdos" LABEL_FATBOOT="EFIBOOT" LABEL="EFIBOOT" UUID="1234-5678" TYPE="vfat" PARTUUID="c8e0e6ee-02"
/dev/mapper/crypted-nixos: UUID="BB6RmT-B4Wy-hflm-BtXb-lyxL-Xmq6-SSgXhF" TYPE="LVM2_member"
/dev/mapper/vg-swap: LABEL="swap" UUID="3e0b6cc7-e28c-45ff-99e6-620a1441dacd" TYPE="swap"
/dev/mapper/vg-root: LABEL="root" UUID="87ba2cd8-d13e-4c6d-b114-355133a674bc" TYPE="ext4"
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the GRUB 2 boot loader.
#boot.loader.grub.enable = true;
#boot.loader.grub.version = 2;
# boot.loader.grub.efiSupport = true;
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# Define on which hard drive you want to install Grub.
# boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.loader.grub = {
efiInstallAsRemovable = true;
enable = true;
device = "nodev";
version = 2;
efiSupport = true;
enableCryptodisk = true;
extraInitrd = /boot/initrd.keys.gz;
};
boot.initrd.luks.devices = [
{
name = "root";
device = "dev/disk/by-uuid/78c53c41-1379-4bc3-9990-527fd6232ca1";
preLVM = true;
keyFile = "/keyfile0.bin";
allowDiscards = true;
}
];
# networking.hostName = "nixos"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
# i18n = {
# consoleFont = "Lat2-Terminus16";
# consoleKeyMap = "us";
# defaultLocale = "en_US.UTF-8";
# };
# Set your time zone.
# time.timeZone = "Europe/Amsterdam";
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# wget vim
# ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
# Enable the X11 windowing system.
# services.xserver.enable = true;
# services.xserver.layout = "us";
# services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support.
# services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.desktopManager.plasma5.enable = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
# users.users.jane = {
# isNormalUser = true;
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
# };
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
# should.
system.stateVersion = "19.03"; # Did you read the comment?
}
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/87ba2cd8-d13e-4c6d-b114-355133a674bc";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/85E2-F536";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/3e0b6cc7-e28c-45ff-99e6-620a1441dacd"; }
];
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}
/dev/mapper/vg-root on /mnt type ext4 (rw,relatime)
/dev/sda1 on /mnt/boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment