GithubHelp home page GithubHelp logo

catppuccin / nix Goto Github PK

View Code? Open in Web Editor NEW
312.0 6.0 45.0 1.93 MB

❄️ Soothing pastel theme for Nix

Home Page: https://nix.catppuccin.com/

License: MIT License

Nix 99.02% Shell 0.98%
catppuccin home-manager nix nix-flake nixos theme

nix's Introduction

Logo
Catppuccin for Nix

Previews

🌻 Latte
🪴 Frappé
🌺 Macchiato
🌿 Mocha

Usage

You will probably want to see our Getting started guide, but as a TLDR:

  1. Import the NixOS and home-manager modules
With Flakes
{
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";
    catppuccin.url = "github:catppuccin/nix";
    home-manager = {
      url = "github:nix-community/home-manager";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };

  outputs = { nixpkgs, catppuccin, home-manager }: {
    # for nixos module home-manager installations
    nixosConfigurations.pepperjacksComputer = pkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        catppuccin.nixosModules.catppuccin
        # if you use home-manager
        home-manager.nixosModules.home-manager

        {
          # if you use home-manager
          home-manager.users.pepperjack = {
            imports = [
              ./home.nix
              catppuccin.homeManagerModules.catppuccin
            ];
          };
        }
      ];
    };

    # for standalone home-manager installations
    homeConfigurations.pepperjack = home-manager.lib.homeManagerConfiguration {
      pkgs = nixpkgs.legacyPackages.x86_64-linux;
      modules = [
        ./home.nix
        catppuccin.homeManagerModules.catppuccin
      ];
    };
  };
}
With Nix Channels
sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
sudo nix-channel --add https://github.com/catppuccin/nix/archive/main.tar.gz catppuccin
sudo nix-channel --update

For NixOS module installations:

{
  imports = [
    <catppuccin/modules/nixos>
    # if you use home-manager
    <home-manager/nixos>
  ];

  # if you use home-manager
  home-manager.users.pepperjack = {
    imports = [
      <catppuccin/modules/home-manager>
    ];
  };
}

For standalone installations

{
  imports = [
    <catppuccin/modules/home-manager>
  ];

  home.username = "pepperjack";
  programs.home-manager.enable = true;
}
  1. Choose your desired flavor with catppuccin.flavor
{
  catppuccin.flavor = "mocha";
}
  1. Enable for supported programs with catppucin.enable = true;
{
  programs.starship = {
    enable = true;
    catppuccin.enable = true;
  };
}
  1. Enable for all available programs you're using!
{
  catppuccin.enable = true;
}

🙋 FAQ

  • Q: "How do I know what programs are supported?"
    A: You can find programs supported through home-manager here, and NixOS modules here

  • Q: "How do I set catppuccin.enable for everything I use?"
    A: You can set catppuccin.enable globally

  • Q: "What versions of NixOS and home-manager are supported?"
    A: We primarily support the unstable branch, but try our best to support the current stable release. You can check if your stable release is currently supported at status.nixos.org

💝 Thanks to

 

Copyright © 2023-present Catppuccin Org

nix's People

Contributors

anomalocaridid avatar c-leri avatar dependabot[bot] avatar drupol avatar eljamm avatar enziokam avatar getchoo avatar github-actions[bot] avatar hamish-mclean avatar henrisota avatar isabelroses avatar liassica avatar lichthagel avatar michaelbelsanti avatar perchunpak avatar pluiedev avatar renovate[bot] avatar ryanccn avatar scrumplex avatar selfuryon avatar sgoudham avatar sophieforrest avatar stonks3141 avatar uncenter avatar vdbe avatar vgskye avatar weathercold avatar xelden avatar xyenon avatar zspher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

nix's Issues

home-manager.users.usn.gtk.catppuccin.flavor' does not exist

I have catppuccin nix included in nix inputs, and inputs being inherited .

