arnaucube
arnaucube/configsPublic Self-hosted repository
configs/nixos/surface-configuration.nix
nixos/surface-configuration.nixRaw
 1# This file is meant to be renamed to `configuration.nix`
 2# Surface Go 2 NixOS configuration
 3
 4{ config, pkgs, ... }:
 5
 6{
 7  imports =
 8    [
 9      ./common-configuration.nix
10      ./hardware-configuration.nix
11      ./surface-extra-hardware-configuration.nix
12      ./private-configuration.nix
13    ];
14
15  # Bootloader.
16  boot.loader.systemd-boot.enable = true;
17  boot.loader.efi.canTouchEfiVariables = true;
18
19  # Setup keyfile
20  boot.initrd.secrets = {
21    "/crypto_keyfile.bin" = null;
22  };
23
24  networking.hostName = "surface"; # Define your hostname.
25  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
26
27  # Configure network proxy if necessary
28  # networking.proxy.default = "http://user:password@proxy:port/";
29  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
30
31  # Enable networking
32  networking.networkmanager.enable = true;
33
34  # Define a user account. Don't forget to set a password with ‘passwd’.
35  users.users.userc = {
36    isNormalUser = true;
37    description = "userc";
38    extraGroups = [ "networkmanager" "wheel" ];
39    packages = with pkgs; [];
40  };
41
42  # Allow unfree packages
43  nixpkgs.config.allowUnfree = true;
44
45  # This value determines the NixOS release from which the default
46  # settings for stateful data, like file locations and database versions
47  # on your system were taken. It‘s perfectly fine and recommended to leave
48  # this value at the release version of the first install of this system.
49  # Before changing this value read the documentation for this option
50  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
51  system.stateVersion = "23.05"; # Did you read the comment?
52
53  # gvfs needed for Thunar to detect external disks
54  services.gvfs.enable = true;
55
56  # obs virtual camera
57  boot.extraModulePackages = with config.boot.kernelPackages; [
58    v4l2loopback
59  ];
60}