diff --git a/flake.lock b/flake.lock index 2a1522d..c8247e6 100644 --- a/flake.lock +++ b/flake.lock @@ -638,6 +638,26 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758273351, + "narHash": "sha256-wOv1guIi9THD1NjOtBU2Xh/Avg9xv7nIjsfFSkr1NeQ=", + "ref": "refs/heads/master", + "rev": "e9a574d919a89602d2868621576b2ccae54a5cb0", + "revCount": 675, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, "root": { "inputs": { "home-manager": "home-manager", @@ -645,6 +665,7 @@ "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", + "quickshell": "quickshell", "sops-nix": "sops-nix", "stylix": "stylix", "watt": "watt", diff --git a/flake.nix b/flake.nix index 47c5176..8e11345 100644 --- a/flake.nix +++ b/flake.nix @@ -27,14 +27,23 @@ # secrets sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; + + # quickshell + quickshell = { + url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; outputs = { self, nixpkgs, + nixpkgs-unstable, home-manager, stylix, sops-nix, + quickshell, ... } @ inputs: let @@ -50,7 +59,6 @@ modules = [ ./hosts/spectre-x360-2018 stylix.nixosModules.stylix - inputs.watt.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -73,7 +81,6 @@ modules = [ ./hosts/mobile-usb stylix.nixosModules.stylix - inputs.watt.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -97,7 +104,6 @@ ./hosts/yoga-7-pro sops-nix.nixosModules.sops stylix.nixosModules.stylix - inputs.watt.nixosModules.default home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; diff --git a/modules/home-manager/quickshell/default.nix b/modules/home-manager/quickshell/default.nix new file mode 100644 index 0000000..72ffc9e --- /dev/null +++ b/modules/home-manager/quickshell/default.nix @@ -0,0 +1,36 @@ +{ + config, + inputs, + lib, + pkgs, + builtins, + ... +}: +let + cfg = config.nix-config.quickshell; + qs = inputs.quickshell.packages.x86_64-linux.default; +in +{ + options.nix-config.quickshell.enable = lib.mkEnableOption { + name = "quickshell"; + description = "Whether to enable quickshell."; + default = true; + }; + + config = lib.mkIf cfg.enable { + home.packages = [ + qs + pkgs.qt6.qtimageformats + pkgs.qt6.qt5compat + pkgs.qt6.qtmultimedia + pkgs.qt6.qtdeclarative + pkgs.qt6.qtsvg + pkgs.qt6.qtwayland + pkgs.qt6.qtbase + + ]; + + # add the quickshell config (whole directory) to XDG_CONFIG_HOME + # home.file.".config/quickshell/config".source = ./config; + }; +} diff --git a/modules/nixos/power.nix b/modules/nixos/power.nix index 41c2a71..88cf427 100644 --- a/modules/nixos/power.nix +++ b/modules/nixos/power.nix @@ -1,5 +1,6 @@ { config, + inputs, lib, pkgs, ... @@ -15,44 +16,50 @@ }; }; + imports = [ + inputs.watt.nixosModules.default + ]; + + config = { - services.tlp = { - enable = true; - settings = { - # processor chooses frequencies itself but respects the limits set by the user - CPU_DRIVER_OPMODE_ON_AC = "guided"; - CPU_DRIVER_OPMODE_ON_BAT = "guided"; + # services.tlp = { + # enable = true; + # settings = { + # # processor chooses frequencies itself but respects the limits set by the user + # CPU_DRIVER_OPMODE_ON_AC = "guided"; + # CPU_DRIVER_OPMODE_ON_BAT = "guided"; - # governor dictates global behavior of the CPU - CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; - CPU_SCALING_GOVERNOR_ON_AC = "performance"; + # # governor dictates global behavior of the CPU + # CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + # CPU_SCALING_GOVERNOR_ON_AC = "performance"; - # energy performance policy (EPP) sets the energy/performance balance - CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power"; - CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + # # energy performance policy (EPP) sets the energy/performance balance + # CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power"; + # CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; - # clock speeds reported by `sudo tlp-stat` - # 623377 [kHz] and 5090910 [kHz] - # CPU_SCALING_MIN_FREQ_ON_AC = 623377; - # CPU_SCALING_MAX_FREQ_ON_AC = 5090910; - # CPU_SCALING_MIN_FREQ_ON_BAT = 0; - # # reduce max frequency on battery to save power - # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000; + # # clock speeds reported by `sudo tlp-stat` + # # 623377 [kHz] and 5090910 [kHz] + # # CPU_SCALING_MIN_FREQ_ON_AC = 623377; + # # CPU_SCALING_MAX_FREQ_ON_AC = 5090910; + # # CPU_SCALING_MIN_FREQ_ON_BAT = 0; + # # # reduce max frequency on battery to save power + # # CPU_SCALING_MAX_FREQ_ON_BAT = 3000000; - # Allow the CPU to boost - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 1; + # # Allow the CPU to boost + # CPU_BOOST_ON_AC = 1; + # CPU_BOOST_ON_BAT = 1; - RADEON_DPM_PERF_LEVEL_ON_AC = "high"; - WIFI_PWR_ON_BAT = "off"; + # RADEON_DPM_PERF_LEVEL_ON_AC = "high"; + # WIFI_PWR_ON_BAT = "off"; + + # # enable battery charge thresholds on the default battery + # STOP_CHARGE_THRESH_BAT0 = 1; + # }; + # }; - # enable battery charge thresholds on the default battery - STOP_CHARGE_THRESH_BAT0 = 1; - }; - }; systemd.sleep.extraConfig = '' @@ -61,6 +68,28 @@ AllowHybridSleep=yes AllowSuspendThenHibernate=yes ''; + + services.watt = { + enable = true; + settings = { + battery_charge_thresholds = [ + 40 + 80 + ]; + }; + }; + + # write the watt-config under /etc/watt.toml + + + services.irqbalance = { + enable = true; + }; + + services.thermald = { + enable = true; + }; }; + } diff --git a/users/remy_yoga/default.nix b/users/remy_yoga/default.nix index 2b53ee0..a7f3b50 100644 --- a/users/remy_yoga/default.nix +++ b/users/remy_yoga/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, nixpkgs, nixpkgs-unstable, lib, ... }: with lib.hm.gvariant; { config = { @@ -9,6 +9,9 @@ with lib.hm.gvariant; scale = "1.6"; }; }; + quickshell = { + enable = true; + }; }; }; @@ -31,6 +34,7 @@ with lib.hm.gvariant; ../../modules/home-manager/notifications.nix ../../modules/home-manager/obsidian.nix ../../modules/home-manager/owncloud-client.nix + ../../modules/home-manager/quickshell ../../modules/home-manager/ssh.nix ../../modules/home-manager/stylix.nix ../../modules/home-manager/thunderbird.nix