Skip to content

Commit

Permalink
hosts (warehouse): Init
Browse files Browse the repository at this point in the history
  • Loading branch information
britter committed Jul 8, 2024
1 parent 7f3792b commit c6a6081
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 0 deletions.
10 changes: 10 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,16 @@
./systems/x86_64-linux/cyberoffice/configuration.nix
];
};
nixosConfigurations.warehouse = let
system = inputs.flake-utils.lib.system.x86_64-linux;
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {inherit inputs;};
modules = [
./systems/x86_64-linux/warehouse/configuration.nix
];
};
nixosConfigurations.watchtower = let
system = inputs.flake-utils.lib.system.x86_64-linux;
in
Expand Down
2 changes: 2 additions & 0 deletions modules/nixos/grafana/prometheus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ in {
"localhost:9100"
"${config.my.homelab.cyberoffice.ip}:9100"
"${config.my.homelab.raspberry-pi.ip}:9100"
"${config.my.homelab.warehouse.ip}:9100"
];
}
];
Expand All @@ -35,6 +36,7 @@ in {
"localhost:4243"
"${config.my.homelab.cyberoffice.ip}:4243"
"${config.my.homelab.raspberry-pi.ip}:4243"
"${config.my.homelab.warehouse.ip}:4243"
];
}
];
Expand Down
6 changes: 6 additions & 0 deletions modules/nixos/homelab/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
default = "192.168.178.105";
};
};
warehouse = {
ip = lib.mkOption {
type = lib.types.str;
default = "192.168.178.220";
};
};
watchtower = {
ip = lib.mkOption {
type = lib.types.str;
Expand Down
31 changes: 31 additions & 0 deletions systems/x86_64-linux/warehouse/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{...}: {
imports = [
../../../modules/nixos
];

my = {
host = {
name = "warehouse";
system = "x86_64-linux";
role = "server";
};
modules = {
disko = {
enable = true;
disk = "/dev/sda";
};
};
};

# TODO extract into a VM module
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
services.qemuGuest.enable = true;

# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}

0 comments on commit c6a6081

Please sign in to comment.