Reorganize
This commit is contained in:
parent
0ce1331346
commit
b506e8af60
1 changed files with 2130 additions and 183 deletions
48
flake.nix
48
flake.nix
|
|
@ -2,14 +2,11 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
wrapper-manager.url = "github:viperML/wrapper-manager";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
disko = {
|
||||
url = "github:nix-community/disko";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
firefox-gnome-theme = {
|
||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||
flake = false;
|
||||
};
|
||||
run0-sudo-shim = {
|
||||
url = "github:lordgrimmauld/run0-sudo-shim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
|
@ -54,6 +51,14 @@
|
|||
url = "github:nix-community/nh";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
firefox-gnome-theme = {
|
||||
url = "github:rafaelmardojai/firefox-gnome-theme";
|
||||
flake = false;
|
||||
};
|
||||
sdm845 = {
|
||||
url = "github:linyinfeng/dotfiles";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = inputs: let
|
||||
|
|
@ -62,9 +67,9 @@
|
|||
opt = lib.optionals;
|
||||
dirFiles = type: dir: lib.filter (lib.hasSuffix type) (lib.filesystem.listFilesRecursive dir);
|
||||
};
|
||||
system = hostname: isDesktop:
|
||||
system = hostname: isDesktop: isGraphical: arch:
|
||||
lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
system = "${arch}-linux";
|
||||
specialArgs = {
|
||||
inherit inputs isDesktop dirUtils;
|
||||
};
|
||||
|
|
@ -79,8 +84,9 @@
|
|||
++ dirFiles ".nix" ./clients/${hostname}
|
||||
++ dirFiles ".nix" ./modules/common
|
||||
++ opt (!isDesktop) (dirFiles ".nix" ./modules/server)
|
||||
++ opt isDesktop (
|
||||
(dirFiles ".nix" ./modules/desktop)
|
||||
++ opt isDesktop (dirFiles ".nix" ./modules/desktop)
|
||||
++ opt isGraphical (
|
||||
(dirFiles ".nix" ./modules/graphical)
|
||||
++ [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.stylix.nixosModules.stylix
|
||||
|
|
@ -88,13 +94,23 @@
|
|||
]
|
||||
);
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = builtins.mapAttrs (name: value: system name value) {
|
||||
"quadraticserver" = false;
|
||||
"quadraticpc" = true;
|
||||
"quadtop" = true;
|
||||
};
|
||||
in
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["aarch64-linux" "x86_64-linux"];
|
||||
|
||||
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
||||
};
|
||||
perSystem = {pkgs, ...}: {
|
||||
formatter = pkgs.alejandra;
|
||||
};
|
||||
|
||||
flake.nixosConfigurations = builtins.mapAttrs (name: value: system name value.isDesktop (value.isGraphical or value.isDesktop) (value.arch or "x86_64")) {
|
||||
"quadraticserver".isDesktop = false;
|
||||
"quadraticpc".isDesktop = true;
|
||||
"quadtop".isDesktop = true;
|
||||
"quadphone" = {
|
||||
isDesktop = true;
|
||||
isGraphical = true;
|
||||
arch = "aarch64";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue