make it so podman can be logged into, and fix arion compose being the same file as

This commit is contained in:
Sky Hearn 2024-03-05 18:48:24 -08:00
parent 654f1bbf8a
commit 0516ff439d
5 changed files with 46 additions and 38 deletions

View File

@ -23,6 +23,11 @@
# set hostname
networking.hostName = "rackserver";
# fix nixpkgs warning
nix.nixPath = [
"nixpkgs=${pkgs.path}"
];
# wireguard server setup
# enable NAT
networking.nat.enable = true;
@ -90,6 +95,7 @@
environment.systemPackages = [
pkgs.wget
pkgs.vim
pkgs.arion

View File

@ -24,6 +24,7 @@
home-manager.users.nub = import ./users/nub.nix;
home-manager.users.jas = import ./users/jas.nix;
home-manager.users.sky = import ./users/sky.nix;
home-manager.users.podman = import ./users/podman.nix;
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix

View File

@ -1,20 +1,19 @@
{ pkgs, ... }:
{
project.name = "webapp";
project.name = "minecraft";
services = {
webserver = {
image.enableRecommendedContents = true;
service.useHostStore = true;
service.command = [ "sh" "-c" ''
cd "$$WEB_ROOT"
${pkgs.python3}/bin/python -m http.server
'' ];
service.ports = [
"8000:8000" # host:container
];
service.environment.WEB_ROOT = "${pkgs.nix.doc}/share/doc/nix/manual";
service.stop_signal = "SIGINT";
mc = {
service.image = "itzg/minecraft-server";
service.volumes = [ "${toString ./.}/data:/data" ];
service.ports = [ "25564:25565" ];
service.environment = {
EULA = "true";
MOD_PLATFORM = "AUTO_CURSEFORGE";
CF_API_KEY = "$2a$10$BiefeMHCHbPFjXkIwpHk/.LvfbKaohRF7HcB3PF8oJtVAI/PfMpwe"; # free API key <3
CF_FORCE_SYNCHRONIZE = "true";
CF_PAGE_URL = "https://www.curseforge.com/minecraft/modpacks/valhelsia-6/files/5135030";
MEMORY = "16G";
};
};
};
}

20
users/podman.nix Normal file
View File

@ -0,0 +1,20 @@
{ pkgs, ... }: {
home.username = "podman";
home.homeDirectory = pkgs.lib.mkForce "/home/podman";
home.packages = [ ];
programs.bash.enable = true;
home.file = {
"arion-pkgs.nix" = {
source = ./arion-pkgs.nix;
};
"arion-compose.nix" = {
source = ./arion-compose.nix;
};
};
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
}

View File

@ -6,31 +6,13 @@
users.users.nub.isNormalUser = true;
users.users.jas.isNormalUser = true;
users.users.podman.isSystemUser = true;
users.extraUsers.podman.hashedPassword = "";
users.users.podman.isNormalUser = true;
users.users.gitea.isSystemUser = true;
users.extraUsers.sky.hashedPassword = "";
users.groups.wheel.members=["sky"];
users.groups.podman = {};
users.users.podman.group = "podman";
home-manager.users.podman = { pkgs, ... }: {
home.username = "podman";
home.homeDirectory = pkgs.lib.mkForce "/home/podman";
home.packages = [ ];
programs.bash.enable = true;
home.file = {
"arion-pkgs.nix" = {
source = ./arion-pkgs.nix;
};
"arion-compose.nix" = {
source = ./arion-pkgs.nix;
};
};
# The state version is required and should stay at the version you
# originally installed.
home.stateVersion = "23.11";
};
}