nix server config
This commit is contained in:
commit
4a6efc0c1a
5 changed files with 287 additions and 0 deletions
59
configuration.nix
Normal file
59
configuration.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
nix.settings.experimental-features = "flakes nix-command";
|
||||
virtualisation.docker.enable = true;
|
||||
users.users.root.extraGroups = [ "docker" ];
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./matrix.nix
|
||||
./website.nix
|
||||
./fm.nix
|
||||
./gitea.nix
|
||||
];
|
||||
fileSystems."/" = {
|
||||
device = "/dev/vda1";
|
||||
fsType = "ext4";
|
||||
};
|
||||
boot.loader.grub.device = "/dev/vda";
|
||||
boot.loader.timeout = 30;
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
|
||||
boot.initrd.kernelModules = [ "nvme" ];
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
swapDevices = [
|
||||
{ device = "/swap"; size = 2121; }
|
||||
];
|
||||
zramSwap.enable = true;
|
||||
|
||||
networking = {
|
||||
useNetworkd = true;
|
||||
usePredictableInterfaceNames = true;
|
||||
hostName = "peopleswar";
|
||||
domain = "cc";
|
||||
};
|
||||
|
||||
systemd.network = {
|
||||
enable = true;
|
||||
networks."40-wan" = {
|
||||
matchConfig.Name = "enx5254597fe862";
|
||||
address = [ "" ];
|
||||
routes = [
|
||||
{ Gateway = ""; GatewayOnLink = true; }
|
||||
];
|
||||
dns = [ "2020:fe::10" "9.9.9.10" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHioVSkG7cILl5SQiGm3TaL641BGU00FLSgexBx6xtYy nixos@nixos"
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
fcgiwrap
|
||||
wget
|
||||
];
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue