fix problems rebuilding, make niri and noctalia more HM friendly
added `inputs` to `extraSpecialArgs`, giving homeModules access to helper functions cleaned up the logic for the stylix file, removing the final `sharedModules` in the process in favour of `home-manager.users.grey`
This commit is contained in:
8 files changed
+81
-27
No files matched your search
@@ -27,7 +27,7 @@ input {
|
|||||||
}
|
}
|
||||||
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
|
||||||
prefer-no-csd
|
prefer-no-csd
|
||||||
overview { zoom 0.666; }
|
overview { zoom 0.5; }
|
||||||
layout {
|
layout {
|
||||||
gaps 12
|
gaps 12
|
||||||
struts {
|
struts {
|
||||||
@@ -159,3 +159,7 @@ animations {
|
|||||||
spring damping-ratio=0.8 stiffness=650 epsilon=0.0001
|
spring damping-ratio=0.8 stiffness=650 epsilon=0.0001
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^noctalia-backdrop"
|
||||||
|
place-within-backdrop true
|
||||||
|
}
|
||||||
@@ -4,8 +4,9 @@ config_version = 13
|
|||||||
enable_sounds = true
|
enable_sounds = true
|
||||||
|
|
||||||
[backdrop]
|
[backdrop]
|
||||||
blur_intensity = 0.099999997764825821
|
blur_intensity = 0.74999998323619366
|
||||||
tint_intensity = 0.14999999664723873
|
enabled = true
|
||||||
|
tint_intensity = 0.19999999552965164
|
||||||
|
|
||||||
[bar.default]
|
[bar.default]
|
||||||
background_opacity = 0.79999998211860657
|
background_opacity = 0.79999998211860657
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
options = {
|
options.components = {
|
||||||
components = {
|
|
||||||
displayManager = lib.mkOption {
|
displayManager = lib.mkOption {
|
||||||
# enum that dynamically populates itself with the contents of the display-managers directory
|
# enum that dynamically populates itself with the contents of the display-managers directory
|
||||||
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||||
@@ -32,7 +31,6 @@
|
|||||||
default = [];
|
default = [];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@@ -48,7 +46,32 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { config, pkgs, ... }: {
|
flake.homeModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
|
options.components = {
|
||||||
|
windowManagers = lib.mkOption {
|
||||||
|
type = lib.types.either (lib.types.listOf (
|
||||||
|
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||||
|
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||||
|
))
|
||||||
|
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||||
|
builtins.attrNames (builtins.readDir "${self}/modules/components/window-managers")
|
||||||
|
)));
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
|
||||||
|
shells = lib.mkOption {
|
||||||
|
type = lib.types.either (lib.types.listOf (
|
||||||
|
lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||||
|
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||||
|
))
|
||||||
|
)) (lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
|
||||||
|
builtins.attrNames (builtins.readDir "${self}/modules/components/shells")
|
||||||
|
)));
|
||||||
|
default = [];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
x264
|
x264
|
||||||
@@ -81,4 +104,5 @@
|
|||||||
gtk2.force = true;
|
gtk2.force = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -1,29 +1,39 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
|
||||||
config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) {
|
config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = [
|
||||||
inputs.noctalia.packages.${system}.default
|
inputs.noctalia.packages.${pkgs.system}.default
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.noctalia.enable = true;
|
programs.noctalia.enable = true;
|
||||||
|
|
||||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: {
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
home.activation = {
|
components.shells = [ "noctalia" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.graphics = { pkgs, config, lib, inputs, ... }: {
|
||||||
|
config = lib.mkIf ((config.components.shells == "noctalia")||(builtins.elem "noctalia" config.components.shells)) {
|
||||||
|
home = {
|
||||||
|
packages = lib.mkIf (config.info.isStandalone) [ inputs.noctalia.packages.${pkgs.system}.default ];
|
||||||
|
|
||||||
|
activation = {
|
||||||
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
symlinkNoctaliaState = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
||||||
target = "${config.users.grey.homeDir}/.local/state/noctalia/settings.toml";
|
target = "${config.home.homeDirectory}/.local/state/noctalia/settings.toml";
|
||||||
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
||||||
});
|
});
|
||||||
|
|
||||||
symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
symlinkNoctaliaStatePlugins = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
||||||
target = "${config.users.grey.homeDir}/.local/state/noctalia/plugins";
|
target = "${config.home.homeDirectory}/.local/state/noctalia/plugins";
|
||||||
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
||||||
isDir = true;
|
isDir = true;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
xdg.configFile."noctalia/settings.toml".source = "${self}/dotfiles/${config.info.hostName}/noctalia/settings.toml";
|
||||||
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
xdg.configFile."noctalia/plugins".source = "${self}/dotfiles/${config.info.hostName}/noctalia/plugins";
|
||||||
});
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{ inputs, self, ... }: {
|
{ inputs, self, ... }: {
|
||||||
flake.nixosModules.graphics = { config, pkgs, inputs, lib, ... }: {
|
flake.nixosModules.graphics = { config, pkgs, lib, ... }: {
|
||||||
config = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) {
|
config = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
xdg-desktop-portal-gnome
|
xdg-desktop-portal-gnome
|
||||||
@@ -37,12 +37,20 @@
|
|||||||
));
|
));
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) ({ lib, config, ... }: {
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
home.activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
components.windowManagers = [ "niri" ];
|
||||||
target = "${config.users.grey.homeDir}/.config/niri/config.kdl";
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
flake.homeModules.graphics = { config, pkgs, lib, inputs, ... }: {
|
||||||
|
home = lib.mkIf ((config.components.windowManagers == "niri")||(builtins.elem "niri" config.components.windowManagers)) {
|
||||||
|
packages = lib.mkIf (config.info.isStandalone) [ pkgs.niri ];
|
||||||
|
|
||||||
|
activation.symlinkNiriConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
|
||||||
|
target = "${config.home.homeDirectory}/.config/niri/config.kdl";
|
||||||
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl";
|
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/niri.kdl";
|
||||||
});
|
});
|
||||||
});
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -14,15 +14,11 @@
|
|||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
backupFileExtension = "bak";
|
backupFileExtension = "bak";
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
|
||||||
users.grey = self.homeModules.${config.info.hostName};
|
users.grey = self.homeModules.${config.info.hostName};
|
||||||
sharedModules = [
|
|
||||||
{ features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable; }
|
|
||||||
( lib.mkIf (config.features.nixos.stylix.enable)
|
|
||||||
( if (config.features.applications.gui.floorp.enable) then {
|
|
||||||
stylix.targets.floorp.profileNames = [ "default" ];
|
|
||||||
} else {})
|
|
||||||
)
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -10,10 +10,20 @@
|
|||||||
stylix.enable = true;
|
stylix.enable = true;
|
||||||
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
|
stylix.image = builtins.path { path = "${self}/modules/hosts/${config.info.hostName}/wallpaper.jpg"; };
|
||||||
stylix.polarity = "dark";
|
stylix.polarity = "dark";
|
||||||
|
|
||||||
|
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||||
|
features.nixos.stylix.enable = lib.mkDefault config.features.nixos.stylix.enable;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
flake.homeModules.graphics = { pkgs, lib, config, ... }: {
|
||||||
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
options.features.nixos.stylix.enable = lib.mkEnableOption "stylix";
|
||||||
|
|
||||||
|
config = lib.mkIf (config.features.nixos.stylix.enable) {
|
||||||
|
stylix.targets = lib.mkIf (config.features.applications.gui.floorp.enable) {
|
||||||
|
floorp.profileNames = [ "default" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
modules = with self.homeModules; [
|
modules = with self.homeModules; [
|
||||||
takamaki
|
takamaki
|
||||||
];
|
];
|
||||||
|
extraSpecialArgs = { inherit inputs; };
|
||||||
};
|
};
|
||||||
|
|
||||||
flake.homeModules.takamaki = { pkgs, config, lib, ... }: {
|
flake.homeModules.takamaki = { pkgs, config, lib, ... }: {
|
||||||
|
|||||||
Reference in new issue
Block a user