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

• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/cfd6b5fc90b15709b780a5a1619695a88505a176' (2024-04-12)
  → 'github:NixOS/nixpkgs/6143fc5eeb9c4f00163267708e26191d1e918932' (2024-04-21)
2024-04-22 07:42:23 -04:00
.forgejo/workflows build all packages 2024-02-26 10:11:29 -05:00
npins jhovold: 6.9.0-rc2 -> 6.9.0-rc4 2024-04-15 11:01:04 -04:00
packages jhovold: 6.9.0-rc2 -> 6.9.0-rc4 2024-04-15 11:01:04 -04:00
.envrc init: x13s module and packages 2024-01-22 12:47:25 -05:00
.gitignore init: x13s module and packages 2024-01-22 12:47:25 -05:00
flake.lock flake.lock: Update 2024-04-22 07:42:23 -04:00
flake.nix drop steev completely 2024-03-19 10:18:36 -04:00
module.nix drop steev completely 2024-03-19 10:18:36 -04:00
README.md added non-flake example, and binary cache example 2024-04-15 10:59:09 -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;
  ...