hosts: init arashi
This commit is contained in:
parent
9367ce85e5
commit
8d099bccf6
8 changed files with 145 additions and 0 deletions
|
@ -49,6 +49,10 @@
|
|||
HostName 192.168.1.36
|
||||
User notoh
|
||||
IdentityFile ~/.ssh/yuki
|
||||
Host arashi
|
||||
HostName 192.168.1.211
|
||||
User notoh
|
||||
IdentityFile ~/.ssh/arashi
|
||||
Host hetzner
|
||||
HostName 5.161.181.184
|
||||
User root
|
||||
|
|
24
hosts/arashi/default.nix
Normal file
24
hosts/arashi/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
];
|
||||
|
||||
boot.loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
configurationLimit = 5;
|
||||
device = "/dev/sda";
|
||||
useOSProber = false;
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "arashi";
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "";
|
||||
};
|
||||
}
|
29
hosts/arashi/hardware-configuration.nix
Normal file
29
hosts/arashi/hardware-configuration.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/3fd88f1f-cec3-4737-b9d0-6c8f026c3927";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{device = "/dev/disk/by-uuid/e9eb4b6a-e9a1-4616-8c82-349d2f38d140";}
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
14
hosts/arashi/home.nix
Normal file
14
hosts/arashi/home.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
../../home
|
||||
];
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
username = "notoh";
|
||||
homeDirectory = "/home/notoh";
|
||||
stateVersion = "23.05";
|
||||
};
|
||||
}
|
5
hosts/arashi/services/default.nix
Normal file
5
hosts/arashi/services/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
_: {
|
||||
imports = [
|
||||
./traefik.nix
|
||||
];
|
||||
}
|
39
hosts/arashi/services/traefik.nix
Normal file
39
hosts/arashi/services/traefik.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
_: {
|
||||
networking.firewall.allowedTCPPorts = [80 443];
|
||||
services.traefik = {
|
||||
enable = true;
|
||||
dynamicConfigOptions = {
|
||||
http = {
|
||||
routers = {
|
||||
api = {
|
||||
rule = "PathPrefix(`/api/`)";
|
||||
entryPoints = ["websecure"];
|
||||
service = "api@internal";
|
||||
};
|
||||
};
|
||||
services = {
|
||||
sonarr.loadBalancer.servers = [{url = "http://localhost:8989";}];
|
||||
};
|
||||
};
|
||||
};
|
||||
staticConfigOptions = {
|
||||
log.level = "DEBUG";
|
||||
api.dashboard = false;
|
||||
api.insecure = false;
|
||||
global = {
|
||||
checkNewVersion = false;
|
||||
sendAnonymousUsage = false;
|
||||
};
|
||||
entryPoints = {
|
||||
websecure = {
|
||||
address = ":443";
|
||||
forwardedHeaders.insecure = true;
|
||||
};
|
||||
web = {
|
||||
address = ":80";
|
||||
forwardedHeaders.insecure = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -117,4 +117,24 @@ in {
|
|||
}
|
||||
];
|
||||
};
|
||||
arashi = nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {inherit inputs;};
|
||||
modules = [
|
||||
./arashi
|
||||
sopsModule
|
||||
hmModule
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.notoh = {
|
||||
imports = [
|
||||
./arashi/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -30,5 +30,15 @@ inputs: {
|
|||
sshOpts = ["-t" "-i" "~/.ssh/yuki"];
|
||||
magicRollback = false;
|
||||
};
|
||||
arashi = {
|
||||
hostname = "arashi";
|
||||
profiles.system = {
|
||||
user = "root";
|
||||
path = activate.nixos inputs.self.nixosConfigurations.arashi;
|
||||
};
|
||||
sshUser = "notoh";
|
||||
sshOpts = ["-t" "-i" "~/.ssh/arashi"];
|
||||
magicRollback = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue