fix: nixos-vm and test quadlet container
This commit is contained in:
parent
1349461d3c
commit
b6a7394c2a
@ -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;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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,9 +12,10 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.oci-containers.containers.filestash = {
|
||||
virtualisation.quadlet.containers.filestash = {
|
||||
autoStart = true;
|
||||
environment = {
|
||||
containerConfig = {
|
||||
environments = {
|
||||
PUID = "1000";
|
||||
PGID = "100";
|
||||
UMASK = "002";
|
||||
@ -23,11 +25,13 @@ in
|
||||
};
|
||||
# Tags: latest
|
||||
image = "docker.io/machines/filestash@sha256:923c3399768fada3424bb6f3bc01521dad30e9a7a840cfb2eba3610b6acafffe";
|
||||
ports = [ "127.0.0.1:8334:8334/tcp" ];
|
||||
networks = [ networks.br-services.ref ];
|
||||
publishPorts = [ "127.0.0.1:8334:8334/tcp" ];
|
||||
volumes = [
|
||||
"${nas-path}/configs/filestash:/app/data/state"
|
||||
"${nas-path}:/mnt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user