building
This commit is contained in:
parent
d088d31c37
commit
d7c1e54788
9 changed files with 54 additions and 34 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
result
|
|
@ -17,6 +17,4 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.allowMissingModules = true;
|
boot.initrd.allowMissingModules = true;
|
||||||
|
|
||||||
nixpkgs.config.allowBroken = true;
|
|
||||||
}
|
}
|
||||||
|
|
51
flake.nix
51
flake.nix
|
@ -73,31 +73,35 @@
|
||||||
inherit (info) system;
|
inherit (info) system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs dirUtils;
|
inherit inputs dirUtils;
|
||||||
isDesktop = info.isDesktop or false;
|
inherit (info) type;
|
||||||
|
|
||||||
crossPkgs = import inputs.nixpkgs {
|
crossPkgs = import inputs.nixpkgs {
|
||||||
hostPlatform = info.system;
|
hostPlatform = info.system;
|
||||||
localSystem = info.system;
|
localSystem = info.system;
|
||||||
buildPlatform = "x86_64-linux";
|
buildPlatform = "x86_64-linux";
|
||||||
|
|
||||||
overlays = let
|
overlays = let path = ./cross-overlays/${info.hostname}; in dirUtils.opt (builtins.pathExists path) (map (file: import file inputs) (lib.filesystem.listFilesRecursive path));
|
||||||
overlays = lib.filesystem.listFilesRecursive ./cross-overlays/${info.hostname};
|
|
||||||
in
|
config.permittedInsecurePackages = [
|
||||||
map (file: import file inputs) overlays;
|
"libsoup-2.74.3"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = with dirUtils;
|
modules = let
|
||||||
|
clientPath = ./clients/${info.hostname};
|
||||||
|
in
|
||||||
|
with dirUtils;
|
||||||
[
|
[
|
||||||
./wrappers/default.nix
|
./wrappers/default.nix
|
||||||
{networking.hostName = info.hostname;}
|
{networking.hostName = info.hostname;}
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
inputs.run0-sudo-shim.nixosModules.default
|
inputs.run0-sudo-shim.nixosModules.default
|
||||||
]
|
]
|
||||||
++ dirFiles ".nix" ./clients/${info.hostname}
|
|
||||||
++ dirFiles ".nix" ./modules/common
|
++ dirFiles ".nix" ./modules/common
|
||||||
++ opt (info.isServer or false) (dirFiles ".nix" ./modules/server)
|
++ dirFiles ".nix" ./modules/${info.type}
|
||||||
++ opt (info.isDesktop or false) (dirFiles ".nix" ./modules/desktop)
|
++ opt (builtins.pathExists clientPath) (dirFiles ".nix" clientPath)
|
||||||
++ opt (info.isGraphical or info.isDesktop or false) (
|
++ opt info.graphical (
|
||||||
(dirFiles ".nix" ./modules/graphical)
|
(dirFiles ".nix" ./modules/graphical)
|
||||||
++ [
|
++ [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
@ -117,17 +121,32 @@
|
||||||
program = pkgs.writeShellApplication {
|
program = pkgs.writeShellApplication {
|
||||||
name = "image";
|
name = "image";
|
||||||
runtimeInputs = with pkgs; [nix-output-monitor];
|
runtimeInputs = with pkgs; [nix-output-monitor];
|
||||||
text = "nom build .#nixosConfigurations.quadphone.config.system.build.image";
|
text = "nom build .#nixosConfigurations.\"$1\".config.system.build.image";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.nixosConfigurations = builtins.mapAttrs (name: value: system ({system = "x86_64-linux";} // value // {hostname = name;})) {
|
flake.nixosConfigurations = builtins.mapAttrs (name: value:
|
||||||
"quadraticpc".isDesktop = true;
|
system (
|
||||||
"quadtop".isDesktop = true;
|
{
|
||||||
"quadraticserver".isServer = true;
|
system = "x86_64-linux";
|
||||||
|
graphical = true;
|
||||||
|
hostname = name;
|
||||||
|
}
|
||||||
|
// value
|
||||||
|
)) {
|
||||||
|
"quadraticpc".type = "desktop";
|
||||||
|
"quadtop".type = "desktop";
|
||||||
|
"quadraticserver" = {
|
||||||
|
type = "server";
|
||||||
|
graphical = false;
|
||||||
|
};
|
||||||
"quadphone" = {
|
"quadphone" = {
|
||||||
isGraphical = true;
|
type = "mobile";
|
||||||
|
system = "aarch64-linux";
|
||||||
|
};
|
||||||
|
"everquad" = {
|
||||||
|
type = "mobile";
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
inkscape
|
inkscape
|
||||||
libreoffice
|
libreoffice
|
||||||
authenticator
|
authenticator
|
||||||
cinny-desktop
|
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
cinny-desktop
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,5 +9,6 @@
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
google-cursor
|
google-cursor
|
||||||
papirus-icon-theme
|
papirus-icon-theme
|
||||||
|
# crossPkgs.cinny-desktop
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
1
modules/mobile/allow-broken.nix
Normal file
1
modules/mobile/allow-broken.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{nixpkgs.config.allowBroken = true;}
|
|
@ -2,14 +2,14 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
dirUtils,
|
dirUtils,
|
||||||
isDesktop,
|
type,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(inputs.wrapper-manager.lib {
|
(inputs.wrapper-manager.lib {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
modules = with dirUtils; dirFiles ".nix" ./common ++ opt isDesktop (dirFiles ".nix" ./desktop);
|
modules = with dirUtils; dirFiles ".nix" ./common ++ opt (type == "desktop") (dirFiles ".nix" ./desktop);
|
||||||
})
|
})
|
||||||
.config.build.toplevel
|
.config.build.toplevel
|
||||||
];
|
];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue