use snowfall

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

104
flake.lock generated
View File

@ -16,10 +16,62 @@
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils-plus": {
"inputs": {
"flake-utils": "flake-utils"
},
"locked": {
"lastModified": 1696331477,
"narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
"type": "github"
},
"original": {
"owner": "gytis-ivaskevicius",
"repo": "flake-utils-plus",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-stable"
"nixpkgs"
]
},
"locked": {
@ -37,13 +89,13 @@
"type": "github"
}
},
"nixpkgs-stable": {
"nixpkgs": {
"locked": {
"lastModified": 1704874635,
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
"lastModified": 1706515015,
"narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
"rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4",
"type": "github"
},
"original": {
@ -73,8 +125,46 @@
"inputs": {
"alacritty-theme": "alacritty-theme",
"home-manager": "home-manager",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"snowfall-lib": "snowfall-lib"
}
},
"snowfall-lib": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils-plus": "flake-utils-plus",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1696432959,
"narHash": "sha256-oJQZv2MYyJaVyVJY5IeevzqpGvMGKu5pZcCCJvb+xjc=",
"owner": "snowfallorg",
"repo": "lib",
"rev": "92803a029b5314d4436a8d9311d8707b71d9f0b6",
"type": "github"
},
"original": {
"owner": "snowfallorg",
"repo": "lib",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},

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; };
};
};
}

View File

@ -1,6 +1,22 @@
{ config, pkgs, inputs, ... }:
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
home, # The home architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this home (eg. `x86_64-home`).
format, # A normalized name for the home target (eg. `home`).
virtual
, # A boolean to determine whether this home is a virtual target using nixos-generators.
host, # The host name for this home.
# All other arguments come from the home home.
config, ... }: {
home.username = "julian";
home.homeDirectory = "/home/julian";

View File

@ -0,0 +1,8 @@
import = [
"~/.config/alacritty/theme/themes/smoooooth.toml"
]
[[keyboard.bindings]]
chars = "fzf-z \r"
key = "Z"
mods = "Control"

View File

@ -12,10 +12,7 @@ in {
home.file = {
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
".config/alacritty" = {
source = ../../alacritty;
recursive = true;
};
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
};
};
}

View File

@ -8,9 +8,7 @@ in {
config = mkIf cfg.enable {
home.file = {
".config/starship.toml".source = ../../../../starship/starship.toml;
};
home.file = { ".config/starship.toml".source = ./starship.toml; };
home.packages = with pkgs; [ starship ];

View File

@ -0,0 +1,14 @@
# newline between shell prompts
add_newline = false
#format = "$all$directory$character"
[line_break]
disabled = true
[directory]
fish_style_pwd_dir_length = 1
[status]
map_symbol = true
format = '[$symbol$status $common_meaning$signal_name$maybe_int]($style) '
disabled = false