Package: Add all target.

This commit is contained in:
Dmitry Voronin 2025-01-18 21:20:02 +03:00
parent 736d204b39
commit a1fde92ec3
Signed by: voronind
SSH key fingerprint: SHA256:3kBb4iV2ahufEBNq+vFbUe4QYfHt98DHQjN7QaptY9k
8 changed files with 57 additions and 34 deletions

View file

@ -59,17 +59,17 @@ installer:
.PHONY: live .PHONY: live
live: live:
nix build -o installer $(options) $(flake)#nixosConfigurations.live.config.system.build.isoImage nix build -o installer $(options) $(flake)#nixosConfigurations.live.config.system.build.isoImage
.PHONY: recovery
recovery:
nix build -o installer $(options) $(flake)#nixosConfigurations.recovery.config.system.build.isoImage
no-nixconf: no-nixconf:
mv /etc/nix/nix.conf /etc/nix/nix.conf_ || true mv /etc/nix/nix.conf /etc/nix/nix.conf_ || true
reboot: boot reboot: boot
reboot reboot
.PHONY: recovery
recovery:
nix build -o installer $(options) $(flake)#nixosConfigurations.recovery.config.system.build.isoImage
show: show:
nix flake show nix flake show

View file

@ -5,17 +5,8 @@ in
{ {
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
imports = [ imports = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/iso-image.nix"
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
]; ];
networking.wireless.enable = lib.mkForce false;
# Override my settings to allow SSH logins using root password.
services.openssh.settings = {
PasswordAuthentication = lib.mkForce true;
PermitRootLogin = lib.mkForce "yes";
};
}; };
} }

View file

@ -10,7 +10,7 @@
amd.gpu.enable = true; amd.gpu.enable = true;
builder.client.enable = true; builder.client.enable = true;
display.primary = "DP-1"; display.primary = "DP-1";
package.extra = true; package.all = true;
print.enable = true; print.enable = true;
purpose = { purpose = {
creative = true; creative = true;

View file

@ -8,7 +8,7 @@
module = { module = {
builder.client.enable = true; builder.client.enable = true;
package.extra = true; package.all = true;
print.enable = true; print.enable = true;
syncthing.enable = true; syncthing.enable = true;
purpose = { purpose = {

View file

@ -1,22 +1,27 @@
{ ... }: { inputs, lib, ... }:
{ {
imports = [
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
"${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
];
networking.wireless.enable = lib.mkForce false;
# Override my settings to allow SSH logins using root password.
services.openssh.settings = {
PasswordAuthentication = lib.mkForce true;
PermitRootLogin = lib.mkForce "yes";
};
# Root user setup. # Root user setup.
home.nixos.enable = true; home.nixos.enable = true;
user.root = true; user.root = true;
module = { module = {
keyd.enable = true; keyd.enable = true;
package.all = true;
purpose = { purpose = {
live = true; live = true;
}; };
package = {
common = true;
core = true;
creative = true;
desktop = true;
dev = true;
extra = true;
gaming = true;
};
}; };
} }

View file

@ -0,0 +1,23 @@
{ ... }:
{
# Root user setup.
home.nixos.enable = true;
user.root = true;
module = {
keyd.enable = true;
purpose = {
live = true;
};
package = {
common = true;
core = true;
creative = true;
desktop = true;
dev = true;
extra = true;
gaming = true;
};
};
}

View file

@ -9,7 +9,7 @@
module = { module = {
builder.client.enable = true; builder.client.enable = true;
package.extra = true; package.all = true;
print.enable = true; print.enable = true;
syncthing.enable = true; syncthing.enable = true;
purpose = { purpose = {

View file

@ -1,27 +1,31 @@
{ lib, config, ... }: { lib, config, ... }:
let let
cfg = config.module.package;
purpose = config.module.purpose; purpose = config.module.purpose;
in in
{ {
options.module.package = { options.module.package = {
all = lib.mkEnableOption "All apps.";
core = lib.mkEnableOption "Core apps." // { core = lib.mkEnableOption "Core apps." // {
default = true; default = true;
}; };
common = lib.mkEnableOption "Common Apps." // { common = lib.mkEnableOption "Common Apps." // {
default = with purpose; desktop || laptop; default = cfg.all || (with purpose; desktop || laptop);
}; };
creative = lib.mkEnableOption "Creative Apps." // { creative = lib.mkEnableOption "Creative Apps." // {
default = purpose.creative; default = cfg.all || purpose.creative;
}; };
desktop = lib.mkEnableOption "Desktop Apps." // { desktop = lib.mkEnableOption "Desktop Apps." // {
default = with purpose; desktop || laptop; default = cfg.all || (with purpose; desktop || laptop);
}; };
dev = lib.mkEnableOption "Dev Apps." // { dev = lib.mkEnableOption "Dev Apps." // {
default = purpose.work; default = cfg.all || purpose.work;
}; };
gaming = lib.mkEnableOption "Gaming Apps." // { gaming = lib.mkEnableOption "Gaming Apps." // {
default = purpose.gaming; default = cfg.all || purpose.gaming;
};
extra = lib.mkEnableOption "Extra Apps." // {
default = cfg.all;
}; };
extra = lib.mkEnableOption "Extra Apps.";
}; };
} }