feat: Add Nitro

master
Chan Wen Xu 2021-12-20 15:32:10 +07:00
parent efdcaf5b64
commit 45028618c2
Signed by: chanbakjsd
GPG Key ID: 7E9A74B1B07A7558
3 changed files with 87 additions and 0 deletions

@ -0,0 +1,30 @@
{ config, pkgs, lib, ... }:
{
nix.buildCores = 4;
nix.maxJobs = 4;
nixpkgs.config.allowUnfree = true;
boot.kernelPackages = pkgs.zfs.latestCompatibleLinuxPackages;
boot.loader = {
efi.efiSysMountPoint = "/boot/efi";
grub.efiSupport = true;
grub.device = "nodev";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/3b7f1053-adb0-4ab3-be45-e4570eb867e2";
networking = {
hostName = "nitro";
# useDHCP is deprecated, disable explicitly.
useDHCP = false;
interfaces.enp3s0.useDHCP = true;
};
services.xserver.libinput.enable = true;
system.stateVersion = "22.05";
}

@ -0,0 +1,49 @@
# 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, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/persist" =
{ device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f";
fsType = "btrfs";
options = [ "subvol=@persist" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/c6d4b892-09fd-48ee-97ee-3509af5cd873";
fsType = "ext4";
};
fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/627E-7033";
fsType = "vfat";
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/f7853517-9c5c-497f-a749-17171320d45f";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/3430af3a-484c-40b6-a278-d38b042abd21"; }
];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

@ -16,6 +16,14 @@
./config/aspire_hardware.nix ./config/aspire_hardware.nix
]; ];
}; };
nitro = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./config/common.nix inputs)
./config/nitro.nix
./config/nitro_hardware.nix
];
};
installationMedia = nixpkgs.lib.nixosSystem { installationMedia = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";