update readme, include example work profile

This commit is contained in:
John Bowdre 2023-08-04 09:33:10 -05:00
parent 95f11fc8d0
commit b2d4129850
4 changed files with 68 additions and 14 deletions

View file

@ -0,0 +1,29 @@
{
description = "A flake to overlay private configurations on my public flake";
inputs = {
dotfiles.url = "github:jbowdre/dotfiles";
};
outputs = { self, dotfiles, nixpkgs } @inputs:
let
inherit (dotfiles) homeConfigurations homeManagerModules lib overlays packages;
inherit (self) outputs;
in
{
homeManagerModules = import "${dotfiles}/modules/home-manager";
overlays = import "${dotfiles}/overlays" { inherit inputs outputs; };
homeConfigurations = {
"work-user@work-system" = lib.homeManagerConfiguration {
modules = [
"${dotfiles}/home/global"
./work_overrides
];
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs outputs; };
};
};
};
}

View file

@ -0,0 +1,24 @@
{ pkgs, ... }: {
imports = [
./fish.nix
];
home = {
# username override
username = "work-user";
packages = with pkgs; [
packer
terraform
vagrant
vault
wsl-open
wslu
];
};
programs = {
htop.enable = true;
git.userEmail = "work-user@company.tld";
};
}

View file

@ -0,0 +1,13 @@
{ pkgs, lib, config, ... }: {
programs.fish = {
# Shell overrides for work
shellAbbrs = rec {
putmykey = "ssh-copy-id -i ~/.ssh/id_ed25519";
putrootkey = "ssh-copy-id -i ~/.ssh/id_ed25519-root";
ssh = "ssh -i ~/.ssh/id_ed25519 -l work-user";
sshroot = "ssh -i ~/.ssh/id_ed25519-root -l root";
vpnkit = "wsl.exe -d wsl-vpnkit --cd /app service wsl-vpnkit";
};
};
}

View file

@ -1,19 +1,7 @@
# Config files # Config files
## Nix ## Nix
I've started the process of leveraging [Nix](https://nixos.org/explore.html) to manage my system configurations. This repo will (eventually?) hold files used for managing user environments with [Home Manager](https://github.com/nix-community/home-manager). The goods are in [flake.nix](./flake.nix) and the [nix](./nix/) directory. I've started the process of leveraging [Nix](https://nixos.org/explore.html) to manage my system configurations. This repo holds files used for managing user environments with [Home Manager](https://github.com/nix-community/home-manager). The goods are in [flake.nix](./flake.nix).
It's very much a work-in-progress though so the legacy dotfile configs are below. I've also set this up so that I can overlay a flake stored in a private repo, say for work-specific configurations. That will allow me to use the same base configs for both work and personal machines, but with some additional work-specific stuff on top. There's an example of how I did that in [.example_work_profile](./.example_work_profile).
## Legacy stuff
Clone the repo:
```sh
git clone https://github.com/jbowdre/dotfiles.git ~/.dotfiles
```
Use `ln` to symlink the desired configs into your home directory:
```sh
ln -s ~/.dotfiles/zsh/.zshrc ~/.zshrc
ln -s ~/.dotfiles/vim/.vimrc ~/.vimrc
ln -s ~/.dotfiles/tmux/.tmux.conf ~/.tmux.conf
ln -s ~/.dotfiles/pwsh/Microsoft.PowerShell_profile.ps1 ~/.config/powershell/Microsoft.PowerShell_profile.ps1
```