nixos config

From Queen Ibis, 1 Year ago, written in Plain Text, viewed 255 times. This paste will kick the bucket in 1 Second.
URL https://paste.steamr.com/view/2b1addbb Embed
Download Paste or View Raw
  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.   boot.loader.efi.efiSysMountPoint = "/boot/efi";
  17.  
  18.   networking.hostName = "nixos"; # Define your hostname.
  19.   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant.
  20.  
  21.   # Configure network proxy if necessary
  22.   # networking.proxy.default = "http://user:password@proxy:port/";
  23.   # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
  24.  
  25.   # Enable networking
  26.   networking.networkmanager.enable = true;
  27.  
  28.   # Set your time zone.
  29.   time.timeZone = "America/Edmonton";
  30.  
  31.   # Select internationalisation properties.
  32.   i18n.defaultLocale = "en_CA.UTF-8";
  33.  
  34.   # Enable the X11 windowing system.
  35.   services.xserver.enable = true;
  36.  
  37.   # Enable the GNOME Desktop Environment.
  38.   services.xserver.displayManager.gdm.enable = true;
  39.   services.xserver.desktopManager.gnome.enable = true;
  40.  
  41.   # Configure keymap in X11
  42.   services.xserver = {
  43.     layout = "us";
  44.     xkbVariant = "";
  45.   };
  46.  
  47.   # Enable CUPS to print documents.
  48.   services.printing.enable = true;
  49.  
  50.   # Enable sound with pipewire.
  51.   sound.enable = true;
  52.   hardware.pulseaudio.enable = false;
  53.   security.rtkit.enable = true;
  54.   services.pipewire = {
  55.     enable = true;
  56.     alsa.enable = true;
  57.     alsa.support32Bit = true;
  58.     pulse.enable = true;
  59.     # If you want to use JACK applications, uncomment this
  60.     #jack.enable = true;
  61.  
  62.     # use the example session manager (no others are packaged yet so this is enabled by default,
  63.     # no need to redefine it in your config for now)
  64.     #media-session.enable = true;
  65.   };
  66.  
  67.   # Enable touchpad support (enabled default in most desktopManager).
  68.   # services.xserver.libinput.enable = true;
  69.  
  70.   # Define a user account. Don't forget to set a password with ‘passwd’.
  71.   users.users.leo = {
  72.     isNormalUser = true;
  73.     description = "leo";
  74.     extraGroups = [ "networkmanager" "wheel" ];
  75.     packages = with pkgs; [
  76.       firefox
  77.       microsoft-edge
  78.       nextcloud-client
  79.       keepass
  80.       gnome.gnome-tweaks
  81.       gnomeExtensions.dash-to-panel
  82.       gnomeExtensions.arcmenu
  83.       gnomeExtensions.random-wallpaper
  84.     #  thunderbird
  85.     ];
  86.   };
  87.  
  88.   # Allow unfree packages
  89.   nixpkgs.config.allowUnfree = true;
  90.  
  91.   # List packages installed in system profile. To search, run:
  92.   # $ nix search wget
  93.   environment.systemPackages = with pkgs; [
  94.     binutils
  95.     vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
  96.     wget
  97.     curl
  98.     zsh
  99.     git
  100.     tmux
  101.     screen
  102.     inetutils
  103.     nmap
  104.     tcpdump
  105.   ];
  106.  
  107. #   systemd.user.timers."rotate-wallpaper" = {
  108. #     wantedBy = [ "timers.target" ];
  109. #       timerConfig = {
  110. #         OnBootSec = "5m";
  111. #         OnUnitActiveSec = "5m";
  112. #         Unit = "rotate-wallpaper.service";
  113. #       };
  114. #   };
  115. #  
  116. #   systemd.user.services."rotate-wallpaper" = {
  117. #     script = ''
  118. #       bash -x $HOME/Pictures/wallpaper/wallpaper.sh
  119. #       exit
  120. #       Wallpaper=$(ls $HOME/Pictures/wallpaper/*jpg | shuf -n 1)
  121. #      
  122. #       # ${pkgs.glib}
  123. #       gsettings set org.gnome.desktop.background picture-uri file://$Wallpaper
  124. #       gsettings set org.gnome.desktop.screensaver picture-uri file://$Wallpaper
  125. #       gsettings set org.gnome.desktop.background picture-uri-dark file://$Wallpaper
  126. #       gsettings set org.gnome.desktop.screensaver picture-uri-dark file://$Wallpaper
  127. #     '';
  128. #     serviceConfig = {
  129. #       Type = "oneshot";
  130. #       User= "leo";
  131. #       Group= "users";
  132. #       SupplementaryGroups= "";
  133. #     };
  134. #   };
  135.  
  136.   # Some programs need SUID wrappers, can be configured further or are
  137.   # started in user sessions.
  138.   # programs.mtr.enable = true;
  139.   # programs.gnupg.agent = {
  140.   #   enable = true;
  141.   #   enableSSHSupport = true;
  142.   # };
  143.  
  144.   # List services that you want to enable:
  145.  
  146.   # Enable the OpenSSH daemon.
  147.   # services.openssh.enable = true;
  148.  
  149.   # Open ports in the firewall.
  150.   # networking.firewall.allowedTCPPorts = [ ... ];
  151.   # networking.firewall.allowedUDPPorts = [ ... ];
  152.   # Or disable the firewall altogether.
  153.   # networking.firewall.enable = false;
  154.  
  155.   # This value determines the NixOS release from which the default
  156.   # settings for stateful data, like file locations and database versions
  157.   # on your system were taken. It‘s perfectly fine and recommended to leave
  158.   # this value at the release version of the first install of this system.
  159.   # Before changing this value read the documentation for this option
  160.   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
  161.   system.stateVersion = "22.11"; # Did you read the comment?
  162.  
  163. }
  164.  

Reply to "nixos config"

Here you can reply to the paste above