formatted all files with nixfmt, added env variable to hold secrets
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{pkgs, lib, self, config, ... }:
|
||||
{ pkgs, lib, self, config, ... }:
|
||||
|
||||
# This folder is for programs that do not have existing configuration modules in NixOS.
|
||||
# Basically a to-do list for stuff I need to write my own modules for.
|
||||
@@ -10,25 +10,25 @@ let
|
||||
scheme_path = "${pkgs.base16-schemes}/share/themes/${ssh_base16}.yaml";
|
||||
scheme_string = builtins.readFile scheme_path;
|
||||
scheme_list = lib.splitString "\n" "${scheme_string}";
|
||||
colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list;
|
||||
ssh_scheme =
|
||||
lib.lists.foldl' (
|
||||
acc: line: let
|
||||
splitLine = lib.splitString ": " line;
|
||||
key = builtins.elemAt splitLine 0;
|
||||
value = builtins.elemAt splitLine 1;
|
||||
trimmedKey = lib.trim key;
|
||||
cleanValue_step1 = lib.splitString " " value;
|
||||
cleanValue_step2 = builtins.elemAt cleanValue_step1 0;
|
||||
cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2;
|
||||
in
|
||||
acc // {"${trimmedKey}" = cleanValue_final;}
|
||||
) {}
|
||||
colors;
|
||||
in
|
||||
{
|
||||
colors =
|
||||
lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null)
|
||||
scheme_list;
|
||||
ssh_scheme = lib.lists.foldl' (acc: line:
|
||||
let
|
||||
splitLine = lib.splitString ": " line;
|
||||
key = builtins.elemAt splitLine 0;
|
||||
value = builtins.elemAt splitLine 1;
|
||||
trimmedKey = lib.trim key;
|
||||
cleanValue_step1 = lib.splitString " " value;
|
||||
cleanValue_step2 = builtins.elemAt cleanValue_step1 0;
|
||||
cleanValue_final =
|
||||
builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2)
|
||||
cleanValue_step2;
|
||||
in acc // { "${trimmedKey}" = cleanValue_final; }) { } colors;
|
||||
in {
|
||||
options = {
|
||||
movOpts.homeFiles.enable = lib.mkEnableOption "enables declared custom files";
|
||||
movOpts.homeFiles.enable =
|
||||
lib.mkEnableOption "enables declared custom files";
|
||||
};
|
||||
config = {
|
||||
home.file = {
|
||||
|
||||
Reference in New Issue
Block a user