Giter Site home page Giter Site logo

homini's Introduction

Homini

Homini is a minimalist dotfiles manager using Nix inspired by Home Manager and GNU Stow.


NOTICE: Homini is usable but the API is still unstable. The API might be changed due to upcomming features down below:

  • NixOS support
  • Multi-user support
  • nix-darwin support
  • Standalone support

Despite above new feature, the heart of Homini will remain the same: minimalist.


How to use Homini?

Consider the following snipet

homini = {
  enable = true;
  dir = ./dotfiles;
};

this will link the dotfiles directory

dotfiles
└── .config
    └── git
        ├── config
        ├── ignore
        ├── personal
        └── work

to your $HOME directory.

$HOME
└── .config
    └── git
        ├── config -> /nix/store/xqj0sf5q4q35q1hp19yyhfp8sbp0zrwa-dotfiles/.config/git/config
        ├── ignore -> /nix/store/xqj0sf5q4q35q1hp19yyhfp8sbp0zrwa-dotfiles/.config/git/ignore
        ├── personal -> /nix/store/xqj0sf5q4q35q1hp19yyhfp8sbp0zrwa-dotfiles/.config/git/personal
        └── work -> /nix/store/xqj0sf5q4q35q1hp19yyhfp8sbp0zrwa-dotfiles/.config/git/work

NixOS

Rebuild the following flake with nixos-rebuild switch --flake .#machine.

{
  description = "My NixOS Configurations";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    homini.url = "github:minizilla/homini";
    homini.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, homini, ... }: {
    nixosConfigurations.machine = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ./configuration.nix
        homini.nixosModules.homini {
          homini = {
            enable = true;
            dir = ./dotfiles;
          };
        }
      ];
    };
  };
}

[WIP] MacOS (nix-darwin)

Standalone

Run the following flake with nix run.

{
  description = "My dotfiles";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
    homini.url = "github:minizilla/homini";
    homini.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { self, nixpkgs, homini, ... }:
    let
      forAllSystems = nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed;
    in
    {
      packages = forAllSystems (system: {
        default = homini.standalone {
          pkgs = nixpkgs.legacyPackages.${system};
          dir = ./dotfiles;
        };
      });
    };
}

Why Homini when we have Home Manager?

This Article by Florian Beeres is what inspired me to write Homini and this quote sums up why

At the end of the day I really don’t need the per-user installation of packages and elaborate modules that Home Manager gives me. I’d be perfectly content with providing a list of packages to install system-wide and a few basic primitives to generate configuration files in my home folder.

homini's People

Contributors

minizilla avatar

Stargazers

zach latta avatar Slava avatar Nikolaus Schlemm avatar  avatar Acid Bong avatar Sune Debel avatar Sandro avatar Dmitriy avatar  avatar  avatar  avatar  avatar Caleb P. Bradley avatar Jake Hamilton avatar Sylvain LRT avatar Pim Snel 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.