From fea6ae70a4acb7897481caf4859081449b8e4e84 Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 10 Jan 2024 19:51:13 +0100 Subject: [PATCH] add nixos-generator --- flake.lock | 24 ++++++++++++++++ flake.nix | 13 +++++++++ modules/default.nix | 1 + systems/installer/default.nix | 54 +++++++++++++++++++++++++++++++++++ 4 files changed, 92 insertions(+) create mode 100644 systems/installer/default.nix diff --git a/flake.lock b/flake.lock index e61a39b..6f0a5fe 100644 --- a/flake.lock +++ b/flake.lock @@ -286,6 +286,29 @@ "type": "github" } }, + "nixos-generators": { + "inputs": { + "nixlib": [ + "nixpkgs-lib" + ], + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1701689616, + "narHash": "sha256-ewnfgvRy73HoP5KnYmy1Rcr4m4yShvsb6TCCaKoW8pc=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "246219bc21b943c6f6812bb7744218ba0df08600", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1704632650, @@ -503,6 +526,7 @@ "libnbtplusplus": "libnbtplusplus", "nix-filter": "nix-filter", "nix-systems": "nix-systems", + "nixos-generators": "nixos-generators", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nixpkgs-lib": "nixpkgs-lib", diff --git a/flake.nix b/flake.nix index 753c253..2554486 100644 --- a/flake.nix +++ b/flake.nix @@ -27,6 +27,11 @@ inputs.nix-filter.follows = "nix-filter"; }; nixos-hardware.url = "github:NixOS/nixos-hardware"; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixlib.follows = "nixpkgs-lib"; + }; tela-icon-theme = { url = "github:vinceliuice/Tela-icon-theme"; flake = false; @@ -113,6 +118,14 @@ self.outputs.nixosModules.default ]; }; + installer = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = inputs; + modules = [ + ./systems/installer + self.outputs.nixosModules.default + ]; + }; steamdeck = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = inputs; diff --git a/modules/default.nix b/modules/default.nix index 3c0cfa6..3e6e1e3 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -22,5 +22,6 @@ ./users self.inputs.home-manager.nixosModules.home-manager self.inputs.kde2nix.nixosModules.plasma6 + self.inputs.nixos-generators.nixosModules.all-formats ]; } diff --git a/systems/installer/default.nix b/systems/installer/default.nix new file mode 100644 index 0000000..329939b --- /dev/null +++ b/systems/installer/default.nix @@ -0,0 +1,54 @@ +{ config, pkgs, ... }: + +{ + jopejoe1 = { + audio = { + enable = true; + }; + local.enable = true; + nix.enable = true; + plasma6.enable = true; + overlays.enable = true; + jopejoe1.enable = true; + root.enable = true; + }; + + networking = { + hostName = "installer"; + }; + + nixpkgs = { + hostPlatform = { + system = "x86_64-linux"; + config = "x86_64-unknown-linux-gnu"; + }; + }; + + time.timeZone = "Europe/Berlin"; + + + environment.systemPackages = with pkgs; [ + # Calamares for graphical installation + libsForQt5.kpmcore + calamares-nixos + (pkgs.makeAutostartItem { name = "io.calamares.calamares"; package = pkgs.calamares-nixos; }) + calamares-nixos-extensions + # Get list of locales + glibcLocales + # Theming + catppuccin-kvantum + catppuccin-kde + catppuccin-gtk + tela-icon-theme + ]; + + i18n.supportedLocales = [ "all" ]; + + programs = { + xwayland.enable = true; + kdeconnect.enable = true; + }; + console = { + enable = true; + }; +}