fix: nixos-vm and test quadlet container
This commit is contained in:
parent
1349461d3c
commit
b6a7394c2a
@ -119,7 +119,6 @@
|
|||||||
];
|
];
|
||||||
hostModuleDir = ./hosts;
|
hostModuleDir = ./hosts;
|
||||||
hosts = {
|
hosts = {
|
||||||
NixOS-VM.system = "x86_64-linux";
|
|
||||||
# home-workstation
|
# home-workstation
|
||||||
andromedae = {
|
andromedae = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@ -144,6 +143,10 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
useHomeManager = false;
|
useHomeManager = false;
|
||||||
};
|
};
|
||||||
|
NixOS-VM = {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
useHomeManager = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
{
|
{ modulesPath, ... }:
|
||||||
modulesPath,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
@ -11,9 +7,9 @@
|
|||||||
|
|
||||||
ataraxia.defaults.role = "base";
|
ataraxia.defaults.role = "base";
|
||||||
|
|
||||||
boot.kernelParams = [
|
# boot.kernelParams = [
|
||||||
"systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
# "systemd.setenv=SYSTEMD_SULOGIN_FORCE=1"
|
||||||
];
|
# ];
|
||||||
|
|
||||||
virtualisation.memorySize = 4096;
|
virtualisation.memorySize = 4096;
|
||||||
virtualisation.cores = 4;
|
virtualisation.cores = 4;
|
||||||
@ -23,48 +19,12 @@
|
|||||||
"-vga qxl"
|
"-vga qxl"
|
||||||
"-display gtk"
|
"-display gtk"
|
||||||
];
|
];
|
||||||
users.users.test = {
|
virtualisation.diskSize = 8192;
|
||||||
isNormalUser = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.supportedFilesystems = [ "zfs" ];
|
boot.loader.grub.enable = false;
|
||||||
boot.zfs.forceImportRoot = false;
|
|
||||||
networking.hostId = "84977205";
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
ataraxia.virtualisation.podman = true;
|
||||||
# test overlay
|
ataraxia.containers.filestash.enable = true;
|
||||||
sing-box
|
|
||||||
];
|
|
||||||
|
|
||||||
# Test persist module
|
system.stateVersion = "25.05";
|
||||||
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";
|
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
let
|
let
|
||||||
inherit (lib) mkEnableOption mkIf;
|
inherit (lib) mkEnableOption mkIf;
|
||||||
|
inherit (config.virtualisation.quadlet) networks;
|
||||||
|
|
||||||
cfg = config.ataraxia.containers.filestash;
|
cfg = config.ataraxia.containers.filestash;
|
||||||
nas-path = "/media/nas/media-stack";
|
nas-path = "/media/nas/media-stack";
|
||||||
@ -11,23 +12,26 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
virtualisation.oci-containers.containers.filestash = {
|
virtualisation.quadlet.containers.filestash = {
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
environment = {
|
containerConfig = {
|
||||||
PUID = "1000";
|
environments = {
|
||||||
PGID = "100";
|
PUID = "1000";
|
||||||
UMASK = "002";
|
PGID = "100";
|
||||||
TZ = "Europe/Moscow";
|
UMASK = "002";
|
||||||
APPLICATION_URL = "files.ataraxiadev.com";
|
TZ = "Europe/Moscow";
|
||||||
CANARY = "true";
|
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"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user