From 06c0bc1b3f668c6d81f090deb9643540b6cb46d2 Mon Sep 17 00:00:00 2001 From: Stefan Junker Date: Mon, 14 Oct 2024 15:02:22 +0200 Subject: [PATCH] refactor: remove multi-kernel support, clarify maintnenance --- README.md | 53 ++++------------------------------------------------- flake.nix | 2 +- module.nix | 6 +----- 3 files changed, 6 insertions(+), 55 deletions(-) diff --git a/README.md b/README.md index 937bf17..4b4918e 100644 --- a/README.md +++ b/README.md @@ -1,40 +1,20 @@ # nixos x13s > [!CAUTION] -> This project is unmaintained. +> This project is partially maintained. +> It receives kernel updates, until mainline will provide a fully functional experience. This repository aims to provide easy, shared, support for Lenovo X13s on Linux. The support for this machine is constantly improving in mainline kernel and upstream packages. Eventually the goal is that this repository is no longer necessary. -## Binary cache - -A binary cache is provided through Cachix so you can avoid re-building the kernel. - -https://app.cachix.org/cache/nixos-x13s - -Ensure you are not overriding the nixpkgs input when consuming this flake, or you may not be able to take advantages of this cache. - -NixOS configuration example: - -```nix - nix.settings = { - substituters = [ - "https://nixos-x13s.cachix.org" - ]; - trusted-public-keys = [ - "nixos-x13s.cachix.org-1:SzroHbidolBD3Sf6UusXp12YZ+a5ynWv0RtYF0btFos=" - ]; - }; -``` - ## Add with a flake ```nix { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s"; + nixos-x13s.url = "git+https://codeberg.org/steveej/nixos-x13s"; }; outputs = @@ -46,13 +26,7 @@ NixOS configuration example: inputs.nixos-x13s.nixosModules.default { nixos-x13s.enable = true; - nixos-x13s.kernel = "jhovold"; # jhovold is default, but mainline supported - - # install multiple kernels! note this increases eval time for each specialization - specialisation = { - # note that activation of each specialization is required to copy the dtb to the EFI, and thus boot - mainline.configuration.nixos-x13s.kernel = "mainline"; - }; + nixos-x13s.kernel = "jhovold"; # jhovold is default # allow unfree firmware nixpkgs.config.allowUnfree = true; @@ -66,25 +40,6 @@ NixOS configuration example: } ``` -## Add using not a flake - -Clone the repository: - -``` -git clone https://codeberg.org/adamcstephens/nixos-x13s /etc/nixos/nixos-x13s -``` - -Then reference the module in your `configuration.nix` and use the module as documented in the flake example above: - -```nix - imports = - [ - ./nixos-x13s/module.nix - ]; - nixos-x13s.enable = true; - ... -``` - ## UEFI Update ISO This repository provides a package which can output the USB UEFI Update ISO. This will be updated as Lenovo releases new versions. diff --git a/flake.nix b/flake.nix index aaa2ed3..a0a9d0c 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,7 @@ { config, pkgs, ... }: { nixos-x13s.enable = true; - nixos-x13s.kernel = "jhovold"; # jhovold is default, but mainline supported + nixos-x13s.kernel = "jhovold"; # jhovold is default # allow unfree firmware nixpkgs.config.allowUnfree = true; diff --git a/module.nix b/module.nix index 5fee192..0038fbe 100644 --- a/module.nix +++ b/module.nix @@ -10,9 +10,6 @@ let cfg = config.nixos-x13s; linuxPackages_x13s = - if cfg.kernel == "mainline" then - pkgs.linuxPackages_latest - else pkgs.linuxPackagesFor ( if cfg.kernel == "jhovold" then x13sPackages.linux_jhovold else throw "Unsupported kernel" ); @@ -46,9 +43,8 @@ in kernel = lib.mkOption { type = lib.types.enum [ "jhovold" - "mainline" ]; - description = "Which patched kernel to use. jhovold is the latest RC or release with some x13s specific patches, and mainline is nixos latest"; + description = "Which patched kernel to use. jhovold is the latest RC or release with some x13s specific patches."; default = "jhovold"; }; };