nix machine / user configurations

use stylix

Changed files
+155 -344
modules
de
greetd
users
+95 -45
flake.lock
···
"type": "github"
}
},
-
"base16-schemes": {
-
"flake": false,
+
"base16": {
+
"inputs": {
+
"nixpkgs": [
+
"stylix",
+
"nixpkgs"
+
]
+
},
"locked": {
-
"lastModified": 1665690101,
-
"narHash": "sha256-J2ZvNaVFkqaTXzYO5L+jyRORfIOavFPKvWItP6UTMKs=",
-
"owner": "tinted-theming",
-
"repo": "base16-schemes",
-
"rev": "a3dc916cf90471a422c0bfe1bb4b1bdd12185ced",
+
"lastModified": 1658847131,
+
"narHash": "sha256-X6Mml7cT0YR3WCD5fkUhpRVV5ZPcwdcDsND8r8xMqTE=",
+
"owner": "SenchoPens",
+
"repo": "base16.nix",
+
"rev": "6b404cda2e04ca3cf5ca7b877af9c469e1386acb",
"type": "github"
},
"original": {
-
"owner": "tinted-theming",
-
"repo": "base16-schemes",
+
"owner": "SenchoPens",
+
"repo": "base16.nix",
"type": "github"
}
},
···
"type": "gitlab"
}
},
+
"coricamu": {
+
"inputs": {
+
"nixpkgs": [
+
"stylix",
+
"nixpkgs"
+
],
+
"utils": "utils_2"
+
},
+
"locked": {
+
"lastModified": 1677749800,
+
"narHash": "sha256-xIqxDr4fkOA5R4OudbQoUMS8xvPJNCyGfqugENutSP4=",
+
"owner": "danth",
+
"repo": "coricamu",
+
"rev": "40db414609dc6d72319987d3e9d7b56fe405c28f",
+
"type": "github"
+
},
+
"original": {
+
"owner": "danth",
+
"repo": "coricamu",
+
"type": "github"
+
}
+
},
"crane": {
"flake": false,
"locked": {
···
"original": {
"owner": "nix-community",
"repo": "fenix",
+
"type": "github"
+
}
+
},
+
"flake-compat": {
+
"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"
}
},
···
"type": "github"
}
},
-
"nix-colors": {
-
"inputs": {
-
"base16-schemes": "base16-schemes",
-
"nixpkgs-lib": "nixpkgs-lib_4"
-
},
-
"locked": {
-
"lastModified": 1672236234,
-
"narHash": "sha256-dpBIuxcDEvJbLD8fTipE0A0JbQD1lZB94zYFPoh01PI=",
-
"owner": "Misterio77",
-
"repo": "nix-colors",
-
"rev": "7e459f1d88ac54fc2f4b308adb5064863006e4b1",
-
"type": "github"
-
},
-
"original": {
-
"owner": "Misterio77",
-
"repo": "nix-colors",
-
"type": "github"
-
}
-
},
"nix-pypi-fetcher": {
"flake": false,
"locked": {
···
"type": "github"
}
},
-
"nixpkgs-lib_4": {
-
"locked": {
-
"lastModified": 1655599917,
-
"narHash": "sha256-kjZbt5WdTrnjMxL79okg9TCoRUdADG50x/TWozbyTsE=",
-
"owner": "nix-community",
-
"repo": "nixpkgs.lib",
-
"rev": "5fb55578aa2f1a502d636a8ac71aece57cb730bb",
-
"type": "github"
-
},
-
"original": {
-
"owner": "nix-community",
-
"repo": "nixpkgs.lib",
-
"type": "github"
-
}
-
},
"nixpkgs-wayland": {
"flake": false,
"locked": {
···
"helix": "helix",
"home": "home",
"nil": "nil",
-
"nix-colors": "nix-colors",
"nixinate": "nixinate",
"nixos-hardware": "nixos-hardware",
"nixos-persistence": "nixos-persistence",
"nixpkgs": "nixpkgs_4",
"nixpkgs-wayland": "nixpkgs-wayland",
-
"nur": "nur"
+
"nur": "nur",
+
"stylix": "stylix"
},
"rust-analyzer-src": {
···
"type": "github"
},
+
"stylix": {
+
"inputs": {
+
"base16": "base16",
+
"coricamu": "coricamu",
+
"flake-compat": "flake-compat",
+
"home-manager": [
+
"home"
+
],
+
"nixpkgs": [
+
"nixpkgs"
+
]
+
},
+
"locked": {
+
"lastModified": 1679594819,
+
"narHash": "sha256-DQ36Qh6mTr8qGS1F4SSzsI0VEmaNspEO5BTy723m2Lo=",
+
"owner": "danth",
+
"repo": "stylix",
+
"rev": "5887b5381626d27f40d0ca4813388ac619913b87",
+
"type": "github"
+
},
+
"original": {
+
"owner": "danth",
+
"repo": "stylix",
+
"type": "github"
+
}
+
},
"tailwind": {
"flake": false,
"locked": {
···
"owner": "numtide",
"repo": "flake-utils",
"rev": "3db36a8b464d0c4532ba1c7dda728f4576d6d073",
+
"type": "github"
+
},
+
"original": {
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"type": "github"
+
}
+
},
+
"utils_2": {
+
"locked": {
+
"lastModified": 1642700792,
+
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
+
"owner": "numtide",
+
"repo": "flake-utils",
+
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
+4 -1
flake.nix
···
nil.url = "github:oxalica/nil";
nil.inputs.nixpkgs.follows = "nixpkgs";
+
stylix.url = "github:danth/stylix";
+
stylix.inputs.nixpkgs.follows = "nixpkgs";
+
stylix.inputs.home-manager.follows = "home";
+
# needed for hyprland setup
# hyprland.url = "github:hyprwm/Hyprland";
# hyprland.inputs.nixpkgs.follows = "nixpkgs";
···
# eww.url = "github:elkowar/eww";
# eww.inputs.nixpkgs.follows = "nixpkgs";
-
nix-colors.url = "github:Misterio77/nix-colors";
# catppuccin-discord.url = "https://catppuccin.github.io/discord/dist/catppuccin-mocha.theme.css";
# catppuccin-discord.flake = false;
};
+1 -1
modules/de/greetd/default.nix
···
settings = {
terminal.vt = 1;
default_session = {
-
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --issue --time --cmd 'apply-hm-env Hyprland'";
+
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --issue --time --cmd 'apply-hm-env'";
user = "greeter";
};
};
-27
users/modules/colors/default.nix
···
-
{lib, ...}: let
-
l = lib // builtins;
-
t = l.types;
-
in {
-
options = {
-
colors = {
-
theme = l.mkOption {
-
type = t.str;
-
};
-
base = l.mkOption {
-
type = t.attrsOf t.str;
-
};
-
x = l.mkOption {
-
type = t.attrsOf t.str;
-
};
-
xrgba = l.mkOption {
-
type = t.attrsOf t.str;
-
};
-
xargb = l.mkOption {
-
type = t.attrsOf t.str;
-
};
-
rgba = l.mkOption {
-
type = t.attrsOf t.str;
-
};
-
};
-
};
-
}
+1 -25
users/modules/dunst/default.nix
···
-
{
-
config,
-
pkgs,
-
...
-
}: let
-
x = config.colors.x;
-
in {
+
{config, ...}: {
# notification daemon
services.dunst = {
enable = true;
···
alignment = "center";
corner_radius = 16;
follow = "mouse";
-
font = config.settings.font.regular.fullName;
format = "<b>%s</b>\\n%b";
frame_width = 1;
offset = "5x5";
···
mouse_right_click = "close_current";
padding = 8;
plain_text = "no";
-
separator_color = "auto";
separator_height = 1;
show_indicators = false;
shrink = "no";
···
};
fullscreen_delay_everything = {fullscreen = "delay";};
-
-
urgency_critical = {
-
background = x.base00;
-
foreground = x.base06;
-
frame_color = x.base08;
-
};
-
urgency_low = {
-
background = x.base00;
-
foreground = x.base06;
-
frame_color = x.base05;
-
};
-
urgency_normal = {
-
background = x.base00;
-
foreground = x.base06;
-
frame_color = x.base06;
-
};
};
};
}
+2 -27
users/modules/foot/default.nix
···
{
-
config,
+
lib,
pkgs,
...
}: {
···
enable = true;
package = pkgs.foot;
server.enable = false;
-
settings = {
-
main = {
-
font = "${config.settings.font.monospace.name}:size=${toString config.settings.font.monospace.size}";
-
dpi-aware = "yes";
-
};
-
colors = {
-
foreground = "cdd6f4"; # Text
-
background = "1e1e2e"; # Base
-
regular0 = "45475a"; # Surface 1
-
regular1 = "f38ba8"; # red
-
regular2 = "a6e3a1"; # green
-
regular3 = "f9e2af"; # yellow
-
regular4 = "89b4fa"; # blue
-
regular5 = "f5c2e7"; # pink
-
regular6 = "94e2d5"; # teal
-
regular7 = "bac2de"; # Subtext 1
-
bright0 = "585b70"; # Surface 2
-
bright1 = "f38ba8"; # red
-
bright2 = "a6e3a1"; # green
-
bright3 = "f9e2af"; # yellow
-
bright4 = "89b4fa"; # blue
-
bright5 = "f5c2e7"; # pink
-
bright6 = "94e2d5"; # teal
-
bright7 = "a6adc8"; # Subtext 0
-
};
-
};
+
settings.main.dpi-aware = lib.mkForce "yes";
};
}
+3 -3
users/modules/fzf/default.nix
···
{config, ...}: {
programs.fzf.enable = true;
-
home.sessionVariables = {
-
FZF_DEFAULT_OPTS = "--color=spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD";
-
};
+
# home.sessionVariables = {
+
# FZF_DEFAULT_OPTS = "--color=spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD";
+
# };
}
-1
users/modules/helix/default.nix
···
}
];
settings = {
-
theme = "catppuccin_mocha";
editor = {
line-number = "relative";
middle-click-paste = false;
+1 -12
users/modules/mako/default.nix
···
-
{
-
pkgs,
-
config,
-
...
-
}: {
+
{...}: {
programs.mako = {
enable = true;
anchor = "top-center";
-
font = config.settings.font.regular.fullName;
borderRadius = 16;
-
extraConfig = builtins.readFile (
-
builtins.fetchurl {
-
url = "https://raw.githubusercontent.com/catppuccin/mako/d077d9832e8f22777a4812eadbfb658e793cbdfc/config";
-
sha256 = "sha256:1c8j16ljbnynb5kplxvhg99rw536hbxxz1rl8qgaixdf2bg2awp0";
-
}
-
);
};
}
+4 -118
users/modules/rofi/default.nix
···
-
{
-
pkgs,
-
config,
-
...
-
}: {
-
home.packages = [pkgs.rofi-wayland];
-
xdg.enable = true;
-
xdg.dataFile = {
-
"rofi/themes/catppuccin.rasi".source = builtins.fetchurl {
-
url = "https://raw.githubusercontent.com/catppuccin/rofi/c7c242d6bfd4cabdc9a220cff71e3b0766811fbe/.local/share/rofi/themes/catppuccin.rasi";
-
sha256 = "sha256:17jssby0llsnabzfz3lp4wcc9vdzfz77i5wjcclfcyyvpswc53nx";
-
};
-
};
-
xdg.configFile = {
-
"rofi/config.rasi".text = ''
-
configuration{
-
modi: "drun";
-
lines: 5;
-
font: "${config.settings.font.regular.fullName}";
-
show-icons: true;
-
terminal: "st";
-
drun-display-format: "{icon} {name}";
-
location: 0;
-
disable-history: false;
-
hide-scrollbar: true;
-
display-drun: "  Apps ";
-
display-run: "  Run ";
-
display-window: " 﩯 Window";
-
display-Network: " 󰤨 Network";
-
sidebar-mode: true;
-
}
-
-
@theme "catppuccin"
-
-
element-text, element-icon , mode-switcher {
-
background-color: inherit;
-
text-color: inherit;
-
}
-
-
window {
-
height: 40%;
-
width: 40%;
-
border: 3px;
-
border-color: @border-col;
-
background-color: @bg-col;
-
}
-
-
mainbox {
-
background-color: @bg-col;
-
}
-
-
inputbar {
-
children: [prompt,entry];
-
background-color: @bg-col;
-
border-radius: 5px;
-
padding: 2px;
-
}
-
-
prompt {
-
background-color: @blue;
-
padding: 6px;
-
text-color: @bg-col;
-
border-radius: 3px;
-
margin: 20px 0px 0px 20px;
-
}
-
-
textbox-prompt-colon {
-
expand: false;
-
str: ":";
-
}
-
-
entry {
-
padding: 6px;
-
margin: 20px 0px 0px 10px;
-
text-color: @fg-col;
-
background-color: @bg-col;
-
}
-
-
listview {
-
border: 0px 0px 0px;
-
padding: 6px 0px 0px;
-
margin: 10px 0px 0px 20px;
-
columns: 2;
-
background-color: @bg-col;
-
}
-
-
element {
-
padding: 5px;
-
background-color: @bg-col;
-
text-color: @fg-col ;
-
}
-
-
element-icon {
-
size: 25px;
-
}
-
-
element selected {
-
background-color: @selected-col ;
-
text-color: @fg-col2 ;
-
}
-
-
mode-switcher {
-
spacing: 0;
-
}
-
-
button {
-
padding: 10px;
-
background-color: @bg-col-light;
-
text-color: @grey;
-
vertical-align: 0.5;
-
horizontal-align: 0.5;
-
}
-
-
button selected {
-
background-color: @bg-col;
-
text-color: @blue;
-
}
-
'';
+
{pkgs, ...}: {
+
programs.rofi = {
+
enable = true;
+
package = pkgs.rofi-wayland;
};
}
+1 -22
users/modules/settings/default.nix
···
l = lib // builtins;
t = l.types;
cfg = config.settings;
-
fontSettings = {
-
name = l.mkOption {
-
type = t.str;
-
};
-
package = l.mkOption {
-
type = t.package;
-
};
-
size = l.mkOption {
-
type = t.ints.unsigned;
-
};
-
fullName = l.mkOption {
-
type = t.str;
-
readOnly = true;
-
};
-
};
in {
options = {
settings.iconTheme = {
···
type = t.path;
};
};
-
settings.font = {
-
regular = fontSettings;
-
monospace = fontSettings;
-
};
};
config = {
-
home.packages = [cfg.font.regular.package cfg.font.monospace.package];
-
settings.font.regular.fullName = "${cfg.font.regular.name} ${toString cfg.font.regular.size}";
-
settings.font.monospace.fullName = "${cfg.font.monospace.name} ${toString cfg.font.monospace.size}";
+
gtk.iconTheme = cfg.iconTheme;
};
}
+1 -5
users/modules/sway/default.nix
···
exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
'';
config = {
-
fonts = {
-
names = [config.settings.font.regular.name];
-
size = config.settings.font.regular.size + 0.0;
-
};
bars = [];
gaps.smartBorders = "on";
menu = mkRofiCmd ["-show" "drun"];
···
};
output = {
"*" = {
-
bg = "${config.home.homeDirectory}/.config/wallpaper fill";
+
bg = "${config.stylix.image} fill";
# adaptive_sync = "on";
};
"eDP-1" = {
+1 -6
users/modules/swaylock/default.nix
···
-
{
-
config,
-
pkgs,
-
...
-
}: {
+
{pkgs, ...}: {
home.packages = [pkgs.swaylock-effects];
programs.swaylock.settings = {
···
effect-scale = "0.5";
effect-greyscale = true;
effect-blur = "20x3";
-
font = config.settings.font.regular.name;
};
}
-25
users/patriot/colors.nix
···
-
{
-
lib,
-
tlib,
-
inputs,
-
...
-
}: let
-
l = lib;
-
theme = "catppuccin";
-
colors = with tlib.colors; let
-
baseColors = inputs.nix-colors.colorSchemes.${theme}.colors;
-
in {
-
base = baseColors;
-
# #RRGGBB
-
x = l.mapAttrs (_: x) baseColors;
-
# #RRGGBBAA
-
xrgba = l.mapAttrs (_: xrgba) baseColors;
-
# #AARRGGBB
-
xargb = l.mapAttrs (_: xargb) baseColors;
-
# rgba(,,,) colors (css)
-
rgba = l.mapAttrs (_: rgba) baseColors;
-
};
-
in {
-
imports = [../modules/colors];
-
config.colors = colors // {inherit theme;};
-
}
+13 -26
users/patriot/default.nix
···
lib,
tlib,
config,
-
inputs,
...
} @ globalAttrs: let
l = lib // builtins;
nixosConfig = globalAttrs.config;
in {
-
# imports = [../../modules/de/gnome];
+
imports = [./stylix.nix];
+
users.users.patriot = {
isNormalUser = true;
createHome = true;
···
];
in
l.flatten [
-
./colors.nix
../../modules/persist
inputs.nixos-persistence.nixosModules.home-manager.impermanence
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
···
};
fonts.fontconfig.enable = l.mkForce true;
-
settings.font.regular = {
-
name = "Comic Relief";
-
size = 13;
-
package = pkgs.comic-relief;
-
};
-
settings.font.monospace = {
-
name = "Comic Mono";
-
size = 13;
-
package = pkgs.comic-mono;
-
};
settings.iconTheme = {
name = "Yaru-dark";
···
x11.enable = true;
};
-
gtk = {
-
enable = true;
-
-
font = {
-
inherit (config.settings.font.regular) name package;
-
};
+
# gtk = {
+
# enable = true;
-
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
+
# font = {
+
# inherit (config.settings.font.regular) name package;
+
# };
-
iconTheme = config.settings.iconTheme;
+
# gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
-
theme = {
-
name = "Yaru-dark";
-
package = pkgs.yaru-theme;
-
};
-
};
+
# theme = {
+
# name = "Yaru-dark";
+
# package = pkgs.yaru-theme;
+
# };
+
# };
home = {
homeDirectory = nixosConfig.users.users.patriot.home;
+28
users/patriot/stylix.nix
···
+
{
+
inputs,
+
config,
+
pkgs,
+
...
+
}: {
+
imports = [inputs.stylix.nixosModules.stylix];
+
+
stylix.image = ./wallpaper.png;
+
stylix.polarity = "dark";
+
+
stylix.fonts = {
+
serif = {
+
name = "Comic Relief";
+
package = pkgs.comic-relief;
+
};
+
sansSerif = config.stylix.fonts.serif;
+
monospace = {
+
name = "Comic Mono";
+
package = pkgs.comic-mono;
+
};
+
};
+
+
stylix.fonts.sizes = {
+
popups = 13;
+
terminal = 13;
+
};
+
}
users/patriot/wallpaper.png

This is a binary file and will not be displayed.