Start merging in spike

This commit is contained in:
Artemis Tosini 2020-08-23 23:31:28 +00:00
parent cf4134a35c
commit eb27c30c82
Signed by: artemist
GPG key ID: ADFFE553DCBB831E
3 changed files with 112 additions and 0 deletions

View file

@ -0,0 +1,33 @@
{ config, pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
kernel.sysctl."vm.swappiness" = 5;
cleanTmpDir = true;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd = {
availableKernelModules = [ "battery" ]; # wat
luks.devices."${config.networking.hostName}" = {
name = config.networking.hostName;
device = "/dev/disk/by-uuid/9df93bae-80b9-48c2-be43-b73994afda5b";
preLVM = true;
allowDiscards = true;
};
};
};
services.udev.packages = [
pkgs.android-udev-rules
pkgs.openocd
(pkgs.callPackage ./externals/rules/adafruit.nix { })
(pkgs.callPackage ./externals/rules/fpga.nix { })
(pkgs.callPackage ./externals/rules/limesuite.nix { })
(pkgs.callPackage ./externals/rules/uhk.nix { })
];
}

29
system/spike/default.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
imports = [ ./boot-config.nix ./hardware-configuration.nix ];
networking.hostName = "spike";
hardware = {
cpu.intel.updateMicrocode = true;
opengl.extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
];
};
services = {
tlp.enable = true;
upower.enable = true;
throttled.enable = true;
};
programs.light.enable = true;
environment.systemPackages = with pkgs; [
i7z
linuxPackages.cpupower
];
system.stateVersion = "20.03";
}

View file

@ -0,0 +1,50 @@
# 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 = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/54a16759-45b0-4b30-92d9-d60ee6815511";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/54a16759-45b0-4b30-92d9-d60ee6815511";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/var/lib/flatpak" =
{ device = "/dev/disk/by-uuid/54a16759-45b0-4b30-92d9-d60ee6815511";
fsType = "btrfs";
options = [ "subvol=flatpak" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/54a16759-45b0-4b30-92d9-d60ee6815511";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/597E-B7FC";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/52effd04-0e5a-4ac6-a0c9-5970c063e5f4"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}