98 lines
3 KiB
Nix
98 lines
3 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
ros_neovim.url = "git+https://git.joshuabell.xyz/nvim";
|
|
mod_common.url = "git+https://git.joshuabell.xyz/dotfiles?ref=mod_common";
|
|
mod_common.inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
deploy-rs,
|
|
...
|
|
}@inputs:
|
|
let
|
|
configuration_name = "l002";
|
|
lib = nixpkgs.lib;
|
|
in
|
|
{
|
|
deploy = {
|
|
sshUser = "root";
|
|
sshOpts = [
|
|
"-i"
|
|
"/run/agenix/nix2linode"
|
|
];
|
|
nodes.${configuration_name} = {
|
|
hostname = "172.234.26.141";
|
|
profiles.system = {
|
|
user = "root";
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.${configuration_name};
|
|
};
|
|
};
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
nixos = self.nixosConfigurations.${configuration_name};
|
|
"${configuration_name}" =
|
|
let
|
|
auto_modules = builtins.concatMap (
|
|
input:
|
|
lib.optionals
|
|
(builtins.hasAttr "nixosModules" input && builtins.hasAttr "default" input.nixosModules)
|
|
[
|
|
input.nixosModules.default
|
|
]
|
|
) (builtins.attrValues inputs);
|
|
in
|
|
(lib.nixosSystem {
|
|
modules = [
|
|
./configuration.nix
|
|
./hardware-configuration.nix
|
|
./linode.nix
|
|
./nginx.nix
|
|
../../../components/nix/tailscale.nix
|
|
(
|
|
{ pkgs, ... }:
|
|
{
|
|
users.users.root.openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
|
];
|
|
components = {
|
|
# NOTE we manually onboard this machine since it has no secrets uploaded to it
|
|
tailscale.useSecretsAuth = false;
|
|
};
|
|
mods = {
|
|
common = {
|
|
disableRemoteBuildsOnLio = true;
|
|
systemName = configuration_name;
|
|
allowUnfree = true;
|
|
primaryUser = "luser";
|
|
docker = true;
|
|
users = {
|
|
luser = {
|
|
extraGroups = [
|
|
"wheel"
|
|
"networkmanager"
|
|
];
|
|
isNormalUser = true;
|
|
openssh.authorizedKeys.keys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
)
|
|
] ++ auto_modules;
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
});
|
|
};
|
|
};
|
|
}
|