diff --git a/flake.lock b/flake.lock index c1f2282..b405d1e 100644 --- a/flake.lock +++ b/flake.lock @@ -58,19 +58,24 @@ "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" } }, @@ -166,6 +171,28 @@ "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": { @@ -475,6 +502,22 @@ "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" + } + }, "flake-parts": { "inputs": { "nixpkgs": "nixpkgs" @@ -814,25 +857,6 @@ "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": { @@ -969,21 +993,6 @@ "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": { @@ -1174,13 +1183,13 @@ "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": { @@ -1285,6 +1294,32 @@ "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": { @@ -1316,6 +1351,21 @@ "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": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c15c51b..f483406 100644 --- a/flake.nix +++ b/flake.nix @@ -34,6 +34,10 @@ 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"; @@ -42,7 +46,6 @@ # 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; }; diff --git a/modules/de/greetd/default.nix b/modules/de/greetd/default.nix index 08616cc..533a76f 100644 --- a/modules/de/greetd/default.nix +++ b/modules/de/greetd/default.nix @@ -4,7 +4,7 @@ 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"; }; }; diff --git a/users/modules/colors/default.nix b/users/modules/colors/default.nix deleted file mode 100644 index e4781e5..0000000 --- a/users/modules/colors/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{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; - }; - }; - }; -} diff --git a/users/modules/dunst/default.nix b/users/modules/dunst/default.nix index f7d07a2..f225715 100644 --- a/users/modules/dunst/default.nix +++ b/users/modules/dunst/default.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - ... -}: let - x = config.colors.x; -in { +{config, ...}: { # notification daemon services.dunst = { enable = true; @@ -14,7 +8,6 @@ in { alignment = "center"; corner_radius = 16; follow = "mouse"; - font = config.settings.font.regular.fullName; format = "%s\\n%b"; frame_width = 1; offset = "5x5"; @@ -28,7 +21,6 @@ in { mouse_right_click = "close_current"; padding = 8; plain_text = "no"; - separator_color = "auto"; separator_height = 1; show_indicators = false; shrink = "no"; @@ -36,22 +28,6 @@ in { }; 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; - }; }; }; } diff --git a/users/modules/foot/default.nix b/users/modules/foot/default.nix index 8b21e4c..8e41e4d 100644 --- a/users/modules/foot/default.nix +++ b/users/modules/foot/default.nix @@ -1,5 +1,5 @@ { - config, + lib, pkgs, ... }: { @@ -9,31 +9,6 @@ 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"; }; } diff --git a/users/modules/fzf/default.nix b/users/modules/fzf/default.nix index 3ae5be1..f6b724a 100644 --- a/users/modules/fzf/default.nix +++ b/users/modules/fzf/default.nix @@ -1,6 +1,6 @@ {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"; + # }; } diff --git a/users/modules/helix/default.nix b/users/modules/helix/default.nix index f164cbc..41bbbab 100644 --- a/users/modules/helix/default.nix +++ b/users/modules/helix/default.nix @@ -21,7 +21,6 @@ } ]; settings = { - theme = "catppuccin_mocha"; editor = { line-number = "relative"; middle-click-paste = false; diff --git a/users/modules/mako/default.nix b/users/modules/mako/default.nix index 4b27c50..36a6e47 100644 --- a/users/modules/mako/default.nix +++ b/users/modules/mako/default.nix @@ -1,18 +1,7 @@ -{ - 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"; - } - ); }; } diff --git a/users/modules/rofi/default.nix b/users/modules/rofi/default.nix index a0e0700..7cb6835 100644 --- a/users/modules/rofi/default.nix +++ b/users/modules/rofi/default.nix @@ -1,120 +1,6 @@ -{ - 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; }; } diff --git a/users/modules/settings/default.nix b/users/modules/settings/default.nix index 91c4aed..3b660d7 100644 --- a/users/modules/settings/default.nix +++ b/users/modules/settings/default.nix @@ -6,21 +6,6 @@ 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 = { @@ -39,15 +24,9 @@ in { 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; }; } diff --git a/users/modules/sway/default.nix b/users/modules/sway/default.nix index bf442a2..40f1f0c 100644 --- a/users/modules/sway/default.nix +++ b/users/modules/sway/default.nix @@ -30,10 +30,6 @@ 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"]; @@ -102,7 +98,7 @@ }; output = { "*" = { - bg = "${config.home.homeDirectory}/.config/wallpaper fill"; + bg = "${config.stylix.image} fill"; # adaptive_sync = "on"; }; "eDP-1" = { diff --git a/users/modules/swaylock/default.nix b/users/modules/swaylock/default.nix index d963e54..9d47982 100644 --- a/users/modules/swaylock/default.nix +++ b/users/modules/swaylock/default.nix @@ -1,8 +1,4 @@ -{ - config, - pkgs, - ... -}: { +{pkgs, ...}: { home.packages = [pkgs.swaylock-effects]; programs.swaylock.settings = { @@ -12,6 +8,5 @@ effect-scale = "0.5"; effect-greyscale = true; effect-blur = "20x3"; - font = config.settings.font.regular.name; }; } diff --git a/users/patriot/colors.nix b/users/patriot/colors.nix deleted file mode 100644 index b6a7f59..0000000 --- a/users/patriot/colors.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - 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;}; -} diff --git a/users/patriot/default.nix b/users/patriot/default.nix index ee9bd8d..2afdc0b 100644 --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -3,14 +3,14 @@ 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; @@ -114,7 +114,6 @@ in { ]; in l.flatten [ - ./colors.nix ../../modules/persist inputs.nixos-persistence.nixosModules.home-manager.impermanence (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) @@ -159,16 +158,6 @@ in { }; 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"; @@ -183,22 +172,20 @@ in { x11.enable = true; }; - gtk = { - enable = true; + # gtk = { + # enable = true; - font = { - inherit (config.settings.font.regular) name package; - }; + # font = { + # inherit (config.settings.font.regular) name package; + # }; - gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; + # gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; - iconTheme = config.settings.iconTheme; - - theme = { - name = "Yaru-dark"; - package = pkgs.yaru-theme; - }; - }; + # theme = { + # name = "Yaru-dark"; + # package = pkgs.yaru-theme; + # }; + # }; home = { homeDirectory = nixosConfig.users.users.patriot.home; diff --git a/users/patriot/stylix.nix b/users/patriot/stylix.nix new file mode 100644 index 0000000..c4be3c3 --- /dev/null +++ b/users/patriot/stylix.nix @@ -0,0 +1,28 @@ +{ + 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; + }; +} diff --git a/users/patriot/wallpaper.png b/users/patriot/wallpaper.png new file mode 100644 index 0000000..d7f0610 Binary files /dev/null and b/users/patriot/wallpaper.png differ