Skip to content

Commit

Permalink
more cross platform modules
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyavolyn committed Dec 21, 2024
1 parent 1cdd283 commit ed969ea
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 45 deletions.
5 changes: 2 additions & 3 deletions hosts/applin/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@
streaming
minecraft
messaging
spotify
qflipper

hammerspoon
];

homebrew = {
casks = [
"microsoft-teams"
"mongodb-compass"
"tunnelblick"
"steam"
"spotify"
"chatgpt"
"jellyfin-media-player"
"ticktick"
"qflipper"
"bitwarden"
];

Expand Down
22 changes: 16 additions & 6 deletions modules/apps/dev/db.nix
Original file line number Diff line number Diff line change
@@ -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
];
})
];
}
13 changes: 5 additions & 8 deletions modules/apps/dev/default.nix
Original file line number Diff line number Diff line change
@@ -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
Expand Down
12 changes: 8 additions & 4 deletions modules/apps/dev/insomnia.nix
Original file line number Diff line number Diff line change
@@ -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 ];
})
];
}
28 changes: 16 additions & 12 deletions modules/apps/qflipper.nix
Original file line number Diff line number Diff line change
@@ -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"
'';
})
];
}
31 changes: 19 additions & 12 deletions modules/apps/spotify.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
};
})
];
}

0 comments on commit ed969ea

Please sign in to comment.