From 85b2b6ea1ebf0ce5f502ed342e2c8ceb752916dd Mon Sep 17 00:00:00 2001 From: Artemis Tosini Date: Fri, 4 Dec 2020 23:35:51 +0000 Subject: [PATCH] Add device-specific config for mistmane. x86_64 stuff still not in set --- sets/hardware.nix | 1 + system/mistmane/boot-config.nix | 25 ++++++++++++++ system/mistmane/default.nix | 13 ++++++++ system/mistmane/hardware-configuration.nix | 38 ++++++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100644 system/mistmane/boot-config.nix create mode 100644 system/mistmane/hardware-configuration.nix diff --git a/sets/hardware.nix b/sets/hardware.nix index c83e177..39aa4eb 100644 --- a/sets/hardware.nix +++ b/sets/hardware.nix @@ -10,6 +10,7 @@ environment.systemPackages = with pkgs; [ kicad-unstable openocd + picocom stlink (callPackage ../externals/packages/jlink { }) ]; diff --git a/system/mistmane/boot-config.nix b/system/mistmane/boot-config.nix new file mode 100644 index 0000000..1fe82e0 --- /dev/null +++ b/system/mistmane/boot-config.nix @@ -0,0 +1,25 @@ +{ config, pkgs, ... }: + +{ + boot = { + kernel.sysctl."vm.swappiness" = 5; + cleanTmpDir = true; + loader.grub.enable = false; + loader.generic-extlinux-compatible.enable = true; + + initrd = { + luks.devices."${config.networking.hostName}" = { + name = config.networking.hostName; + device = "/dev/disk/by-uuid/aa3cac7f-695a-40d4-ad2b-f781ddd3c8e1"; + preLVM = true; + allowDiscards = true; + }; + }; + }; + + fileSystems = { + "/home".options = [ "noatime" ]; + "/boot".options = [ "noatime" ]; + "/".options = [ "noatime" ]; + }; +} diff --git a/system/mistmane/default.nix b/system/mistmane/default.nix index 14f09ff..be4d478 100644 --- a/system/mistmane/default.nix +++ b/system/mistmane/default.nix @@ -2,6 +2,19 @@ { imports = [ + ./boot-config.nix + ./hardware-configuration.nix ../../externals/wip-pinebook-pro/pinebook_pro.nix + ../../sets/neovim + ../../sets/sway.nix + ../../sets/networkmanager.nix + ]; + + networking.hostName = "mistmane"; + programs.light.enable = true; + system.stateVersion = "20.09"; + + environment.systemPackages = with pkgs; [ + foot ]; } diff --git a/system/mistmane/hardware-configuration.nix b/system/mistmane/hardware-configuration.nix new file mode 100644 index 0000000..faf4a4a --- /dev/null +++ b/system/mistmane/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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" "usbhid" "usb_storage" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/de73bbb6-e56a-4aa0-8a48-c18c9d87a2b9"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/de73bbb6-e56a-4aa0-8a48-c18c9d87a2b9"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/DB30-D60A"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/33353309-c592-40ba-8a72-f629c0776a82"; } + ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; +}