Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

68 changes: 44 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@

inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";

flake-utils = {
url = "github:numtide/flake-utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
outputs =
{
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (
system:
let
pkgs = nixpkgs.legacyPackages.${system};

Expand Down Expand Up @@ -87,7 +97,7 @@

# ── The Brain Shell package ────────────────────────────────────────
brain-shell = pkgs.stdenv.mkDerivation {
pname = "brain-shell";
pname = "brain-shell";
version = "0.1.0";

src = ./.;
Expand All @@ -111,19 +121,19 @@
'';

meta = with pkgs.lib; {
description = "A modular Quickshell/QML desktop shell for Hyprland";
homepage = "https://github.com/Brainitech/Brain_Shell";
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "brain-shell";
description = "A modular Quickshell/QML desktop shell for Hyprland";
homepage = "https://github.com/Brainitech/Brain_Shell";
license = licenses.mit;
platforms = platforms.linux;
mainProgram = "brain-shell";
};
};

in
{
# ── Packages ───────────────────────────────────────────────────────
packages = {
default = brain-shell;
default = brain-shell;
brain-shell = brain-shell;
};

Expand All @@ -146,14 +156,22 @@
};

# ── NixOS module ───────────────────────────────────────────────────
nixosModules.default = { config, lib, pkgs, ... }:
let cfg = config.programs.brain-shell;
in {
nixosModules.default =
{
config,
lib,
pkgs,
...
}:
let
cfg = config.programs.brain-shell;
in
{
options.programs.brain-shell = {
enable = lib.mkEnableOption "Brain Shell desktop shell";

autostart = lib.mkOption {
type = lib.types.bool;
type = lib.types.bool;
default = true;
description = "Add brain-shell to Hyprland exec-once.";
};
Expand All @@ -162,16 +180,18 @@
config = lib.mkIf cfg.enable {
environment.systemPackages = [ brain-shell ];

wayland.windowManager.hyprland.settings = lib.mkIf cfg.autostart {
exec-once = [
"brain-shell"
"hypridle"
"awww-daemon"
"systemctl --user start hyprpolkitagent"
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"
];
};
# This can't even be configured this way, so just tell the user to manually add it to their config or something.

# wayland.windowManager.hyprland.settings = lib.mkIf cfg.autostart {
# exec-once = [
# "brain-shell"
# "hypridle"
# "awww-daemon"
# "systemctl --user start hyprpolkitagent"
# "wl-paste --type text --watch cliphist store"
# "wl-paste --type image --watch cliphist store"
# ];
# };
};
};

Expand Down
Loading