mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
Merge branch 'changes'
This commit is contained in:
commit
2ffa9fb046
14 changed files with 65 additions and 59 deletions
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.bash.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
nixup = "sudo nixos-rebuild switch --flake /etc/nixos/.#desktop";
|
nixup = "sudo nixos-rebuild switch --flake ${config.user.nixosDir}/.#desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.stateVersion = "22.11";
|
home.stateVersion = "22.11";
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@
|
||||||
${config.user.name} = {
|
${config.user.name} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = config.user.groups
|
extraGroups = config.user.groups
|
||||||
++ [ "video" "audio" "kvm" "libvirtd" "docker" ];
|
++ [ "video" "audio" "kvm" "libvirtd" ];
|
||||||
openssh.authorizedKeys.keys = config.user.sshKeys.key2;
|
openssh.authorizedKeys.keys = [ "${config.user.sshKeys.key2}" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.bash.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
nixup = "sudo nixos-rebuild switch --flake /etc/nixos/.#server";
|
nixup = "sudo nixos-rebuild switch --flake ${config.user.nixosDir}/.#server";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
${config.user.name} = {
|
${config.user.name} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = config.user.groups;
|
extraGroups = config.user.groups;
|
||||||
openssh.authorizedKeys.keys = config.user.sshKeys.key1;
|
openssh.authorizedKeys.keys = [ "${config.user.sshKeys.key1}" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
programs.bash.shellAliases = {
|
programs.bash.shellAliases = {
|
||||||
nixup = "sudo nixos-rebuild switch --flake /etc/nixos/.#wsl";
|
nixup = "sudo nixos-rebuild switch --flake ${config.user.nixosDir}/.#wsl";
|
||||||
};
|
};
|
||||||
|
|
||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, config, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
|
gpg = config.modules.user.security.gpg;
|
||||||
|
|
||||||
userConfigs = rec {
|
userConfigs = rec {
|
||||||
name = "bryan";
|
name = "bryan";
|
||||||
email = "bryan@ramos.codes";
|
email = "bryan@ramos.codes";
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
|
nixosDir = /etc/nixos; # PATH to this repo
|
||||||
|
|
||||||
# Image name from ~Pictures/wallpapers directory
|
# Image name from ~Pictures/wallpapers directory
|
||||||
wallpaper = "mountains.jpg";
|
wallpaper = "mountains.jpg";
|
||||||
|
|
@ -14,52 +18,28 @@ let
|
||||||
gitConfig = {
|
gitConfig = {
|
||||||
userName = "Bryan Ramos";
|
userName = "Bryan Ramos";
|
||||||
userEmail = email;
|
userEmail = email;
|
||||||
signing = {
|
signing = optionalAttrs gpg.enable {
|
||||||
key = "F1F3466458452B2DF351F1E864D12BA95ACE1F2D";
|
key = "F1F3466458452B2DF351F1E864D12BA95ACE1F2D";
|
||||||
signByDefault = true;
|
signByDefault = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = {
|
|
||||||
init = { defaultBranch = "master"; };
|
|
||||||
mergetool = {
|
|
||||||
lazygit = {
|
|
||||||
cmd = "lazygit";
|
|
||||||
trustExitCode = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
merge = { tool = "lazygit"; };
|
|
||||||
safe = { directory = "/etc/nixos"; };
|
|
||||||
};
|
|
||||||
|
|
||||||
ignores = [
|
|
||||||
"node_modules"
|
|
||||||
".direnv"
|
|
||||||
"dist-newstyle"
|
|
||||||
".nuxt/"
|
|
||||||
".output/"
|
|
||||||
"dist"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pgpKey = {
|
pgpKey = {
|
||||||
text = import ./pgpKey.nix;
|
text = import ./keys/pgpKey.nix;
|
||||||
trust = 5;
|
trust = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
sshKeys = {
|
sshKeys = {
|
||||||
key1 = [
|
key1 = import ./keys/sshKey1.nix;
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDl4895aB9P5p/lp8Hq5rHun4clvhyTSHFi3U2d6OOBoW5Fm+VcQnW/xbjmCBsXk5BdiowsBxQhwnzdfz/KJL7J5RobomUEaVRwb9UwT88eJveLp14BG8j2J3SjfyhrCX+4jkPx0bPQk1HGcuYY+tPEXf1q/ps88Dhu0CARBIzYQOTYY6b1qWzxpDoFZGHjKG8g5iY6FIu65yKKvvVy1f8IgZ3l3IpwBWVamxgkTcYY0QYSrmzo1n7TXxwrWbvenAqBsQ0cBPs+gVa3uIr+1TJl0Az5SElBVGu3LvUdlk58trtPUj6TQR3YUkg7Vjll7WHOdqhux5ZQNhjkOsHerf0Tw86e6cEzgeTuIbQHIb0LcsUunwKcuh2+au7RO599cvHn0+xZE5MZBxloDDaJ3JsiliM8kyPP/U3ERj03cWLW7BqbT+sfjAOl21RCzk0iQxk1wt/8VmtCr9Adv7IyrtaYvf/bwRP+g+9ldmzKGt8Mdb605uVzZ70H/LLm17f40Te+QHaex5by/6p6cuwEEZtgIg53Wpglu0rA6UxrBfQEHKl/Jt3FLeE0mnEyYkkR2MnHNtyWRIXtuqYZMAm2Ub1pFHH7jQV1gGiDVTw6a2eIwK21a/hXtRjFUpFd1nB1n+KNfJBE4zT3wm3Ud7mKw/6rWnoRyhYZvGXkFdp+iEs49Q=="
|
key2 = import ./keys/sshKey2.nix;
|
||||||
];
|
|
||||||
key2 = [
|
|
||||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK2ROz7EVvE+nzF5k9EYZ2v3JhBzk058uh3QJTzcG4t70fkZgh9y56AOx26eXlKQWuuV05e8EkWRuVI8gfA2ROI="
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
user = lib.mkOption {
|
user = mkOption {
|
||||||
type = lib.types.attrs;
|
type = types.attrs;
|
||||||
default = userConfigs;
|
default = userConfigs;
|
||||||
description = "User Configurations";
|
description = "User Configurations";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
1
src/user/configs/keys/sshKey1.nix
Normal file
1
src/user/configs/keys/sshKey1.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDl4895aB9P5p/lp8Hq5rHun4clvhyTSHFi3U2d6OOBoW5Fm+VcQnW/xbjmCBsXk5BdiowsBxQhwnzdfz/KJL7J5RobomUEaVRwb9UwT88eJveLp14BG8j2J3SjfyhrCX+4jkPx0bPQk1HGcuYY+tPEXf1q/ps88Dhu0CARBIzYQOTYY6b1qWzxpDoFZGHjKG8g5iY6FIu65yKKvvVy1f8IgZ3l3IpwBWVamxgkTcYY0QYSrmzo1n7TXxwrWbvenAqBsQ0cBPs+gVa3uIr+1TJl0Az5SElBVGu3LvUdlk58trtPUj6TQR3YUkg7Vjll7WHOdqhux5ZQNhjkOsHerf0Tw86e6cEzgeTuIbQHIb0LcsUunwKcuh2+au7RO599cvHn0+xZE5MZBxloDDaJ3JsiliM8kyPP/U3ERj03cWLW7BqbT+sfjAOl21RCzk0iQxk1wt/8VmtCr9Adv7IyrtaYvf/bwRP+g+9ldmzKGt8Mdb605uVzZ70H/LLm17f40Te+QHaex5by/6p6cuwEEZtgIg53Wpglu0rA6UxrBfQEHKl/Jt3FLeE0mnEyYkkR2MnHNtyWRIXtuqYZMAm2Ub1pFHH7jQV1gGiDVTw6a2eIwK21a/hXtRjFUpFd1nB1n+KNfJBE4zT3wm3Ud7mKw/6rWnoRyhYZvGXkFdp+iEs49Q=="
|
||||||
1
src/user/configs/keys/sshKey2.nix
Normal file
1
src/user/configs/keys/sshKey2.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK2ROz7EVvE+nzF5k9EYZ2v3JhBzk058uh3QJTzcG4t70fkZgh9y56AOx26eXlKQWuuV05e8EkWRuVI8gfA2ROI="
|
||||||
|
|
@ -5,7 +5,6 @@ function cdg() {
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check for invalid command
|
|
||||||
if [[ -n "$1" ]]; then
|
if [[ -n "$1" ]]; then
|
||||||
echo "Invalid command: $1. Try 'cdg --help'."
|
echo "Invalid command: $1. Try 'cdg --help'."
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,26 @@ in
|
||||||
programs = {
|
programs = {
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
init = { defaultBranch = "master"; };
|
||||||
|
mergetool = {
|
||||||
|
vimdiff = {
|
||||||
|
trustExitCode = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
merge = { tool = "vimdiff"; };
|
||||||
|
safe = {
|
||||||
|
directory = "${config.user.nixosDir}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
ignores = [
|
||||||
|
"node_modules"
|
||||||
|
".direnv"
|
||||||
|
"dist-newstyle"
|
||||||
|
".nuxt/"
|
||||||
|
".output/"
|
||||||
|
"dist"
|
||||||
|
];
|
||||||
} // config.user.gitConfig;
|
} // config.user.gitConfig;
|
||||||
gh = {
|
gh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ let
|
||||||
|
|
||||||
in
|
in
|
||||||
{ options.modules.user.security = { enable = mkEnableOption "user.security"; };
|
{ options.modules.user.security = { enable = mkEnableOption "user.security"; };
|
||||||
config = mkIf cfg.enable {
|
|
||||||
imports = [ ./modules ];
|
imports = [ ./modules ];
|
||||||
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pass
|
pass
|
||||||
wireguard-tools
|
wireguard-tools
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
|
enableScDaemon = true;
|
||||||
pinentryFlavor = "tty";
|
pinentryFlavor = "tty";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,10 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.git.ignores = [
|
||||||
|
".direnv"
|
||||||
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
DIRENV_LOG_FORMAT = " ";
|
DIRENV_LOG_FORMAT = " ";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue