diff --git a/modules/base.nix b/modules/base.nix index 2d70014..c4e1064 100644 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,20 +1,17 @@ { pkgs, lib, config, inputs, ... }: -with lib; { imports = [ ./cachix.nix ]; nix = { - extraOptions = "experimental-features = nix-command flakes"; - gc = { - automatic = true; - dates = "weekly"; - options = "--delete-older-than 20d"; - }; - settings = { - auto-optimise-store = true; - }; - nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; + extraOptions = "experimental-features = nix-command flakes"; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 20d"; + }; + settings = { auto-optimise-store = true; }; + nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; }; # nixpkgs.config.allowUnFree = true; # pkgs.config.allowUnfree = true; @@ -34,7 +31,8 @@ with lib; i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "America/Chicago"; - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + networking.networkmanager.enable = + true; # Easiest to use and most distros use this by default. # Set default shell to be dash for speed # Apparently this is bad because a lot of nix relies on bash diff --git a/modules/cachix/nix-community.nix b/modules/cachix/nix-community.nix index d9d227b..f809233 100644 --- a/modules/cachix/nix-community.nix +++ b/modules/cachix/nix-community.nix @@ -1,11 +1,8 @@ - { nix = { settings = { - substituters = [ - "https://nix-community.cachix.org" - "https://cosmic.cachix.org/" - ]; + substituters = + [ "https://nix-community.cachix.org" "https://cosmic.cachix.org/" ]; trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" diff --git a/pkgs/desktop-packages.nix b/pkgs/desktop-packages.nix index 60fc0c7..5a1fcd0 100644 --- a/pkgs/desktop-packages.nix +++ b/pkgs/desktop-packages.nix @@ -1,6 +1,5 @@ { pkgs, lib, config, ... }: -with lib; { environment.systemPackages = with pkgs; [ discover @@ -51,7 +50,9 @@ with lib; tagutil # python310Packages.mutagen python310Packages.audiotools - (mpv.override {scripts = with pkgs.mpvScripts; [ mpris quality-menu sponsorblock ];}) + (mpv.override { + scripts = with pkgs.mpvScripts; [ mpris quality-menu sponsorblock ]; + }) ani-cli # mov-cli nerdfonts @@ -89,7 +90,7 @@ with lib; phinger-cursors plasma-hud kde-cli-tools - gzip + gzip qrencode # scribus darktable diff --git a/systems/syl/configuration.nix b/systems/syl/configuration.nix index 141a85f..6edc3b9 100644 --- a/systems/syl/configuration.nix +++ b/systems/syl/configuration.nix @@ -1,16 +1,15 @@ { lib, config, pkgs, callPackage, inputs, ... }: { - imports = - [ - ./hardware-configuration.nix - ../../cachix/default.nix - ../../pkgs/base-packages.nix - ../../pkgs/desktop-packages.nix - ../../modules/base.nix - ../../modules/emacs.nix - ../../modules/desktop.nix - ]; + imports = [ + ./hardware-configuration.nix + ../../cachix/default.nix + ../../pkgs/base-packages.nix + ../../pkgs/desktop-packages.nix + ../../modules/base.nix + ../../modules/emacs.nix + ../../modules/desktop.nix + ]; networking.hostName = "syl"; # Define your hostname. boot.initrd.kernelModules = [ "i915" ]; @@ -27,19 +26,27 @@ # vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; }; # }; - services.xserver.videoDrivers = ["intel"]; + services.xserver.videoDrivers = [ "intel" ]; hardware.graphics = { enable = true; extraPackages = with pkgs; [ intel-media-driver # LIBVA_DRIVER_NAME=iHD - vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) + vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium) libvdpau-va-gl ]; }; systemd.services.display-manager = { - wants = [ "systemd-user-sessions.service" "multi-user.target" "network-online.target" ]; - after = [ "systemd-user-sessions.service" "multi-user.target" "network-online.target" ]; + wants = [ + "systemd-user-sessions.service" + "multi-user.target" + "network-online.target" + ]; + after = [ + "systemd-user-sessions.service" + "multi-user.target" + "network-online.target" + ]; }; # Enable fingerprint @@ -51,24 +58,24 @@ services.tlp = { enable = true; settings = { - CPU_SCALING_GOVERNOR_ON_AC="performance"; - CPU_SCALING_GOVERNOR_ON_BAT="powersave"; - CPU_ENERGY_PERF_POLICY_ON_AC="balance_performance"; - CPU_ENERGY_PERF_POLICY_ON_BAT="power"; - PCIE_ASPM_ON_AC="default"; - PCIE_ASPM_ON_BAT="powersupersave"; - SCHED_POWERSAVE_ON_AC=0; - SCHED_POWERSAVE_ON_BAT=1; - START_CHARGE_THRESH_BAT1=70; - STOP_CHARGE_THRESH_BAT1=80; - USB_ALLOWLIST="32ac:0002"; - RUNTIME_PM_ON_AC="on"; - RUNTIME_PM_ON_BAT="auto"; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + PCIE_ASPM_ON_AC = "default"; + PCIE_ASPM_ON_BAT = "powersupersave"; + SCHED_POWERSAVE_ON_AC = 0; + SCHED_POWERSAVE_ON_BAT = 1; + START_CHARGE_THRESH_BAT1 = 70; + STOP_CHARGE_THRESH_BAT1 = 80; + USB_ALLOWLIST = "32ac:0002"; + RUNTIME_PM_ON_AC = "on"; + RUNTIME_PM_ON_BAT = "auto"; }; }; -# SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/bin/at -M -f /lib/udev/power-profiles/power-saver now" -# SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/bin/at -M -f /lib/udev/power-profiles/performance now" + # SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="/usr/bin/at -M -f /lib/udev/power-profiles/power-saver now" + # SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="/usr/bin/at -M -f /lib/udev/power-profiles/performance now" # Enable touchpad support (enabled default in most desktopManager). services.xserver.libinput.enable = true; @@ -97,7 +104,38 @@ package = pkgs.plocate; localuser = null; interval = "hourly"; - prunePaths = [ "/tmp" "/nix/store" "/nix/var/log/nix" "/etc" "/bin" "/boot" "/usr" "/var" "/run" "/srv" "/sys" "/root" "/proc" "/opt" "/dev" "/home/chris/.emacs.d" "/home/chris/.config" "/home/chris/.nix-profile" "/home/chris/.profile" "/home/chris/dev/nixpkgs" "/home/chris/.cache" "/home/chris/.local" "/home/chris/.dotemacs" "/home/chris/.cargo" "/home/chris/.mozilla" "/home/chris/.var" "/home/chris/.dotfiles" "/home/chris/.dbus" "/home/chris/.android" "/var/lib"]; + prunePaths = [ + "/tmp" + "/nix/store" + "/nix/var/log/nix" + "/etc" + "/bin" + "/boot" + "/usr" + "/var" + "/run" + "/srv" + "/sys" + "/root" + "/proc" + "/opt" + "/dev" + "/home/chris/.emacs.d" + "/home/chris/.config" + "/home/chris/.nix-profile" + "/home/chris/.profile" + "/home/chris/dev/nixpkgs" + "/home/chris/.cache" + "/home/chris/.local" + "/home/chris/.dotemacs" + "/home/chris/.cargo" + "/home/chris/.mozilla" + "/home/chris/.var" + "/home/chris/.dotfiles" + "/home/chris/.dbus" + "/home/chris/.android" + "/var/lib" + ]; }; # Enable the OpenSSH daemon.