now using flake-parts; refactored nixosConfigurations; using hm standalone
This commit is contained in:
parent
7f64d49052
commit
816496fbab
104 changed files with 1414 additions and 1910 deletions
14
hosts/io/boot.nix
Normal file
14
hosts/io/boot.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
boot = {
|
||||
# TODO check if future kernel versions fix boot issue with systemd initrd with tpm
|
||||
initrd.systemd.tpm2.enable = false;
|
||||
kernelParams = [
|
||||
"nosgx"
|
||||
"i915.fastboot=1"
|
||||
"mem_sleep_default=deep"
|
||||
];
|
||||
extraModprobeConfig = ''
|
||||
options snd-intel-dspcfg dsp_driver=3
|
||||
'';
|
||||
};
|
||||
}
|
||||
83
hosts/io/disko.nix
Normal file
83
hosts/io/disko.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [ inputs.disko.nixosModules.default ];
|
||||
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/disk/by-id/mmc-hDEaP3_0x1041b689";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
start = "1MiB";
|
||||
end = "1GiB";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot/efi";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
};
|
||||
cryptroot = {
|
||||
priority = 2;
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "cryptroot";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ];
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"subvol=@root"
|
||||
];
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"subvol=@home"
|
||||
];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"subvol=@nix"
|
||||
];
|
||||
};
|
||||
"@persistent" = {
|
||||
mountpoint = "/persistent";
|
||||
mountOptions = [
|
||||
"noatime"
|
||||
"compress=zstd"
|
||||
"subvol=@persistent"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
36
hosts/io/hardware-configuration.nix
Normal file
36
hosts/io/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
};
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 100;
|
||||
};
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
27
hosts/io/programs.nix
Normal file
27
hosts/io/programs.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
cml-ucm-conf = pkgs.alsa-ucm-conf.overrideAttrs {
|
||||
wttsrc = pkgs.fetchFromGitHub {
|
||||
owner = "WeirdTreeThing";
|
||||
repo = "chromebook-ucm-conf";
|
||||
rev = "b6ce2a7";
|
||||
hash = "sha256-QRUKHd3RQmg1tnZU8KCW0AmDtfw/daOJ/H3XU5qWTCc=";
|
||||
};
|
||||
postInstall = ''
|
||||
echo "v0.4.1" > $out/chromebook.patched
|
||||
cp -R $wttsrc/{common,codecs,platforms} $out/share/alsa/ucm2
|
||||
cp -R $wttsrc/{cml,sof-rt5682} $out/share/alsa/ucm2/conf.d
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
maliit-keyboard
|
||||
sof-firmware
|
||||
];
|
||||
sessionVariables.ALSA_CONFIG_UCM2 = "${cml-ucm-conf}/share/alsa/ucm2";
|
||||
};
|
||||
}
|
||||
59
hosts/io/services.nix
Normal file
59
hosts/io/services.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services = {
|
||||
keyd = {
|
||||
enable = true;
|
||||
keyboards.main = {
|
||||
ids = [ "0001:0001" ];
|
||||
settings = {
|
||||
main = {
|
||||
meta = "overload(meta, esc)";
|
||||
f1 = "back";
|
||||
f2 = "forward";
|
||||
f3 = "refresh";
|
||||
f4 = "M-f11";
|
||||
f5 = "M-w";
|
||||
f6 = "brightnessdown";
|
||||
f7 = "brightnessup";
|
||||
f8 = "timeout(mute, 200, micmute)";
|
||||
f9 = "play";
|
||||
f10 = "timeout(nextsong, 200, previoussong)";
|
||||
f13 = "delete";
|
||||
"102nd" = "layer(function)";
|
||||
};
|
||||
shift = {
|
||||
leftshift = "capslock";
|
||||
rightshift = "capslock";
|
||||
};
|
||||
function = {
|
||||
escape = "f1";
|
||||
f1 = "f2";
|
||||
f2 = "f3";
|
||||
f3 = "f4";
|
||||
f4 = "f5";
|
||||
f5 = "f6";
|
||||
f6 = "f7";
|
||||
f7 = "f8";
|
||||
f8 = "f9";
|
||||
f9 = "f10";
|
||||
f10 = "f11";
|
||||
f13 = "f12";
|
||||
y = "sysrq";
|
||||
k = "home";
|
||||
l = "pageup";
|
||||
"," = "end";
|
||||
"." = "pagedown";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: remove once gmodena/nix-flatpak/issues/45 fixed
|
||||
systemd.services."flatpak-managed-install" = {
|
||||
serviceConfig = {
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/sleep 5";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue