mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -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.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";
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
${config.user.name} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = config.user.groups
|
||||
++ [ "video" "audio" "kvm" "libvirtd" "docker" ];
|
||||
openssh.authorizedKeys.keys = config.user.sshKeys.key2;
|
||||
++ [ "video" "audio" "kvm" "libvirtd" ];
|
||||
openssh.authorizedKeys.keys = [ "${config.user.sshKeys.key2}" ];
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
programs.home-manager.enable = true;
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
${config.user.name} = {
|
||||
isNormalUser = true;
|
||||
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.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";
|
||||
|
|
|
|||
|
|
@ -1,10 +1,14 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
gpg = config.modules.user.security.gpg;
|
||||
|
||||
userConfigs = rec {
|
||||
name = "bryan";
|
||||
email = "bryan@ramos.codes";
|
||||
shell = pkgs.bash;
|
||||
nixosDir = /etc/nixos; # PATH to this repo
|
||||
|
||||
# Image name from ~Pictures/wallpapers directory
|
||||
wallpaper = "mountains.jpg";
|
||||
|
|
@ -14,52 +18,28 @@ let
|
|||
gitConfig = {
|
||||
userName = "Bryan Ramos";
|
||||
userEmail = email;
|
||||
signing = {
|
||||
signing = optionalAttrs gpg.enable {
|
||||
key = "F1F3466458452B2DF351F1E864D12BA95ACE1F2D";
|
||||
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 = {
|
||||
text = import ./pgpKey.nix;
|
||||
text = import ./keys/pgpKey.nix;
|
||||
trust = 5;
|
||||
};
|
||||
|
||||
sshKeys = {
|
||||
key1 = [
|
||||
"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 = [
|
||||
"ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBK2ROz7EVvE+nzF5k9EYZ2v3JhBzk058uh3QJTzcG4t70fkZgh9y56AOx26eXlKQWuuV05e8EkWRuVI8gfA2ROI="
|
||||
];
|
||||
key1 = import ./keys/sshKey1.nix;
|
||||
key2 = import ./keys/sshKey2.nix;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options = {
|
||||
user = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
user = mkOption {
|
||||
type = types.attrs;
|
||||
default = userConfigs;
|
||||
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
|
||||
fi
|
||||
|
||||
# Check for invalid command
|
||||
if [[ -n "$1" ]]; then
|
||||
echo "Invalid command: $1. Try 'cdg --help'."
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -10,6 +10,26 @@ in
|
|||
programs = {
|
||||
git = {
|
||||
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;
|
||||
gh = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ let
|
|||
|
||||
in
|
||||
{ options.modules.user.security = { enable = mkEnableOption "user.security"; };
|
||||
config = mkIf cfg.enable {
|
||||
imports = [ ./modules ];
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
pass
|
||||
wireguard-tools
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ in
|
|||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableBashIntegration = true;
|
||||
enableScDaemon = true;
|
||||
pinentryFlavor = "tty";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,6 +29,10 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
programs.git.ignores = [
|
||||
".direnv"
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
DIRENV_LOG_FORMAT = " ";
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue