[feat] Add all nix config with device gates

This commit is contained in:
Uttarayan Mondal
2024-02-19 19:14:09 +05:30
parent 935043e290
commit 0fc1c8b054
14 changed files with 135 additions and 177 deletions

View File

@@ -1,20 +1,12 @@
{
inputs,
pkgs,
osConfig,
...
}: {
imports =
if pkgs.stdenv.isLinux
then [inputs.anyrun.nixosModules.home-manager]
else [];
{ inputs, pkgs, osConfig, ... }: {
imports = [ inputs.anyrun.nixosModules.home-manager ];
programs.anyrun = {
enable = pkgs.stdenv.isLinux;
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
inputs.anyrun-nixos-options.packages.${pkgs.system}.default
inputs.anyrun-hyprwin.packages.${pkgs.system}.default
# inputs.anyrun-rink.packages.${pkgs.system}.default
inputs.anyrun-rink.packages.${pkgs.system}.default
# rink
applications
websearch
@@ -23,10 +15,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";
@@ -34,11 +26,9 @@
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
@@ -50,9 +40,10 @@
# ":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},
@@ -89,12 +80,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
''
}"),
)
'';
};

View File

@@ -1,17 +1,9 @@
{ devices, inputs, overlays, home-manager, ... }:
builtins.listToAttrs (builtins.map (device: {
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [ ../common/home.nix ];
};
}) devices)
{ pkgs, ... }: {
imports = [
../common/firefox.nix
../linux/hyprland.nix
../linux/gtk.nix
../linux/anyrun.nix
../linux/ironbar.nix
];
}

View File

@@ -0,0 +1,17 @@
{ devices, inputs, overlays, home-manager, ... }:
builtins.listToAttrs (builtins.map (device: {
name = device.user;
value = let
pkgs = import inputs.nixpkgs {
inherit overlays;
system = device.system;
};
in home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
inherit device;
};
modules = [ ../common/home.nix ];
};
}) devices)

View File

@@ -1,4 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }: {
foot = {
enable = pkgs.stdenv.isLinux;
server.enable = true;

View File

@@ -1,26 +1,28 @@
{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"];
{ pkgs, ... }: {
programs = {
gtk = {
enable = true;
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";
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; };
};
gtk3.extraConfig = {gtk-application-prefer-dark-theme = 1;};
gtk4.extraConfig = {gtk-application-prefer-dark-theme = 1;};
};
}

View File

@@ -1,6 +1,6 @@
{ pkgs, ... }: {
{ ... }: {
wayland.windowManager.hyprland = {
enable = pkgs.stdenv.isLinux;
enable = true;
settings = {
monitor = [
",preferred,auto,auto"

View File

@@ -1,25 +1,18 @@
{
pkgs,
inputs,
...
}: {
imports =
if pkgs.stdenv.isLinux
then [inputs.ironbar.homeManagerModules.default]
else [];
{ inputs, ... }: {
imports = [ inputs.ironbar.homeManagerModules.default ];
programs.ironbar = {
enable = pkgs.stdenv.isLinux;
enable = true;
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 = [
{
@@ -32,7 +25,7 @@
type = "music";
player_type = "mpris";
}
{type = "clock";}
{ type = "clock"; }
];
};
DP-1 = {
@@ -57,27 +50,25 @@
# networks= 3;
};
}
{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;
}
{ 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;
}];
};
};
style = ''