First implementation for hermes

This commit is contained in:
Paul-Mathias Logue 2025-12-13 20:14:02 +01:00
parent 03f9a9de88
commit 45992b10ae
16 changed files with 535 additions and 409 deletions

View file

@ -9,52 +9,63 @@
inputs.nixpkgs.follows = "nixpkgs";
};
apple-fonts.url= "github:Lyndeno/apple-fonts.nix";
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self, ... }@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
outputs = { self, nixpkgs, lanzaboote, apple-fonts, ...}: {
nixosConfigurations = {
hermes = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
# This is not a complete NixOS configuration and you need to reference
# your normal configuration here.
lanzaboote.nixosModules.lanzaboote
./configuration.nix
./hardware-configuration.nix
({ pkgs, lib, ... }: {
nixpkgs.config.allowUnfree = true;
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
fonts.packages = [
apple-fonts.packages."x86_64-linux".sf-pro
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.bootspec.enable = true;
boot.initrd.systemd.enable = true;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
forEachSupportedSystem =
f:
inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f {
inherit system;
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
})
}
);
in
{
nixosConfigurations.hermes = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./machines/hermes
./users/pml.nix
];
};
};
};
}
devShells = forEachSupportedSystem (
{ pkgs, system }:
{
default = pkgs.mkShellNoCC {
packages = with pkgs; [
self.formatter.${system}
nixd
];
};
}
);
# Nix formatter
# This applies the formatter that follows RFC 166, which defines a standard format:
# https://github.com/NixOS/rfcs/pull/166
# To format all Nix files:
# git ls-files -z '*.nix' | xargs -0 -r nix fmt
# To check formatting:
# git ls-files -z '*.nix' | xargs -0 -r nix develop --command nixfmt --check
formatter = forEachSupportedSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
};
}