GithubHelp home page GithubHelp logo

Add to home-manager as a module about stylix HOT 9 CLOSED

danth avatar danth commented on August 26, 2024
Add to home-manager as a module

from stylix.

Comments (9)

Mateiadrielrafael avatar Mateiadrielrafael commented on August 26, 2024

To expand on this, I too wish we had separate nixos and home-manager modules. A good reason for this is being able to use the HM module outside of nixos systems. The lack of separation is the only reason I'm still using a weaker handrolled solution instead of migrating to this awesome tool.

from stylix.

danth avatar danth commented on August 26, 2024

I too wish we had separate nixos and home-manager modules.

This is being worked on in #23. It's mostly finished and will be merged soon

from stylix.

DamienCassou avatar DamienCassou commented on August 26, 2024

Now that #23 has been merged, is any more work planned around this? I feel that the README could contain an example of how to setup stylix with home-manager on a non-NixOS distro.

from stylix.

danth avatar danth commented on August 26, 2024

I agree we should add an example for that use case. It hasn't been tested on non-NixOS yet, however I would expect it to work at least to some extent. It would be great if someone with experience using Home Manager on another distro could set it up and provide feedback :)

If your Home Manager configuration is in a flake, you should be able to import homeManagerModules.stylix similar to the example for NixOS.

from stylix.

DamienCassou avatar DamienCassou commented on August 26, 2024

@danth I tried and I got an issue: #28.

from stylix.

DamienCassou avatar DamienCassou commented on August 26, 2024

Here is a working configuration:

{pkgs, ...}@args:

let
  base16 = import ../../base16;
  palette-generator = pkgs.callPackage ../../stylix/palette-generator { };
in
{
  stylix.image = pkgs.fetchurl {
    url = "https://www.pixelstalk.net/wp-content/uploads/2016/05/Epic-Anime-Awesome-Wallpapers.jpg";
    sha256 = "enQo3wqhgf0FEPHj2coOCvo7DuZv+x5rL/WIo4qPI50=";
  };

  imports = [
    (import ../../stylix/stylix/hm {
      inherit palette-generator;
      base16 = base16 args;
    })
  ];
}

Do you want a PR for the README?

from stylix.

danth avatar danth commented on August 26, 2024

I already added an example for Home Manager + Flakes; I've been trying to keep the documentation to flakes only for clarity, but if you think the non-flake version is helpful then please do go ahead with a PR.

from stylix.

DamienCassou avatar DamienCassou commented on August 26, 2024

I wouldn't have focused only on flakes while they are experimental.

from stylix.

Mateiadrielrafael avatar Mateiadrielrafael commented on August 26, 2024

Thanks for solving this!

from stylix.

Related Issues (20)

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.