GithubHelp home page GithubHelp logo

afreakk / xmoflake Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 108 KB

Compiles xmonad & xmobar with common files, so you can share font-config and colors between them.

Nix 2.56% Haskell 97.44%
nix nixos xmonad xmobar nix-flakes

xmoflake's Introduction

XmoFlake

Development

# Will generate .cabal file from package.yaml using hpack
# (that's only really needed to give hints to haskell-language-server)
# It will also provide you all dependencies and haskell-language-server
nix develop

# To build run
nix build

Integration suggestion for use with nixos/home-manager

Add input:

inputs.xmoflake.url = path:Xmoflake; # recommend cloning repo, and using path, so you can more easily change stuff

(If xmoflake is a local git repo, you need to use flag submodules=1 like so sudo nixos-rebuild switch --flake '.?submodules=1#')
Add in your nixos-config like so:

{ nixpkgs.overlays = [ xmoflake.overlay ]; }

Can for instance be used like this in home-manager:

xsession = {
    enable = true;
    windowManager.command = "systemd-cat --identifier=xmonad ${pkgs.xmoflake}/bin/xmonad";
};
home.packages = [ pkgs.xmoflake ];
#below script is only needed to be able to rebuild in place
home.file.xmonadBuildScript = {
  target = ".xmonad/build";
  executable = true;
  text = ''
    #!/usr/bin/env bash
    set -e
    # CHANGE THIS TO MATCH THE ACTUAL LOCATION OF XMOFLAKE REPO !!
    XmoflakeDir="$HOME/nixos-config/Xmoflake"

    cd "$XmoflakeDir"
    nix build

    ln -s -f -T "$XmoflakeDir/result/bin/xmonad" "$1"
  '';

Then in-place-recompilation will work for xmonad and xmobar!
To have nixos launch the xsession.windowManager.command we have defined, you can add this in nixos-config:

  services.xserver = {
    #from https://discourse.nixos.org/t/opening-i3-from-home-manager-automatically/4849/8
    windowManager.session = [{
      name = "home-manager";
      start = ''
        ${pkgs.runtimeShell} $HOME/.xsession &
        waitPID=$!
      '';
    }];
    displayManager.lightdm.enable = true;
    enable = true;
    layout = "us";
  };

If there is a less hacky way of launching home-manager's windowManager.command, please tell me :)

xmoflake's People

Contributors

afreakk avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.