Compare commits
No commits in common. "ee4e468012c13f3782770b15f2f7fddda22e8e62" and "a96821361d3ff8237aa5045f0df5de139d80b555" have entirely different histories.
ee4e468012
...
a96821361d
4 changed files with 93 additions and 60 deletions
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./disko.nix
|
||||||
|
# ./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "bocchi";
|
networking.hostName = "bocchi";
|
||||||
|
|
|
||||||
78
hosts/bocchi/disko.nix
Normal file
78
hosts/bocchi/disko.nix
Normal file
|
|
@ -0,0 +1,78 @@
|
||||||
|
{ ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,39 +0,0 @@
|
||||||
# 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;
|
|
||||||
}
|
|
||||||
|
|
@ -9,26 +9,19 @@
|
||||||
|
|
||||||
networking.hostName = "nijika";
|
networking.hostName = "nijika";
|
||||||
|
|
||||||
# enable vaapi on OS-level
|
hardware.graphics.enable = true;
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD";
|
||||||
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
|
hardware.graphics.extraPackages = with pkgs; [
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables.LIBVA_DRIVER_NAME = "iHD"; # Same here
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
intel-media-driver # For Broadwell (2014) or newer processors. LIBVA_DRIVER_NAME=iHD
|
||||||
libva-vdpau-driver # Previously vaapiVdpau
|
libva-vdpau-driver # Previously vaapiVdpau
|
||||||
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
|
||||||
# OpenCL support for intel CPUs before 12th gen
|
# OpenCL support for intel CPUs before 12th gen
|
||||||
# see: https://github.com/NixOS/nixpkgs/issues/356535
|
# see: https://github.com/NixOS/nixpkgs/issues/356535
|
||||||
intel-compute-runtime-legacy1
|
# intel-compute-runtime-legacy1
|
||||||
vpl-gpu-rt # QSV on 11th gen or newer
|
vpl-gpu-rt # QSV on 11th gen or newer
|
||||||
intel-media-sdk # QSV up to 11th gen
|
intel-media-sdk # QSV up to 11th gen
|
||||||
intel-ocl # OpenCL support
|
intel-ocl # OpenCL support
|
||||||
];
|
];
|
||||||
};
|
|
||||||
|
|
||||||
services.logind.lidSwitchExternalPower = "ignore";
|
services.logind.lidSwitchExternalPower = "ignore";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue