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
  3# Edit this configuration file to define what should be installed on
  4# your system.  Help is available in the configuration.nix(5) man page
  5# and in the NixOS manual (accessible by running ‘nixos-help’).
  6
  7{ config, pkgs, ... }:
  8
  9{
 10  imports =
 11    [
 12      ./common-configuration.nix
 13      ./hardware-configuration.nix
 14      ./surface-extra-hardware-configuration.nix
 15      ./private-configuration.nix
 16    ];
 17
 18  # Bootloader.
 19  boot.loader.systemd-boot.enable = true;
 20  boot.loader.efi.canTouchEfiVariables = true;
 21
 22  # Setup keyfile
 23  boot.initrd.secrets = {
 24    "/crypto_keyfile.bin" = null;
 25  };
 26
 27  networking.hostName = "nixos"; # Define your hostname.
 28  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
 29
 30  # Configure network proxy if necessary
 31  # networking.proxy.default = "http://user:password@proxy:port/";
 32  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
 33
 34  # Enable networking
 35  networking.networkmanager.enable = true;
 36
 37  # Set your time zone.
 38  time.timeZone = "Europe/Madrid";
 39
 40  # Select internationalisation properties.
 41  i18n.defaultLocale = "en_US.UTF-8";
 42
 43  i18n.extraLocaleSettings = {
 44    LC_ALL = "en_US.UTF-8";
 45  };
 46
 47  # Configure keymap in X11
 48  services.xserver = {
 49    layout = "us";
 50    xkbVariant = "";
 51
 52    enable=true;
 53    displayManager = {
 54      defaultSession = "none+i3";
 55    };
 56    windowManager.i3 = {
 57      enable=true;
 58      extraPackages = with pkgs; [
 59        dmenu
 60        i3status
 61        i3lock
 62      ];
 63    };
 64  };
 65
 66  # Define a user account. Don't forget to set a password with ‘passwd’.
 67  users.users.userc = {
 68    isNormalUser = true;
 69    description = "userc";
 70    extraGroups = [ "networkmanager" "wheel" ];
 71    packages = with pkgs; [];
 72  };
 73
 74  # Allow unfree packages
 75  nixpkgs.config.allowUnfree = true;
 76
 77
 78  programs.zsh.enable = true;
 79  users.defaultUserShell = pkgs.zsh;
 80  environment.shells = with pkgs; [zsh];
 81
 82  # Some programs need SUID wrappers, can be configured further or are
 83  # started in user sessions.
 84  # programs.mtr.enable = true;
 85  # programs.gnupg.agent = {
 86  #   enable = true;
 87  #   enableSSHSupport = true;
 88  # };
 89
 90  # List services that you want to enable:
 91
 92  # Enable the OpenSSH daemon.
 93  # services.openssh.enable = true;
 94
 95  # Open ports in the firewall.
 96  # networking.firewall.allowedTCPPorts = [ ... ];
 97  # networking.firewall.allowedUDPPorts = [ ... ];
 98  # Or disable the firewall altogether.
 99  # networking.firewall.enable = false;
100
101  # This value determines the NixOS release from which the default
102  # settings for stateful data, like file locations and database versions
103  # on your system were taken. It‘s perfectly fine and recommended to leave
104  # this value at the release version of the first install of this system.
105  # Before changing this value read the documentation for this option
106  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
107  system.stateVersion = "23.05"; # Did you read the comment?
108
109  # gvfs needed for Thunar to detect external disks
110  services.gvfs.enable = true;
111
112  # bluetooth related
113  hardware.bluetooth.enable = true;
114  services.blueman.enable = true;
115
116  # obs virtual camera
117  boot.extraModulePackages = with config.boot.kernelPackages; [
118    v4l2loopback
119  ];
120}