diff --git a/flake.nix b/flake.nix index 611f97c..4b880a5 100644 --- a/flake.nix +++ b/flake.nix @@ -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 diff --git a/machines/Flakes-ISO/default.nix b/machines/Flakes-ISO/default.nix new file mode 100644 index 0000000..0852bf8 --- /dev/null +++ b/machines/Flakes-ISO/default.nix @@ -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"; + }; + }; +} \ No newline at end of file diff --git a/machines/Flakes-ISO/system b/machines/Flakes-ISO/system new file mode 100644 index 0000000..9bdfd5f --- /dev/null +++ b/machines/Flakes-ISO/system @@ -0,0 +1 @@ +x86_64-linux \ No newline at end of file diff --git a/modules/devices.nix b/modules/devices.nix index cc7671c..ba5a617 100644 --- a/modules/devices.nix +++ b/modules/devices.nix @@ -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;