mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
sync
This commit is contained in:
63
home-manager/home.nix
Normal file
63
home-manager/home.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
# TODO: Set your username
|
||||
home = {
|
||||
username = "your-username";
|
||||
homeDirectory = "/home/your-username";
|
||||
};
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
# programs.neovim.enable = true;
|
||||
# home.packages = with pkgs; [ steam ];
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "22.11";
|
||||
}
|
||||
197
home-manager/sstent.nix
Normal file
197
home-manager/sstent.nix
Normal file
@@ -0,0 +1,197 @@
|
||||
{ lib, config, pkgs, ... }: {
|
||||
|
||||
home-manager.users."sstent" = {
|
||||
home.username = "sstent";
|
||||
home.homeDirectory = "/home/sstent";
|
||||
home.stateVersion = "23.05";
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
autossh
|
||||
azure-cli
|
||||
ansible
|
||||
sshpass
|
||||
(import ./packages/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;
|
||||
programs.home-manager.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;
|
||||
historyControl = ["ignorespace"];
|
||||
shellOptions = [ "histappend" ];
|
||||
sessionVariables = {
|
||||
DOCKER_HOST="tcp://192.168.1.223:2375";
|
||||
NOMAD_ADDR="http://192.168.1.250:4646";
|
||||
TERM="xterm-256color";
|
||||
ANSIBLE_HOST_KEY_CHECKING="False";
|
||||
HSTR_CONFIG="hicolor";
|
||||
PROMPT_COMMAND="history -a;"; # ensure synchronization between bash memory and history file
|
||||
SSH_AUTH_SOCK="/home/sstent/.ssh/wsl-ssh-agent.sock";
|
||||
};
|
||||
bashrcExtra = ''
|
||||
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
|
||||
ssh-add -l
|
||||
export PATH=$PATH:/bin #Fix for wslpath
|
||||
'';
|
||||
};
|
||||
# zsh = {
|
||||
# enable = true;
|
||||
# shellAliases = {
|
||||
# ll = "ls -l";
|
||||
# update = "sudo nixos-rebuild switch";
|
||||
# };
|
||||
# # history = {
|
||||
# # size = 10000;
|
||||
# # path = "${config.xdg.dataHome}/zsh/history";
|
||||
# # };
|
||||
# oh-my-zsh = {
|
||||
# enable = true;
|
||||
# plugins = [ "git" "thefuck" ];
|
||||
# theme = "robbyrussell";
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "sstent";
|
||||
userEmail = "stuart.stent@gmail.com";
|
||||
};
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"odroid*" = {
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user = lib.mkIf config.wsl.enable {
|
||||
|
||||
startServices = true;
|
||||
|
||||
services.ssh-proxy = lib.mkIf config.wsl.enable {
|
||||
Unit = { Description = "WSL Proxy"; };
|
||||
Service = {
|
||||
ExecStart = "${pkgs.writeShellScript "start-proxy" ''
|
||||
set -x
|
||||
${pkgs.coreutils}/bin/rm -f /home/sstent/.ssh/wsl-ssh-agent.sock
|
||||
${pkgs.util-linux}/bin/setsid ${pkgs.socat}/bin/socat UNIX-LISTEN:/home/sstent/.ssh/wsl-ssh-agent.sock,fork EXEC:"${pkgs.npiperelay}/bin/npiperelay.exe -ei -s //./pipe/openssh-ssh-agent",nofork
|
||||
''}";
|
||||
};
|
||||
#Install = { WantedBy = [ "default.target" ]; };
|
||||
};
|
||||
};
|
||||
|
||||
# homeage = {
|
||||
# # Absolute path to identity (created not through home-manager)
|
||||
# identityPaths = [ "~/.ssh/id_ed25519" ];
|
||||
|
||||
# # "activation" if system doesn't support systemd
|
||||
# installationType = "systemd";
|
||||
|
||||
# file."pijulsecretkey" = {
|
||||
# # Path to encrypted file tracked by the git repository
|
||||
# source = ./secretkey.json.age;
|
||||
# symlinks = [ "${config.xdg.configHome}/pijul/secretkey.json" ];
|
||||
# copies = [ "${config.xdg.configHome}/no-symlink-support/secretkey.json" ];
|
||||
# };
|
||||
# };
|
||||
|
||||
# imports = [ homeage.homeManagerModules.homeage ];
|
||||
|
||||
|
||||
|
||||
|
||||
}; ### endf home-manager
|
||||
|
||||
|
||||
#######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