updates
seems to be the method to nixify a vps on my vps.
This commit is contained in:
parent
968170a677
commit
d96c914844
6 changed files with 42 additions and 90 deletions
|
|
@ -199,6 +199,7 @@
|
|||
hostPlatform = system;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
pinix = inputs.pinix.packages.${system}.default;
|
||||
inherit
|
||||
(customPkgs)
|
||||
minijinja-cli
|
||||
|
|
|
|||
|
|
@ -12,21 +12,18 @@
|
|||
./server/hardware-configuration.nix
|
||||
./server/networking.nix
|
||||
./server/security.nix
|
||||
./server/nginx.nix
|
||||
./server/redis.nix
|
||||
./modules/timezone.nix
|
||||
./modules/docker.nix
|
||||
./modules/npm.nix
|
||||
./modules/nixos.nix
|
||||
./modules/appimage.nix
|
||||
./modules/core.nix
|
||||
];
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
|
||||
boot = {
|
||||
loader.grub.enable = true;
|
||||
initrd.availableKernelModules = ["xen_blkfront" "virtio_blk"];
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
|
|
@ -35,9 +32,8 @@
|
|||
ffmpeg
|
||||
yt-dlp
|
||||
fastfetch
|
||||
zelliq
|
||||
zellij
|
||||
];
|
||||
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
|
|
@ -46,11 +42,8 @@
|
|||
};
|
||||
settings.auto-optimise-store = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
fstrim.enable = true;
|
||||
xserver.enable = false;
|
||||
};
|
||||
|
||||
sound.enable = false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,57 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./disk-config.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
boot.initrd.availableKernelModules = ["xen_blkfront" "virtio_blk"];
|
||||
|
||||
networking = {
|
||||
hostName = "alteur";
|
||||
useDHCP = false;
|
||||
interfaces.enX0.ipv4.addresses = [
|
||||
{
|
||||
address = "redacted";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
defaultGateway = "redacted";
|
||||
nameservers = ["8.8.8.8" "8.8.4.4"];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [8123];
|
||||
settings = {
|
||||
PermitRootLogin = "prohibit-password";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"redacted"
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
curl
|
||||
git
|
||||
htop
|
||||
];
|
||||
|
||||
networking.firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [8123 80 443];
|
||||
};
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
|
@ -1,17 +1,33 @@
|
|||
{lib, ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
boot = {
|
||||
type = "disk";
|
||||
device = "/dev/xvda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
MBR = {
|
||||
type = "EF02";
|
||||
boot = {
|
||||
size = "1M";
|
||||
priority = 1;
|
||||
type = "EF02";
|
||||
};
|
||||
mbr = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
main = {
|
||||
type = "disk";
|
||||
device = "/dev/xvdb";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,18 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "platform_pci" "sr_mod" "xen_blkfront" ];
|
||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "sr_mod" "xen_blkfront"];
|
||||
boot.initrd.kernelModules = ["dm-snapshot"];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
|
|
|
|||
|
|
@ -11,18 +11,15 @@
|
|||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../.secrets/id_ed25519.pub
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK29z1CTXF77ykGyklPM8X3SxeMYM7zHyoIDGi2C9/HU riiidge.racer@gmail.com"
|
||||
];
|
||||
|
||||
users.users.admin = {
|
||||
users.users.alteur = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "docker"];
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../../.secrets/id_ed25519.pub
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK29z1CTXF77ykGyklPM8X3SxeMYM7zHyoIDGi2C9/HU riiidge.racer@gmail.com"
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue