introduce stylix

feature/nixinite
Ingolf Wagner 2023-06-30 17:28:17 +02:00
parent f47eb1017d
commit 5675dc8b64
Signed by: palo
GPG Key ID: 76BF5F1928B9618B
7 changed files with 204 additions and 322 deletions

View File

@ -2,8 +2,8 @@
"nodes": {
"barcode-reader": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1636602745,
@ -19,23 +19,24 @@
"type": "github"
}
},
"deploy-rs": {
"base16": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": "nixpkgs",
"utils": "utils"
"nixpkgs": [
"stylix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1686747123,
"narHash": "sha256-XUQK9kwHpTeilHoad7L4LjMCCyY13Oq383CoFADecRE=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "724463b5a94daa810abfc64a4f87faef4e00f984",
"lastModified": 1658847131,
"narHash": "sha256-X6Mml7cT0YR3WCD5fkUhpRVV5ZPcwdcDsND8r8xMqTE=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "6b404cda2e04ca3cf5ca7b877af9c469e1386acb",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"owner": "SenchoPens",
"repo": "base16.nix",
"type": "github"
}
},
@ -59,6 +60,27 @@
"type": "github"
}
},
"dns": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1635273082,
"narHash": "sha256-EHiDP2jEa7Ai5ZwIf5uld9RVFcV77+2SUxjQXwJsJa0=",
"owner": "kirelagin",
"repo": "dns.nix",
"rev": "c7b9645da9c0ddce4f9de4ef27ec01bb8108039a",
"type": "github"
},
"original": {
"owner": "kirelagin",
"repo": "dns.nix",
"type": "github"
}
},
"doom-emacs": {
"flake": false,
"locked": {
@ -88,8 +110,8 @@
"evil-org-mode": "evil-org-mode",
"evil-quick-diff": "evil-quick-diff",
"explain-pause-mode": "explain-pause-mode",
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils_2",
"format-all": "format-all",
"nix-straight": "nix-straight",
"nixpkgs": [
@ -307,11 +329,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
@ -337,6 +359,21 @@
}
},
"flake-utils": {
"locked": {
"lastModified": 1614513358,
"narHash": "sha256-LakhOx3S1dRjnh0b5Dg3mbZyH0ToC9I8Y2wKSkBaTzU=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5466c5bbece17adaab2d82fae80b46e807611bf3",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
@ -354,7 +391,7 @@
"type": "github"
}
},
"flake-utils_2": {
"flake-utils_3": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
@ -369,7 +406,7 @@
"type": "github"
}
},
"flake-utils_3": {
"flake-utils_4": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
@ -384,7 +421,7 @@
"type": "github"
}
},
"flake-utils_4": {
"flake-utils_5": {
"locked": {
"lastModified": 1637014545,
"narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=",
@ -399,7 +436,7 @@
"type": "github"
}
},
"flake-utils_5": {
"flake-utils_6": {
"locked": {
"lastModified": 1631561581,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=",
@ -493,6 +530,28 @@
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"stylix",
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1680000368,
"narHash": "sha256-TlgC4IJ7aotynUdkGRtaAVxquaiddO38Ws89nB7VGY8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "765e4007b6f9f111469a25d1df6540e8e0ca73a6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"kmonad": {
"inputs": {
"nixpkgs": [
@ -517,8 +576,8 @@
},
"landingpage": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3"
"flake-utils": "flake-utils_4",
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1669559123,
@ -552,7 +611,7 @@
},
"nixinate": {
"inputs": {
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1671116920,
@ -585,16 +644,15 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1671417167,
"narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
"owner": "NixOS",
"lastModified": 1636416043,
"narHash": "sha256-Esz9X97OeAsNoJUVuqlCu2LDWcyLE24huUonhOY3JGw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
"rev": "db6044d5debaff0749420c3553d1b89fc6c5c5f8",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
@ -602,7 +660,7 @@
"nixpkgs-fmt": {
"inputs": {
"fenix": "fenix",
"flake-utils": "flake-utils_4",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"nixpkgs"
]
@ -702,21 +760,6 @@
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1636416043,
"narHash": "sha256-Esz9X97OeAsNoJUVuqlCu2LDWcyLE24huUonhOY3JGw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "db6044d5debaff0749420c3553d1b89fc6c5c5f8",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1645527175,
"narHash": "sha256-WeewqaO48sCctiN+iwgZZEJRU29Si7vHHoLCINAvuk8=",
@ -731,7 +774,7 @@
"type": "github"
}
},
"nixpkgs_4": {
"nixpkgs_3": {
"locked": {
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
@ -747,7 +790,7 @@
"type": "github"
}
},
"nixpkgs_5": {
"nixpkgs_4": {
"locked": {
"lastModified": 1687829761,
"narHash": "sha256-QRe1Y8SS3M4GeC58F/6ajz6V0ZLUVWX3ZAMgov2N3/g=",
@ -763,7 +806,7 @@
"type": "github"
}
},
"nixpkgs_6": {
"nixpkgs_5": {
"locked": {
"lastModified": 1632855891,
"narHash": "sha256-crW76mt9/kbUBiKy/KiSnsQ9JEYgD3StDuYAMVkTbM0=",
@ -777,7 +820,7 @@
"type": "indirect"
}
},
"nixpkgs_7": {
"nixpkgs_6": {
"locked": {
"lastModified": 1686979235,
"narHash": "sha256-gBlBtk+KrezFkfMrZw6uwTuA7YWtbFciiS14mEoTCo0=",
@ -793,6 +836,22 @@
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1679793451,
"narHash": "sha256-JafTtgMDATE8dZOImBhWMA9RCn9AP8FVOpN+9K/tTlg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cd51a933d91078775b300cf0f29aa3495231aa2",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nose": {
"flake": false,
"locked": {
@ -911,8 +970,8 @@
},
"polygon-art": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_6"
"flake-utils": "flake-utils_6",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1632864714,
@ -977,8 +1036,8 @@
},
"root": {
"inputs": {
"deploy-rs": "deploy-rs",
"disko": "disko",
"dns": "dns",
"doom-emacs-nix": "doom-emacs-nix",
"emacs-overlay": "emacs-overlay_2",
"grocy-scanner": "grocy-scanner",
@ -988,7 +1047,7 @@
"landingpage": "landingpage",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_5",
"nixpkgs": "nixpkgs_4",
"nixpkgs-fmt": "nixpkgs-fmt",
"nixpkgs-legacy_2105": "nixpkgs-legacy_2105",
"nixpkgs-legacy_2205": "nixpkgs-legacy_2205",
@ -999,7 +1058,8 @@
"private_assets": "private_assets",
"retiolum": "retiolum",
"secrets": "secrets",
"sops-nix": "sops-nix"
"sops-nix": "sops-nix",
"stylix": "stylix"
}
},
"rotate-text": {
@ -1070,7 +1130,7 @@
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_7",
"nixpkgs": "nixpkgs_6",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
@ -1087,6 +1147,27 @@
"type": "github"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"flake-compat": "flake-compat_2",
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1687876430,
"narHash": "sha256-c1fXtnyQNm9HQ74NSsrvTi1ZrbRpIyIRrR2+4Ozg2j0=",
"owner": "danth",
"repo": "stylix",
"rev": "7dfce721b923549a773bf32c16515ebf1a509dae",
"type": "github"
},
"original": {
"owner": "danth",
"repo": "stylix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
@ -1120,11 +1201,11 @@
},
"utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"lastModified": 1676283394,
"narHash": "sha256-XX2f9c3iySLCw54rJ/CZs+ZK6IQy7GXNY4nSOyu2QG4=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
"type": "github"
},
"original": {

View File

@ -66,22 +66,20 @@
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
#dns = {
# url = "github:kirelagin/dns.nix";
# inputs.nixpkgs.follows = "nixpkgs";
#};
dns = {
url = "github:kirelagin/dns.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixinate.url = "github:matthewcroughan/nixinate";
# For accessing `deploy-rs`'s utility Nix functions
deploy-rs.url = "github:serokell/deploy-rs";
stylix.url = "github:danth/stylix";
};
outputs =
{ self
, disko
#, dns
, deploy-rs
, dns
, stylix
, doom-emacs-nix
, emacs-overlay
, grocy-scanner
@ -220,14 +218,38 @@
}
];
homeManagerModules = {
imports = [ home-manager.nixosModules.home-manager ];
homeManagerModules = {config, ... }: {
imports = [
home-manager.nixosModules.home-manager
# stylix.nixosModules.stylix
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.mainUser.imports = [
doom-emacs-nix.hmModule
home-manager-utils.hmModule
];
home-manager.users.mainUser = {
imports = [
doom-emacs-nix.hmModule
home-manager-utils.hmModule
stylix.homeManagerModules.stylix
];
stylix.image = ./nixos/assets/wallpaper.png;
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-medium.yaml";
programs.i3status-rust.bars.my = {
icons = "awesome5";
theme = "gruvbox-light";
};
stylix.fonts = {
serif = config.home-manager.users.mainUser.stylix.fonts.monospace;
sansSerif = config.home-manager.users.mainUser.stylix.fonts.monospace;
monospace = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
};
sopsModule = name: { lib, ... }: {
@ -263,7 +285,6 @@
(filterAttrs
(n: hasAttrByPath [ "config" "system" "build" "sdImage" ])
self.nixosConfigurations);
in
vms // sds;
};

BIN
nixos/assets/wallpaper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

View File

@ -7,7 +7,6 @@
enable = true;
settings = {
global = {
font = "JetBrains Mono";
# Allow a small subset of html markup:
# <b>bold</b>
# <i>italic</i>
@ -136,32 +135,15 @@
# Horizontal padding.
horizontal_padding = 1;
# Define a color for the separator.
# possible values are:
# * auto: dunst tries to find a color fitting to the background;
# * foreground: use the same color as the foreground;
# * frame: use the same color as the frame;
# * anything else will be interpreted as a X color.
separator_color = "frame";
# Print a notification on startup.
# This is mainly for error detection, since dbus (re-)starts dunst
# automatically after a crash.
startup_notification = true;
# dmenu path.
#dmenu = "${pkgs.dmenu}/bin/dmenu -p dunst:";
# Browser for opening urls in context menu.
# browser = /usr/bin/firefox -new-tab
# Align icons left/right/off
icon_position = "off";
max_icon_size = 80;
frame_width = 2;
frame_color = "#8EC07C";
};
shortcuts = {
@ -184,83 +166,7 @@
# Context menu.
context = "mod4+u";
};
urgency_low = {
frame_color = "#268bd2";
foreground = "#002b36";
background = "#fdf6e3";
#timeout = 1;
};
urgency_normal = {
frame_color = "#b58900";
foreground = "#002b36";
background = "#fdf6e3";
#timeout = 1;
};
urgency_critical = {
frame_color = "#dc322f";
foreground = "#002b36";
background = "#fdf6e3";
#timeout = 1;
};
};
# Every section that isn't one of the above is interpreted as a rules to
# override settings for certain messages.
# Messages can be matched by "appname", "summary", "body", "icon", "category",
# "msg_urgency" and you can override the "timeout", "urgency", "foreground",
# "background", "new_icon" and "format".
# Shell-like globbing will get expanded.
#
# SCRIPTING
# You can specify a script that gets run when the rule matches by
# setting the "script" option.
# The script will be called as follows:
# script appname summary body icon urgency
# where urgency can be "LOW", "NORMAL" or "CRITICAL".
#
# NOTE: if you don't want a notification to be displayed, set the format
# to "".
# NOTE: It might be helpful to run dunst -print in a terminal in order
# to find fitting options for rules.
#[espeak]
# summary = "*"
# script = dunst_espeak.sh
#[script-test]
# summary = "*script*"
# script = dunst_test.sh
#[ignore]
# # This notification will not be displayed
# summary = "foobar"
# format = ""
#[signed_on]
# appname = Pidgin
# summary = "*signed on*"
# urgency = low
#
#[signed_off]
# appname = Pidgin
# summary = *signed off*
# urgency = low
#
#[says]
# appname = Pidgin
# summary = *says*
# urgency = critical
#
#[twitter]
# appname = Pidgin
# summary = *twitter.com*
# urgency = normal
#
# vim: ft=cfg
};
};
};

View File

@ -2,14 +2,6 @@
let
cfg = config.home-manager.users.mainUser.xsession.windowManager.i3;
colorTheme =
let
theme = (import ../../../library/colorThemes.nix).solarized.light.hex;
in
theme // {
foreground = theme.base3;
background = theme.base03;
};
backgroundCommand = pkgs.writers.writeDash "background" ''
${pkgs.xorg.xrandr}/bin/xrandr | grep " connected" | grep "primary" | \
@ -33,13 +25,10 @@ in
{
config = lib.mkIf config.components.gui.enable {
home-manager.users.mainUser = {
programs.i3status-rust = {
enable = true;
bars = {
my = {
icons = "awesome5";
theme = "solarized-light";
# https://github.com/greshake/i3status-rust/blob/v0.22.0/doc/blocks.md
blocks = [
{
@ -66,7 +55,7 @@ in
{
block = "taskwarrior";
interval = 60;
format = " $icon $count.eng(w:1) tasks ";
format = " $icon $count.eng(w:3) tasks ";
format_singular = " $icon 1 task ";
format_everything_done = "";
warning_threshold = 10;
@ -91,50 +80,12 @@ in
];
};
};
};
programs.kitty = {
enable = true;
# kitty +kitten themes
theme = "Gruvbox Light Hard";
settings = {
font_family = "JetBrains Mono";
bold_font = "auto";
italic_font = "auto";
bold_italic_font = "auto";
font_size = 11;
};
};
programs.alacritty = {
enable = true;
settings = {
import =
let
themes = pkgs.fetchFromGitHub {
owner = "alacritty";
repo = "alacritty-theme";
rev = "024c5c0dfb65197d5796e29e307b321af9a5e198";
sha256 = "sha256-zXyGXZSmmTup5o7Dx6he+57vSFpygR+GSD+3PTxDbVk=";
};
in
[ "${themes}/themes/gruvbox_light.yaml" ];
font = {
normal = {
family = "JetBrains Mono";
style = "Regular";
};
bold = {
family = "JetBrains Mono";
style = "Bold";
};
italic = {
family = "JetBrains Mono";
style = "Italic";
};
size = 6.0;
};
font.size = lib.mkForce 7.0;
};
};
@ -170,105 +121,26 @@ in
'');
always = true;
}
# { command = "${pkgs.wireplumber}/bin/wireplumber"; always = true; }
# { command = "systemctl --user restart polybar"; always = true; notification = false; }
# todo : still needed?
# home.file.".xprofile".text = ''
# # todo : only allow the browsers and rambox access
#
# ${pkgs.flameshot}/bin/flameshot &
# # cleanup xmonad
# rm -f ~/.xmonad/xmonad.state
# '';
];
fonts = {
names = [ "JetBrains Mono" ];
size = 11.0;
};
bars =
with colorTheme;
let
selected = blue;
in
[{
bars = [
({
#mode = "hide";
hiddenState = "hide";
position = "top";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${config.users.users.mainUser.home}/.config/i3status-rust/config-my.toml";
fonts = {
names = [ "JetBrains Mono" ];
size = 11.0;
};
#fonts = {
# names = [ "JetBrains Mono" ];
# size = 11.0;
#};
trayOutput = "primary";
colors = {
background = background;
statusline = background;
separator = background;
focusedWorkspace = {
border = selected;
background = base02;
text = foreground;
};
activeWorkspace = {
border = background;
background = base02;
text = foreground;
};
inactiveWorkspace = {
border = background;
background = base02;
text = foreground;
};
urgentWorkspace = {
border = red;
background = base02;
text = foreground;
};
bindingMode = {
border = red;
background = red;
text = background;
};
};
}];
colors = with colorTheme; {
background = background;
focused = {
background = blue;
border = blue;
childBorder = blue;
indicator = blue;
text = foreground;
};
focusedInactive = {
background = base01;
border = base01;
childBorder = base02;
indicator = base02;
text = foreground;
};
unfocused = {
background = base02;
border = base02;
childBorder = base02;
indicator = base02;
text = foreground;
};
urgent = {
background = orange;
border = orange;
childBorder = background;
indicator = background;
text = foreground;
};
};
} // config.home-manager.users.mainUser.lib.stylix.i3.bar)
];
keybindings = {
"Print" = "exec ${pkgs.flameshot}/bin/flameshot gui -c -p /share/";

View File

@ -23,6 +23,8 @@
./trilium.nix
];
# stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-light-hard.yaml";
users.users.mainUser.extraGroups = [ "pipewire" ];
components.gui.enable = true;

View File

@ -32,19 +32,19 @@ in
fontDir.enable = true;
# todo brauch ich überhaupt die urxvt und xterm configurationen?
fontconfig = {
subpixel = {
lcdfilter = "default";
rgba = "rgb";
};
hinting = {
enable = true;
autohint = false;
};
enable = true;
antialias = true;
defaultFonts = { monospace = [ "JetBrains Mono" ]; };
};
#fontconfig = {
# subpixel = {
# lcdfilter = "default";
# rgba = "rgb";
# };
# hinting = {
# enable = true;
# autohint = false;
# };
# enable = true;
# antialias = true;
# defaultFonts = { monospace = [ "JetBrains Mono" ]; };
#};
fonts = with pkgs; [
@ -57,7 +57,7 @@ in
# symbol fonts
# ------------
# nerdfonts
nerdfonts
powerline-fonts
font-awesome
fira-code-symbols