use snowfall

This commit is contained in:
2024-02-01 12:28:31 +01:00
parent c2e80ffddd
commit d8e53f1f78
16 changed files with 160 additions and 55 deletions

View File

@ -2,12 +2,17 @@
description = "Home Manager configuration of julian";
inputs = {
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs-stable";
inputs.nixpkgs.follows = "nixpkgs";
};
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
alacritty-theme = {
@ -16,45 +21,22 @@
};
};
outputs = { nixpkgs-stable, nixpkgs-unstable, home-manager, ... }@inputs:
let
system = "x86_64-linux";
outputs = inputs:
inputs.snowfall-lib.mkFlake {
inherit inputs;
# Must always be ./.
src = ./.;
unstable-overlay = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
snowfall = {
# The root of the snowfall config
root = ./home-manager;
# lib namespace
namepace = "frajul";
meta = {
# name = "my home configs name";
# title = "my home configs title";
};
};
pkgs = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
overlays = [ unstable-overlay ];
};
# Does not follow symlinks
listNixFilesRec = dir:
pkgs.lib.lists.flatten (pkgs.lib.attrsets.mapAttrsToList (name: value:
let path = "${toString dir}/${name}";
in if value == "directory" && builtins.pathExists path then
listNixFilesRec path
else if value == "regular" && pkgs.lib.hasSuffix ".nix" name then
path
else
[ ]) (builtins.readDir dir));
in {
homeConfigurations."julian" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [ ./home-manager/home.nix ]
++ listNixFilesRec ./home-manager/modules;
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = { inherit inputs; };
};
};
}