Compare commits
6 Commits
7c857443f3
...
5fc7ed3171
Author | SHA1 | Date | |
---|---|---|---|
5fc7ed3171 | |||
edc3d88722 | |||
8f8421b2be | |||
19460ea48f | |||
60d486da70 | |||
c716457192 |
7
flake.lock
generated
7
flake.lock
generated
@ -711,15 +711,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1716206302,
|
"lastModified": 1716384443,
|
||||||
"narHash": "sha256-5Qc3aQGVyPEOuN82zVamStaV81HebHvLjk3fGfpyCPY=",
|
"narHash": "sha256-utea2y5nEwzMM9rWJXDN0qmV4tJjRcMERQEcgk/ng00=",
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"rev": "81df8443556335016d6f0bc22630a95776a56d8b",
|
"rev": "e8e3304c2f8cf2ca60dcfc736a7422af2f24b8a8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "danth",
|
"owner": "danth",
|
||||||
|
"ref": "e8e3304c2f8cf2ca60dcfc736a7422af2f24b8a8",
|
||||||
"repo": "stylix",
|
"repo": "stylix",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
23
flake.nix
23
flake.nix
@ -60,7 +60,7 @@
|
|||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
|
|
||||||
stylix = {
|
stylix = {
|
||||||
url = "github:danth/stylix";
|
url = "github:danth/stylix?ref=e8e3304c2f8cf2ca60dcfc736a7422af2f24b8a8";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.home-manager.follows = "home-manager";
|
inputs.home-manager.follows = "home-manager";
|
||||||
};
|
};
|
||||||
@ -172,6 +172,27 @@
|
|||||||
# TODO rewrite this so it follows the same wrapper pattern as mkHome
|
# TODO rewrite this so it follows the same wrapper pattern as mkHome
|
||||||
# This function produces a nixosSystem which imports configuration.nix and
|
# This function produces a nixosSystem which imports configuration.nix and
|
||||||
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
# a Home Manager home.nix for the given user from ./hosts/${hostname}/
|
||||||
|
mkSystemN = let
|
||||||
|
_username = username;
|
||||||
|
_overlays = overlays;
|
||||||
|
in { nixpkgs ? inputs.nixpkgs,
|
||||||
|
home-manager ? inputs.home-manager,
|
||||||
|
username ? _username,
|
||||||
|
entrypoint ? ./system,
|
||||||
|
modules ? [ ],
|
||||||
|
stateVersion ? null,
|
||||||
|
config ? { },
|
||||||
|
overlays ? _overlays,
|
||||||
|
system,
|
||||||
|
... }@args: let
|
||||||
|
_modules = [ entrypoint config ] ++ modules ++ [{
|
||||||
|
nixpkgs.config = {
|
||||||
|
inherit overlays;
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
|
}] ++ lib.optional (args ? stateVersion) { config.system.stateVersion = stateVersion; };
|
||||||
|
in nixpkgs.lib.nixosSystem {
|
||||||
|
};
|
||||||
mkSystem = let _username=username; _overlays=overlays; _nixpkgs=nixpkgs;
|
mkSystem = let _username=username; _overlays=overlays; _nixpkgs=nixpkgs;
|
||||||
in { system,
|
in { system,
|
||||||
nixpkgs ? _nixpkgs,
|
nixpkgs ? _nixpkgs,
|
||||||
|
@ -76,12 +76,37 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.pointerCursor = {
|
stylix = {
|
||||||
package = lib.mkDefault ctp.packages.cursors;
|
enable = true;
|
||||||
name = lib.mkDefault ctp.names.cursors;
|
autoEnable = true;
|
||||||
size = lib.mkDefault 24;
|
cursor = {
|
||||||
x11.enable = lib.mkDefault true;
|
package = lib.mkDefault ctp.packages.cursors;
|
||||||
gtk.enable = lib.mkDefault true;
|
name = lib.mkDefault ctp.names.cursors;
|
||||||
|
size = lib.mkDefault 24;
|
||||||
|
# x11.enable = lib.mkDefault true;
|
||||||
|
# gtk.enable = lib.mkDefault true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts = let
|
||||||
|
ubuntu = pkgs.ubuntu_font_family;
|
||||||
|
in {
|
||||||
|
# packages = with pkgs; [
|
||||||
|
# ubuntu_font_family
|
||||||
|
# noto-fonts-emoji-blob-bin
|
||||||
|
# ];
|
||||||
|
emoji = {
|
||||||
|
package = pkgs.noto-fonts-emoji-blob-bin;
|
||||||
|
name = "Blobmoji";
|
||||||
|
};
|
||||||
|
monospace = {
|
||||||
|
package = ubuntu;
|
||||||
|
name = "Ubuntu Mono";
|
||||||
|
};
|
||||||
|
sansSerif = {
|
||||||
|
package = ubuntu;
|
||||||
|
name = "Ubuntu";
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@ in
|
|||||||
# alternatives thereof) are pulled in by desktop environments.
|
# alternatives thereof) are pulled in by desktop environments.
|
||||||
|
|
||||||
nixfiles.theming.enable = lib.mkDefault true;
|
nixfiles.theming.enable = lib.mkDefault true;
|
||||||
|
nixfiles.programs.dunst.enable = lib.mkDefault true;
|
||||||
|
|
||||||
qt.enable = true;
|
qt.enable = true;
|
||||||
qt.platformTheme.name = "qtct";
|
qt.platformTheme.name = "qtct";
|
||||||
@ -57,6 +58,7 @@ in
|
|||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
||||||
swaylock = {
|
swaylock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.swaylock-effects;
|
package = pkgs.swaylock-effects;
|
||||||
|
@ -11,6 +11,9 @@ in
|
|||||||
./profile
|
./profile
|
||||||
./programs
|
./programs
|
||||||
./sessions
|
./sessions
|
||||||
|
|
||||||
|
# modules
|
||||||
|
./stylix.nix # imports inputs.stylix
|
||||||
];
|
];
|
||||||
config = {};
|
config = {};
|
||||||
options.nixfiles = {
|
options.nixfiles = {
|
||||||
|
@ -71,6 +71,25 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.btop.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
programs.ranger = let
|
||||||
|
defaultTerminal = "kitty";
|
||||||
|
# defaultTerminal =
|
||||||
|
# if config.programs.kitty.enable then "kitty"
|
||||||
|
# else null;
|
||||||
|
|
||||||
|
in {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
settings = lib.mkMerge [{
|
||||||
|
use_preview_script = lib.mkDefault true;
|
||||||
|
preview_files = lib.mkDefault true;
|
||||||
|
} (lib.mkIf (!(isNull defaultTerminal)) {
|
||||||
|
preview_images = lib.mkDefault true;
|
||||||
|
preview_images_method = lib.mkDefault defaultTerminal;
|
||||||
|
})];
|
||||||
|
};
|
||||||
|
|
||||||
programs.keychain = {
|
programs.keychain = {
|
||||||
enable = lib.mkDefault true;
|
enable = lib.mkDefault true;
|
||||||
enableBashIntegration = lib.mkDefault true;
|
enableBashIntegration = lib.mkDefault true;
|
||||||
|
@ -121,6 +121,11 @@ in
|
|||||||
inputs.hyprwm-contrib.packages.${pkgs.system}.hdrop
|
inputs.hyprwm-contrib.packages.${pkgs.system}.hdrop
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.rofi = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
package = lib.mkDefault pkgs.rofi-wayland;
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = lib.mkIf (osConfig ? programs) (lib.mkDefault osConfig.programs.hyprland.finalPackage);
|
package = lib.mkIf (osConfig ? programs) (lib.mkDefault osConfig.programs.hyprland.finalPackage);
|
||||||
|
21
home/stylix.nix
Normal file
21
home/stylix.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{ pkgs, lib, config, inputs, ... }@args:
|
||||||
|
{
|
||||||
|
imports = [ inputs.stylix.homeManagerModules.stylix ];
|
||||||
|
config = {
|
||||||
|
stylix = lib.mkMerge [
|
||||||
|
{
|
||||||
|
targets.vim.enable = lib.mkDefault false;
|
||||||
|
targets.gtk.enable = lib.mkDefault false;
|
||||||
|
}
|
||||||
|
# only if styix is standalone
|
||||||
|
(lib.mkIf (!(args ? osConfig && args.osConfig ? stylix)) {
|
||||||
|
# all of this is documented in system/stylix.nix
|
||||||
|
autoEnable = lib.mkDefault config.stylix.enable;
|
||||||
|
enable = lib.mkDefault false;
|
||||||
|
|
||||||
|
image = lib.mkDefault "${pkgs.nixfiles-assets}/share/wallpapers/nixfiles-static/Djayjesse-finding_life.png";
|
||||||
|
base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -16,7 +16,10 @@
|
|||||||
};
|
};
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
home.pointerCursor = lib.mkIf config.nixfiles.theming.enable { size = 32; };
|
# TODO mkif stylix.enable; danth/stylix#216
|
||||||
|
home.pointerCursor = lib.mkIf (config.nixfiles.theming.enable && !config.stylix.enable) { size = 32; };
|
||||||
|
stylix.cursor = { size = 32; };
|
||||||
|
|
||||||
nixfiles.theming.catppuccin.themeDPI = "hdpi";
|
nixfiles.theming.catppuccin.themeDPI = "hdpi";
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
|
@ -18,6 +18,7 @@ in
|
|||||||
# modules
|
# modules
|
||||||
inputs.nix-minecraft.nixosModules.minecraft-servers
|
inputs.nix-minecraft.nixosModules.minecraft-servers
|
||||||
inputs.impermanence.nixosModules.impermanence
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
./stylix.nix # imports inputs.stylix
|
||||||
];
|
];
|
||||||
config = {};
|
config = {};
|
||||||
options.nixfiles = {
|
options.nixfiles = {
|
||||||
|
30
system/stylix.nix
Normal file
30
system/stylix.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{ pkgs, config, lib, inputs, ... }@args:
|
||||||
|
{
|
||||||
|
imports = [ inputs.stylix.nixosModules.stylix ];
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# stylix defaults (this is an external module so i don't mind setting sane defaults right here).
|
||||||
|
stylix = {
|
||||||
|
# don't mess with things by default.
|
||||||
|
#
|
||||||
|
# this naming is confusing as shit
|
||||||
|
# this enables color theming of things by stylix
|
||||||
|
autoEnable = lib.mkDefault config.stylix.enable;
|
||||||
|
# this enables installation of fonts/images/etc
|
||||||
|
enable = lib.mkDefault false;
|
||||||
|
|
||||||
|
# an image i like
|
||||||
|
image = lib.mkDefault "${pkgs.nixfiles-assets}/share/wallpapers/nixfiles-static/Djayjesse-finding_life.png";
|
||||||
|
|
||||||
|
# default theme
|
||||||
|
base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
|
||||||
|
homeManagerIntegration = {
|
||||||
|
# use system config in home-manager
|
||||||
|
followSystem = lib.mkDefault true;
|
||||||
|
|
||||||
|
# I will manually import within home-manager so it works standalone
|
||||||
|
autoImport = lib.mkDefault false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user