Add minimal NixOracle host config

This commit is contained in:
ltadeu6 2026-04-26 18:53:29 -03:00
parent 8861f27e86
commit deb5343d20
5 changed files with 113 additions and 2 deletions

View file

@ -7,8 +7,8 @@ Este arquivo deve refletir o estado atual do repo. Se a estrutura mudar, atualiz
## Objetivo do repo
- Este repo contem a configuracao pessoal de NixOS e Home Manager da maquina `Nixos`.
- O setup e especifico para o usuario `ltadeu6` e para o host atual; nao trate este repo como template generico sem adaptar usuario, host, mounts, rede e segredos.
- O flake principal gera apenas `nixosConfigurations.Nixos`.
- O setup e especifico para o usuario `ltadeu6` e para os hosts versionados neste repo; nao trate este repo como template generico sem adaptar usuario, host, mounts, rede e segredos.
- O flake principal gera `nixosConfigurations.Nixos` e `nixosConfigurations.NixOracle`.
- O Home Manager esta embutido no modulo NixOS; nao existe fluxo separado de `home-manager switch`.
## Regras gerais para agentes
@ -27,6 +27,8 @@ Este arquivo deve refletir o estado atual do repo. Se a estrutura mudar, atualiz
- `flake.lock`: lockfile dos inputs do flake.
- `hosts/Nixos/configuration.nix`: modulo principal do sistema.
- `hosts/Nixos/hardware-configuration.nix`: hardware, filesystem e driver de video; gerado pelo NixOS.
- `hosts/NixOracle/configuration.nix`: modulo minimo do VPS `NixOracle`.
- `hosts/NixOracle/hardware-configuration.nix`: placeholder para o hardware do VPS; substitua pelo gerado no host.
- `home/ltadeu6.nix`: modulo principal do Home Manager do usuario.
- `home/openclaw.nix`: modulo opcional do OpenClaw; so entra se `enableOpenClaw = true` em `flake.nix`.
- `configs/hypr/`: fontes de verdade do Hyprland e asset do wallpaper.

View file

@ -62,5 +62,12 @@
}
];
};
nixosConfigurations.NixOracle = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/NixOracle/configuration.nix
];
};
};
}

View file

@ -0,0 +1,71 @@
{ pkgs, ... }:
let
username = "ltadeu6";
sshAuthorizedKeys = [
''
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCtg8wYZkp59veN/+wiF/nD6cQimOctVL0TpIIPYNCibFsXvh3c20p0lGpHUxp+yZZxqToQxIKeQzgx2nwdlVqN7zxco9T9N4Kg3QlbFuUWZ0k1jovxcORkBEYSuJ0FM/KLN8zJIRgArm3diMqj9t0fYzCZCPJg2TPi7eziBnkCT3FiuZKI6C23oFPoDqt4z1Hl83VHJipn98vPJCJ43uyb5yNZoEnD2hPErdvwOiYB6FE8pSgqWPuHxgScgG5aM0RxnoyzVyEAk5mQ1aeEr2F2gp/R4ApvYu5bF3iCEgg/17DvkyRpDz5WkOXr/r7c4Lbt3NwM5moAnomAVYySwITmmezBIovJC96LR3zMF90Bwt3rcCIhm1ahmFKSaf3HasERVz9zJAnP+WncEeJWvrO91qCQxqq1pw4CR1Shk+PvjXJUEfTmWGoXnNPlO6y2NevXKwWzX6HDumqVLM486+eQUsQZ9L9dhVNI2B5FxPKL2OvR0WWjoPO9yiPouHO7bb0= u0_a254@localhost
''
''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBitXAExTzEy48juhqlKANx/oYqnxpR7J6BCKsBXt8iH ltadeu6@nixos
''
];
in {
imports = [
./hardware-configuration.nix
];
environment.systemPackages = with pkgs; [
curl
fd
git
htop
neovim
ripgrep
starship
tmux
wget
];
services.logrotate.checkConfig = false;
boot.tmp.cleanOnBoot = true;
zramSwap.enable = true;
networking.hostName = "NixOracle";
networking.domain = "";
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
PermitRootLogin = "prohibit-password";
};
};
programs.fish = {
enable = true;
interactiveShellInit = ''
set -g fish_greeting
'';
};
programs.git.enable = true;
programs.htop.enable = true;
programs.neovim = {
enable = true;
defaultEditor = true;
};
programs.starship.enable = true;
users.defaultUserShell = pkgs.fish;
users.users.root.openssh.authorizedKeys.keys = sshAuthorizedKeys;
users.users.${username} = {
isNormalUser = true;
description = "Lucas Tadeu";
extraGroups = [ "wheel" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = sshAuthorizedKeys;
};
system.stateVersion = "23.11";
}

View file

@ -0,0 +1,30 @@
{ modulesPath, ... }: {
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader = {
efi.efiSysMountPoint = "/boot/efi";
grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
};
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/174A-E05D";
fsType = "vfat";
};
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"xen_blkfront"
"vmw_pvscsi"
];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = {
device = "/dev/sda1";
fsType = "ext4";
};
}

View file

@ -121,6 +121,7 @@ in {
nameservers = [ "8.8.8.8" "1.1.1.1" ];
extraHosts = ''
191.252.194.81 vps
204.216.130.111 NixOracle
'';
# Enable WireGuard
# wireguard.interfaces = {