adicionando a VPS

This commit is contained in:
2026-04-19 15:17:37 -03:00
parent 5f85583bd0
commit 8329531ac7
37 changed files with 1630 additions and 0 deletions
+82
View File
@@ -0,0 +1,82 @@
{
config,
lib,
pkgs,
inputs,
...
}:
let
vars = import ./vars.nix;
in
{
imports = [
./hardware-configuration.nix
inputs.disko.nixosModules.disko
./disk-config.nix
./config/imp.nix
];
boot = {
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
initrd.systemd.enable = true;
};
systemd.targets.multi-user.enable = true;
networking.hostName = vars.hostname;
networking.networkmanager.enable = true;
time.timeZone = vars.timezone;
i18n.defaultLocale = vars.locale;
users = {
mutableUsers = false;
users.${vars.username} = {
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
"docker"
];
openssh.authorizedKeys.keys = [ vars.sshKey ];
};
};
# Enable passwordless sudo.
security.sudo.extraRules = [
{
users = [ vars.username ];
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
## Config do fish
programs.fish.enable = true;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi '';
};
services.getty.autologinUser = null;
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.11"; # Did you read the comment?
}