fixes and formatting

This commit is contained in:
Henry Hiles 2025-09-23 09:17:26 -04:00
commit 80cf48f1e8
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

127
flake.nix
View file

@ -60,44 +60,49 @@
};
};
outputs = inputs: let
lib = inputs.nixpkgs.lib;
dirUtils = {
opt = lib.optionals;
dirFiles = type: dir: lib.filter (lib.hasSuffix type) (lib.filesystem.listFilesRecursive dir);
};
system = info:
lib.nixosSystem {
inherit (info) system;
specialArgs = {
inherit inputs dirUtils;
inherit (info) type;
outputs =
inputs:
let
lib = inputs.nixpkgs.lib;
dirUtils = {
opt = lib.optionals;
dirFiles = type: dir: lib.filter (lib.hasSuffix type) (lib.filesystem.listFilesRecursive dir);
};
system =
info:
lib.nixosSystem {
inherit (info) system;
specialArgs = {
inherit inputs dirUtils;
inherit (info) type;
crossPkgs = import inputs.nixpkgs {
hostPlatform = info.system;
localSystem = info.system;
buildPlatform = "x86_64-linux";
crossPkgs = import inputs.nixpkgs {
hostPlatform = info.system;
localSystem = info.system;
buildPlatform = "x86_64-linux";
overlays = let
path = ./cross-overlays/${info.hostname};
in
dirUtils.opt (builtins.pathExists path) (
map (file: import file inputs) (lib.filesystem.listFilesRecursive path)
);
overlays =
let
path = ./cross-overlays/${info.hostname};
in
dirUtils.opt (builtins.pathExists path) (
map (file: import file inputs) (lib.filesystem.listFilesRecursive path)
);
config.permittedInsecurePackages = [
"libsoup-2.74.3"
];
config.permittedInsecurePackages = [
"libsoup-2.74.3"
];
};
};
};
modules = let
clientPath = ./clients/${info.hostname};
in
with dirUtils;
modules =
let
clientPath = ./clients/${info.hostname};
in
with dirUtils;
[
./wrappers/default.nix
{networking.hostName = info.hostname;}
{ networking.hostName = info.hostname; }
inputs.agenix.nixosModules.default
inputs.run0-sudo-shim.nixosModules.default
]
@ -113,29 +118,31 @@
./stylix.nix
]
);
};
in
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
};
in
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"aarch64-linux"
"x86_64-linux"
];
perSystem = {pkgs, ...}: {
apps.image = {
type = "app";
program = pkgs.writeShellApplication {
name = "image";
runtimeInputs = with pkgs; [nix-output-monitor];
text = "nom build .#nixosConfigurations.\"$1\".config.system.build.image";
perSystem =
{ pkgs, ... }:
{
apps.image = {
type = "app";
program = pkgs.writeShellApplication {
name = "image";
runtimeInputs = with pkgs; [ nix-output-monitor ];
text = "nom build .#nixosConfigurations.\"$1\".config.system.build.image";
};
};
};
};
flake.nixosConfigurations =
builtins.mapAttrs
(
name: value:
(
name: value:
system (
{
system = "x86_64-linux";
@ -144,22 +151,22 @@
}
// value
)
)
{
"quadraticpc".type = "desktop";
"quadtop".type = "desktop";
"quadraticserver" = {
type = "server";
graphical = false;
)
{
"quadraticpc".type = "desktop";
"quadtop".type = "desktop";
"quadraticserver" = {
type = "server";
graphical = false;
};
"quadphone" = {
type = "mobile";
system = "aarch64-linux";
};
"everquad" = {
type = "mobile";
system = "aarch64-linux";
};
};
"quadphone" = {
type = "mobile";
system = "aarch64-linux";
};
"everquad" = {
type = "mobile";
system = "aarch64-linux";
};
};
};
}