many updates, new linode server
This commit is contained in:
parent
343f5d7b52
commit
e27a4af6d2
20 changed files with 2528 additions and 137 deletions
93
hosts/linode/l001/flake.nix
Normal file
93
hosts/linode/l001/flake.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
deploy-rs,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
configuration_name = "l001";
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
deploy = {
|
||||
sshUser = "root";
|
||||
sshOpts = [
|
||||
"-i"
|
||||
"/run/agenix/nix2linode"
|
||||
];
|
||||
nodes.${configuration_name} = {
|
||||
hostname = "172.236.111.33";
|
||||
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
|
||||
./headscale.nix
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJuo6L6V52AzdQIK6fWW9s0aX1yKUUTXbPd8v8IU9p2o nix2linode"
|
||||
];
|
||||
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;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue