fix(nixos): power profile and battery monitoring with module

This commit is contained in:
Randi Budi
2025-09-17 04:20:37 +07:00
parent b7d8f92414
commit cdfb110007
2 changed files with 17 additions and 21 deletions
+6 -21
View File
@@ -140,21 +140,15 @@ mkdir -p ~/.config/quickshell/noctalia-shell && curl -sL https://github.com/noct
<details>
<summary><strong>Nix Installation</strong></summary>
You can run Noctalia directly using the `nix run` command:
```bash
nix run github:noctalia-dev/noctalia-shell
```
You can add it to your NixOS configuration or flake:
Alternatively, you can add it to your NixOS configuration or flake:
**Step 1**: Add Quickshell and Noctalia flakes to your `flake.nix`:
Add this to your `flake.nix`:
```nix
{
description = "Example Nix flake with Noctalia + Quickshell";
description = "Example Nix flake with Noctalia";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# you need nixpkgs unstable
quickshell = {
url = "github:outfoxxed/quickshell";
@@ -164,31 +158,22 @@ Alternatively, you can add it to your NixOS configuration or flake:
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
inputs.quickshell.follows = "quickshell";
inputs.quickshell.follows = "quickshell"; # Use same quickshell version
};
};
outputs = { self, nixpkgs, noctalia, quickshell, ... }:
outputs = { self, nixpkgs, noctalia, ... }:
{
nixosConfigurations.my-host = nixpkgs.lib.nixosSystem {
modules = [
./configuration.nix
noctalia.nixosModules.noctalia # Import Noctalia module here
];
};
};
}
```
**Step 2**: Add the packages to your `configuration.nix`:
```nix
{
environment.systemPackages = with pkgs; [
inputs.noctalia.packages.${system}.default
inputs.quickshell.packages.${system}.default
];
}
```
</details>
### Usage
+11
View File
@@ -80,6 +80,17 @@
});
defaultPackage = eachSystem (system: self.packages.${system}.default);
nixosModules = {
noctalia = { pkgs, lib, ... }: {
environment.systemPackages = [
self.packages.${pkgs.system}.default
];
# Required services for proper functionality
services.power-profiles-daemon.enable = true; # Power profile switching support
services.upower.enable = true; # Battery monitoring & power management
};
};
};
}