mirror of
https://github.com/noctalia-dev/noctalia-shell.git
synced 2026-05-11 17:08:27 +08:00
fix(nixos): power profile and battery monitoring with module
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user