fix: nixos-vm and test quadlet container

This commit is contained in:
Dmitriy Kholkin 2025-07-08 22:25:13 +03:00
parent 1349461d3c
commit b6a7394c2a
Signed by: AtaraxiaDev
GPG Key ID: FD266B810DF48DF2
3 changed files with 32 additions and 65 deletions

View File

@ -119,7 +119,6 @@
];
hostModuleDir = ./hosts;
hosts = {
NixOS-VM.system = "x86_64-linux";
# home-workstation
andromedae = {
system = "x86_64-linux";
@ -144,6 +143,10 @@
system = "x86_64-linux";
useHomeManager = false;
};
NixOS-VM = {
system = "x86_64-linux";
useHomeManager = false;
};
};
};

View File

@ -1,8 +1,4 @@
{
modulesPath,
pkgs,
...
}:
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/qemu-guest.nix")
@ -11,9 +7,9 @@
ataraxia.defaults.role = "base";
boot.kernelParams = [
"systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
];
# boot.kernelParams = [
# "systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
# ];
virtualisation.memorySize = 4096;
virtualisation.cores = 4;
@ -23,48 +19,12 @@
"-vga qxl"
"-display gtk"
];
users.users.test = {
isNormalUser = true;
};
virtualisation.diskSize = 8192;
boot.supportedFilesystems = [ "zfs" ];
boot.zfs.forceImportRoot = false;
networking.hostId = "84977205";
boot.loader.grub.enable = false;
environment.systemPackages = with pkgs; [
# test overlay
sing-box
];
ataraxia.virtualisation.podman = true;
ataraxia.containers.filestash.enable = true;
# Test persist module
persist.enable = true;
persist.cache.clean.enable = true;
persist.state.directories = [ "/etc" ];
persist.cache.directories = [ "/cache" ];
home-manager.users.ataraxia = {
home.stateVersion = "24.11";
persist.enable = true;
persist.cache.clean.enable = false;
persist.state.directories = [ "test-home" ];
persist.cache.directories = [
"test-1"
"test-2"
];
persist.state.files = [ "home" ];
};
home-manager.users.test = {
home.stateVersion = "24.11";
persist.enable = true;
persist.cache.clean.enable = true;
persist.cache.directories = [
"test-3"
"test-4"
];
persist.cache.files = [
"home"
"home3"
];
};
system.stateVersion = "24.11";
system.stateVersion = "25.05";
}

View File

@ -1,6 +1,7 @@
{ config, lib, ... }:
let
inherit (lib) mkEnableOption mkIf;
inherit (config.virtualisation.quadlet) networks;
cfg = config.ataraxia.containers.filestash;
nas-path = "/media/nas/media-stack";
@ -11,23 +12,26 @@ in
};
config = mkIf cfg.enable {
virtualisation.oci-containers.containers.filestash = {
virtualisation.quadlet.containers.filestash = {
autoStart = true;
environment = {
PUID = "1000";
PGID = "100";
UMASK = "002";
TZ = "Europe/Moscow";
APPLICATION_URL = "files.ataraxiadev.com";
CANARY = "true";
containerConfig = {
environments = {
PUID = "1000";
PGID = "100";
UMASK = "002";
TZ = "Europe/Moscow";
APPLICATION_URL = "files.ataraxiadev.com";
CANARY = "true";
};
# Tags: latest
image = "docker.io/machines/filestash@sha256:923c3399768fada3424bb6f3bc01521dad30e9a7a840cfb2eba3610b6acafffe";
networks = [ networks.br-services.ref ];
publishPorts = [ "127.0.0.1:8334:8334/tcp" ];
volumes = [
"${nas-path}/configs/filestash:/app/data/state"
"${nas-path}:/mnt"
];
};
# Tags: latest
image = "docker.io/machines/filestash@sha256:923c3399768fada3424bb6f3bc01521dad30e9a7a840cfb2eba3610b6acafffe";
ports = [ "127.0.0.1:8334:8334/tcp" ];
volumes = [
"${nas-path}/configs/filestash:/app/data/state"
"${nas-path}:/mnt"
];
};
};
}