Don't want to list everything, a ton of stuff 🥁

This commit is contained in:
Andrea Ciceri 2023-03-19 01:12:10 +01:00
parent f05ee0a658
commit 86fc4d7f9f
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
17 changed files with 492 additions and 70 deletions

View file

@ -41,7 +41,7 @@
agenix.overlays.default
comma.overlays.default
nur.overlay
nil.overlays.default
nil.overlays.default # FIXME This shouldn't be here
];
};
extraModules = lib.mkOption {
@ -69,7 +69,7 @@
internal = true;
default = hostname: config:
inputs.nixpkgsUnstable.lib.nixosSystem {
system = config.system;
inherit (config) system;
modules =
[
({lib, ...}: {
@ -98,6 +98,7 @@
specialArgs = {
fleetModules = builtins.map (moduleName: "${self.outPath}/modules/${moduleName}");
fleetHmModules = builtins.map (moduleName: "${self.outPath}/hmModules/${moduleName}");
fleetFlake = self;
};
};
};
@ -122,6 +123,16 @@
system = "aarch64-linux";
extraModules = [inputs.rock5b.nixosModules.default];
};
pbp = {
system = "aarch64-linux";
extraModules = with inputs; [
nixosHardware.nixosModules.pine64-pinebook-pro
disko.nixosModules.disko
];
extraHmModules = [
inputs.ccrEmacs.hmModules.default
];
};
};
flake.nixosConfigurations =

73
hosts/pbp/disko.nix Normal file
View file

@ -0,0 +1,73 @@
_: {
disk = {
emmc = {
device = "/dev/mmcblk2";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "root";
type = "partition";
start = "1MiB";
end = "-4G";
part-type = "primary";
bootable = false;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
}
{
name = "swap";
type = "partition";
start = "-4G";
end = "100%";
part-type = "primary";
content = {
type = "swap";
randomEncryption = true;
};
}
];
};
};
ssd = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
type = "partition";
name = "ESP";
start = "1MiB";
end = "1024MiB";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
}
{
name = "home";
type = "partition";
start = "1024MiB";
end = "100%";
part-type = "primary";
bootable = false;
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
}
];
};
};
};
}

View file

@ -4,6 +4,8 @@
pkgs,
...
}: {
disko.devices = import ./disko.nix {};
boot = {
initrd.availableKernelModules = ["usbhid"];
extraModulePackages = with config.boot.kernelPackages; [
@ -46,19 +48,6 @@
time.timeZone = "Europe/Rome";
fileSystems = {
"/" = {
device = "/dev/disk/by-label/nixos";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-label/boot";
fsType = "vfat";
};
};
swapDevices = [{device = "/dev/disk/by-label/swap";}];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
services.logind.extraConfig = ''

View file

@ -1,4 +1,5 @@
{
fleetFlake,
fleetModules,
lib,
pkgs,
@ -17,11 +18,13 @@
ccr.enable = true;
# programs.sway.enable = true;
services.rock5b-fan-control.enable = true;
nixpkgs.config.permittedInsecurePackages = [
"libav-11.12"
];
# nixpkgs.config.permittedInsecurePackages = [
# "libav-11.12"
# ];
fileSystems."/mnt/film" = {
device = "//ccr.ydns.eu/film";