arnaucube
arnaucube/configsPublic Self-hosted repository
configs/nixos/configuration.nix
nixos/configuration.nixRaw
  1# Edit this configuration file to define what should be installed on
  2# your system.  Help is available in the configuration.nix(5) man page
  3# and in the NixOS manual (accessible by running ‘nixos-help’).
  4
  5{ config, pkgs, ... }:
  6
  7{
  8  imports =
  9    [
 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 = "nixos"; # 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  # Set your time zone.
 35  time.timeZone = "Europe/Madrid";
 36
 37  # Select internationalisation properties.
 38  i18n.defaultLocale = "en_US.UTF-8";
 39
 40  i18n.extraLocaleSettings = {
 41    LC_ALL = "en_US.UTF-8";
 42  };
 43
 44  # Configure keymap in X11
 45  services.xserver = {
 46    layout = "us";
 47    xkbVariant = "";
 48
 49    enable=true;
 50    displayManager = {
 51      defaultSession = "none+i3";
 52    };
 53    windowManager.i3 = {
 54      enable=true;
 55      extraPackages = with pkgs; [
 56        dmenu
 57        i3status
 58        i3lock
 59      ];
 60    };
 61  };
 62
 63  # Define a user account. Don't forget to set a password with ‘passwd’.
 64  users.users.userc = {
 65    isNormalUser = true;
 66    description = "userc";
 67    extraGroups = [ "networkmanager" "wheel" ];
 68    packages = with pkgs; [];
 69  };
 70
 71  # Allow unfree packages
 72  nixpkgs.config.allowUnfree = true;
 73
 74  # List packages installed in system profile. To search, run:
 75  # $ nix search wget
 76  environment.systemPackages = with pkgs; [
 77  	vim
 78	neovim
 79 	wget
 80	tmux
 81	git
 82	delta
 83	tig
 84	mosh
 85	bat
 86	lf
 87	ripgrep
 88	fzf
 89	python3
 90	xfce.thunar
 91	xfce.xfconf # needed to save preferences of thunar
 92	screenfetch
 93	htop
 94	alacritty
 95	zathura
 96	mate.atril
 97	firefox
 98	qutebrowser
 99	chromium
100	xfce.ristretto
101	pavucontrol
102	texlive.combined.scheme-medium # includes latexmk
103	#pgf-umlsd # latex diagrams
104	#pgf
105	(pkgs.texlive.combine {
106		inherit (pkgs.texlive)
107		scheme-medium
108		pgf
109		;
110	})
111	sage
112	rustup
113	gcc
114	go
115	nodejs
116	xclip # to make clipboard work in neovim
117	xfce.xfce4-screenshooter
118	mpv
119	xorg.xmodmap
120	feh
121  ];
122
123  programs.zsh.enable = true;
124  users.defaultUserShell = pkgs.zsh;
125  environment.shells = with pkgs; [zsh];
126
127  # Some programs need SUID wrappers, can be configured further or are
128  # started in user sessions.
129  # programs.mtr.enable = true;
130  # programs.gnupg.agent = {
131  #   enable = true;
132  #   enableSSHSupport = true;
133  # };
134
135  # List services that you want to enable:
136
137  # Enable the OpenSSH daemon.
138  # services.openssh.enable = true;
139
140  # Open ports in the firewall.
141  # networking.firewall.allowedTCPPorts = [ ... ];
142  # networking.firewall.allowedUDPPorts = [ ... ];
143  # Or disable the firewall altogether.
144  # networking.firewall.enable = false;
145
146  # This value determines the NixOS release from which the default
147  # settings for stateful data, like file locations and database versions
148  # on your system were taken. It‘s perfectly fine and recommended to leave
149  # this value at the release version of the first install of this system.
150  # Before changing this value read the documentation for this option
151  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
152  system.stateVersion = "23.05"; # Did you read the comment?
153
154  # gvfs needed for Thunar to detect external disks
155  services.gvfs.enable = true;
156
157  # bluetooth related
158  hardware.bluetooth.enable = true;
159  services.blueman.enable = true;
160
161  # obs virtual camera
162  boot.extraModulePackages = with config.boot.kernelPackages; [
163    v4l2loopback
164  ];
165}