From 4c0708599c27de0765c5658516dfa26ec0ecf96b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Tue, 19 Nov 2024 23:24:47 +0200 Subject: [PATCH] Tied up configuration.nix --- hosts/laptop-nixos/configuration.nix | 33 ++++++++-------------------- 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/hosts/laptop-nixos/configuration.nix b/hosts/laptop-nixos/configuration.nix index cccef77..730b57e 100644 --- a/hosts/laptop-nixos/configuration.nix +++ b/hosts/laptop-nixos/configuration.nix @@ -1,12 +1,11 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page +# Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { config, pkgs, inputs, ... }: { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix inputs.home-manager.nixosModules.default ]; @@ -15,7 +14,7 @@ boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "laptop-nixos"; # Define your hostname. + networking.hostName = "laptop-nixos"; # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. nix.settings.experimental-features = [ "nix-command" "flakes" ]; @@ -27,10 +26,7 @@ # Enable networking networking.networkmanager.enable = true; - # Set your time zone. time.timeZone = "Asia/Hebron"; - - # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; # Enable the X11 windowing system. @@ -48,7 +44,7 @@ }; # Enable CUPS to print documents. - services.printing.enable = true; + services.printing.enable = false; # Enable sound with pipewire. hardware.pulseaudio.enable = false; @@ -69,20 +65,18 @@ # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; + # Allow sudo without a password if in "wheel" group. + security.sudo.wheelNeedsPassword = false; + # Define a user account. Don't forget to set a password with ‘passwd’. users.users.kyren = { isNormalUser = true; description = "Kyren"; extraGroups = [ "networkmanager" "wheel" ]; shell = pkgs.zsh; - packages = with pkgs; [ - kdePackages.kate - # thunderbird - ]; }; home-manager = { - # also pass inputs to home-manager modules extraSpecialArgs = { inherit inputs pkgs; }; useUserPackages = true; users = { @@ -94,16 +88,11 @@ programs.firefox.enable = true; programs.zsh.enable = true; - users.defaultUserShell = pkgs.zsh; - # Allow unfree packages nixpkgs.config.allowUnfree = true; - # List packages installed in system profile. To search, run: - # $ nix search wget + # List packages installed in system profile. Use for apps that need sudo. environment.systemPackages = with pkgs; [ - vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. - # wget ]; # Some programs need SUID wrappers, can be configured further or are @@ -114,13 +103,9 @@ # enableSSHSupport = true; # }; - # List services that you want to enable: - - # Enable the OpenSSH daemon. + # Services services.openssh.enable = true; - security.sudo.wheelNeedsPassword = false; - # Open ports in the firewall. # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];