From 1fe4cbb0453d6eb042eb3d31c91a001bc38b14c8 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Thu, 10 Oct 2024 11:46:59 -0400 Subject: [PATCH] added chromium + updated nix stable --- flake.lock | 6 +-- hosts/fwbook.nix | 90 +++++++++++++---------------------- modules/nixos/desktop/x11.nix | 1 + 3 files changed, 36 insertions(+), 61 deletions(-) diff --git a/flake.lock b/flake.lock index 04f17dc..307a00d 100644 --- a/flake.lock +++ b/flake.lock @@ -297,11 +297,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726320982, - "narHash": "sha256-RuVXUwcYwaUeks6h3OLrEmg14z9aFXdWppTWPMTwdQw=", + "lastModified": 1728328465, + "narHash": "sha256-a0a0M1TmXMK34y3M0cugsmpJ4FJPT/xsblhpiiX1CXo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8f7492cce28977fbf8bd12c72af08b1f6c7c3e49", + "rev": "1bfbbbe5bbf888d675397c66bfdb275d0b99361c", "type": "github" }, "original": { diff --git a/hosts/fwbook.nix b/hosts/fwbook.nix index 3010dfe..8c77254 100644 --- a/hosts/fwbook.nix +++ b/hosts/fwbook.nix @@ -15,13 +15,16 @@ in server.admin.enable = true; core.qemu.enable = true; nixos = { - common.hardware.sound.enable = true; + common.hardware = { + sound.enable = true; + laptop-power-mgr.enable = true; + }; desktop = { enable = true; kde.enable = true; cosmic.enable = false; hyprland = { - enable = true; + enable = false; useNWG = false; }; crypto.enable = true; @@ -47,7 +50,6 @@ in hardware.bluetooth.settings.General = { ControllerMode = "bredr"; }; hardware.bluetooth.enable = true; hardware.bluetooth.powerOnBoot = true; - # services.blueman.enable = true; # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -74,6 +76,8 @@ in # Photo Editing krita gimp-with-plugins + # Web + chromium ]) ++ (with unstable; [ dbeaver-bin ]); @@ -89,6 +93,16 @@ in enable = true; extest.enable = true; }; + # Chrome + programs.chromium = { + enable = true; + enablePlasmaBrowserIntegration = true; + extensions = [ + "nngceckbapebfimnlniiiahkandclblb" # bitwarden + "gcbommkclmclpchllfjekcdonpmejbdp" # https everywhere + "cjpalhdlnbpafiamejdnhcphjbkeiagm" # ublock origin + ]; + }; # Ollama services.ollama = { enable = true; @@ -109,67 +123,27 @@ in source ${zshFunctions} ''; environment.localBinInPath = true; - # Advance Power Management - powerManagement.powertop.enable = true; - powerManagement.enable = true; - services.thermald.enable = true; - services.power-profiles-daemon.enable = false; - services.tlp = { - enable = true; - settings = { - TLP_DEFAULT_MODE = "BAT"; - TLP_PERSISTENT_DEFAULT = 1; - - CPU_BOOST_ON_BAT = 0; - RUNTIME_PM_ON_BAT = "auto"; - PLATFORM_PROFILE_ON_AC = "balanced"; - PLATFORM_PROFILE_ON_BAT = "low-power"; - - CPU_SCALING_GOVERNOR_ON_AC = "performance"; - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - - CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_AC = 100; - CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 20; - - START_CHARGE_THRESH_BAT0 = 40; # and bellow it starts to charge - STOP_CHARGE_THRESH_BAT0 = 97; # and above it stops charging - }; - }; - services.auto-cpufreq.enable = true; - services.auto-cpufreq.settings = { - battery = { - governor = "powersave"; - turbo = "never"; - }; - charger = { - governor = "performance"; - turbo = "auto"; - }; - }; - # Logind - services.logind = { - lidSwitchExternalPower = "suspend-then-hibernate"; - lidSwitch = "suspend-then-hibernate"; - powerKey = "lock"; - extraConfig = '' - LidSwitchIgnoreInhibited=yes - HandlePowerKey=suspend-then-hibernate - IdleAction=suspend-then-hibernate - IdleActionSec=2m - ''; - }; - systemd.sleep.extraConfig = "HibernateDelaySec=30m"; # Family Storage fileSystems."/mnt/EightTerra/FamilyStorage" = { device = "tnas1.lab.internal:/mnt/EightTerra/FamilyStorage"; fsType = "nfs"; options = [ "x-systemd.automount" "noauto" ]; }; + # Remote Builder + nix.buildMachines = [{ + hostName = "root@bigbox1.lab.internal"; + system = "x86_64-linux"; + protocol = "ssh-ng"; + maxJobs = 1; + speedFactor = 2; + supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + mandatoryFeatures = [ ]; + }]; + nix.distributedBuilds = true; + # optional, useful when the builder has a faster internet connection than yours + nix.extraOptions = '' + builders-use-substitutes = true + ''; # Firewall networking.firewall.allowedUDPPorts = openPorts; networking.firewall.allowedTCPPorts = openPorts; diff --git a/modules/nixos/desktop/x11.nix b/modules/nixos/desktop/x11.nix index 55fdb54..d92e51b 100644 --- a/modules/nixos/desktop/x11.nix +++ b/modules/nixos/desktop/x11.nix @@ -9,6 +9,7 @@ in xkb.layout = "us"; xkb.variant = ""; }; + users.users.${config.skyg.user.name}.extraGroups = [ "input" ]; environment.systemPackages = with pkgs; [ # These are used to handle touchpad gestures libinput-gestures