From b9de7c91d7b458e9e7d019b46c4e83e0f9f22f7d Mon Sep 17 00:00:00 2001 From: 0xTux <0xtux@pm.me> Date: Sun, 4 Aug 2024 14:01:48 +0530 Subject: [PATCH] add iso image host --- .gitignore | 1 + flake.nix | 20 ++++++++++ hosts/isoImage/default.nix | 76 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 hosts/isoImage/default.nix diff --git a/.gitignore b/.gitignore index 04204c7..46e1560 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ config +result diff --git a/flake.nix b/flake.nix index 5ae44c6..646ba49 100755 --- a/flake.nix +++ b/flake.nix @@ -102,6 +102,26 @@ } ]; }; + + isoImage = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs username;}; + modules = [ + ./modules/nixos + ./hosts/isoImage + + home-manager.nixosModules.home-manager + { + home-manager.backupFileExtension = "backup"; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = {inherit inputs outputs username;}; + home-manager.users.${username} = { + imports = [ + ./modules/home-manager + ]; + }; + } + ]; + }; }; # Standalone home-manager configuration entrypoint diff --git a/hosts/isoImage/default.nix b/hosts/isoImage/default.nix new file mode 100644 index 0000000..8c59f01 --- /dev/null +++ b/hosts/isoImage/default.nix @@ -0,0 +1,76 @@ +{ + pkgs, + modulesPath, + ... +}: { + imports = [ + "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" + ../../modules/nixos/default.nix + ../../modules/nixos/desktop/awesome + ]; + + nixpkgs.hostPlatform = "x86_64-linux"; + + networking = { + hostName = "iso"; + }; + + hardware = { + bluetooth.enable = true; + bluetooth.powerOnBoot = true; + }; + + security = { + sudo.wheelNeedsPassword = false; + rtkit.enable = true; + }; + + programs = { + ssh.startAgent = true; + thunar = { + enable = true; + plugins = with pkgs.xfce; [thunar-archive-plugin thunar-volman]; + }; + nix-ld = { + enable = true; + package = pkgs.nix-ld-rs; + }; + nm-applet.enable = true; + }; + + services = { + resolved.enable = true; + + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; + + logind = { + extraConfig = "HandlePowerKey=suspend"; + lidSwitch = "suspend"; + lidSwitchExternalPower = "suspend"; + }; + + xserver = { + enable = true; + xkb = { + layout = "in"; + variant = "eng"; + }; + }; + + libinput.touchpad.naturalScrolling = true; + + blueman.enable = true; + + gvfs.enable = true; + tumbler.enable = true; + }; + + fonts.packages = with pkgs; [(nerdfonts.override {fonts = ["FiraCode" "JetBrainsMono"];})]; + + system.stateVersion = "23.11"; +}