use different stylix version to have an enable option
This commit is contained in:
11
flake.lock
generated
11
flake.lock
generated
@@ -840,15 +840,16 @@
|
|||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717268716,
|
"lastModified": 1717250350,
|
||||||
"narHash": "sha256-hKM/D6Ni3+Ihvmy8pF+rOFgIqhphOEHUWqxJd+5ZV6Y=",
|
"narHash": "sha256-l7y55WbUrj4NVCzgo3GLmM1Z2HC2uLb8dLUt7FxfI5g=",
|
||||||
"owner": "danth",
|
"owner": "jalil-salame",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "3befd5d693a2669dc7d2086b57298838ff71f24b",
|
"rev": "03a8c7744903f29f017fabeda833834bd873f956",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "danth",
|
"owner": "jalil-salame",
|
||||||
|
"ref": "enable-option",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
13
flake.nix
13
flake.nix
@@ -28,7 +28,7 @@
|
|||||||
url = "github:nix-community/nixvim";
|
url = "github:nix-community/nixvim";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
};
|
};
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:jalil-salame/stylix/enable-option";
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
# helper function to create a machine
|
# helper function to create a machine
|
||||||
mkHost = { modules, specialArgs ? { pkgsVersion = nixpkgs-unstable; }
|
mkHost = { modules, specialArgs ? { pkgsVersion = nixpkgs-unstable; }
|
||||||
, system ? "x86_64-linux", minimal ? false, stylixEnabled ? false }:
|
, system ? "x86_64-linux", minimal ? false }:
|
||||||
specialArgs.pkgsVersion.lib.nixosSystem {
|
specialArgs.pkgsVersion.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = modules ++ [
|
modules = modules ++ [
|
||||||
@@ -59,13 +59,11 @@
|
|||||||
] ++ (if !minimal then [
|
] ++ (if !minimal then [
|
||||||
home-manager-unstable.nixosModules.home-manager
|
home-manager-unstable.nixosModules.home-manager
|
||||||
nixos-cosmic.nixosModules.default
|
nixos-cosmic.nixosModules.default
|
||||||
|
stylix.nixosModules.stylix
|
||||||
|
./modules/graphical/stylix.nix
|
||||||
./modules/graphical/cosmic.nix
|
./modules/graphical/cosmic.nix
|
||||||
] else
|
] else
|
||||||
[ ]) ++ (if stylixEnabled then [
|
[ ]);
|
||||||
stylix.nixosModules.stylix
|
|
||||||
./modules/graphical/stylix.nix
|
|
||||||
] else
|
|
||||||
[ ]);
|
|
||||||
specialArgs = specialArgs // { inherit inputs outputs; };
|
specialArgs = specialArgs // { inherit inputs outputs; };
|
||||||
};
|
};
|
||||||
in flake-utils.lib.eachDefaultSystem (system: {
|
in flake-utils.lib.eachDefaultSystem (system: {
|
||||||
@@ -90,7 +88,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
"kop-pc" = mkHost {
|
"kop-pc" = mkHost {
|
||||||
stylixEnabled = true;
|
|
||||||
modules = [ ./users/kopatz ./systems/pc/configuration.nix ];
|
modules = [ ./users/kopatz ./systems/pc/configuration.nix ];
|
||||||
};
|
};
|
||||||
"nix-laptop" = mkHost {
|
"nix-laptop" = mkHost {
|
||||||
|
|||||||
3
home-manager/stylix.nix
Normal file
3
home-manager/stylix.nix
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{ osConfig, pkgs, config, lib, ... }:
|
||||||
|
let cfg = osConfig.custom.graphical.stylix;
|
||||||
|
in { config = lib.mkIf cfg.enable { stylix.enable = true; }; }
|
||||||
@@ -40,6 +40,7 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
stylix = {
|
stylix = {
|
||||||
|
enable = true;
|
||||||
autoEnable = lib.mkForce true;
|
autoEnable = lib.mkForce true;
|
||||||
polarity = "dark";
|
polarity = "dark";
|
||||||
image = cfg.image;
|
image = cfg.image;
|
||||||
@@ -57,7 +58,7 @@ in {
|
|||||||
desktop = 0.7;
|
desktop = 0.7;
|
||||||
terminal = 0.7;
|
terminal = 0.7;
|
||||||
};
|
};
|
||||||
targets.hyprland.enable = false;
|
#targets.hyprland.enable = false; does not exist in the MR version yet
|
||||||
fonts = {
|
fonts = {
|
||||||
serif = config.stylix.fonts.sansSerif;
|
serif = config.stylix.fonts.sansSerif;
|
||||||
sansSerif = {
|
sansSerif = {
|
||||||
|
|||||||
@@ -21,5 +21,4 @@
|
|||||||
inputs.nix-colors.homeManagerModule
|
inputs.nix-colors.homeManagerModule
|
||||||
];
|
];
|
||||||
|
|
||||||
colorScheme = inputs.nix-colors.colorSchemes.tokyo-night-dark;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,9 +28,10 @@
|
|||||||
#../../home-manager/theme.nix
|
#../../home-manager/theme.nix
|
||||||
../../home-manager/zsh.nix
|
../../home-manager/zsh.nix
|
||||||
../../home-manager/i3.nix
|
../../home-manager/i3.nix
|
||||||
|
../../home-manager/stylix.nix
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
inputs.nix-colors.homeManagerModule
|
inputs.nix-colors.homeManagerModule
|
||||||
] ++ lib.optional osConfig.custom.graphical.i3.enable ../../home-manager/i3.nix; # need this hack because i3 uses stylix, and it errors otherwise
|
];
|
||||||
|
|
||||||
colorScheme = import ../../home-manager/themes/yorha/colors.nix;
|
#colorScheme = import ../../home-manager/themes/yorha/colors.nix;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user