move tree config to another file to tidy up outputs.nix
This commit is contained in:
parent
7b0310b368
commit
e4e76442d9
|
@ -5,29 +5,11 @@ let
|
|||
tree.impure.modules.nixos
|
||||
tree.impure.profiles.base
|
||||
];
|
||||
defaultModulesNixOSUnstable = defaultModules ++ [
|
||||
# NO_INLINE
|
||||
inputs.home-manager-unstable.nixosModules.home-manager
|
||||
];
|
||||
|
||||
defaultSpecialArgs = {
|
||||
tree = tree.impure;
|
||||
pureTree = tree.pure;
|
||||
};
|
||||
|
||||
defaultSpecialArgsNixOSUnstable = defaultSpecialArgs // {
|
||||
inputs = inputs // {
|
||||
# set these to the correct versions from inputs
|
||||
nixpkgs = inputs.nixpkgs-unstable;
|
||||
home-manager = inputs.home-manager-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem;
|
||||
|
||||
in {
|
||||
inherit defaultModules;
|
||||
inherit defaultModulesNixOSUnstable;
|
||||
inherit defaultSpecialArgs;
|
||||
inherit defaultSpecialArgsNixOSUnstable;
|
||||
inherit defaultModules;
|
||||
inherit defaultSpecialArgs;
|
||||
}
|
||||
|
|
|
@ -3,41 +3,52 @@ let
|
|||
|
||||
defaults = import ./defaults.nix inputs;
|
||||
|
||||
defaultModulesNixOSUnstable = defaults.defaultModulesNixOSUnstable;
|
||||
defaultSpecialArgsNixOSUnstable = defaults.defaultSpecialArgsNixOSUnstable;
|
||||
nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem;
|
||||
|
||||
defaultSpecialArgs = defaults.defaultSpecialArgs // {
|
||||
inputs = inputs // {
|
||||
# set these to the correct versions from inputs
|
||||
nixpkgs = inputs.nixpkgs-unstable;
|
||||
home-manager = inputs.home-manager-unstable;
|
||||
};
|
||||
};
|
||||
|
||||
defaultModules = defaults.defaultModules ++ [
|
||||
# NO_INLINE
|
||||
inputs.home-manager-unstable.nixosModules.home-manager
|
||||
];
|
||||
|
||||
nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem;
|
||||
in {
|
||||
lappy = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgsNixOSUnstable;
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModulesNixOSUnstable
|
||||
modules = defaultModules
|
||||
++ [ ./lappy/lappy.nix ./lappy/hardware.nix ];
|
||||
};
|
||||
|
||||
lappy-vm = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgsNixOSUnstable;
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModulesNixOSUnstable
|
||||
modules = defaultModules
|
||||
++ [ ./lappy/lappy.nix ./lappy/vm.nix ];
|
||||
};
|
||||
|
||||
rescue-x86_64 = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgsNixOSUnstable;
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModulesNixOSUnstable ++ [ ./rescue/rescue.nix ];
|
||||
modules = defaultModules ++ [ ./rescue/rescue.nix ];
|
||||
};
|
||||
|
||||
hetzner-vm = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgsNixOSUnstable;
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "x86_64-linux";
|
||||
modules = defaultModulesNixOSUnstable ++ [ ./hetzner-vm/hetzner-vm.nix ];
|
||||
modules = defaultModules ++ [ ./hetzner-vm/hetzner-vm.nix ];
|
||||
};
|
||||
|
||||
# nix --no-sandbox build .#nixosConfigurations.raspberry.config.system.build.sdImage
|
||||
raspberry = nixosUnstableSystem {
|
||||
specialArgs = defaultSpecialArgsNixOSUnstable;
|
||||
specialArgs = defaultSpecialArgs;
|
||||
system = "aarch64-linux";
|
||||
modules = defaultModulesNixOSUnstable ++ [ ./raspberry/raspberry.nix ];
|
||||
modules = defaultModules ++ [ ./raspberry/raspberry.nix ];
|
||||
};
|
||||
}
|
||||
|
|
39
outputs.nix
39
outputs.nix
|
@ -1,44 +1,9 @@
|
|||
{ self, nixpkgs-unstable, deploy-rs, ... }@inputs:
|
||||
let
|
||||
mkTree = import ./tree.nix { inherit (nixpkgs-unstable) lib; };
|
||||
pkgs-x86_64-linux = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
tree = mkTree {
|
||||
inherit inputs;
|
||||
folder = ./.;
|
||||
config = {
|
||||
"hosts/*/services".functor.enable = true;
|
||||
"hosts/raspberry/services/music-friend".functor.enable = true;
|
||||
"hosts/*/home".functor.enable = true;
|
||||
"hosts/*/profiles".functor.enable = true;
|
||||
"profiles/*".functor.enable = true;
|
||||
"profiles/sound/*".functor.enable = true;
|
||||
"profiles/sound/pulseaudio/*".functor.enable = true;
|
||||
"profiles/connectivity/*".functor.enable = true;
|
||||
"profiles/gaming/*".functor.enable = true;
|
||||
"profiles/gui/environments/*".functor.enable = true;
|
||||
"users/*".functor.enable = true;
|
||||
"home/*".functor.enable = true;
|
||||
"home/gui/environments/*".functor.enable = true;
|
||||
"home/apps/*".functor.enable = true;
|
||||
"home/gaming/emulators/*".functor.enable = true;
|
||||
"home/gaming/games/*".functor.enable = true;
|
||||
"home/gaming/platforms/*".functor.enable = true;
|
||||
tree = (import ./treeConfig.nix { inherit mkTree; }).tree;
|
||||
|
||||
"home/programming/languages/*".functor.enable = true;
|
||||
"modules/nixos" = {
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [ ];
|
||||
};
|
||||
};
|
||||
"modules/home" = {
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
pkgs-x86_64-linux = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
hosts = import ./hosts ({ inherit tree; } // inputs);
|
||||
in {
|
||||
nixosConfigurations = hosts.nixosConfigurations;
|
||||
|
|
2
tree.nix
2
tree.nix
|
@ -1,5 +1,5 @@
|
|||
{ lib }:
|
||||
{ config, folder, inputs, ... }@args:
|
||||
{ config, folder, ... }@args:
|
||||
with lib;
|
||||
let
|
||||
# Made by kat witch (kittywitch)
|
||||
|
|
38
treeConfig.nix
Normal file
38
treeConfig.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{mkTree, ...}: {
|
||||
tree = mkTree {
|
||||
folder = ./.;
|
||||
config = {
|
||||
"hosts/*/services".functor.enable = true;
|
||||
"hosts/raspberry/services/music-friend".functor.enable = true;
|
||||
"hosts/*/home".functor.enable = true;
|
||||
"hosts/*/profiles".functor.enable = true;
|
||||
"profiles/*".functor.enable = true;
|
||||
"profiles/sound/*".functor.enable = true;
|
||||
"profiles/sound/pulseaudio/*".functor.enable = true;
|
||||
"profiles/connectivity/*".functor.enable = true;
|
||||
"profiles/gaming/*".functor.enable = true;
|
||||
"profiles/gui/environments/*".functor.enable = true;
|
||||
"users/*".functor.enable = true;
|
||||
"home/*".functor.enable = true;
|
||||
"home/gui/environments/*".functor.enable = true;
|
||||
"home/apps/*".functor.enable = true;
|
||||
"home/gaming/emulators/*".functor.enable = true;
|
||||
"home/gaming/games/*".functor.enable = true;
|
||||
"home/gaming/platforms/*".functor.enable = true;
|
||||
|
||||
"home/programming/languages/*".functor.enable = true;
|
||||
"modules/nixos" = {
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [ ];
|
||||
};
|
||||
};
|
||||
"modules/home" = {
|
||||
functor = {
|
||||
enable = true;
|
||||
external = [ ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue