use snowfall
This commit is contained in:
parent
c2e80ffddd
commit
d8e53f1f78
104
flake.lock
generated
104
flake.lock
generated
@ -16,10 +16,62 @@
|
|||||||
"type": "github"
|
"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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-stable"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@ -37,13 +89,13 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1704874635,
|
"lastModified": 1706515015,
|
||||||
"narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=",
|
"narHash": "sha256-eFfY5A7wlYy3jD/75lx6IJRueg4noE+jowl0a8lIlVo=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356",
|
"rev": "f4a8d6d5324c327dcc2d863eb7f3cc06ad630df4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -73,8 +125,46 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"alacritty-theme": "alacritty-theme",
|
"alacritty-theme": "alacritty-theme",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
60
flake.nix
60
flake.nix
@ -2,12 +2,17 @@
|
|||||||
description = "Home Manager configuration of julian";
|
description = "Home Manager configuration of julian";
|
||||||
|
|
||||||
inputs = {
|
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";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-23.11";
|
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 = {
|
alacritty-theme = {
|
||||||
@ -16,45 +21,22 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { nixpkgs-stable, nixpkgs-unstable, home-manager, ... }@inputs:
|
outputs = inputs:
|
||||||
let
|
inputs.snowfall-lib.mkFlake {
|
||||||
system = "x86_64-linux";
|
inherit inputs;
|
||||||
|
# Must always be ./.
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
unstable-overlay = final: prev: {
|
snowfall = {
|
||||||
unstable = import nixpkgs-unstable {
|
# The root of the snowfall config
|
||||||
inherit system;
|
root = ./home-manager;
|
||||||
config.allowUnfree = true;
|
# 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; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -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.username = "julian";
|
||||||
home.homeDirectory = "/home/julian";
|
home.homeDirectory = "/home/julian";
|
||||||
|
|
8
home-manager/modules/home/alacritty/alacritty.toml
Normal file
8
home-manager/modules/home/alacritty/alacritty.toml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
import = [
|
||||||
|
"~/.config/alacritty/theme/themes/smoooooth.toml"
|
||||||
|
]
|
||||||
|
|
||||||
|
[[keyboard.bindings]]
|
||||||
|
chars = "fzf-z \r"
|
||||||
|
key = "Z"
|
||||||
|
mods = "Control"
|
@ -12,10 +12,7 @@ in {
|
|||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
||||||
".config/alacritty" = {
|
".config/alacritty/alacritty.toml".source = ./alacritty.toml;
|
||||||
source = ../../alacritty;
|
|
||||||
recursive = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -8,9 +8,7 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
home.file = {
|
home.file = { ".config/starship.toml".source = ./starship.toml; };
|
||||||
".config/starship.toml".source = ../../../../starship/starship.toml;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [ starship ];
|
home.packages = with pkgs; [ starship ];
|
||||||
|
|
14
home-manager/modules/home/zsh/starship.toml
Normal file
14
home-manager/modules/home/zsh/starship.toml
Normal 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
|
Loading…
x
Reference in New Issue
Block a user