fixes and formatting
This commit is contained in:
parent
a6c96c23ae
commit
80cf48f1e8
1 changed files with 739 additions and 1103 deletions
127
flake.nix
127
flake.nix
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue