use continuwuity from nixpkgs
This commit is contained in:
parent
0a808e1d53
commit
a6c96c23ae
1 changed files with 104 additions and 120 deletions
137
flake.nix
137
flake.nix
|
|
@ -2,14 +2,10 @@
|
|||
inputs = {
|
||||
gnome-mobile.url = "github:chuangzhu/nixpkgs-gnome-mobile";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-lasuite.url = "github:Henry-Hiles/nixpkgs/bump-lasuite";
|
||||
nixpkgs-continuwuity.url = "github:savyajha/nixpkgs/continuwuity";
|
||||
wrapper-manager.url = "github:viperML/wrapper-manager";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nix-maid.url = "github:viperML/nix-maid";
|
||||
continuwuity = {
|
||||
url = "path:/home/quadradical/Documents/Code/continuwuity";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -64,49 +60,44 @@
|
|||
};
|
||||
};
|
||||
|
||||
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)
|
||||
);
|
||||
|
||||
config.permittedInsecurePackages = [
|
||||
"libsoup-2.74.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
modules =
|
||||
let
|
||||
clientPath = ./clients/${info.hostname};
|
||||
overlays = let
|
||||
path = ./cross-overlays/${info.hostname};
|
||||
in
|
||||
with dirUtils;
|
||||
dirUtils.opt (builtins.pathExists path) (
|
||||
map (file: import file inputs) (lib.filesystem.listFilesRecursive path)
|
||||
);
|
||||
|
||||
config.permittedInsecurePackages = [
|
||||
"libsoup-2.74.3"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
]
|
||||
|
|
@ -122,31 +113,29 @@
|
|||
./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";
|
||||
|
|
@ -155,22 +144,22 @@
|
|||
}
|
||||
// value
|
||||
)
|
||||
)
|
||||
{
|
||||
"quadraticpc".type = "desktop";
|
||||
"quadtop".type = "desktop";
|
||||
"quadraticserver" = {
|
||||
type = "server";
|
||||
graphical = false;
|
||||
};
|
||||
"quadphone" = {
|
||||
type = "mobile";
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
"everquad" = {
|
||||
type = "mobile";
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
)
|
||||
{
|
||||
"quadraticpc".type = "desktop";
|
||||
"quadtop".type = "desktop";
|
||||
"quadraticserver" = {
|
||||
type = "server";
|
||||
graphical = false;
|
||||
};
|
||||
"quadphone" = {
|
||||
type = "mobile";
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
"everquad" = {
|
||||
type = "mobile";
|
||||
system = "aarch64-linux";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue