From febffa83585bed7ca654cc7bf90c0fadef6d56b7 Mon Sep 17 00:00:00 2001 From: Kumar Damani Date: Sat, 20 Apr 2024 19:24:59 -0400 Subject: new machine updates --- .../nixpkgs/per-user/kdam0-art/configuration.nix | 102 ++++++--------------- .../per-user/kdam0-art/hardware-configuration.nix | 2 + .../.config/nixpkgs/per-user/kdam0-art/home.nix | 5 +- 3 files changed, 33 insertions(+), 76 deletions(-) (limited to 'nixpkgs') diff --git a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/configuration.nix b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/configuration.nix index b9a6628..22c261c 100644 --- a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/configuration.nix +++ b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/configuration.nix @@ -1,37 +1,19 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - { config, lib, pkgs, ... }: - { imports = - [ # Include the results of the hardware scan. + [ ./hardware-configuration.nix ./hosts.nix ]; - # Use the GRUB 2 boot loader. boot.loader.grub.enable = true; - # boot.loader.grub.efiSupport = true; - # boot.loader.grub.efiInstallAsRemovable = true; - # boot.loader.efi.efiSysMountPoint = "/boot/efi"; - # Define on which hard drive you want to install Grub. - boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only + boot.loader.grub.device = "/dev/sda"; - networking.hostName = "art"; # Define your hostname. - # Pick only one of the below networking options. - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + networking.hostName = "art"; + networking.networkmanager.enable = true; - # Set your time zone. time.timeZone = "America/Toronto"; - # Configure network proxy if necessary - # networking.proxy.default = "http://user:password@proxy:port/"; - # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; - - # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; console = { font = "Lat2-Terminus16"; @@ -39,16 +21,6 @@ useXkbConfig = true; # use xkb.options in tty. }; - # Enable the X11 windowing system. - # services.xserver.enable = true; - - # Configure keymap in X11 - # services.xserver.xkb.layout = "us"; - # services.xserver.xkb.options = "eurosign:e,caps:escape"; - - # Enable CUPS to print documents. - services.printing.enable = true; - # Enable sound. security.rtkit.enable = true; services.pipewire = { @@ -62,7 +34,6 @@ systemWide = false; }; - # Define a user account. Don't forget to set a password with ‘passwd’. users.users.kdam0 = { isNormalUser = true; extraGroups = [ @@ -70,15 +41,13 @@ "networkmanager" "audio" "video" - ]; # Enable ‘sudo’ for the user. + ]; packages = with pkgs; [ tree ]; shell = pkgs.zsh; }; - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. neovim @@ -88,61 +57,48 @@ htop bmon alsa-utils + (python3.withPackages (ps: with ps; [ + pip + regex + pyopenssl + ])) ]; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + programs.zsh.enable = true; + programs.hyprland.enable = true; # List services that you want to enable: - - # Enable the OpenSSH daemon. + services.printing.enable = true; services.openssh.enable = true; + services.thermald.enable = true; + services.tlp.enable = true; + services.logind.lidSwitch = "suspend-then-hibernate"; security.pam.services = { - login.gnupg.enable = true; - }; + login.gnupg.enable = true; + }; - programs.zsh.enable = true; - programs.hyprland.enable = true; + powerManagement.enable = true; - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. networking.firewall.enable = false; - # Copy the NixOS configuration file and link it from the resulting system - # (/run/current-system/configuration.nix). This is useful in case you - # accidentally delete configuration.nix. - # system.copySystemConfiguration = true; + systemd.sleep.extraConfig = '' + AllowSuspend=yes + AllowHybridSleep=no + AllowHibernation=yes + AllowSuspendThenHibernate=yes + HibernateDelaySec=1m + ''; - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "23.11"; # Did you read the comment? + nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.auto-optimise-store = true; + system.stateVersion = "23.11"; # DO NOT CHANGE system.autoUpgrade.enable = true; system.autoUpgrade.allowReboot = true; - - nix.settings.experimental-features = ["nix-command" "flakes"]; - nix.settings.auto-optimise-store = true; } - diff --git a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/hardware-configuration.nix b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/hardware-configuration.nix index 2168526..e8eb415 100644 --- a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/hardware-configuration.nix +++ b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/hardware-configuration.nix @@ -12,6 +12,7 @@ boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ config.boot.kernelPackages.rtl8821au ]; + boot.resumeDevice = "/dev/disk/by-label/swap"; fileSystems."/" = { device = "/dev/disk/by-uuid/4d71526e-b296-49a2-ab2b-3c7a2c970f83"; @@ -32,4 +33,5 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + } diff --git a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/home.nix b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/home.nix index dcb4564..d2c1b3c 100644 --- a/nixpkgs/.config/nixpkgs/per-user/kdam0-art/home.nix +++ b/nixpkgs/.config/nixpkgs/per-user/kdam0-art/home.nix @@ -16,13 +16,13 @@ v = "nvim $@"; r = "ranger $@"; gst = "git status"; + cnix = "nvim ~/.config/nixpkgs/per-user/kdam0-art/configuration.nix"; chm = "nvim ~/.config/nixpkgs/per-user/kdam0-art/home.nix"; cvim = "nvim ~/.config/nixpkgs/common/nvim/init.vim"; clsp = "nvim ~/.config/nixpkgs/common/nvim/plugins/lspconfig.lua"; search = "nix search nixpkgs $@"; conf = "ranger ~/.config/nixpkgs/common/"; up = "cd ~/.config/nixpkgs; sudo nixos-rebuild switch --flake ."; - #up = "sudo nixos-rebuild switch"; }; programs.home-manager.enable = true; @@ -136,7 +136,7 @@ programs.waybar.enable = true; - home.stateVersion = "22.11"; + home.stateVersion = "23.11"; nixpkgs = { config = { allowUnfree = true; @@ -327,7 +327,6 @@ "walp" "waybar" "[workspace 9 silient] firefox" - "[workspace 8 silient] brave" "[workspace 2 silent] foot" "[workspace 1 silient] slack" "[workspace 1 silient] signal-desktop" -- cgit v1.2.3