This commit is contained in:
albert 2024-03-20 19:05:41 +09:00
parent 6e5ef7ddf5
commit fb368413f3
No known key found for this signature in database
GPG key ID: 64F6C4EB46C4543A
2 changed files with 28 additions and 37 deletions

View file

@ -35,30 +35,21 @@
container,
username ? "albert",
desktop ? null,
gpu ? null,
system ? "x86_64-linux",
theme ? "stylix",
type ? "default",
repo ? "nixpkgs",
unfree ? false
unfree ? false,
pkgs ? import inputs.${repo}
{ inherit system; config.allowUnfree = unfree; hostPlatform = system; },
pkgs-unstable ? import inputs.nixpkgs-unstable
{inherit system; config.allowUnfree = unfree; hostPlatform = system; }
}: {
autoStart = true;
privateNetwork = false;
specialArgs = { inherit desktop container username stateVersion gpu system theme; };
config = { lib, container, username, desktop, gpu, system, theme, type, repo, unfree, pkgs, stateVersion}: {
# Choose whether to pull from stable or unstable
pkgs = import inputs.${repo} {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
imports = [ ../nixos/containers/rdesktop ];
specialArgs = { inherit pkgs pkgs-unstable container username desktop theme system repo unfree; };
config = { lib, config, pkgs, pkgs-unstable, container, username, desktop, theme, system, repo, ... }: {
imports = [ ../nixos/containers/${container} ];
};
};
@ -75,25 +66,25 @@
unfree ? false
}: inputs.${repo}.lib.nixosSystem {
specialArgs = { inherit inputs outputs desktop hostname username hmStateVersion stateVersion gpu system theme self;
# Choose whether to pull from stable or unstable
pkgs = import inputs.${repo} {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
# Choose whether to pull from stable or unstable
pkgs = import inputs.${repo} {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
# Some packages (ie, Vintage Story) I want to keep on unstable no matter what default repo I use
pkgs-unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = unfree;
hostPlatform = system;
};
};
modules = [
# Types are 'default', 'small', and 'minimal'
../nixos/${type}.nix
inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote
modules = [
# Types are 'default', 'small', and 'minimal'
../nixos/${type}.nix
inputs.sops-nix.nixosModules.sops
inputs.lanzaboote.nixosModules.lanzaboote
];
};

View file

@ -1,8 +1,8 @@
{ self, inputs, outputs, username, stateVersion, hmStateVersion, config, lib, pkgs, modulesPath, system, ... }:
{ self, inputs, outputs, stateVersion, hmStateVersion, pkgs, pkgs-unstable, ... }:
let
libx = import ../../../lib {inherit self inputs outputs stateVersion hmStateVersion; };
libx = import ../../../lib {inherit self inputs outputs stateVersion hmStateVersion pkgs-unstable pkgs; };
in {
containers = {
rdesktop = libx.mkContainer { container = "rdesktop"; desktop = "xfce";};
rdesktop = libx.mkContainer { container = "rdesktop"; desktop = "xfce"; unfree = true;};
};
}