Consolidate into variables
This commit is contained in:
@@ -77,4 +77,4 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
programs.rbw = {
|
||||
enable = true;
|
||||
settings = {
|
||||
base_url = "https://vault.jelles.net";
|
||||
email = "mail@jelles.net";
|
||||
email = config.var.email;
|
||||
pinentry = pkgs.pinentry-gnome3;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# Git configuration
|
||||
{config, ...}: let
|
||||
username = config.var.git.username;
|
||||
email = config.var.git.email;
|
||||
in {
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
ignores = [
|
||||
@@ -18,8 +16,8 @@ in {
|
||||
"result-*"
|
||||
];
|
||||
settings = {
|
||||
user.name = username;
|
||||
user.email = email;
|
||||
user.name = config.var.username;
|
||||
user.email = config.var.email;
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = "false";
|
||||
push.autoSetupRemote = true;
|
||||
@@ -44,10 +42,8 @@ in {
|
||||
st = "status";
|
||||
br = "branch";
|
||||
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
||||
hist = ''
|
||||
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
||||
llog = ''
|
||||
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
|
||||
hist = ''log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
||||
llog = ''log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
|
||||
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{config, ...}: {
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
flake = "/home/kiri/.config/nixos"; # Assuming this is the flake root
|
||||
flake = config.var.configDirectory; # Assuming this is the flake root
|
||||
};
|
||||
}
|
||||
|
||||
@@ -129,8 +129,8 @@ let
|
||||
extra = {
|
||||
nixdExtras = {
|
||||
nixpkgs = ''import ${pkgs.path} {}'';
|
||||
nixos_options = ''(builtins.getFlake "path:///home/kiri/.config/nixos").nixosConfigurations.${toString config.var.hostname}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path:///home/kiri/.config/nixos").nixosConfigurations.${toString config.var.hostname}.options.home-manager.users.type.getSubOptions []'';
|
||||
nixos_options = ''(builtins.getFlake "path://${config.var.configDirectory}").nixosConfigurations.${toString config.var.hostname}.options'';
|
||||
home_manager_options = ''(builtins.getFlake "path://${config.var.configDirectory}").nixosConfigurations.${toString config.var.hostname}.options.home-manager.users.type.getSubOptions []'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.rclone = {
|
||||
enable = true;
|
||||
@@ -11,16 +12,16 @@
|
||||
};
|
||||
|
||||
secrets = {
|
||||
token = "/home/kiri/.config/rclone/gdrive_token";
|
||||
token = "${config.xdg.configHome}/rclone/gdrive_token";
|
||||
|
||||
client_id = "/home/kiri/.config/rclone/gdrive_client_id";
|
||||
client_secret = "/home/kiri/.config/rclone/gdrive_client_secret"; #TODO: sops?
|
||||
client_id = "${config.xdg.configHome}/rclone/gdrive_client_id";
|
||||
client_secret = "${config.xdg.configHome}/rclone/gdrive_client_secret"; # TODO: sops?
|
||||
};
|
||||
|
||||
mounts = {
|
||||
"/" = {
|
||||
enable = true;
|
||||
mountPoint = "/home/kiri/gdrive";
|
||||
mountPoint = "${config.home.homeDirectory}/gdrive";
|
||||
|
||||
options = {
|
||||
dir-cache-time = "5000h";
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
{
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.kiri = {
|
||||
profiles.${config.var.username} = {
|
||||
isDefault = true;
|
||||
withExternalGnupg = true;
|
||||
settings = {
|
||||
@@ -56,4 +56,4 @@
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user