mirror of
https://github.com/sstent/vmimages.git
synced 2026-04-04 03:53:38 +00:00
sync
This commit is contained in:
163
modules/home-manager/sstent.nix
Normal file
163
modules/home-manager/sstent.nix
Normal file
@@ -0,0 +1,163 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
|
||||
options.mymods.user_sstent.enable = lib.mkEnableOption "Create sstent user";
|
||||
|
||||
config = lib.mkIf config.mymods.user_sstent.enable {
|
||||
users.users = {
|
||||
sstent = {
|
||||
initialPassword = "farscape5";
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC+D4o3mL4BQsRr0UIhB1hn0brSTIJ9Lr0m2fMMVGF3tIuEihnmwGTeAX78q5/bmoo4gZy7G+CHal54S1lY8LY1KvmIDCpPJ8848HvLbTiTX3qZ7Mjaav+Ox9eHMwX+7zkPwdhfP8TDvmNe12j1GEKBhAm+FhdBQCbEV7cbm1SkX0+WBGoVvI2qbRm1RF0mOuTAmO3Lr2YeAcKJ21YxwNMv1Qrj7oxGYH9rLHLNwZ/0soIdTC9cikl4DHyvCs4HRYcVw36uuCVc/AyIT2GeETRapAQr8nzT89Haa1IThgZ9ztjSsSSOtrUhxatlMIfTIpVjl/gWq7GLfqd/ei/evTal sstent@StuPC"
|
||||
];
|
||||
extraGroups = [ "wheel" "video" ];
|
||||
};
|
||||
};
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
home-manager.users."sstent" = {
|
||||
home.username = "sstent";
|
||||
home.homeDirectory = "/home/sstent";
|
||||
home.stateVersion = "22.05";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
autossh
|
||||
azure-cli
|
||||
ansible
|
||||
sshpass
|
||||
(import ./python-packages.nix { pkgs = pkgs; })
|
||||
pyinfra
|
||||
sshpass
|
||||
nmap
|
||||
nomad_1_4
|
||||
consul
|
||||
terraform
|
||||
wget
|
||||
curl
|
||||
socat
|
||||
p7zip
|
||||
#git-run
|
||||
mr
|
||||
perl
|
||||
# beets
|
||||
qemu_kvm
|
||||
nixos-generators
|
||||
nixfmt
|
||||
deploy-rs
|
||||
];
|
||||
|
||||
services.keybase.enable = true;
|
||||
services.kbfs.enable = true;
|
||||
home.file.".mrconfig".source = configs/mrconfig;
|
||||
# xdg.configFile."beets/config.yaml".source = ./beets_config.yaml;
|
||||
programs = {
|
||||
dircolors.enable = true;
|
||||
go.enable = true;
|
||||
gpg.enable = true;
|
||||
htop.enable = true;
|
||||
jq.enable = true;
|
||||
less.enable = true;
|
||||
man.enable = true;
|
||||
nix-index.enable = true;
|
||||
yt-dlp.enable = true;
|
||||
bash = {
|
||||
enable = true;
|
||||
bashrcExtra = ''
|
||||
export DOCKER_HOST="tcp://192.168.1.223:2375";
|
||||
export NOMAD_ADDR="http://192.168.1.250:4646";
|
||||
export TERM="xterm-256color";
|
||||
export ANSIBLE_HOST_KEY_CHECKING=False
|
||||
|
||||
export HSTR_CONFIG=hicolor # get more colors
|
||||
shopt -s histappend # append new history items to .bash_history
|
||||
export HISTCONTROL=ignorespace # leading space hides commands from history
|
||||
# ensure synchronization between bash memory and history file
|
||||
export PROMPT_COMMAND="history -a;"
|
||||
|
||||
if [ -e /home/sstent/.nix-profile/etc/profile.d/nix.sh ]; then . /home/sstent/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer
|
||||
|
||||
#keybase service &
|
||||
# Configure ssh forwarding
|
||||
. wsl-ssh-agent-forwarder
|
||||
ssh-add -l
|
||||
|
||||
'';
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "sstent";
|
||||
userEmail = "stuart.stent@gmail.com";
|
||||
};
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"odroid*" = {
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
#######If Gnome
|
||||
config = lib.mkIf config.mymods.gnome.enable {
|
||||
programs.bash.enable = true;
|
||||
programs.firefox.enable = true;
|
||||
programs.gnome-terminal.enable = true;
|
||||
programs.gnome-terminal.profile = {
|
||||
"f2afd3c7-cb35-4d08-b6c2-523b444be64d" = {
|
||||
visibleName = "Stu";
|
||||
showScrollbar = true;
|
||||
default = true;
|
||||
font = "DejaVu Sans Mono 12";
|
||||
colors = {
|
||||
backgroundColor = "rgb(23,20,33)";
|
||||
foregroundColor = "rgb(208,207,204)";
|
||||
palette = [
|
||||
"#272224"
|
||||
"#FF473D"
|
||||
"#3DCCB2"
|
||||
"#FF9600"
|
||||
"#3B7ECB"
|
||||
"#F74C6D"
|
||||
"#00B5FC"
|
||||
"#3E3E3E"
|
||||
"#52494C"
|
||||
"#FF6961"
|
||||
"#85E6D4"
|
||||
"#FFB347"
|
||||
"#779ECB"
|
||||
"#F7A8B8"
|
||||
"#55CDFC"
|
||||
"#EEEEEC"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile."gnome-initial-setup-done".text = "yes";
|
||||
xdg.configFile."gtk-3.0/bookmarks".text = ''
|
||||
file:///mnt/Public Public
|
||||
'';
|
||||
dconf.settings = {
|
||||
# ...
|
||||
"org/gnome/shell" = {
|
||||
favorite-apps = [
|
||||
"firefox.desktop"
|
||||
"org.gnome.Terminal.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/interface" = { color-scheme = "prefer-dark"; };
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user