home-manager-conf/flake.nix

78 lines
2.0 KiB
Nix
Raw Normal View History

2021-11-17 21:16:13 +02:00
{
description = "Home-manager configuration";
inputs = {
nixpkgs = { url = "github:NixOS/nixpkgs/nixpkgs-unstable"; };
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
myEmacs = {
url = "github:MasseR/nix-conf-emacs";
inputs.nixpkgs.follows = "nixpkgs";
};
myVim = {
url = "github:MasseR/nix-conf-nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-11-17 21:31:01 +02:00
myZsh = {
url = "git+https://git.rauhala.info/MasseR/nix-conf-zsh";
inputs.nixpkgs.follows = "nixpkgs";
};
myUrxvt = {
url = "git+https://git.rauhala.info/MasseR/nix-conf-urxvt";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-11-17 21:16:13 +02:00
kobodl = {
url = "github:MasseR/nix-kobodl";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
2021-11-17 21:26:33 +02:00
nixosModules =
let
dirs = builtins.attrNames (builtins.readDir ./modules);
selfModules = map (module: import (./modules + "/${module}")) dirs;
in
2021-11-17 21:31:01 +02:00
selfModules ++ [
inputs.myZsh.nixosModule
inputs.myUrxvt.nixosModule
];
2021-11-17 21:16:13 +02:00
overlays = [
inputs.myEmacs.overlay
inputs.myVim.overlay
];
homeConfigurations =
let system = "x86_64-linux";
in
{
"masse@omena" = home-manager.lib.homeManagerConfiguration {
system = system;
homeDirectory = "/home/masse";
username = "masse";
stateVersion = "21.05";
pkgs = import nixpkgs {
system = system;
overlays = self.overlays ++ [
(final: prev: {
kobodl = inputs.kobodl.packages.${system}.kobodl;
})
];
};
configuration = {pkgs,...}:
{
programs.home-manager.enable = true;
2021-11-17 21:26:33 +02:00
imports = self.nixosModules ++ [
2021-11-17 21:16:13 +02:00
./macbook/masse.nix
];
};
};
};
};
}