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

View File

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

View File

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

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.nub.isNormalUser = true;
users.users.jas.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.users.gitea.isSystemUser = true;
users.extraUsers.sky.hashedPassword = ""; users.extraUsers.sky.hashedPassword = "";
users.groups.wheel.members=["sky"]; users.groups.wheel.members=["sky"];
users.groups.podman = {};
users.users.podman.group = "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";
};
} }