2024-09-23 18:58:39 -07:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-10-05 12:33:48 -07:00
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2024-09-24 13:19:54 -07:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
|
2024-10-05 12:33:48 -07:00
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-09-23 18:58:39 -07:00
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
outputs = inputs@{ self, nixpkgs, deploy-rs, home-manager, ... }:
|
|
|
|
let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import inputs.nixpkgs {
|
|
|
|
system = system;
|
|
|
|
config = { allowUnfreePredicate = (_: true); };
|
|
|
|
};
|
|
|
|
pkgs-unstable = import inputs.nixpkgs-unstable {
|
|
|
|
system = system;
|
|
|
|
config = { allowUnfreePredicate = (_: true); };
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
|
|
|
bard = nixpkgs.lib.nixosSystem {
|
|
|
|
modules = [ ./configuration.nix ./hosts/bard/hardware-configuration.nix ];
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit pkgs;
|
2024-10-08 17:03:45 -07:00
|
|
|
inherit pkgs-unstable;
|
|
|
|
inherit inputs;
|
2024-10-05 12:33:48 -07:00
|
|
|
hostConf = {
|
|
|
|
name = "bard";
|
|
|
|
nic.mac = "6c:2b:59:37:89:40";
|
|
|
|
nic.ip = "192.168.1.31";
|
|
|
|
nic.name = "enp1s0";
|
2024-09-23 18:58:39 -07:00
|
|
|
};
|
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
};
|
|
|
|
ranger = nixpkgs.lib.nixosSystem {
|
|
|
|
modules = [ ./configuration.nix ./hosts/ranger/hardware-configuration.nix ];
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit pkgs;
|
2024-10-08 17:03:45 -07:00
|
|
|
inherit pkgs-unstable;
|
|
|
|
inherit inputs;
|
2024-10-05 12:33:48 -07:00
|
|
|
hostConf = {
|
|
|
|
name = "ranger";
|
|
|
|
nic.mac = "6c:2b:59:37:9e:91";
|
|
|
|
nic.ip = "192.168.1.32";
|
|
|
|
nic.name = "enp1s0";
|
2024-09-24 13:19:54 -07:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
cleric = nixpkgs.lib.nixosSystem {
|
|
|
|
modules = [ ./configuration.nix ./hosts/cleric/hardware-configuration.nix ];
|
|
|
|
inherit system;
|
|
|
|
specialArgs = {
|
|
|
|
inherit pkgs;
|
2024-10-08 17:03:45 -07:00
|
|
|
inherit pkgs-unstable;
|
|
|
|
inherit inputs;
|
2024-10-05 12:33:48 -07:00
|
|
|
hostConf = {
|
|
|
|
name = "cleric";
|
|
|
|
nic.mac = "6c:2b:59:37:9e:00";
|
|
|
|
nic.ip = "192.168.1.33";
|
|
|
|
nic.name = "enp1s0";
|
|
|
|
};
|
2024-09-24 13:19:54 -07:00
|
|
|
};
|
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
};
|
|
|
|
homeConfigurations = {
|
|
|
|
admin = home-manager.lib.homeManagerConfiguration {
|
|
|
|
modules = [ ./users/admin.nix ];
|
|
|
|
inherit pkgs;
|
|
|
|
extraSpecialArgs = { inherit pkgs; };
|
2024-09-24 13:19:54 -07:00
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
};
|
|
|
|
deploy = {
|
|
|
|
nodes = {
|
|
|
|
bard = {
|
|
|
|
hostname = "192.168.1.31";
|
|
|
|
profilesOrder = [ "system" ];
|
|
|
|
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.bard;
|
|
|
|
};
|
|
|
|
ranger = {
|
|
|
|
hostname = "192.168.1.32";
|
|
|
|
profilesOrder = [ "system" ];
|
|
|
|
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.ranger;
|
|
|
|
};
|
|
|
|
cleric = {
|
|
|
|
hostname = "192.168.1.33";
|
|
|
|
profilesOrder = [ "system" ];
|
|
|
|
profiles.system.path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.cleric;
|
2024-09-24 13:19:54 -07:00
|
|
|
};
|
2024-09-23 18:58:39 -07:00
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
sshUser = "root";
|
|
|
|
user = "root";
|
|
|
|
fastConnection = true;
|
|
|
|
autoRollback = true;
|
|
|
|
magicRollback = true;
|
|
|
|
remoteBuild = true;
|
|
|
|
confirmTimeout = 60;
|
2024-09-23 18:58:39 -07:00
|
|
|
};
|
2024-10-05 12:33:48 -07:00
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
2024-09-23 18:58:39 -07:00
|
|
|
};
|
|
|
|
}
|