init: stylix

This commit is contained in:
William 2024-09-17 23:19:59 -03:00
parent 886d285db2
commit aa031db47d
12 changed files with 395 additions and 183 deletions

BIN
assets/wp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

269
flake.lock generated
View file

@ -23,6 +23,120 @@
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1708890466,
"narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "665b3c6748534eb766c777298721cece9453fdae",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-foot": {
"flake": false,
"locked": {
"lastModified": 1696725948,
"narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=",
"owner": "tinted-theming",
"repo": "base16-foot",
"rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-foot",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1720809814,
"narHash": "sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "34f41987bec14c0f3f6b2155c19787b1f6489625",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-kitty": {
"flake": false,
"locked": {
"lastModified": 1665001328,
"narHash": "sha256-aRaizTYPpuWEcvoYE9U+YRX+Wsc8+iG0guQJbvxEdJY=",
"owner": "kdrag0n",
"repo": "base16-kitty",
"rev": "06bb401fa9a0ffb84365905ffbb959ae5bf40805",
"type": "github"
},
"original": {
"owner": "kdrag0n",
"repo": "base16-kitty",
"type": "github"
}
},
"base16-tmux": {
"flake": false,
"locked": {
"lastModified": 1696725902,
"narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=",
"owner": "tinted-theming",
"repo": "base16-tmux",
"rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-tmux",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1716150083,
"narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -99,6 +213,22 @@
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems_3"
@ -117,6 +247,60 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1689549921,
"narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84",
"type": "github"
},
"original": {
"owner": "SenchoPens",
"repo": "fromYaml",
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1713702291,
"narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "46.1",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -159,6 +343,27 @@
"type": "github"
}
},
"home-manager_3": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1724435763,
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"homepage": {
"flake": false,
"locked": {
@ -316,6 +521,22 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1725194671,
"narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -328,7 +549,38 @@
"nix-minecraft": "nix-minecraft",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
"nixpkgs-stable": "nixpkgs-stable",
"stylix": "stylix"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-foot": "base16-foot",
"base16-helix": "base16-helix",
"base16-kitty": "base16-kitty",
"base16-tmux": "base16-tmux",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_2",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_2",
"systems": "systems_4"
},
"locked": {
"lastModified": 1726497442,
"narHash": "sha256-fieyqmLEJQqqnuJcg2CAnQ8kHapXHhg9rL48NNWjnPw=",
"owner": "danth",
"repo": "stylix",
"rev": "149b313ddf91c3cc94309170498b162cec666675",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
@ -376,6 +628,21 @@
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_2"

View file

@ -43,11 +43,13 @@
};
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
stylix.url = "github:danth/stylix";
};
outputs = inputs@{ self, nixpkgs, home-manager, nixpkgs-stable, deploy-rs
, agenix, nixos-generators, homepage, nix-minecraft, impermanence
, nix-flatpak, nix-index-db, ... }: {
, nix-flatpak, nix-index-db, stylix, ... }: {
nixosConfigurations = {
rotterdam = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
@ -59,6 +61,7 @@
impermanence.nixosModules.impermanence
nix-index-db.nixosModules.nix-index
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
{
nixpkgs.overlays =
[ agenix.overlays.default self.overlays.custom ];
@ -76,6 +79,7 @@
impermanence.nixosModules.impermanence
nix-index-db.nixosModules.nix-index
nix-flatpak.nixosModules.nix-flatpak
stylix.nixosModules.stylix
{
nixpkgs.overlays =
[ agenix.overlays.default self.overlays.custom ];

View file

@ -12,5 +12,6 @@
./services.nix
./users.nix
./virtualisation.nix
./stylix.nix
];
}

38
hosts/common/stylix.nix Normal file
View file

@ -0,0 +1,38 @@
{ config, pkgs, ... }:
{
stylix = {
enable = true;
image = ../../assets/wp.png;
base16Scheme = "${pkgs.base16-schemes}/share/themes/catppuccin-mocha.yaml";
cursor = {
package = pkgs.kdePackages.breeze-icons;
name = "Breeze_Light";
size = 24;
};
fonts = {
serif = {
package = pkgs.source-serif;
name = "Source Serif 4 Display";
};
sansSerif = {
package = pkgs.inter;
name = "Inter";
};
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "Hack" ]; };
name = "Hack Nerd Font";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
sizes = {
applications = 10;
desktop = config.stylix.fonts.sizes.applications;
popups = config.stylix.fonts.sizes.applications;
terminal = 12;
};
};
};
}

View file

@ -2,11 +2,7 @@
{
boot = {
plymouth = {
enable = true;
themePackages = with pkgs; [ adi1090x-plymouth-themes ];
theme = "colorful_sliced";
};
plymouth.enable = true;
initrd.systemd.enable = true;
loader = {
efi.efiSysMountPoint = "/boot/efi";

View file

@ -96,14 +96,7 @@ in {
fonts = {
fontDir.enable = true;
fontconfig.enable = true;
packages = with pkgs; [
corefonts
inter
maple-mono
roboto
(nerdfonts.override { fonts = [ "Hack" ]; })
];
packages = with pkgs; [ corefonts maple-mono noto-fonts-cjk roboto ];
};
environment.plasma6.excludePackages =

View file

@ -12,7 +12,6 @@
helix = {
enable = true;
settings = {
theme = "catppuccin-mocha_transparent";
editor = {
idle-timeout = 0;
line-number = "relative";
@ -34,17 +33,11 @@
};
};
languages = {
language = [
{
language = [{
name = "nix";
auto-format = true;
formatter.command = "nixfmt";
}
];
};
themes.catppuccin-mocha_transparent = {
inherits = "catppuccin_mocha";
"ui.background" = "{}";
}];
};
};
@ -154,7 +147,6 @@
btop = {
enable = true;
settings = {
color_theme = "catppuccin_mocha.theme";
theme_background = false;
proc_sorting = "cpu direct";
update_ms = 500;

View file

@ -1,5 +1,5 @@
{ ... }:
{
imports = [ ./home.nix ./programs.nix ./programs ];
imports = [ ./programs.nix ./programs ];
}

View file

@ -1,19 +0,0 @@
{ config, pkgs, lib, ... }:
{
home = {
pointerCursor = {
size = 24;
gtk.enable = true;
x11.enable = true;
name = "Breeze_Light";
package = pkgs.kdePackages.breeze-icons;
};
activation.removeExistingGtk =
lib.hm.dag.entryBefore [ "checkLinkTargets" ] ''
rm -rf ~/.gtkrc-2.0
rm -rf ~/.config/gtk-3.0
rm -rf ~/.config/gtk-4.0
'';
};
}

View file

@ -42,57 +42,4 @@
};
};
};
home.file = {
".config/MangoHud/MangoHud.conf".text = ''
time
fps
gpu_stats
gpu_temp
vram
cpu_stats
cpu_temp
ram
frame_timing
battery_icon
gamepad_battery_icon
horizontal
horizontal_stretch=0
legacy_layout=0
background_alpha=0.6
position=top-left
control=mangohud
offset_x=4
offset_y=4
table_columns=20
time_format=%H:%M
toggle_hud=End
core_load_change
cpu_color=ffffff
cpu_load_change
cpu_load_color=FFFFFF,FFAA7F,CC0000
cpu_load_value=50,90
cpu_text=CPU
gpu_color=ffffff
gpu_load_change
gpu_load_color=FFFFFF,FFAA7F,CC0000
gpu_load_value=50,90
gpu_text=GPU
io_color=ffffff
media_player_color=ffffff
ram_color=ffffff
text_color=ffffff
vram_color=ffffff
engine_color=ffffff
frametime_color=ffffff
blacklist=zed,org.wezfurlong.wezterm
'';
".mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json".source =
"${pkgs.plasma-browser-integration}/lib/mozilla/native-messaging-hosts/org.kde.plasma.browser_integration.json";
};
}

View file

@ -5,7 +5,6 @@
enable = true;
extraConfig = ''
local act = wezterm.action
local function get_initial_cols_by_hostname()
local hostname = wezterm.hostname()
@ -20,29 +19,11 @@
return {
disable_default_key_bindings = true,
color_scheme = "Catppuccin Mocha",
font = wezterm.font_with_fallback ({
{family = "Hack Nerd Font", scale = 1},
{family = "Noto Color Emoji", scale = 1},
}),
initial_cols = get_initial_cols_by_hostname(),
initial_rows = 32,
enable_scroll_bar = true,
inactive_pane_hsb = {
saturation = 0.7,
brightness = 0.5
},
use_fancy_tab_bar = true,
window_frame = {
font = wezterm.font_with_fallback ({
{family = "Hack Nerd Font", scale = 1},
{family = "Noto Color Emoji", scale = 1},
}),
active_titlebar_bg = '#303446',
inactive_titlebar_bg = '#303446',
},
hide_tab_bar_if_only_one_tab = true,
show_new_tab_button_in_tab_bar = false,
front_end = "WebGpu",
colors = {
tab_bar = {
background = '#303446',
@ -55,8 +36,20 @@
fg_color = '#9197b0'
},
inactive_tab_edge = '#303062',
new_tab = { bg_color = "#303446", fg_color = "#9197b0", },
new_tab_hover = { bg_color = "#9197b0", fg_color = "#303446", },
},
},
initial_cols = get_initial_cols_by_hostname(),
initial_rows = 32,
enable_scroll_bar = true,
inactive_pane_hsb = {
saturation = 0.7,
brightness = 0.5
},
hide_tab_bar_if_only_one_tab = false,
show_new_tab_button_in_tab_bar = true,
front_end = "WebGpu",
keys = {
{ key = 'Tab', mods = 'CTRL', action = act.ActivateTabRelative(1) },
{ key = 'Tab', mods = 'SHIFT|CTRL', action = act.ActivateTabRelative(-1) },