This commit is contained in:
albert 2025-02-23 17:48:52 -08:00
parent 722deca86d
commit b281c085f6
Signed by: albert
GPG key ID: 3895DD267CA11BA9
6 changed files with 47 additions and 42 deletions
flake.nix
home-manager/containers/rdesktop
lib
nixos/containers/rdesktop

View file

@ -93,11 +93,6 @@
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
"albert@bakersfield-rpi4" = libx.mkHome { hostname = "bakersfield-rpi4"; system = "aarch64-linux"; type = "small"; };
# Containers
"albert@rdesktop-nuc-server" = libx.mkHome { hostname = "rdesktop-nuc-server"; desktop = "gnome"; };
"albert@rdesktop-framework-server" = libx.mkHome { hostname = "rdesktop-framework-server"; desktop = "gnome"; };
"albert@rdesktop-warsaw-ovh-01" = libx.mkHome { hostname = "rdesktop-warsaw-ovh-01"; desktop = "gnome"; };
};
deploy.nodes = {
# Linode VMs

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,3 @@
{
}

View file

@ -0,0 +1,3 @@
{
}

View file

@ -33,17 +33,17 @@
mkContainer = {
hostname,
host,
username ? "albert",
desktop ? null,
system ? "x86_64-linux",
theme ? "default",
repo ? "nixpkgs",
unfree ? false,
ip ? null,
ephemeral ? false,
username ? "albert",
desktop ? null,
system ? "x86_64-linux",
theme ? "default",
repo ? "nixpkgs",
unfree ? false,
ip ? null,
ephemeral ? false,
deployment_type ? "containers", # Currently used to change where secrets are searched for
pkgs ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs,
pkgs-unstable ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable,
pkgs ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs,
pkgs-unstable ? let packages = (import ./packages.nix { inherit inputs repo system unfree; }); in packages.pkgs-unstable,
}: {
bindMounts = lib.mkMerge [
( import ../nixos/containers/mounts.nix )
@ -70,14 +70,14 @@
# Helper function for generating host configs
mkDeck = {
hostname,
username ? "albert",
desktop ? null,
gpu ? null,
system ? "x86_64-linux",
theme ? "default",
type ? "default",
repo ? "nixpkgs-unstable",
unfree ? true,
username ? "albert",
desktop ? null,
gpu ? null,
system ? "x86_64-linux",
theme ? "default",
type ? "default",
repo ? "nixpkgs-unstable",
unfree ? true,
deployment_type ? "hosts",
}: inputs.${repo}.lib.nixosSystem {
specialArgs = {
@ -97,13 +97,13 @@
# Helper function for generating host configs
mkHost = {
hostname,
username ? "albert",
desktop ? null,
gpu ? null,
system ? "x86_64-linux",
theme ? "default",
type ? "default",
repo ? "nixpkgs",
username ? "albert",
desktop ? null,
gpu ? null,
system ? "x86_64-linux",
theme ? "default",
type ? "default",
repo ? "nixpkgs",
deployment_type ? "hosts",
unfree ? false
}: inputs.${repo}.lib.nixosSystem {
@ -124,14 +124,15 @@
# Combines mkHost and mkHome for image building
mkImage = {
hostname ,
username ? "albert",
desktop ? null,
system ? "x86_64-linux",
gpu ? null,
theme ? "default",
repo ? "nixpkgs",
unfree ? false,
hostname,
username ? "albert",
desktop ? null,
system ? "x86_64-linux",
gpu ? null,
theme ? "default",
repo ? "nixpkgs",
unfree ? false,
deployment_type ? "hosts",
format
}: inputs.nixos-generators.nixosGenerate {
specialArgs = {
@ -150,7 +151,7 @@
inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote
inputs.home-manager.nixosModules.home-manager {
home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username gpu system theme format; };
home-manager.extraSpecialArgs = { inherit inputs outputs desktop hostname username gpu system theme format deployment_type; };
home-manager.users."${username}" = import ../home-manager;
}
];

View file

@ -15,9 +15,9 @@
# Testing fixes for home-manager
systemd.tmpfiles.rules = [
# Create parent directory first
"d /home/albert/.config/dconf 0755 albert users -"
# Create empty file with proper permissions
"f /home/albert/.config/dconf/user.UMZ112 0644 albert users -"
"d /home/albert/.config/dconf 0755 albert albert -"
"d /home/albert/.config 0755 albert albert -"
"d /home/albert/.ssh albert albert -"
];
# Import home-manager