add iso image profile

This commit is contained in:
Dmitriy Kholkin 2021-09-15 18:37:57 +03:00
parent c4ad40b1e3
commit 5555c63a40
4 changed files with 57 additions and 1 deletions

View File

@ -82,6 +82,8 @@
rebuild = pkgs.writeShellScriptBin "rebuild" ''
if [[ -z $1 ]]; then
echo "Usage: $(basename $0) {switch|boot|test}"
elif [[ $1 = "iso" ]]; then
nix build .#nixosConfigurations.Flakes-ISO.config.system.build.isoImage
else
sudo nixos-rebuild $1 --flake .
fi

View File

@ -0,0 +1,49 @@
{ modulesPath, lib, inputs, pkgs, ... }: {
imports = with inputs.self.nixosModules; [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
inputs.self.nixosProfiles.base
inputs.base16.hmModule
alacritty
cursor
fonts
gtk
i3
i3status-rust
rofi
themes
urxvt
vivaldi
vscode
xresources
xserver
];
networking.wireless.enable = lib.mkForce false;
networking.networkmanager.enable = lib.mkForce true;
services.openssh.permitRootLogin = lib.mkForce "no";
sound.enable = lib.mkForce true;
hardware.pulseaudio.enable = lib.mkForce true;
services.getty.autologinUser = lib.mkForce "alukard";
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
boot.supportedFilesystems = lib.mkForce [ "ext4" "vfat" "btrfs" "ntfs" ];
disabledModules = [ "installer/cd-dvd/channel.nix" ];
deviceSpecific.devInfo.drive.type = "hdd";
deviceSpecific.devInfo.gpu.vendor = "other";
deviceSpecific.isHost = false;
deviceSpecific.isShared = false;
deviceSpecific.isGaming = false;
deviceSpecific.enableVirtualisation = false;
deviceSpecific.wireguard.enable = false;
defaultApplications = {
fm = {
cmd = "${pkgs.xfce4-14.thunar}/bin/thunar";
desktop = "thunar";
};
monitor = {
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
desktop = "taskmanager";
};
};
}

View File

@ -0,0 +1 @@
x86_64-linux

View File

@ -17,7 +17,7 @@ with types; {
size = mkOption { type = int; };
};
gpu = {
vendor = mkOption { type = enum [ "amd" "nvidia" "intel" "vm" ]; };
vendor = mkOption { type = enum [ "amd" "nvidia" "intel" "vm" "other" ]; };
};
ram = mkOption { type = int; };
legacy = mkOption { type = bool; default = false; };
@ -41,6 +41,10 @@ with types; {
default =
!isNull (builtins.match ".*ISO" config.networking.hostName);
};
isDesktop = mkOption {
type = bool;
default = with config.deviceSpecific; (!isLaptop && !isVM && !isISO);
};
isHost = mkOption {
type = bool;
default = false;