{inputs, ...}: {
  imports = [inputs.catppuccin.homeManagerModules.catppuccin];
  xdg.enable = true;
  gtk = {
    enable = true;
    catppuccin = {
      enable = true;
      flavor = "mocha";
      #accent = "pink";
      #size = "standard";
      #tweaks = [ "normal" ];
    };
  };
}

result home-manager.users.usn.gtk.catppuccin.flavor' does not exist

Testing

I'd like to test the output of this module with various configurations, we can probably use some kind of expectation testing.

I'll work on this.

Support Nix Darwin

Would it be something possible to add a module to support nix-darwin system configurations ?

Trying to use catppuccin-nix in a darwin module cause this error (grub isn't a thing in nix-darwin):

error: The option `boot.loader.grub.font' does not exist. Definition values:
       - In `<unknown-file>':
           {
             _type = "if";
             condition = false;
             content = "/nix/store/9dgvl02bvzsadmwsq014r14509bf6fmz-catppuccin-grub-theme/font.pf2";
           }

bat theme not work

bat give me this warning:

[bat warning]: Unknown theme 'Catppuccin-mocha', using default.

SDDM Themeing broke

All i can say for sure is that before the renaming of "flavour" to "flavor" the themeing worked, and after i saw the error being caused by the rename and fixed them, then upgraded it no longer was themed. It looks like the default SDDM Theme, so not the Plasma6 theme or anything, just the default default one.

I will attach a screenshot below, just need to figure out how to do that part.

fix some colours... foot

so i tried your thing in foot and when i ran htop i can't see many text can change colour or anything that can increase the readability of text i tried catppuccin mocha...

(theme name is taribble..)

How to follow updates?

I love the project! I find myself coming back about every week to see what's new. Is there a better way? Perhaps a community were announcements are done? If not perhaps releasing a changelog and people can sign up to watch? Thanks!

GTK cursors in GNOME don't enable properly

I am using the gtk home-manager module with the following snippet:

gtk = {
  enable = true;
  catppuccin = {
    enable = true;
    cursor.enable = true;
  };
};

When I rebuild my system, only some of the cursors change and there's just a white square when the cursor is on the desktop. When I manually activate the cursor theme from the gnome-tweaks GUI they work perfectly.

Using dconf, it seems that gnome-tweaks expects a cursor theme named "Catppuccin-${flavour}-${accent}-Cursors" whereas the gtk home-manager module names the cursor theme "Catppuccin-${flavour}-${accent}". I have tested renaming this in a fork and it seems to work fine, but I'm not sure if it breaks in another context.

Why option `xdg.enable` is required?

I've added this module to my home-manager config and I've got Option xdg.enable must be enabled to apply Catppuccin theming error. I wonder why is this option required? What this option does is adding environment variables and allows to change directories for it. But if this option is not enabled, then default directories are used and no environment variables are set. All programs are expected to use default directories if there is no env vars. A specifically didn't enable xdg to not create extra env variables and it all works well. I think this module should not require to set xdg.enable. Am I missing something?

Unreferenced Cursor File Is Stuck In Nix Store

So, I've noticed that the cursor files for the Mocha-Blue cursors are stuck in the store. I've run sudo nix-collect-garbage -d a number of times and the files remain in the store. I've searched through my entire config, and the only place I'm referencing is in my home-manager config, in this file: theme.nix

What follows is a nix-store --query call that shows that the Mocha-Blue cursor files are still in the store.

[root@LATITUDE-NIXOS:/etc/nixos]# nix-store --query --referrers-closure /nix/store/qz1lqp3lqxwby21ggqh3dc2ck6bh2kyp-catppuccin-cursors-0.2.0-mochaBlue
/nix/store/qz1lqp3lqxwby21ggqh3dc2ck6bh2kyp-catppuccin-cursors-0.2.0-mochaBlue
/nix/store/80rc9jycx7hv3zb8fnp2yqfnvbsdqvwd-home-manager-path
/nix/store/yzgsmm16jg1spxsxwg3mrlhgs0xnidhi-hm_fontconfigconf.d10hmfonts.conf
/nix/store/b8gi7bg4vg9zggrgx9z2fq5g5b6nk8r1-home-manager-files
/nix/store/xyfl8n6xv3bj24q6phg483332la8sg3y-home-manager-generation
/nix/store/cbn3wc72d9xi6d1d15i8awwardxhk15n-unit-home-manager-avi.service
/nix/store/cwpr154zvl5h95lhhcbhxx1v84x3aa3j-system-units
/nix/store/yxidpw1lkrrf0hv5c4g28mjr4s5r52j2-user-environment
/nix/store/1i7i1nqyl1s0f4spgc26c0nah02mra9d-etc
/nix/store/5iwmncfmwfyplk6mqpbrifbcrlhqg0vh-nixos-system-LATITUDE-NIXOS-24.05.20240416.5672bc9

GTK themes are not applied correctly

I have the following home-manager GTK config:

  catppuccin.flavour = "mocha";

  ...

  gtk = {
    enable = true;
    catppuccin = {
      enable = true;
      size = "compact";
      accent = "pink";
      tweaks = [ "rimless" ];
      cursor = {
        enable = true;
        accent = "dark";
      };
    };
  };

When I switch to this config using home-manager switch --flake, all the GTK apps have the white background. I have tried different revisions of catppuccin/nix flake and figured out that 1fbdfdacf96c14449aea52edba895e5ab419dd13 seems to be the culprit.

Example GTK app before 1fbdfdac:
image

After:
image

Feature request: gtk cursor: be able to set the size

On my laptop with sway, I usually need to increase the size of the cursor.

I use this right now:

{
  home.pointerCursor = {
    package = pkgs.bibata-cursors;
    name = "Bibata-Modern-Ice";
    size = 22;
  };
}

My screen resolution is: 3200x1800

Tbh, I don't know if setting the cursor size is the right way to fix it or not.

System-wide accent option

Hi, thanks for your works!

Currently, there is no accent option on nixos-modules and I know it is not necessary. However it helps to unify theme. Here is some examples.

# configuration.nix
catppuccin = {
  flavour = "mocha";
  accent = "teal";
};

# To pass custom icon to flatpak, you have to install it globally.
environment.systemPackages = with pkgs; [
  (catppuccin-papirus-folders.override {
    flavor = "${config.catppuccin.flavour}";
    accent = "${config.catppuccin.accent}";
  })
];
# home.nix
# You cannot use this on standalone home-manager setup.
{ osConfig, ... }:

{
    catppuccin = { 
      flavour = "${osConfig.catppuccin.flavour}"; 
      accent = "${osConfig.catppuccin.accent}";
    };
}

GTK theme error: 'border-spacing` is not a valid property name

So, I was looking at journalctl output in order to resolve a completely different problem, and noticed a log message saying Theme parsing error: gtk.css:7763:16: 'border-spacing' is not a valid property name. Turns out that, if I run any GTK app from the terminal, I get the same error message printed to the terminal.

After doing some testing, I have found that this issue only occurs when the Home-Manager module option gtk.catppuccin.enable is set to true.

Move to nixfmt

see NixOS/rfcs#166. once there is a stable release, we should probably switch to it in order to conform to the wider community

Use with hyprland-nix

Is there a way I can use this with hyprland-nix: https://github.com/hyprland-community/hyprland-nix. Which doesn't have the same options as the home-manager one.

Currently I get the following error:

    error: The option `wayland.windowManager.hyprland.settings' does not exist. Definition values:
       - In `<unknown-file>':
           {
             _type = "if";
             condition = false;
             content = {
               "\$base" = "rgb(1e1e2e)";

Because there is not settings field when using that flake. Is there a way to ignore the hyprland module in this flake? Probably more of a general question. I haven't tried to enable catppuccin in hyprland btw.

Thanks

Rofi support forces a default option for font that might not work with all users

The rofi themes provided by a recent commit seem to just use the default theme configs from https://github.com/catppuccin/rofi/tree/main/basic/.local/share/rofi/themes

The main issue with this is these 4 themes all have the same line 12: font: "JetBrainsMono Nerd Font 14"; This font isn't installed on my machine, and the options provided here don't give me any ways to change this. I'd prefer this to either install the required fonts for me, or give me a way to change the font myself.

Releases

Hey, thank you for this!

I was wondering how I could get notified of new modules (however infrequently that may occur).

So I was thinking releases. Just a thought.

Enabling Hyprland setting overwrites configuration

Setting wayland.windowManager.hyprland.catppuccin.enable = true causes this module to overwrite every option declared in wayland.windowManager.hyprland.settings except for the Catppuccin colors. This will most likely leave anyone with a config with no keybinds, etc., unless they use the extraConfig option (not tested, I'm just guessing). With the introduction of wayland.windowManager.hyprland.sourceFirst, I'm guessing the source order issues described in /modules/home-manager/hyprland.nix are no longer present and that this module can use source as normal.

Are global color overrides possible?

It looks like this is just downloading the respective config files from the other catpuccin repos, but I'm wondering if it would be possible to do global color overrides?

For example if I wanted a darker background color, it would be nice to be able to do that globally like

catppuccin = {
  enable = true;
  flavor = "mocha";
  color_overrides = {
    mocha = {
      base = "#[some other color code]";
    };
  };
};

GTK: link GTK 4.0 to correct places

In https://github.com/catppuccin/gtk it suggests that you link gtk 4.0 to given places. See the snippit below

xdg.configFile = {
  "gtk-4.0/assets".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets";
  "gtk-4.0/gtk.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css";
  "gtk-4.0/gtk-dark.css".source = "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css";
};

Create a docs website

While the current markdown files updated by CI work...it's not great. Ideally we should have a site for these options, like search.nixos.org or the home-manager manual. Having a way to search for options would also be welcome

i plan on implementing this using nixosOptionDoc and mkdocs

Add global `enableAll` setting

Hi,

I'd love to just add this flake to my inputs and use a global toggle to enable the theming on all programs I've installed.
This would've the benefit of not having to check on the progress of the program options now and then and to automatically get satisfied when there is a new program supported :)

What do you think?

PS: Thanks for your work!

micro.catppuccin.enable conflict

I never set micro.catppuccin.enable = true; but it returns error.

`sudo nixos-rebuild dry-activate --flake .#nixos --show-trace`
building the system configuration...
error:
       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1537:24:

         1536|     let f = attrPath:
         1537|       zipAttrsWith (n: values:
             |                        ^
         1538|         let here = attrPath ++ [n]; in

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1171:18:

         1170|         mapAttrs
         1171|           (name: value:
             |                  ^
         1172|             if isAttrs value && cond value

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1174:18:

         1173|             then recurse (path ++ [ name ]) value
         1174|             else f (path ++ [ name ]) value);
             |                  ^
         1175|     in

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:242:72:

          241|           # For definitions that have an associated option
          242|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          243|

       … while evaluating the option `system.build.toplevel':

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:824:28:

          823|         # Process mkMerge and mkIf properties.
          824|         defs' = concatMap (m:
             |                            ^
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/nixos/modules/system/activation/top-level.nix':

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:825:137:

          824|         defs' = concatMap (m:
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          826|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/nixos/modules/system/activation/top-level.nix:71:12:

           70|   # Replace runtime dependencies
           71|   system = foldr ({ oldDependency, newDependency }: drv:
             |            ^
           72|       pkgs.replaceDependency { inherit oldDependency newDependency drv; }

       … while calling 'foldr'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:121:20:

          120|   */
          121|   foldr = op: nul: list:
             |                    ^
          122|     let

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:128:8:

          127|         else op (elemAt list n) (fold' (n + 1));
          128|     in fold' 0;
             |        ^
          129|

       … while calling 'fold''

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:124:15:

          123|       len = length list;
          124|       fold' = n:
             |               ^
          125|         if n == len

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1171:18:

         1170|         mapAttrs
         1171|           (name: value:
             |                  ^
         1172|             if isAttrs value && cond value

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1174:18:

         1173|             then recurse (path ++ [ name ]) value
         1174|             else f (path ++ [ name ]) value);
             |                  ^
         1175|     in

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:242:72:

          241|           # For definitions that have an associated option
          242|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          243|

       … while evaluating the option `assertions':

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:824:28:

          823|         # Process mkMerge and mkIf properties.
          824|         defs' = concatMap (m:
             |                            ^
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/470w68hjxk5g3argihzj3dh4yfvdfkqq-source/nixos/common.nix':

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:825:137:

          824|         defs' = concatMap (m:
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          826|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:902:11:

          901|         if def.condition then
          902|           dischargeProperties def.content
             |           ^
          903|         else

       … while calling 'dischargeProperties'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … from call site

         at /nix/store/470w68hjxk5g3argihzj3dh4yfvdfkqq-source/nixos/common.nix:109:20:

          108|
          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
             |                    ^
          110|         flip map config.assertions (assertion: {

       … while calling 'flatten'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:383:13:

          382|   */
          383|   flatten = x:
             |             ^
          384|     if isList x

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:385:21:

          384|     if isList x
          385|     then concatMap (y: flatten y) x
             |                     ^
          386|     else [x];

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:385:24:

          384|     if isList x
          385|     then concatMap (y: flatten y) x
             |                        ^
          386|     else [x];

       … while calling 'flatten'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/lists.nix:383:13:

          382|   */
          383|   flatten = x:
             |             ^
          384|     if isList x

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1062:10:

         1061|     attrs:
         1062|     map (name: f name attrs.${name}) (attrNames attrs);
             |          ^
         1063|

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1062:16:

         1061|     attrs:
         1062|     map (name: f name attrs.${name}) (attrNames attrs);
             |                ^
         1063|

       … while calling anonymous lambda

         at /nix/store/470w68hjxk5g3argihzj3dh4yfvdfkqq-source/nixos/common.nix:109:66:

          108|
          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
             |                                                                  ^
          110|         flip map config.assertions (assertion: {

       … from call site

         at /nix/store/470w68hjxk5g3argihzj3dh4yfvdfkqq-source/nixos/common.nix:110:9:

          109|       assertions = flatten (flip mapAttrsToList cfg.users (user: config:
          110|         flip map config.assertions (assertion: {
             |         ^
          111|           inherit (assertion) assertion;

       … while calling 'flip'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/trivial.nix:314:16:

          313|   */
          314|   flip = f: a: b: f b a;
             |                ^
          315|

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1171:18:

         1170|         mapAttrs
         1171|           (name: value:
             |                  ^
         1172|             if isAttrs value && cond value

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1174:18:

         1173|             then recurse (path ++ [ name ]) value
         1174|             else f (path ++ [ name ]) value);
             |                  ^
         1175|     in

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:242:72:

          241|           # For definitions that have an associated option
          242|           declaredConfig = mapAttrsRecursiveCond (v: ! isOption v) (_: v: v.value) options;
             |                                                                        ^
          243|

       … while evaluating the option `home-manager.users.ravenz46.assertions':

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:824:28:

          823|         # Process mkMerge and mkIf properties.
          824|         defs' = concatMap (m:
             |                            ^
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))

       … while evaluating definitions from `/nix/store/jkzl878icx3syxrq2rddpwqdclikhn2v-source/hosts/nixos/nixos/user.nix':

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:825:137:

          824|         defs' = concatMap (m:
          825|           map (value: { inherit (m) file; inherit value; }) (builtins.addErrorContext "while evaluating definitions from `${m.file}':" (dischargeProperties m.value))
             |                                                                                                                                         ^
          826|         ) defs;

       … while calling 'dischargeProperties'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:896:25:

          895|   */
          896|   dischargeProperties = def:
             |                         ^
          897|     if def._type or "" == "merge" then

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/attrsets.nix:1171:18:

         1170|         mapAttrs
         1171|           (name: value:
             |                  ^
         1172|             if isAttrs value && cond value

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:676:37:

          675|
          676|       matchedOptions = mapAttrs (n: v: v.matchedOptions) resultsByName;
             |                                     ^
          677|

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:646:32:

          645|             in {
          646|               matchedOptions = evalOptionValue loc opt defns';
             |                                ^
          647|               unmatchedDefns = [];

       … while calling 'evalOptionValue'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:780:31:

          779|      config value. */
          780|   evalOptionValue = loc: opt: defs:
             |                               ^
          781|     let

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:805:9:

          804|       warnDeprecation =
          805|         warnIf (opt.type.deprecationMessage != null)
             |         ^
          806|           "The type `types.${opt.type.name}' of option `${showOption loc}' defined in ${showFiles opt.declarations} is deprecated. ${opt.type.deprecationMessage}";

       … while calling 'warnIf'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/trivial.nix:729:18:

          728|   */
          729|   warnIf = cond: msg: if cond then warn msg else x: x;
             |                  ^
          730|

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:644:23:

          643|           if length optionDecls == length decls then
          644|             let opt = fixupOptionType loc (mergeOptionDecls loc decls);
             |                       ^
          645|             in {

       … while calling 'fixupOptionType'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:957:26:

          956|   # TODO: Merge this into mergeOptionDecls
          957|   fixupOptionType = loc: opt:
             |                          ^
          958|     if opt.type.getSubModules or null == null

       … from call site

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:644:44:

          643|           if length optionDecls == length decls then
          644|             let opt = fixupOptionType loc (mergeOptionDecls loc decls);
             |                                            ^
          645|             in {

       … while calling 'mergeOptionDecls'

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:741:9:

          740|   mergeOptionDecls =
          741|    loc: opts:
             |         ^
          742|     foldl' (res: opt:

       … while calling anonymous lambda

         at /nix/store/450afzqlzzgw6wnyc3dwysf3i5yxyqkr-source/lib/modules.nix:742:18:

          741|    loc: opts:
          742|     foldl' (res: opt:
             |                  ^
          743|       let t  = res.type;

       error: The option `home-manager.users.ravenz46.programs.micro.catppuccin.enable' in `/nix/store/jkzl878icx3syxrq2rddpwqdclikhn2v-source/hosts/nixos/nixos/user.nix' is already declared in `/nix/store/jkzl878icx3syxrq2rddpwqdclikhn2v-source/hosts/nixos/nixos/user.nix'.
hosts/nixos/nixos/user.nix
{ config, pkgs, lib, inputs, outputs, ... }:

{
  users.users.ravenz46 = {
    isNormalUser = true;
    description = "ravenz46";
    extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" "podman" "lxd" "incus-admin" "adbusers" "audio" ];
    shell = pkgs.fish;
    packages = with pkgs; [ ];
  };

  home-manager = {
    extraSpecialArgs = { inherit inputs outputs; };
    useGlobalPkgs = true;
    useUserPackages = true;
    users.ravenz46 = import ../home-manager/home.nix;
  };
  # add user to automatic login
  services.xserver.displayManager.autoLogin.user = "ravenz46";
}

Previews

What should the previews show?

formatting/general code style guidelines

we've talked about this a lot, so i think it might be a good time to actually figure out what formatter we're going to use, and what (if any) code style guidelines we would want to put in CONTRIBUTING.md. a good example of how we could approach this is found here in the home-manager manual

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.