Advertisement
adingbatponder

20231126 configuration.nix

Nov 26th, 2023
43
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.20 KB | None | 0 0
  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. [ # Include the results of the hardware scan.
  10. ./hardware-configuration.nix
  11. ];
  12.  
  13. # Bootloader.
  14. boot.loader.systemd-boot.enable = true;
  15. boot.loader.efi.canTouchEfiVariables = true;
  16.  
  17. networking.hostName = "nixos"; # Define your hostname.
  18. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
  19.  
  20. # Configure network proxy if necessary
  21. # networking.proxy.default = "http://user:password@proxy:port/";
  22. # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  23.  
  24. # Enable networking
  25. networking.networkmanager.enable = true;
  26.  
  27. # Set your time zone.
  28. time.timeZone = "Europe/Berlin";
  29.  
  30. # Select internationalisation properties.
  31. i18n.defaultLocale = "en_GB.UTF-8";
  32.  
  33. i18n.extraLocaleSettings = {
  34. LC_ADDRESS = "de_DE.UTF-8";
  35. LC_IDENTIFICATION = "de_DE.UTF-8";
  36. LC_MEASUREMENT = "de_DE.UTF-8";
  37. LC_MONETARY = "de_DE.UTF-8";
  38. LC_NAME = "de_DE.UTF-8";
  39. LC_NUMERIC = "de_DE.UTF-8";
  40. LC_PAPER = "de_DE.UTF-8";
  41. LC_TELEPHONE = "de_DE.UTF-8";
  42. LC_TIME = "de_DE.UTF-8";
  43. };
  44.  
  45. # Enable the X11 windowing system.
  46. services.xserver.enable = true;
  47.  
  48. # Enable the GNOME Desktop Environment.
  49. services.xserver.displayManager.gdm.enable = true;
  50. services.xserver.desktopManager.gnome.enable = true;
  51.  
  52. # Configure keymap in X11
  53. services.xserver = {
  54. layout = "de";
  55. xkbVariant = "";
  56. };
  57.  
  58. # Configure console keymap
  59. console.keyMap = "de";
  60.  
  61. # Enable CUPS to print documents.
  62. services.printing.enable = true;
  63. # see https://nixos.wiki/wiki/Printing
  64. services.printing.drivers = [pkgs.brlaser];
  65. services.avahi = {
  66. enable = true;
  67. nssmdns = true;
  68. openFirewall = true;
  69. };
  70.  
  71. # Enable sound with pipewire.
  72. sound.enable = true;
  73. hardware.pulseaudio.enable = false;
  74. security.rtkit.enable = true;
  75. services.pipewire = {
  76. enable = true;
  77. alsa.enable = true;
  78. alsa.support32Bit = true;
  79. pulse.enable = true;
  80. # If you want to use JACK applications, uncomment this
  81. #jack.enable = true;
  82.  
  83. # use the example session manager (no others are packaged yet so this is enabled by default,
  84. # no need to redefine it in your config for now)
  85. #media-session.enable = true;
  86. };
  87.  
  88. # Enable touchpad support (enabled default in most desktopManager).
  89. # services.xserver.libinput.enable = true;
  90.  
  91. # Define a user account. Don't forget to set a password with ‘passwd’.
  92. users.users.adingbatponder = {
  93. isNormalUser = true;
  94. description = "adingbatponder";
  95. extraGroups = [ "networkmanager" "wheel" ];
  96. packages = with pkgs; [
  97. firefox
  98. # thunderbird
  99. ];
  100. };
  101.  
  102. # Allow unfree packages
  103. nixpkgs.config.allowUnfree = true;
  104.  
  105. # List packages installed in system profile. To search, run:
  106. # $ nix search wget
  107. environment.systemPackages = with pkgs; [
  108. # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  109. # wget
  110. bitwarden
  111. protonvpn-gui
  112. # authy failed to work so intalled google-authenticator even though apparently it is not so fab
  113. authy
  114. # google-authenticator runs from command line> google-authenticator
  115. google-authenticator
  116. # Gnome authenticator
  117. authenticator
  118. gnome.gnome-keyring
  119. protonmail-bridge
  120. threema-desktop
  121. whatsapp-for-linux
  122. # following removed because it seem not to result in any icon
  123. # home-assistant-component-tests.govee_ble
  124. gimp
  125. vscode
  126. git
  127. thunderbird
  128. # firefox stopped working 23-11-23 so installed fork librewolf on recommendation of Project Insanity@[email protected]
  129. librewolf
  130. firefox
  131. # brave installed becaus firefox crashed for certain security setting pages in bitwarden.com
  132. brave
  133. gnome.gnome-tweaks
  134. # element-desktop does not launch any sensible gui to tried element-web instead
  135. # element-desktop
  136. element-web
  137. skypeforlinux
  138. teams-for-linux
  139. # teams commented out because creates errors
  140. # teams
  141. # pdf stuff
  142. # recommended on https://opensource.com/alternatives/adobe-acrobat
  143. evince
  144. # just a random simple one
  145. mupdf
  146. # command line stuff follows:
  147. usbutils
  148. protonvpn-cli
  149. # end of command line stuff.
  150. # modem for sim lte
  151. modemmanager
  152. modem-manager-gui
  153. # for testing script
  154. # screen
  155. # irssi
  156. etcher #to make OS images
  157. ];
  158.  
  159. nixpkgs.config.permittedInsecurePackages = [
  160. # 27-10-2023 to make error for bitwarden pass following recommendation from @[email protected]
  161. "electron-24.8.6"
  162.  
  163. # 18-11-2023 for teams to work
  164. # "teams-1.5.00.23861"
  165. "electron-12.2.3" # for etcher to work
  166. ];
  167.  
  168. systemd.user.services.startprotonvpn = {
  169. # startprotonvpn is the arbitrary name I have given this service
  170. description = "makes proton vpn start when user logs in after machine has just been booted";
  171. script = ''
  172. ${pkgs.protonvpn-cli}/bin/protonvpn-cli r
  173. '';
  174. # to run protonvpn from the command line the package protonvpn-cli was listed above in the environment.systempackages
  175. # the option r uses the previously used protonvpn connection as set by user manually in the GUI or command line
  176. # the so called killswitch setting (if on it cuts internet access if the vpn connection is lost or otherwise not active) in the GUI is on in this case - not sure that matters for this to work
  177. wantedBy = [ "graphical-session.target" ];
  178. partOf = [ "graphical-session.target" ];
  179. };
  180. # if running the the following command at the command line:
  181. # systemctl status startprotonvpn.service
  182. # the shell returns the following message:
  183. # Unit startprotonvpn.service could not be found.
  184. # so testing the above so-called service by eliminating error messages when using the above systemctl command was/is a waste of time in this case
  185.  
  186.  
  187. # Some programs need SUID wrappers, can be configured further or are
  188. # started in user sessions.
  189. # programs.mtr.enable = true;
  190. # programs.gnupg.agent = {
  191. # enable = true;
  192. # enableSSHSupport = true;
  193. # };
  194.  
  195. # List services that you want to enable:
  196.  
  197. # Enable the OpenSSH daemon.
  198. # services.openssh.enable = true;
  199.  
  200. # Open ports in the firewall.
  201. # networking.firewall.allowedTCPPorts = [ ... ];
  202. # networking.firewall.allowedUDPPorts = [ ... ];
  203. # Or disable the firewall altogether.
  204. # networking.firewall.enable = false;
  205.  
  206. # This value determines the NixOS release from which the default
  207. # settings for stateful data, like file locations and database versions
  208. # on your system were taken. It‘s perfectly fine and recommended to leave
  209. # this value at the release version of the first install of this system.
  210. # Before changing this value read the documentation for this option
  211. # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  212. system.stateVersion = "23.05"; # Did you read the comment?
  213.  
  214. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement