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      ./hardware-configuration.nix
 13      ./surface-extra-hardware-configuration.nix
 14      ./private-configuration.nix
 15    ];
 16
 17  # Bootloader.
 18  boot.loader.systemd-boot.enable = true;
 19  boot.loader.efi.canTouchEfiVariables = true;
 20
 21  # Setup keyfile
 22  boot.initrd.secrets = {
 23    "/crypto_keyfile.bin" = null;
 24  };
 25
 26  networking.hostName = "nixos"; # Define your hostname.
 27  # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
 28
 29  # Configure network proxy if necessary
 30  # networking.proxy.default = "http://user:password@proxy:port/";
 31  # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
 32
 33  # Enable networking
 34  networking.networkmanager.enable = true;
 35
 36  # Set your time zone.
 37  time.timeZone = "Europe/Madrid";
 38
 39  # Select internationalisation properties.
 40  i18n.defaultLocale = "en_US.UTF-8";
 41
 42  i18n.extraLocaleSettings = {
 43    LC_ALL = "en_US.UTF-8";
 44  };
 45
 46  # Configure keymap in X11
 47  services.xserver = {
 48    layout = "us";
 49    xkbVariant = "";
 50
 51    enable=true;
 52    displayManager = {
 53      defaultSession = "none+i3";
 54    };
 55    windowManager.i3 = {
 56      enable=true;
 57      extraPackages = with pkgs; [
 58        dmenu
 59        i3status
 60        i3lock
 61      ];
 62    };
 63  };
 64
 65  # Define a user account. Don't forget to set a password with ‘passwd’.
 66  users.users.userc = {
 67    isNormalUser = true;
 68    description = "userc";
 69    extraGroups = [ "networkmanager" "wheel" ];
 70    packages = with pkgs; [];
 71  };
 72
 73  # Allow unfree packages
 74  nixpkgs.config.allowUnfree = true;
 75
 76  # List packages installed in system profile. To search, run:
 77  # $ nix search wget
 78  environment.systemPackages = with pkgs; [
 79  	vim
 80	neovim
 81 	wget
 82	tmux
 83	git
 84	delta
 85	tig
 86	mosh
 87	bat
 88	lf
 89	ripgrep
 90	fzf
 91	python3
 92	xfce.thunar
 93	xfce.xfconf # needed to save preferences of thunar
 94	screenfetch
 95	htop
 96	alacritty
 97	zathura
 98	mate.atril
 99	firefox
100	qutebrowser
101	chromium
102	xfce.ristretto
103	pavucontrol
104	texlive.combined.scheme-medium # includes latexmk
105	#pgf-umlsd # latex diagrams
106	#pgf
107	(pkgs.texlive.combine {
108		inherit (pkgs.texlive)
109		scheme-medium
110		pgf
111		;
112	})
113	sage
114	rustup
115	gcc
116	go
117	nodejs
118	xclip # to make clipboard work in neovim
119	xfce.xfce4-screenshooter
120	mpv
121	xorg.xmodmap
122	feh
123	kolourpaint
124  ];
125
126  fonts.packages = with pkgs; [
127    dina-font
128    proggyfonts
129    terminus_font
130    fira-code
131    liberation_ttf
132    noto-fonts
133    tamsyn
134    termsyn
135    gohufont
136  ];
137
138  programs.zsh.enable = true;
139  users.defaultUserShell = pkgs.zsh;
140  environment.shells = with pkgs; [zsh];
141
142  # Some programs need SUID wrappers, can be configured further or are
143  # started in user sessions.
144  # programs.mtr.enable = true;
145  # programs.gnupg.agent = {
146  #   enable = true;
147  #   enableSSHSupport = true;
148  # };
149
150  # List services that you want to enable:
151
152  # Enable the OpenSSH daemon.
153  # services.openssh.enable = true;
154
155  # Open ports in the firewall.
156  # networking.firewall.allowedTCPPorts = [ ... ];
157  # networking.firewall.allowedUDPPorts = [ ... ];
158  # Or disable the firewall altogether.
159  # networking.firewall.enable = false;
160
161  # This value determines the NixOS release from which the default
162  # settings for stateful data, like file locations and database versions
163  # on your system were taken. It‘s perfectly fine and recommended to leave
164  # this value at the release version of the first install of this system.
165  # Before changing this value read the documentation for this option
166  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
167  system.stateVersion = "23.05"; # Did you read the comment?
168
169  # gvfs needed for Thunar to detect external disks
170  services.gvfs.enable = true;
171
172  # bluetooth related
173  hardware.bluetooth.enable = true;
174  services.blueman.enable = true;
175
176  # obs virtual camera
177  boot.extraModulePackages = with config.boot.kernelPackages; [
178    v4l2loopback
179  ];
180}