feat: add oracle machine
This commit is contained in:
parent
6db28375b8
commit
d5adb7f0b1
15
flake.nix
15
flake.nix
@ -117,6 +117,21 @@
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
oracle = nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.michael = import ./user/environments/nixos-server/home.nix;
|
||||
}
|
||||
|
||||
./machines/oracle/configuration.nix
|
||||
];
|
||||
specialArgs = {inherit inputs;};
|
||||
};
|
||||
|
||||
# WSL environment
|
||||
work = inputs.nixpkgs.lib.nixosSystem {
|
||||
system = utils.lib.system.x86_64-linux;
|
||||
|
58
machines/oracle/configuration.nix
Normal file
58
machines/oracle/configuration.nix
Normal file
@ -0,0 +1,58 @@
|
||||
{ pkgs, config, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking.hostName = "gringottsstatus";
|
||||
networking.domain = "subnet08161027.vcn08161027.oraclevcn.com";
|
||||
networking.firewall.enable = true;
|
||||
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings = {
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
users.users.michael = {
|
||||
isNormalUser = true;
|
||||
home = "/home/michael";
|
||||
description = "Michael Thomas";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDUYHiTel+RDzygCeNwV25cnBBNioM19EQWqxPC+xq7lNlNcAQ4wi9JIOONVGkshxPXzKZyR3F53Igs9JZr1E9088L52eUp35JhW1pthai82cw1jGkj9wxcKJnU6b7QNDKA+ejPTC/ciFFKytMyPgID0ICzBRQsnj15i4lGvGDgfTQ7qfI2J855H7S7qOpY7cbsGfeoz3f8Ye1FspJFDsNu9QhX05iunBcbni0uLoTtgS5cEBRr7H9RkKR7GCfd4Ae/sp+aeDkLU4aBkEi+A8VLfR74Juia1j/3mAAmkgJKGcBCKUv0ixBGd6XclZmkF8f2Hx0z8mDxJ7U8lsDUSKdvxK7fecsM4F/GTvjrUxV1nLD4SRQ06GtBmGQGDzIn3Nm1URd6gGT9W3486XJsqmGzjuHa5o4WhmBgh/Gs8xUcv7kWD5enrYacBr+HKVJWnnLFp+XfAYaMCT6j/4jc4D9/9hijRbhboICTDxWCWtFgz7QpsO6BQpi/wkR4Ql61vPc= michael@neptune''
|
||||
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDQr9lluvuGk3qU1bE7HrrZcE36x5hhD5Dat+E4My55aoh+Df/JeuWMPvzS4zLKMsIIZCUX6kbjvTtvWe7gPLflhDOUGI947MK9B01pojDn0LBugz57Ai9fPlG5+AlMWaxWitmP8JB637oxBpqesqxHdiEKW25u9t2qOvjX3kCdcoSYDlW72Xm8ZI9+qKcAlGLnFhiQxM18rjHcZYdn9ZyWRRSC1ocuTqnbh5lsYoMhD+4QWo5LmwMVjr5uix0i+ktqKzENaiDgA/MQIWQrHqUavfjvMRyyQO7bScVTe/PllKFpLOBym2SLC5hD7vG69BBo0dQUto8tAbIgI9Tmv1dx michael@venus''
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 4*1024;
|
||||
}
|
||||
];
|
||||
|
||||
# Services
|
||||
services.caddy = {
|
||||
enable = true;
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
||||
|
||||
services.uptime-kuma = {
|
||||
enable = true;
|
||||
settings = {
|
||||
port = "3001";
|
||||
};
|
||||
};
|
||||
|
||||
services.caddy.virtualHosts."status.gringotts.michaelt.xyz".extraConfig = ''
|
||||
reverse_proxy http://localhost:${config.services.uptime-kuma.settings.PORT}
|
||||
'';
|
||||
|
||||
system.stateVersion = "23.11";
|
||||
}
|
14
machines/oracle/hardware-configuration.nix
Normal file
14
machines/oracle/hardware-configuration.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
boot.loader.grub = {
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
device = "nodev";
|
||||
};
|
||||
fileSystems."/boot" = { device = "/dev/disk/by-uuid/97E5-76C2"; fsType = "vfat"; };
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
fileSystems."/" = { device = "/dev/mapper/centosvolume-root"; fsType = "xfs"; };
|
||||
|
||||
}
|
3
user/environments/nixos-server/config.nix
Normal file
3
user/environments/nixos-server/config.nix
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
allowUnfree = true;
|
||||
}
|
12
user/environments/nixos-server/home.nix
Normal file
12
user/environments/nixos-server/home.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
../../modules/git.nix
|
||||
../../modules/zsh.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
];
|
||||
|
||||
home.stateVersion = "21.05";
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user