arnaucube
arnaucube/configsPublic Self-hosted repository
configs/nixos/chuwi-configuration.nix
nixos/chuwi-configuration.nixRaw
 1# This file is meant to be renamed to `configuration.nix`
 2# Chuwi minibook NixOS configuration.
 3
 4{ pkgs, ... }:
 5
 6{
 7  imports =
 8    [
 9      ./common-configuration.nix
10      ./hardware-configuration.nix
11      ./private-configuration.nix
12    ];
13
14  # Bootloader.
15  boot.loader.systemd-boot.enable = true;
16  boot.loader.efi.canTouchEfiVariables = true;
17
18  networking.hostName = "chuwi"; # Define your hostname.
19  # NetworkManager owns DHCP for the physical interfaces.
20  networking.networkmanager.enable = true;
21  networking.useDHCP = false;
22  hardware.cpu.intel.updateMicrocode = true;
23
24  # Define a user account. Don't forget to set a password with ‘passwd’.
25  users.users.user = {
26    isNormalUser = true;
27    description = "user";
28    extraGroups = [ "networkmanager" "wheel" "incus" ];
29  };
30
31  # Allow unfree packages
32  nixpkgs.config.allowUnfree = true;
33
34  # This value determines the NixOS release from which the default
35  # settings for stateful data, like file locations and database versions
36  # on your system were taken. It‘s perfectly fine and recommended to leave
37  # this value at the release version of the first install of this system.
38  # Before changing this value read the documentation for this option
39  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
40  system.stateVersion = "24.11"; # Did you read the comment?
41
42  # Chuwi-specific Wi-Fi workaround.
43  boot.kernelPackages = pkgs.linuxPackages_latest;
44
45  # Rotate both the virtual console and the internal Sway output.
46  boot.kernelParams = [ "fbcon=rotate:1" ];
47  environment.etc."sway/config.d/20-chuwi-display.conf".text = ''
48    output DSI-1 transform 90
49  '';
50
51  # Chuwi-specific packages.
52  environment.systemPackages = with pkgs; [
53    rnote
54    xournalpp
55  ];
56
57  services.logind.settings.Login = {
58    HandlePowerKey = "ignore";
59  };
60}