[feat] Only enable certain configs on linux
This commit is contained in:
@@ -1 +1 @@
|
||||
{ ... }: { programs.firefox = { enable = true; }; }
|
||||
{pkgs, ...}: {programs.firefox = {enable = pkgs.stdenv.isLinux;};}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{ config, pkgs, lib, device, ... }:
|
||||
let
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
device,
|
||||
...
|
||||
}: let
|
||||
start-tmux = (import ../scripts/start-tmux.nix) pkgs;
|
||||
# https://mipmip.github.io/home-manager-option-search/
|
||||
in {
|
||||
@@ -9,86 +14,70 @@ in {
|
||||
./wezterm.nix
|
||||
./firefox.nix
|
||||
../linux/hyprland.nix
|
||||
../linux/gtk.nix
|
||||
../linux/anyrun.nix
|
||||
../linux/ironbar.nix
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Mauve-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
variant = "mocha";
|
||||
size = "standard";
|
||||
accents = [ "mauve" ];
|
||||
tweaks = [ "normal" ];
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
htop-vim
|
||||
qmk
|
||||
nodejs
|
||||
nix-index
|
||||
macchina
|
||||
ripgrep
|
||||
fd
|
||||
nixfmt
|
||||
dust
|
||||
eza
|
||||
cachix
|
||||
rustup
|
||||
cmake
|
||||
fzf
|
||||
clang
|
||||
# neovim-nightly
|
||||
neovim
|
||||
(nerdfonts.override {fonts = ["Hasklig"];})
|
||||
mpv
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
accent = "mauve";
|
||||
flavor = "mocha";
|
||||
};
|
||||
};
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
gtk3.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||
|
||||
gtk4.extraConfig = { gtk-application-prefer-dark-theme = 1; };
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
handlr-regex
|
||||
gnome.nautilus
|
||||
webcord-vencord
|
||||
spotify
|
||||
spotify-player
|
||||
htop-vim
|
||||
lsof
|
||||
wl-clipboard
|
||||
qmk
|
||||
nodejs
|
||||
nix-index
|
||||
yubikey-personalization
|
||||
macchina
|
||||
ripgrep
|
||||
fd
|
||||
nixfmt
|
||||
dust
|
||||
eza
|
||||
cachix
|
||||
rustup
|
||||
cmake
|
||||
fzf
|
||||
clang
|
||||
ncpamixer
|
||||
# neovim-nightly
|
||||
neovim
|
||||
yubikey-agent
|
||||
(nerdfonts.override { fonts = [ "Hasklig" ]; })
|
||||
(pkgs.writeShellApplication {
|
||||
name = "xdg-open";
|
||||
runtimeInputs = [ handlr-regex ];
|
||||
text = ''
|
||||
handlr open "$@"
|
||||
'';
|
||||
})
|
||||
mpv
|
||||
|
||||
# # It is sometimes useful to fine-tune packages, for example, by applying
|
||||
# # overrides. You can do that directly here, just don't forget the
|
||||
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
|
||||
# # fonts?
|
||||
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
];
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
]
|
||||
++ (
|
||||
if device.isLinux
|
||||
then
|
||||
with pkgs; [
|
||||
handlr-regex
|
||||
gnome.nautilus
|
||||
webcord-vencord
|
||||
spotify
|
||||
spotify-player
|
||||
lsof
|
||||
wl-clipboard
|
||||
yubikey-personalization
|
||||
ncpamixer
|
||||
yubikey-agent
|
||||
(pkgs.writeShellApplication {
|
||||
name = "xdg-open";
|
||||
runtimeInputs = [handlr-regex];
|
||||
text = ''
|
||||
handlr open "$@"
|
||||
'';
|
||||
})
|
||||
]
|
||||
else []
|
||||
);
|
||||
|
||||
xdg.enable = true;
|
||||
|
||||
@@ -120,7 +109,7 @@ in {
|
||||
|
||||
nushell = {
|
||||
enable = true;
|
||||
shellAliases = { "cd" = "z"; };
|
||||
shellAliases = {"cd" = "z";};
|
||||
package = pkgs.nushellFull;
|
||||
configFile.text = ''
|
||||
$env.config = {
|
||||
@@ -166,45 +155,9 @@ in {
|
||||
enableFishIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
};
|
||||
foot = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "${pkgs.fish.outPath}/bin/fish";
|
||||
font = "Hasklug Nerd Font Mono:size=13";
|
||||
initial-window-size-pixels = "1440x800";
|
||||
};
|
||||
colors = {
|
||||
foreground = "f8f8f2";
|
||||
background = 0;
|
||||
alpha = 0.8;
|
||||
|
||||
"136" = "af8700";
|
||||
|
||||
regular0 = "21222c";
|
||||
regular1 = "ff5555";
|
||||
regular2 = "50fa7b";
|
||||
regular3 = "f1fa8c";
|
||||
regular4 = "bd93f9";
|
||||
regular5 = "ff79c6";
|
||||
regular6 = "8be9fd";
|
||||
regular7 = "f8f8f2";
|
||||
|
||||
bright0 = "6272a4";
|
||||
bright1 = "ff6e6e";
|
||||
bright2 = "69ff94";
|
||||
bright3 = "ffffa5";
|
||||
bright4 = "d6acff";
|
||||
bright5 = "ff92df";
|
||||
bright6 = "a4ffff";
|
||||
bright7 = "ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager = { enable = true; };
|
||||
home-manager = {enable = true;};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
@@ -212,10 +165,10 @@ in {
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
username = device.user;
|
||||
homeDirectory = if device.isMac then
|
||||
lib.mkForce "/Users/${device.user}"
|
||||
else
|
||||
lib.mkForce "/home/${device.user}";
|
||||
homeDirectory =
|
||||
if device.isMac
|
||||
then lib.mkForce "/Users/${device.user}"
|
||||
else lib.mkForce "/home/${device.user}";
|
||||
|
||||
stateVersion = "23.11";
|
||||
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
{ inputs, pkgs, osConfig, ... }: {
|
||||
imports = [ inputs.anyrun.nixosModules.home-manager ];
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
if pkgs.stdenv.isLinux
|
||||
then [inputs.anyrun.nixosModules.home-manager]
|
||||
else [];
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
config = {
|
||||
plugins = with inputs.anyrun.packages.${pkgs.system}; [
|
||||
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
|
||||
@@ -15,10 +23,10 @@
|
||||
symbols
|
||||
kidex
|
||||
];
|
||||
x = { fraction = 0.5; };
|
||||
y = { fraction = 0.3; };
|
||||
height = { absolute = 0; };
|
||||
width = { absolute = 1000; };
|
||||
x = {fraction = 0.5;};
|
||||
y = {fraction = 0.3;};
|
||||
height = {absolute = 0;};
|
||||
width = {absolute = 1000;};
|
||||
showResultsImmediately = true;
|
||||
maxEntries = 10;
|
||||
layer = "overlay";
|
||||
@@ -26,9 +34,11 @@
|
||||
|
||||
extraConfigFiles = {
|
||||
"nixos-options.ron".text = let
|
||||
nixos-options = osConfig.system.build.manual.optionsJSON
|
||||
nixos-options =
|
||||
osConfig.system.build.manual.optionsJSON
|
||||
+ "/share/doc/nixos/options.json";
|
||||
hm-options = inputs.home-manager.packages.${pkgs.system}.docs-json
|
||||
hm-options =
|
||||
inputs.home-manager.packages.${pkgs.system}.docs-json
|
||||
+ "/share/doc/home-manager/options.json";
|
||||
# or alternatively if you wish to read any other documentation options, such as home-manager
|
||||
# get the docs-json package from the home-manager flake
|
||||
@@ -40,10 +50,9 @@
|
||||
# ":nall" = [nixos-options hm-options some-other-option];
|
||||
# };
|
||||
options = builtins.toJSON {
|
||||
":nix" = [ nixos-options ];
|
||||
":hm" = [ hm-options ];
|
||||
":nix" = [nixos-options];
|
||||
":hm" = [hm-options];
|
||||
};
|
||||
|
||||
in ''
|
||||
Config(
|
||||
options: ${options},
|
||||
@@ -80,12 +89,12 @@
|
||||
"rink.ron".text = ''
|
||||
Config(
|
||||
currency: Some("${
|
||||
builtins.toFile "currency.units" ''
|
||||
!category currencies "Currencies"
|
||||
usd USD
|
||||
inr INR
|
||||
''
|
||||
}"),
|
||||
builtins.toFile "currency.units" ''
|
||||
!category currencies "Currencies"
|
||||
usd USD
|
||||
inr INR
|
||||
''
|
||||
}"),
|
||||
)
|
||||
'';
|
||||
};
|
||||
|
||||
38
config/nix/linux/foot.nix
Normal file
38
config/nix/linux/foot.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{pkgs, ...}: {
|
||||
foot = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
shell = "${pkgs.fish.outPath}/bin/fish";
|
||||
font = "Hasklug Nerd Font Mono:size=13";
|
||||
initial-window-size-pixels = "1440x800";
|
||||
};
|
||||
colors = {
|
||||
foreground = "f8f8f2";
|
||||
background = 0;
|
||||
alpha = 0.8;
|
||||
|
||||
"136" = "af8700";
|
||||
|
||||
regular0 = "21222c";
|
||||
regular1 = "ff5555";
|
||||
regular2 = "50fa7b";
|
||||
regular3 = "f1fa8c";
|
||||
regular4 = "bd93f9";
|
||||
regular5 = "ff79c6";
|
||||
regular6 = "8be9fd";
|
||||
regular7 = "f8f8f2";
|
||||
|
||||
bright0 = "6272a4";
|
||||
bright1 = "ff6e6e";
|
||||
bright2 = "69ff94";
|
||||
bright3 = "ffffa5";
|
||||
bright4 = "d6acff";
|
||||
bright5 = "ff92df";
|
||||
bright6 = "a4ffff";
|
||||
bright7 = "ffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
config/nix/linux/gtk.nix
Normal file
26
config/nix/linux/gtk.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{pkgs, ...}: {
|
||||
programs.gtk = {
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
theme = {
|
||||
name = "Catppuccin-Mocha-Standard-Mauve-Dark";
|
||||
package = pkgs.catppuccin-gtk.override {
|
||||
variant = "mocha";
|
||||
size = "standard";
|
||||
accents = ["mauve"];
|
||||
tweaks = ["normal"];
|
||||
};
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.catppuccin-papirus-folders.override {
|
||||
accent = "mauve";
|
||||
flavor = "mocha";
|
||||
};
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
|
||||
|
||||
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
|
||||
};
|
||||
}
|
||||
@@ -1,18 +1,25 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [ inputs.ironbar.homeManagerModules.default ];
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
if pkgs.stdenv.isLinux
|
||||
then [inputs.ironbar.homeManagerModules.default]
|
||||
else [];
|
||||
programs.ironbar = {
|
||||
enable = true;
|
||||
enable = pkgs.stdenv.isLinux;
|
||||
config.monitors = {
|
||||
HDMI-A-2 = {
|
||||
position = "bottom";
|
||||
start = [
|
||||
{
|
||||
type = "launcher";
|
||||
favourites = [ "firefox" "discord" ];
|
||||
favourites = ["firefox" "discord"];
|
||||
show_names = false;
|
||||
show_icons = true;
|
||||
}
|
||||
{ type = "focused"; }
|
||||
{type = "focused";}
|
||||
];
|
||||
end = [
|
||||
{
|
||||
@@ -25,7 +32,7 @@
|
||||
type = "music";
|
||||
player_type = "mpris";
|
||||
}
|
||||
{ type = "clock"; }
|
||||
{type = "clock";}
|
||||
];
|
||||
};
|
||||
DP-1 = {
|
||||
@@ -50,25 +57,27 @@
|
||||
# networks= 3;
|
||||
};
|
||||
}
|
||||
{ type = "tray"; }
|
||||
{type = "tray";}
|
||||
];
|
||||
start = [
|
||||
{
|
||||
type = "workspaces";
|
||||
name_map = {
|
||||
"1" = "icon:code";
|
||||
"2" = "";
|
||||
"3" = "icon:chrome";
|
||||
"4" = "icon:discord";
|
||||
"5" = "icon:steam";
|
||||
"6" = "icon:misc";
|
||||
"7" = "icon:misc";
|
||||
"8" = "icon:docky";
|
||||
"9" = "icon:monodoc";
|
||||
"10" = "icon:spotify";
|
||||
};
|
||||
favorites = ["1" "2" "3" "4" "5" "6" "7" "8" "9" "10"];
|
||||
all_monitors = true;
|
||||
}
|
||||
];
|
||||
start = [{
|
||||
type = "workspaces";
|
||||
name_map = {
|
||||
"1" = "icon:code";
|
||||
"2" = "";
|
||||
"3" = "icon:chrome";
|
||||
"4" = "icon:discord";
|
||||
"5" = "icon:steam";
|
||||
"6" = "icon:misc";
|
||||
"7" = "icon:misc";
|
||||
"8" = "icon:docky";
|
||||
"9" = "icon:monodoc";
|
||||
"10" = "icon:spotify";
|
||||
};
|
||||
favorites = [ "1" "2" "3" "4" "5" "6" "7" "8" "9" "10" ];
|
||||
all_monitors = true;
|
||||
}];
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
|
||||
Reference in New Issue
Block a user