diff --git a/hosts/applin/configuration.nix b/hosts/applin/configuration.nix index 3dbedba..36c852f 100644 --- a/hosts/applin/configuration.nix +++ b/hosts/applin/configuration.nix @@ -11,6 +11,8 @@ streaming minecraft messaging + spotify + qflipper hammerspoon ]; @@ -18,14 +20,11 @@ homebrew = { casks = [ "microsoft-teams" - "mongodb-compass" "tunnelblick" "steam" - "spotify" "chatgpt" "jellyfin-media-player" "ticktick" - "qflipper" "bitwarden" ]; diff --git a/modules/apps/dev/db.nix b/modules/apps/dev/db.nix index b7e3aea..f4be0b8 100644 --- a/modules/apps/dev/db.nix +++ b/modules/apps/dev/db.nix @@ -1,9 +1,19 @@ -{ pkgs, ... }: - +{ pkgs, lib, options, ... }: +with lib; { - home-manager.users.vitalya.home.packages = with pkgs; [ - dbeaver-bin - mongodb-compass - robo3t + config = mkMerge [ + (if (builtins.hasAttr "homebrew" options) then { + homebrew.casks = [ + "mongodb-compass" + "studio-3t" + # "dbeaver-community" + ]; + } else { + home-manager.users.vitalya.home.packages = with pkgs; [ + # dbeaver-bin + mongodb-compass + robo3t + ]; + }) ]; } diff --git a/modules/apps/dev/default.nix b/modules/apps/dev/default.nix index 98e069f..314c268 100644 --- a/modules/apps/dev/default.nix +++ b/modules/apps/dev/default.nix @@ -1,15 +1,12 @@ -{ pkgs, lib, ... }: - +{ pkgs, lib, options, ... }: +with lib; { imports = [ - # ./golang.nix ./vscode ./nvim - # TODO: fix - ]; # ++ lib.optionals pkgs.stdenv.hostPlatform.isLinux [ - # ./db.nix - # ./insomnia.nix - #]; + ./insomnia.nix + ./db.nix + ]; home-manager.users.vitalya.home.packages = with pkgs; [ gnumake diff --git a/modules/apps/dev/insomnia.nix b/modules/apps/dev/insomnia.nix index 5bffc3e..879e201 100644 --- a/modules/apps/dev/insomnia.nix +++ b/modules/apps/dev/insomnia.nix @@ -1,7 +1,11 @@ -{ pkgs, ... }: - +{ pkgs, lib, options, ... }: +with lib; { - home-manager.users.vitalya.home.packages = with pkgs; [ - insomnia + config = mkMerge [ + (if (builtins.hasAttr "homebrew" options) then { + homebrew.casks = [ "insomnia" ]; + } else { + home-manager.users.vitalya.home.packages = with pkgs; [ insomnia ]; + }) ]; } diff --git a/modules/apps/qflipper.nix b/modules/apps/qflipper.nix index 07d1ea7..2fd2b5e 100644 --- a/modules/apps/qflipper.nix +++ b/modules/apps/qflipper.nix @@ -1,14 +1,18 @@ -{ pkgs, ... }: - +{ pkgs, lib, options, ... }: +with lib; { - home-manager.users.vitalya.home.packages = with pkgs; [ - qFlipper - ]; + config = mkMerge [ + (if (builtins.hasAttr "homebrew" options) then { + homebrew.casks = [ "qflipper" ]; + } else { + home-manager.users.vitalya.home.packages = with pkgs; [ qFlipper ]; - services.udev.extraRules = '' - #Flipper Zero serial port - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", GROUP="users", TAG+="uaccess" - #Flipper Zero DFU - SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", GROUP="users", TAG+="uaccess" - ''; -} + services.udev.extraRules = '' + #Flipper Zero serial port + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", GROUP="users", TAG+="uaccess" + #Flipper Zero DFU + SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", GROUP="users", TAG+="uaccess" + ''; + }) + ]; +} \ No newline at end of file diff --git a/modules/apps/spotify.nix b/modules/apps/spotify.nix index f9df985..cc02b36 100644 --- a/modules/apps/spotify.nix +++ b/modules/apps/spotify.nix @@ -1,18 +1,25 @@ -{ pkgs, inputs, ... }: - +{ pkgs, lib, inputs, options, ... }: +with lib; let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; in { - home-manager.users.vitalya.imports = [ - inputs.spicetify-nix.homeManagerModules.default - ]; + config = mkMerge [ + (if (builtins.hasAttr "homebrew" options) then { + homebrew.casks = [ "spotify" ]; + } else { + home-manager.users.vitalya = { + imports = [ + inputs.spicetify-nix.homeManagerModules.default + ]; - home-manager.users.vitalya.programs.spicetify = { - enable = true; - theme = spicePkgs.themes.default; - colorScheme = "flamingo"; - - enabledExtensions = with spicePkgs.extensions; [ popupLyrics ]; - }; + programs.spicetify = { + enable = true; + theme = spicePkgs.themes.default; + colorScheme = "flamingo"; + enabledExtensions = with spicePkgs.extensions; [ popupLyrics ]; + }; + }; + }) + ]; }