mirror of
https://codeberg.org/muon/home.git
synced 2025-12-06 08:07:45 +00:00
Add vps config
This commit is contained in:
parent
652b8599f8
commit
91c9437d56
5 changed files with 107 additions and 0 deletions
|
|
@ -21,7 +21,11 @@
|
||||||
utils = import ./utils.nix { inherit inputs system; };
|
utils = import ./utils.nix { inherit inputs system; };
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
# desktop
|
||||||
muon = utils.mkHost ./hosts/muon/configuration.nix;
|
muon = utils.mkHost ./hosts/muon/configuration.nix;
|
||||||
|
|
||||||
|
# vps
|
||||||
|
mups = utils.mkHost ./hosts/mups/configuration.nix;
|
||||||
};
|
};
|
||||||
|
|
||||||
homeManagerModules.default = ./modules/home;
|
homeManagerModules.default = ./modules/home;
|
||||||
|
|
|
||||||
58
hosts/mups/configuration.nix
Normal file
58
hosts/mups/configuration.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
{ config, lib, pkgs, inputs, system, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.mods;
|
||||||
|
|
||||||
|
in {
|
||||||
|
# Hardware
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# System
|
||||||
|
mods.user.name = "muon";
|
||||||
|
mods.home.file = ./home.nix;
|
||||||
|
|
||||||
|
# Modules
|
||||||
|
mods.desktop.enable = false;
|
||||||
|
|
||||||
|
mods.theme.enable = true;
|
||||||
|
mods.theme.scheme = "woodland";
|
||||||
|
mods.theme.wallpaper = ./wallpaper.png;
|
||||||
|
|
||||||
|
# mods.server.astral.enable = true;
|
||||||
|
|
||||||
|
# Use the GRUB 2 boot loader.
|
||||||
|
boot.loader.grub.enable = true;
|
||||||
|
boot.loader.grub.version = 2;
|
||||||
|
boot.loader.grub.device = "/dev/vda";
|
||||||
|
boot.initrd.checkJournalingFS = false;
|
||||||
|
|
||||||
|
users.users.muon = {
|
||||||
|
openssh.authorizedKeys.keys =
|
||||||
|
[''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEio+Y5wBVD1wILaH2R3wV10FvVjiqy/4gGBWHOITTB muon@muon'' ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKevYmkH7xvYoquBjnYZ7PJiVqf+GOh9fxAJBN6wZGBB gin4@hi.is'' ];
|
||||||
|
};
|
||||||
|
|
||||||
|
# services.static-web-server = {
|
||||||
|
# enable = true;
|
||||||
|
# listen = "[::]:80";
|
||||||
|
# root = "/var/www";
|
||||||
|
# configuration = {
|
||||||
|
# general = {
|
||||||
|
# directory-listing = true;
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
services.openssh.enable = true;
|
||||||
|
users.users.root.openssh.authorizedKeys.keys =
|
||||||
|
[''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKEio+Y5wBVD1wILaH2R3wV10FvVjiqy/4gGBWHOITTB muon@muon'' ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKevYmkH7xvYoquBjnYZ7PJiVqf+GOh9fxAJBN6wZGBB gin4@hi.is'' ];
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedTCPPorts = [ 80 8080 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
}
|
||||||
|
|
||||||
36
hosts/mups/hardware-configuration.nix
Normal file
36
hosts/mups/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }: let
|
||||||
|
ip = "93.95.230.11";
|
||||||
|
gateway = "93.95.230.1";
|
||||||
|
hostname = "vpsorvhm2v";
|
||||||
|
dns0 = "93.95.224.28";
|
||||||
|
dns1 = "93.95.224.29";
|
||||||
|
|
||||||
|
in {
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/031e2049-33ed-4d21-a208-8da3fc250260";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/bc6acd1f-98bb-4f94-b52c-40aa7312e838"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkForce false;
|
||||||
|
networking.hostName = hostname;
|
||||||
|
networking.domain = "";
|
||||||
|
|
||||||
|
networking.interfaces.ens3.ipv4.addresses = [{ address = ip; prefixLength = 24; }];
|
||||||
|
networking.defaultGateway = { address = gateway; interface = "ens3"; };
|
||||||
|
networking.nameservers = [ dns0 dns1 ];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
||||||
9
hosts/mups/home.nix
Normal file
9
hosts/mups/home.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, lib, osConfig,... }: {
|
||||||
|
# Modules
|
||||||
|
mods.terminal.zsh.enable = true;
|
||||||
|
mods.terminal.development.enable = true;
|
||||||
|
mods.terminal.tools.enable = true;
|
||||||
|
|
||||||
|
# Version of first install
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
}
|
||||||
BIN
hosts/mups/wallpaper.png
Normal file
BIN
hosts/mups/wallpaper.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 283 KiB |
Loading…
Add table
Add a link
Reference in a new issue