forked from nico/dots
bocchi: add hardware configuration
This commit is contained in:
parent
a96821361d
commit
06c0f2f55a
3 changed files with 40 additions and 80 deletions
|
|
@ -2,8 +2,7 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
./disko.nix
|
||||
# ./hardware-configuration.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "bocchi";
|
||||
|
|
|
|||
|
|
@ -1,78 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"/root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"/home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
|
||||
"/nix" = {
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
|
||||
"/media" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/media";
|
||||
};
|
||||
|
||||
"/media/shows" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/shows"; };
|
||||
"/media/movies" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/movies"; };
|
||||
"/media/music" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/music"; };
|
||||
"/media/books" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/books"; };
|
||||
"/media/repositories" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/repositories"; };
|
||||
"/media/torrents" = { mountOptions = [ "compress=zstd" ]; mountpoint = "/media/torrents"; };
|
||||
|
||||
# Subvolume for the swapfile
|
||||
"/swap" = {
|
||||
mountpoint = "/.swapvol";
|
||||
swap = {
|
||||
swapfile.size = "20M";
|
||||
swapfile2.size = "20M";
|
||||
swapfile2.path = "rel-path";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
39
hosts/bocchi/hardware-configuration.nix
Normal file
39
hosts/bocchi/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "wl" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/ff0cbf64-8bff-46a3-9bb2-8e314fcfda94";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/795C-AFC7";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s20u1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0f0.useDHCP = lib.mkDefault true;
|
||||
|
||||
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