1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-19 09:29:36 +01:00

Add nixosConfiguration-awareness to the homemanager module

This commit is contained in:
Stefan Ellmauthaler 2022-08-18 10:59:04 +02:00
parent f81d99efbd
commit 1b56086048
Failed to extract signature
12 changed files with 509 additions and 452 deletions

View File

@ -69,6 +69,7 @@ with lib; {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
firefox firefox
thunderbird # v102 has various starting time issues - so back to stable thunderbird # v102 has various starting time issues - so back to stable
ungoogled-chromium
okular okular
texlive.combined.scheme-full texlive.combined.scheme-full
usbutils usbutils

View File

@ -71,6 +71,7 @@ with lib; {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
gnome3.adwaita-icon-theme gnome3.adwaita-icon-theme
wl-clipboard wl-clipboard
wl-mirror
networkmanagerapplet networkmanagerapplet
pavucontrol pavucontrol
pamixer pamixer

View File

@ -1,5 +1,11 @@
{ config, pkgs, lib, ...}: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.i3;
in
mkIf cfg.enable {
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
profiles = { profiles = {
@ -117,4 +123,5 @@
"polybar" = "systemctl --user restart polybar.service"; "polybar" = "systemctl --user restart polybar.service";
}; };
}; };
};
} }

View File

@ -1,15 +1,15 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
# ./autorandr.nix ./autorandr.nix
# ./dunst.nix ./dunst.nix
./git.nix ./git.nix
./gpg.nix ./gpg.nix
./i3.nix ./i3.nix
./kanshi.nix ./kanshi.nix
./mako.nix ./mako.nix
./nextcloud.nix ./nextcloud.nix
# ./polybar.nix ./polybar.nix
./zsh.nix ./zsh.nix
./sway.nix ./sway.nix

View File

@ -1,5 +1,10 @@
{ config, pkgs, ...}: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.i3;
in
mkIf cfg.enable {
services.dunst = { services.dunst = {
iconTheme = { iconTheme = {
package = pkgs.numix-icon-theme; package = pkgs.numix-icon-theme;
@ -34,4 +39,5 @@
}; };
}; };
}; };
};
} }

View File

@ -1,9 +1,15 @@
{ config, pkgs, lib, ...}: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical;
in
mkIf cfg.enable {
xdg = { xdg = {
configFile."i3" = { configFile."i3" = {
source = conf/i3; source = conf/i3;
recursive = true; recursive = true;
}; };
}; };
};
} }

View File

@ -1,5 +1,10 @@
{ config, pkgs, ...}: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.sway;
in
mkIf cfg.enable {
services.kanshi = { services.kanshi = {
enable = true; enable = true;
profiles = { profiles = {
@ -24,4 +29,5 @@
}; };
}; };
}; };
};
} }

View File

@ -1,6 +1,11 @@
{ config, pkgs, lib, nixosConfig, ... }:
with lib; {
config =
let
cfg = nixosConfig.elss.graphical.sway;
in
mkIf cfg.enable {
{ config, pkgs, ...}:
{
programs.mako = { programs.mako = {
enable = true; enable = true;
iconPath = "${pkgs.numix-icon-theme}"; iconPath = "${pkgs.numix-icon-theme}";
@ -11,4 +16,5 @@
}; };
home.packages = [ pkgs.numix-icon-theme ]; home.packages = [ pkgs.numix-icon-theme ];
};
} }

View File

@ -1,7 +1,13 @@
{ pkgs, ... }: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical;
in
mkIf cfg.enable {
services.nextcloud-client = { services.nextcloud-client = {
enable = true; enable = true;
startInBackground = true; startInBackground = true;
}; };
};
} }

View File

@ -1,5 +1,10 @@
{ config, pkgs, ...}: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.i3;
in
mkIf cfg.enable {
services.polybar = { services.polybar = {
enable = true; enable = true;
package = pkgs.polybarFull; package = pkgs.polybarFull;
@ -352,4 +357,5 @@
done; done;
''; '';
}; };
};
} }

View File

@ -1,5 +1,10 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.sway;
in
mkIf cfg.enable {
services = { services = {
blueman-applet.enable = true; blueman-applet.enable = true;
swayidle = { swayidle = {
@ -108,4 +113,5 @@
} }
''; '';
}; };
};
} }

View File

@ -1,5 +1,10 @@
{ config, pkgs, llib, ... }: { config, pkgs, lib, nixosConfig, ... }:
{ with lib; {
config =
let
cfg = nixosConfig.elss.graphical.sway;
in
mkIf cfg.enable {
xdg.configFile."waybar/style.css" = { xdg.configFile."waybar/style.css" = {
source = conf/waybar/style.css; source = conf/waybar/style.css;
}; };
@ -81,5 +86,6 @@
}; };
}; };
}; };
};
} }