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 21:55:47 +00:00
|
|
|
printerfacts = {
|
2022-02-19 19:24:42 +00:00
|
|
|
url = "git+https://tulpa.dev/cadey/printerfacts.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.flake-utils.follows = "utils";
|
|
|
|
};
|
2022-02-19 21:55:47 +00:00
|
|
|
mara = {
|
2022-02-19 19:24:42 +00:00
|
|
|
url = "git+https://tulpa.dev/Xe/mara.git?ref=main";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2022-02-19 21:55:47 +00:00
|
|
|
snoo2nebby = {
|
|
|
|
url = "git+https://tulpa.dev/cadey/snoo2nebby.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";
|
|
|
|
};
|
2022-02-19 20:43:12 +00:00
|
|
|
waifud = {
|
|
|
|
url = "github:Xe/waifud";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.utils.follows = "utils";
|
|
|
|
};
|
2021-12-21 21:48:41 +00:00
|
|
|
};
|
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
outputs = { self, nixpkgs, deploy-rs, home-manager, agenix, printerfacts, mara
|
|
|
|
, snoo2nebby, rhea, waifud, ... }:
|
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
|
2022-02-19 21:55:47 +00:00
|
|
|
|
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
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
printerfacts.nixosModules.${system}.printerfacts
|
|
|
|
mara.nixosModules.${system}.bot
|
|
|
|
snoo2nebby.nixosModule.${system}
|
|
|
|
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-19 21:55:47 +00:00
|
|
|
# avalon
|
2022-02-01 01:38:05 +00:00
|
|
|
chrysalis = mkSystem [ ./hosts/chrysalis ./hardware/location/YOW ];
|
2022-02-19 21:00:43 +00:00
|
|
|
logos = mkSystem [
|
|
|
|
./hosts/logos
|
|
|
|
./hardware/alrest
|
|
|
|
./hardware/location/YOW
|
|
|
|
waifud.nixosModules.x86_64-linux.waifud-runner
|
|
|
|
];
|
2021-12-22 16:57:09 +00:00
|
|
|
|
2022-02-19 21:55:47 +00:00
|
|
|
# cloud
|
|
|
|
firgu = mkSystem [ ./hosts/firgu ];
|
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-19 22:30:45 +00:00
|
|
|
# deploy.nodes.firgu = {
|
|
|
|
# hostname = "149.248.59.1";
|
|
|
|
# sshUser = "root";
|
|
|
|
|
|
|
|
# profiles.system = {
|
|
|
|
# user = "root";
|
|
|
|
# path = deploy-rs.lib.x86_64-linux.activate.nixos
|
|
|
|
# self.nixosConfigurations.firgu;
|
|
|
|
# };
|
|
|
|
# };
|
2022-02-19 22:26:43 +00:00
|
|
|
|
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;
|
|
|
|
};
|
|
|
|
}
|