Find a file
Adam Stephens 7d66d2ca4d
flake.lock: Update
Flake lock file updates:

• Updated input 'flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8' (2024-06-01)
  → 'github:hercules-ci/flake-parts/9227223f6d922fee3c7b190b2cc238a99527bbb7' (2024-07-03)
• Updated input 'flake-parts/nixpkgs-lib':
    'eb9ceca17d.tar.gz?narHash=sha256-lIbdfCsf8LMFloheeE6N31%2BBMIeixqyQWbSr2vk79EQ%3D' (2024-06-01)
  → '5daf051448.tar.gz?narHash=sha256-Fm2rDDs86sHy0/1jxTOKB1118Q0O3Uc7EC0iXvXKpbI%3D' (2024-07-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/2893f56de08021cffd9b6b6dfc70fd9ccd51eb60' (2024-06-24)
  → 'github:NixOS/nixpkgs/9f4128e00b0ae8ec65918efeba59db998750ead6' (2024-07-03)
2024-07-04 17:33:34 -04:00
.woodpecker fix: wrap build in tini 2024-06-08 11:41:56 -04:00
npins jhovold: 6.10.0-rc3 -> 6.10.0-rc5 2024-06-25 14:44:55 -04:00
packages jhovold: 6.10.0-rc3 -> 6.10.0-rc5 2024-06-25 14:44:55 -04:00
.envrc init: x13s module and packages 2024-01-22 12:47:25 -05:00
.gitignore - adding an iso package to the flake 2024-05-12 23:24:31 -04:00
flake.lock flake.lock: Update 2024-07-04 17:33:34 -04:00
flake.nix add update script for kernel 2024-06-25 14:47:58 -04:00
justfile forgejo -> woodpecker 2024-05-14 16:23:18 -04:00
module.nix jhovold: 6.10.0-rc1 -> 6.10.0-rc2 2024-06-08 09:27:27 -04:00
README.md document usb iso 2024-05-01 11:17:21 -04:00
update.py add update script for kernel 2024-06-25 14:47:58 -04:00

nixos x13s

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.settings = {
    substituters = [
      "https://nixos-x13s.cachix.org"
    ];
    trusted-public-keys = [
      "nixos-x13s.cachix.org-1:SzroHbidolBD3Sf6UusXp12YZ+a5ynWv0RtYF0btFos="
    ];
  };

Add with a flake

{
  inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
    nixos-x13s.url = "git+https://codeberg.org/adamcstephens/nixos-x13s";
  };

  outputs =
    { ... }@inputs:
    {
      nixosConfigurations.example = inputs.nixpkgs.lib.nixosSystem {
        system = "aarch64-linux";
        modules = [
          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";
            };

            # allow unfree firmware
            nixpkgs.config.allowUnfree = true;

            # define your fileSystems
            fileSystems."/".device = "/dev/notreal";
          }
        ];
      };
    };
}

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:

  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.

nix build .#uefi-usbiso

dd if=result/usbdisk-*.iso of=/path/to/usb/disk

Reboot, select USB drive from F12 boot menu, follow wizard.