142 lines
4.4 KiB
Nix
142 lines
4.4 KiB
Nix
{
|
|
description = "Config for triple-dezert server";
|
|
|
|
inputs = {
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable"; #todo: put this back to -small once jovian-nixos is fixed
|
|
nixpkgs.url = "nixpkgs/nixos-23.11-small";
|
|
nixpkgs2405.url = "nixpkgs/nixos-24.05-small";
|
|
nix-inspect = {
|
|
url = "github:bluskript/nix-inspect";
|
|
#inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
vscode-server = {
|
|
url = "github:nix-community/nixos-vscode-server";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nix-on-droid = {
|
|
url = "github:nix-community/nix-on-droid/release-23.05";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
jovian = {
|
|
url = "github:Jovian-Experiments/Jovian-NixOS";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
homeManager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
};
|
|
nix-search-cli = {
|
|
url = "github:peterldowns/nix-search-cli";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
padtype = {
|
|
url = "gitlab:shelvacu/padtype";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
microvm = {
|
|
url = "github:astro/microvm.nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nix-on-droid, ... }@inputs: {
|
|
debug.isoDeriv = (import "${inputs.nixpkgs}/nixos/release-small.nix" { nixpkgs = ({ revCount = 0; } // inputs.nixpkgs); });
|
|
nixosConfigurations.triple-dezert = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./triple-dezert ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.compute-deck = inputs.nixpkgs-unstable.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./compute-deck ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.liam = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./liam ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.lp0 = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./lp0 ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.shel-installer = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./installer.nix ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.devver = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./devver ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixosConfigurations.fw = inputs.nixpkgs2405.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [ ./fw ];
|
|
specialArgs = { inherit inputs; };
|
|
};
|
|
|
|
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
|
modules = [ ./nix-on-droid.nix ];
|
|
extraSpecialArgs = { inherit inputs; };
|
|
};
|
|
|
|
diskoConfigurations.compute-deck = import ./compute-deck/partitioning.nix;
|
|
|
|
checks = nixpkgs.lib.genAttrs [ "x86_64-linux" ] (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
config = {
|
|
node.pkgs = pkgs;
|
|
node.pkgsReadOnly = false;
|
|
node.specialArgs.selfPackages = self.packages.${system};
|
|
node.specialArgs.inputs = inputs;
|
|
};
|
|
in
|
|
{
|
|
liam = nixpkgs.lib.nixos.runTest {
|
|
hostPkgs = pkgs;
|
|
imports = [ config ./tests/liam.nix ];
|
|
};
|
|
trip = nixpkgs.lib.nixos.runTest {
|
|
hostPkgs = pkgs;
|
|
imports = [ config ./tests/triple-dezert.nix ];
|
|
};
|
|
# trip_haproxy_config = let
|
|
# hacfg = self.nixosConfigurations.triple-dezert.config.containers.frontproxy.config.services.haproxy;
|
|
# in pkgs.stdenvNoCC.mkDerivation {
|
|
# name = "trip-haproxy-config-check";
|
|
# script = ''
|
|
# mkdir -p certs/shelvacu.com/
|
|
# touch certs/shelvacu.com/full.pem
|
|
# ${hacfg.package}/bin/haproxy \
|
|
# -f ${pkgs.writeText "haproxy-config" hacfg.config} \
|
|
# -c \
|
|
# -dW \
|
|
# -dD \
|
|
# -C $PWD
|
|
# '';
|
|
# };
|
|
}
|
|
);
|
|
|
|
nixosModules.common = import ./common-config.nix;
|
|
packages.x86_64-linux.digitalOceanImage = import ./generic-digitalocean-nixos.nix { inherit inputs; };
|
|
};
|
|
}
|