flake: migrate users/profiles -> users/modules
This commit is contained in:
parent
85fb3f8251
commit
e50310eb80
36 changed files with 46 additions and 79 deletions
10
flake.nix
10
flake.nix
|
@ -107,18 +107,10 @@
|
|||
inputs.rust-overlay.overlays.default
|
||||
inputs.universe-cli.overlays.default
|
||||
];
|
||||
home-manager =
|
||||
let
|
||||
profiles = self.lib.rakeLeaves ./users/profiles;
|
||||
in
|
||||
{
|
||||
home-manager = {
|
||||
sharedModules = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
] ++ (self.lib.leaves ./users/modules);
|
||||
|
||||
extraSpecialArgs = {
|
||||
inherit profiles;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -8,25 +8,7 @@
|
|||
};
|
||||
|
||||
sharedModules = [
|
||||
({ profiles, ... }: {
|
||||
imports = with profiles; [
|
||||
# Programs
|
||||
direnv
|
||||
emacs
|
||||
git
|
||||
gpg
|
||||
htop
|
||||
keychain
|
||||
mpd
|
||||
ssh
|
||||
vim
|
||||
|
||||
# Terminal
|
||||
shells.all
|
||||
starship
|
||||
tmux
|
||||
] ++ builtins.attrValues profiles.programming;
|
||||
|
||||
{
|
||||
home = {
|
||||
stateVersion = config.system.stateVersion;
|
||||
sessionVariables = {
|
||||
|
@ -46,20 +28,16 @@
|
|||
createDirectories = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf config.services.xserver.enable {
|
||||
xsession.enable = true;
|
||||
})
|
||||
(lib.mkIf config.info.graphical ({ profiles, ... }: {
|
||||
imports = with profiles; [
|
||||
kitty
|
||||
];
|
||||
|
||||
}
|
||||
(lib.mkIf config.info.graphical {
|
||||
xdg.systemDirs.data = [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
];
|
||||
}))
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,12 +10,6 @@ in
|
|||
|
||||
home = { config, main, profiles, ... }: {
|
||||
imports = flatten [
|
||||
(ifGraphical' (with profiles; [
|
||||
rofi
|
||||
themeing
|
||||
flameshot
|
||||
]))
|
||||
|
||||
./config
|
||||
];
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{ config, main, pkgs, lib, ... }:
|
||||
{
|
||||
services.flameshot = {
|
||||
enable = true;
|
||||
enable = main.info.graphical;
|
||||
settings = {
|
||||
General = {
|
||||
buttons = "@Variant(\\0\\0\\0\\x7f\\0\\0\\0\\vQList<int>\\0\\0\\0\\0\\x18\\0\\0\\0\\0\\0\\0\\0\\x1\\0\\0\\0\\x2\\0\\0\\0\\x3\\0\\0\\0\\x4\\0\\0\\0\\x5\\0\\0\\0\\x6\\0\\0\\0\\x12\\0\\0\\0\\x13\\0\\0\\0\\xf\\0\\0\\0\\x16\\0\\0\\0\\a\\0\\0\\0\\b\\0\\0\\0\\t\\0\\0\\0\\x10\\0\\0\\0\\n\\0\\0\\0\\v\\0\\0\\0\\f\\0\\0\\0\\r\\0\\0\\0\\xe\\0\\0\\0\\x11\\0\\0\\0\\x14\\0\\0\\0\\x15\\0\\0\\0\\x17)";
|
|
@ -1,6 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
{ main, pkgs, ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
enable = main.info.graphical;
|
||||
extraConfig = {
|
||||
modi = builtins.concatStringsSep "," [
|
||||
"window"
|
34
users/modules/global/themeing.nix
Normal file
34
users/modules/global/themeing.nix
Normal file
|
@ -0,0 +1,34 @@
|
|||
{ lib, main, config, pkgs, ... }:
|
||||
{
|
||||
config = lib.mkIf main.info.graphical {
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
font = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
size = 10;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = {
|
||||
package = pkgs.adwaita-qt;
|
||||
name = "adwaita-dark";
|
||||
};
|
||||
platformTheme = "gnome";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ config, pkgs, ... }: {
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
font = {
|
||||
package = pkgs.dejavu_fonts;
|
||||
name = "DejaVu Sans";
|
||||
size = 10;
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.gnome.adwaita-icon-theme;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
|
||||
theme = {
|
||||
package = pkgs.gnome.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style = {
|
||||
package = pkgs.adwaita-qt;
|
||||
name = "adwaita-dark";
|
||||
};
|
||||
platformTheme = "gnome";
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue