project-flake/flake.nix

72 lines
No EOL
2.1 KiB
Nix

{
description = "Project-A flake!";
inputs = {
nixpkgs.url = "nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
secret.url = "git+ssh://forgejo@git.project-a.space/Project-A/project-secret.git";
project-a-software.url = "git+ssh://forgejo@git.project-a.space/Project-A/project-software.git";
home-manager = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
winapps = {
url = "github:winapps-org/winapps";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs-unstable,
project-a-software,
home-manager,
winapps,
secret,
...
}: let
linux64 = "x86_64-linux";
nixosServer = { name, system ? linux64, modules ? [] }:
nixpkgs.lib.nixosSystem {
system = system;
specialArgs.pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
specialArgs.secret = secret.${name};
specialArgs.common-secret = secret.common;
modules = [
./servers/common/main.nix
./servers/${name}/main.nix
] ++ modules;
};
in {
nixosConfigurations = {
artemisia = nixosServer { name = "artemisia"; modules = [ project-a-software.marzban ]; };
reine = nixosServer { name = "reine"; modules = [ project-a-software.affine ]; };
mio = nixosServer { name = "mio"; modules = [ project-a-software.marzban ]; };
vanessa = nixosServer { name = "vanessa"; modules = [ project-a-software.marzban ]; };
aqore-nix = nixpkgs.lib.nixosSystem {
system = linux64;
specialArgs = {
inherit winapps;
pkgs-unstable = nixpkgs-unstable.legacyPackages.${linux64};
};
modules = [
./desktops/aqore-nix/main.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.almiriqi = ./desktops/users/almiriqi/home.nix;
}
({ pkgs, ... }: {
environment.systemPackages = [
winapps.packages."${linux64}".winapps
winapps.packages."${linux64}".winapps-launcher
];
})
];
};
};
};
}