clean up some things

This commit is contained in:
stupidcomputer 2024-12-26 16:19:59 -06:00
parent 73f349ccf1
commit 76b6b1097c
6 changed files with 37 additions and 42 deletions

View File

@ -6,8 +6,8 @@
./nvidia.nix ./nvidia.nix
./services ./services
../../config/copernicus.nix ../../config/copernicus.nix
../../modules/hosts.nix ../../lib/hosts.nix
../../modules/bootstrap.nix ../../lib/bootstrap.nix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -1,22 +1,20 @@
{ lib, config, pkgs, machines, ... }: { lib, config, pkgs, machines, ... }:
{ {
imports = imports = [
[
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/bootstrap.nix ../../lib/bootstrap.nix
./franklincce.nix
./gitea.nix
./mail.nix
./nextcloud.nix
./nginx.nix
./radicale.nix ./radicale.nix
./ssh.nix ./ssh.nix
./gitea.nix
./radicale.nix
./vaultwarden.nix
./sslh.nix ./sslh.nix
./nginx.nix ./vaultwarden.nix
./franklincce.nix
./wireguard.nix ./wireguard.nix
./nextcloud.nix
./mail.nix
]; ];
nix = { nix = {

View File

@ -1,5 +1,5 @@
{ {
description = "rndusr's nixos flake"; description = "stupidcomputer's nixos flake";
inputs = { inputs = {
# regular nixos stuff # regular nixos stuff
@ -14,29 +14,26 @@
nixpkgs, nixpkgs,
simple-nixos-mailserver, simple-nixos-mailserver,
... ...
}@inputs: { }@inputs: let
nixosConfigurations = { mkSystem = modules:
netbox = nixpkgs.lib.nixosSystem { nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { inherit inputs; } // { machines = import ./machines.nix; }; specialArgs = {
modules = [ inherit inputs;
./boxes/netbox machines = import ./lib/machines.nix;
];
}; };
copernicus = nixpkgs.lib.nixosSystem { inherit modules;
system = "x86_64-linux";
specialArgs = { inherit inputs; } // { machines = import ./machines.nix; };
modules = [
./boxes/copernicus
];
};
aristotle = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; } // { machines = import ./machines.nix; };
modules = [
./lappy/configuration.nix
];
}; };
generateNixosConfigurations = configurations:
builtins.listToAttrs (
map (name: {
inherit name;
value = mkSystem [ (./boxes/. + "/${name}") ];
}) configurations
);
in {
nixosConfigurations = generateNixosConfigurations [ "netbox" "copernicus" ] // {
aristotle = mkSystem [ ./lappy/configuration.nix ];
}; };
}; };
} }