Switch to lix

This commit is contained in:
monologiq 2025-12-23 17:20:55 +01:00
parent 764a05c73c
commit d0c6f19a09
22 changed files with 544 additions and 632 deletions

View file

@ -1,59 +1,54 @@
{
description = "monologiq's systems";
inputs = {
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.11";
nix-darwin.url = "github:nix-darwin/nix-darwin/nix-darwin-25.11";
nix-darwin.url = "github:nix-darwin/nix-darwin?ref=nix-darwin-25.11";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
lanzaboote.url = "github:nix-community/lanzaboote/v1.0.0";
lanzaboote.url = "github:nix-community/lanzaboote?ref=master";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
apple-fonts.inputs.nixpkgs.follows = "nixpkgs";
};
outputs =
{ self, ... }@inputs:
{ self, nixpkgs, ... }@inputs:
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
];
lib = import ./lib { inherit (inputs.nixpkgs) lib; };
pkgsFor =
system:
import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
forEachSupportedSystem =
f:
inputs.nixpkgs.lib.genAttrs supportedSystems (
system:
f {
inherit system;
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
};
pkgs = pkgsFor system;
}
);
in
{
nixosConfigurations."hermes" = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
nixosConfigurations."persephone" = nixpkgs.lib.nixosSystem {
modules = [
{ nixpkgs.overlays = [ self.overlays.default ]; }
./machines/hermes
./users/pml.nix
];
};
darwinConfigurations."mercure" = inputs.nix-darwin.lib.darwinSystem {
modules = [
{ system.configurationRevision = self.rev or self.dirtyRev or null; }
./machines/mercure
inputs.lanzaboote.nixosModules.lanzaboote
./machines/persephone.nix
];
};
overlays.default = import ./overlays;
darwinConfigurations."hermes" = inputs.nix-darwin.lib.darwinSystem {
modules = [
{ system.configurationRevision = self.rev or self.dirtyRev or null; }
./machines/hermes.nix
];
};
devShells = forEachSupportedSystem (
{ pkgs, system }:
@ -67,15 +62,6 @@
}
);
# 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);
};
}