2021-12-21 21:48:41 +00:00
|
|
|
{
|
|
|
|
description = "My deploy-rs config for logos";
|
|
|
|
|
|
|
|
inputs = {
|
2021-12-21 23:02:15 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2021-12-21 21:48:41 +00:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2021-12-21 23:02:15 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2021-12-21 21:48:41 +00:00
|
|
|
utils.url = "github:numtide/flake-utils";
|
2021-12-26 17:01:31 +00:00
|
|
|
|
|
|
|
# my apps
|
2022-02-19 19:24:42 +00:00
|
|
|
xe-printerfacts = {
|
|
|
|
url = "git+https://tulpa.dev/cadey/printerfacts.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "utils";
|
|
|
|
};
|
|
|
|
xe-mara = {
|
|
|
|
url = "git+https://tulpa.dev/Xe/mara.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2022-02-19 20:30:02 +00:00
|
|
|
rhea = {
|
|
|
|
url = "github:Xe/rhea";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2022-02-19 19:24:42 +00:00
|
|
|
outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, xe-printerfacts
|
2022-02-19 20:30:02 +00:00
|
|
|
, xe-mara, rhea, ... }:
|
2021-12-21 23:02:15 +00:00
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
|
|
|
mkSystem = extraModules:
|
2021-12-26 17:01:31 +00:00
|
|
|
nixpkgs.lib.nixosSystem rec {
|
2021-12-21 23:02:15 +00:00
|
|
|
system = "x86_64-linux";
|
2021-12-21 23:59:45 +00:00
|
|
|
modules = [
|
|
|
|
agenix.nixosModules.age
|
|
|
|
home-manager.nixosModules.home-manager
|
2021-12-22 00:02:15 +00:00
|
|
|
({ config, ... }: {
|
|
|
|
system.configurationRevision = self.sourceInfo.rev;
|
2021-12-22 16:57:09 +00:00
|
|
|
services.getty.greetingLine =
|
|
|
|
"<<< Welcome to NixOS ${config.system.nixos.label} @ ${self.sourceInfo.rev} - \\l >>>";
|
2021-12-22 17:26:40 +00:00
|
|
|
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
2021-12-22 00:02:15 +00:00
|
|
|
})
|
2022-02-01 01:20:26 +00:00
|
|
|
./common
|
2022-02-01 01:59:24 +00:00
|
|
|
|
|
|
|
xe-printerfacts.nixosModules."${system}".printerfacts
|
2022-02-19 19:29:27 +00:00
|
|
|
xe-mara.nixosModules."${system}".bot
|
2022-02-19 20:30:02 +00:00
|
|
|
rhea.nixosModule."${system}"
|
2021-12-21 23:59:45 +00:00
|
|
|
] ++ extraModules;
|
2021-12-21 23:02:15 +00:00
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
in {
|
|
|
|
devShell.x86_64-linux = pkgs.mkShell {
|
2021-12-21 23:56:26 +00:00
|
|
|
buildInputs = [
|
|
|
|
deploy-rs.packages.x86_64-linux.deploy-rs
|
|
|
|
agenix.packages.x86_64-linux.agenix
|
|
|
|
];
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2021-12-22 16:57:09 +00:00
|
|
|
nixosConfigurations = {
|
2022-02-01 01:38:05 +00:00
|
|
|
chrysalis = mkSystem [ ./hosts/chrysalis ./hardware/location/YOW ];
|
|
|
|
logos =
|
|
|
|
mkSystem [ ./hosts/logos ./hardware/alrest ./hardware/location/YOW ];
|
2021-12-22 16:57:09 +00:00
|
|
|
|
|
|
|
# vms
|
|
|
|
## logos
|
|
|
|
hugo = mkSystem [ ./hosts/vm/hugo ./hardware/libvirt-generic ];
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
|
2022-02-01 01:20:26 +00:00
|
|
|
deploy.nodes.chrysalis = {
|
|
|
|
hostname = "192.168.2.29";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.chrysalis;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-12-21 22:02:29 +00:00
|
|
|
deploy.nodes.logos = {
|
2021-12-21 21:48:41 +00:00
|
|
|
hostname = "192.168.2.35";
|
2021-12-21 22:02:29 +00:00
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.logos;
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2021-12-22 16:57:09 +00:00
|
|
|
deploy.nodes.hugo = {
|
|
|
|
hostname = "10.77.129.6";
|
|
|
|
sshUser = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
self.nixosConfigurations.hugo;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2021-12-21 21:48:41 +00:00
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
|
|
|
checks = builtins.mapAttrs
|
|
|
|
(system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
|
|
};
|
|
|
|
}
|