feat: Clean up the imports

This commit is contained in:
uttarayan21
2025-03-26 01:44:41 +05:30
parent 11ade0d192
commit 50a0033557
14 changed files with 36 additions and 36 deletions

6
flake.lock generated
View File

@@ -1455,11 +1455,11 @@
"rust-overlay": "rust-overlay_4" "rust-overlay": "rust-overlay_4"
}, },
"locked": { "locked": {
"lastModified": 1741627832, "lastModified": 1742854660,
"narHash": "sha256-/doumzI83bj7z6Bmpr1rccOVWsAWOx1L877EKGercLI=", "narHash": "sha256-5ZnNYxcChfYy5TkyvMiVpj++4JFE8VG1C24R9mIVU00=",
"owner": "JakeStanger", "owner": "JakeStanger",
"repo": "ironbar", "repo": "ironbar",
"rev": "9c7a562469feea2357c97e294b623df0fcddd2bb", "rev": "355cf394465180b5ca1c423125ad2806e6a1df48",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -18,5 +18,6 @@ lib.optionalAttrs device.hasGui {
./wezterm.nix ./wezterm.nix
./zathura.nix ./zathura.nix
./zed.nix ./zed.nix
./gimp.nix
]; ];
} }

View File

@@ -4,7 +4,7 @@
... ...
}: { }: {
programs.foot = { programs.foot = {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
server.enable = true; server.enable = true;
settings = { settings = {
main = { main = {

View File

@@ -14,7 +14,7 @@
./linux ./linux
./programs ./programs
./scripts.nix ./scripts.nix
./services # ./services
]; ];
xdg.enable = true; xdg.enable = true;

View File

@@ -7,7 +7,7 @@
}: { }: {
imports = [inputs.anyrun.homeManagerModules.default]; imports = [inputs.anyrun.homeManagerModules.default];
programs.anyrun = { programs.anyrun = {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
config = { config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [ plugins = with inputs.anyrun.packages.${pkgs.system}; [
inputs.anyrun-nixos-options.packages.${pkgs.system}.default inputs.anyrun-nixos-options.packages.${pkgs.system}.default

View File

@@ -1,24 +1,22 @@
{ {
lib,
device,
pkgs, pkgs,
device,
... ...
}: }: let
lib.optionalAttrs (pkgs.stdenv.isLinux && device.hasGui) { linux_gui = device.hasGui && pkgs.stdenv.isLinux;
in {
imports = [ imports = [
./hyprland.nix ./hyprland.nix
./gtk.nix ./gtk.nix
./anyrun.nix ./anyrun.nix
./ironbar ./ironbar
./foot.nix
./mpd.nix
./gui.nix ./gui.nix
]; ];
services.kdeconnect.enable = device.hasGui; services.kdeconnect.enable = linux_gui;
services.kdeconnect.indicator = device.hasGui; services.kdeconnect.indicator = linux_gui;
services.swayosd.enable = device.hasGui; services.swayosd.enable = linux_gui;
services.swaync.enable = device.hasGui; services.swaync.enable = linux_gui;
# services.nextcloud-client = { # services.nextcloud-client = {
# enable = device.hasGui; # enable = device.hasGui;
# startInBackground = true; # startInBackground = true;

View File

@@ -1,10 +1,11 @@
{ {
pkgs, pkgs,
lib,
device, device,
... ...
}: { }: {
gtk = { gtk = {
enable = true; enable = device.hasGui && pkgs.stdenv.isLinux;
theme = { theme = {
name = "catppuccin-mocha-mauve-standard+normal"; name = "catppuccin-mocha-mauve-standard+normal";
package = pkgs.catppuccinThemes.gtk; package = pkgs.catppuccinThemes.gtk;
@@ -32,8 +33,11 @@
gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;}; gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;}; gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
}; };
home.packages = [ home.packages =
# pkgs.catppuccinThemes.gtk lib.optionals
pkgs.catppuccinThemes.papirus-folders (device.hasGui
]; && pkgs.stdenv.isLinux) [
# pkgs.catppuccinThemes.gtk
pkgs.catppuccinThemes.papirus-folders
];
} }

View File

@@ -3,8 +3,7 @@
device, device,
lib, lib,
... ...
}: }: {
lib.attrsets.optionalAttrs device.hasGui {
systemd.user.services.onepassword-gui = lib.optionalAttrs pkgs.stdenv.isLinux { systemd.user.services.onepassword-gui = lib.optionalAttrs pkgs.stdenv.isLinux {
Unit = { Unit = {
Description = "1Password GUI"; Description = "1Password GUI";
@@ -20,10 +19,8 @@ lib.attrsets.optionalAttrs device.hasGui {
WantedBy = ["graphical-session.target"]; WantedBy = ["graphical-session.target"];
}; };
}; };
home.packages = with pkgs; home.packages = with pkgs;
[] lib.optionals pkgs.stdenv.isLinux [
++ lib.optionals device.hasGui [
discord discord
jdk jdk
mullvad-closest mullvad-closest

View File

@@ -10,7 +10,7 @@
programs.hyprpaper = let programs.hyprpaper = let
wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;}; wallpapers = import ../../utils/wallhaven.nix {inherit pkgs;};
in { in {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
# enable = true; # enable = true;
systemd.enable = true; systemd.enable = true;
systemd.target = "hyprland-session.target"; systemd.target = "hyprland-session.target";
@@ -22,10 +22,10 @@
}; };
}; };
programs.hyprlock = { programs.hyprlock = {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
settings = { settings = {
source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf"; source = "${pkgs.catppuccinThemes.hyprland}/themes/mocha.conf";

View File

@@ -6,7 +6,7 @@
}: { }: {
imports = [inputs.ironbar.homeManagerModules.default]; imports = [inputs.ironbar.homeManagerModules.default];
programs.ironbar = { programs.ironbar = {
enable = device.hasGui; enable = device.hasGui && pkgs.stdenv.isLinux;
config.monitors = { config.monitors = {
"${device.monitors.secondary}" = { "${device.monitors.secondary}" = {
position = "bottom"; position = "bottom";

View File

@@ -1,5 +0,0 @@
{...}: {
services.mpd = {
enable = true;
};
}

View File

@@ -31,7 +31,7 @@
# ./zellij.nix # ./zellij.nix
./zoxide.nix ./zoxide.nix
#./template.nix #./template.nix
./gimp.nix ./mpd.nix
]; ];
home.packages = with pkgs; home.packages = with pkgs;
[ [

5
home/programs/mpd.nix Normal file
View File

@@ -0,0 +1,5 @@
{pkgs, ...}: {
services.mpd = {
enable = pkgs.stdenv.isLinux;
};
}