mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2026-02-04 15:21:15 -05:00
utilities?
This commit is contained in:
parent
840df0bf0b
commit
4f4a9ea1ea
3 changed files with 37 additions and 1 deletions
|
|
@ -1,5 +1,8 @@
|
||||||
{ config, lib, pkgs, ...}:
|
{ config, lib, pkgs, ...}:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./utilities
|
||||||
|
];
|
||||||
options = {
|
options = {
|
||||||
user = lib.mkOption {
|
user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -16,7 +19,6 @@
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
|
||||||
vim
|
vim
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
|
|
|
||||||
6
modules/common/utilities/default.nix
Normal file
6
modules/common/utilities/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./git.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
28
modules/common/utilities/git.nix
Normal file
28
modules/common/utilities/git.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
home-packages = config.home-manager.users.${config.user}.home.packages;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
gitName = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Name to use for git commits";
|
||||||
|
};
|
||||||
|
gitEmail = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
description = "Email to use for git commits";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
home-manager.users.root.programs.git = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
home-manager.users.${config.user} = {
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = config.gitName;
|
||||||
|
userEmail = config.gitEmail;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue