failed experiment. Probably need a CLI wrapper around alacritty's clonepath

nix-rearch
pegasust 2022-12-14 20:39:13 +00:00
parent aecd127dd4
commit 23bf093137
5 changed files with 77 additions and 31 deletions

View File

@ -9,28 +9,37 @@ let
cfg = config.base.alacritty; cfg = config.base.alacritty;
in in
{ {
options.base.alacritty.font.family = myLib.mkOption { options.base.alacritty =
type = myLib.types.singleLineStr; {
default = actualConfig.font.normal.family; font.family = myLib.mkOption {
description = '' type = myLib.types.singleLineStr;
The font family for Alacritty default = actualConfig.font.normal.family;
''; description = ''
example = "DroidSansMono NF"; The font family for Alacritty
}; '';
options.base.alacritty.enable = myLib.mkOption { example = "DroidSansMono NF";
type = myLib.types.bool; };
default = true; enable = myLib.mkOption {
description = '' type = myLib.types.bool;
Enables alacritty default = true;
''; description = ''
example = true; Enables alacritty
}; '';
options.base.alacritty._actualConfig = myLib.mkOption { example = true;
type = myLib.types.attrs; };
visible = false; _actualConfig = myLib.mkOption {
default = actualConfig; type = myLib.types.attrs;
description = "underlying default config"; visible = false;
}; default = actualConfig;
description = "underlying default config";
};
additionalConfigPath = myLib.mkOption {
type = myLib.types.nullOr myLib.types.path;
visible = false;
default = null;
description = "impurely write our alacritty.yml to this path";
};
};
config.programs.alacritty = { config.programs.alacritty = {
enable = cfg.enable; enable = cfg.enable;

View File

@ -0,0 +1,12 @@
(import
(
# Get corresponding version of flake-compat declared in on ./flake.lock
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in
fetchTarball {
url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
sha256 = lock.nodes.flake-compat.locked.narHash;
}
)
{ src = ./.; } # calls flake.nix
).defaultNix

View File

@ -1,5 +1,21 @@
{ {
"nodes": { "nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1667395993,
@ -53,11 +69,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1669071065, "lastModified": 1670970889,
"narHash": "sha256-KBpgj3JkvlPsJ3duOZqFJe6tgr+wc75t8sFmgRbBSbw=", "narHash": "sha256-TWJo3/X3Q3r+HeX16QN4FE6ddBpGtAboymSEF+4Nnc0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f7641a3ff398ccce952e19a199d775934e518c1d", "rev": "e412025fffdcd6219ddd21c65d9a1b90005ce508",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -102,11 +118,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1669140675, "lastModified": 1670929434,
"narHash": "sha256-npzfyfLECsJWgzK/M4gWhykP2DNAJTYjgY2BWkz/oEQ=", "narHash": "sha256-n5UBO6XBV4h3TB7FYu2yAuNQMEYOrQyKeODUwKe06ow=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2788904d26dda6cfa1921c5abb7a2466ffe3cb8c", "rev": "1710ed1f6f8ceb75cf7d1cf55ee0cc21760e1c7a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -134,6 +150,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixgl": "nixgl", "nixgl": "nixgl",
@ -147,11 +164,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1669170936, "lastModified": 1670985057,
"narHash": "sha256-TKPH4Pzkjw5gAPo9hejs3O4mWJW6V/RSiOj8UuSFRTs=", "narHash": "sha256-QfLKTSQUc82HXeIipukznInr5IXXgK1YKm5dplm1Q+A=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "c90c223c4aef334356029b89c72bb65e26f7efe6", "rev": "da99b6227d450438d53ba4b0cf64e43ad2e93e58",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -9,6 +9,11 @@
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nixgl.url = "github:guibou/nixGL"; nixgl.url = "github:guibou/nixGL";
rust-overlay.url = "github:oxalica/rust-overlay"; rust-overlay.url = "github:oxalica/rust-overlay";
# Allows default.nix to call onto flake.nix. Useful for nix eval and automations
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
}; };
outputs = outputs =

View File

@ -2,4 +2,7 @@
# personalized/custom packages # personalized/custom packages
{ pkgs, lib, ... }@pkgs_input: { { pkgs, lib, ... }@pkgs_input: {
# dot-hwtr = import "./dot-hwtr" pkgs_input; # dot-hwtr = import "./dot-hwtr" pkgs_input;
cargo-bacon = pkgs.rustPlatform.buildRustPackage rec {
pname = "bacon";
};
} }