move flake

This commit is contained in:
Tyler Starr 2023-07-23 14:34:39 -07:00
parent ef0a64ffb4
commit 111b52c236
12 changed files with 140 additions and 15 deletions

View File

@ -4,3 +4,5 @@
- Document themeing options in additional-setup (to help and figure out automation)
- Make fzf scratch pad for zk notes
- Make scratch pad for taskwarrior/timewarrior?
- Make kestrel vpn setup automatically
- convert home server to nix?

View File

@ -5,6 +5,11 @@
stripComponents = 1
refreshPeriod = "168h"
[".config/alacritty/themes"]
type = "git-repo"
url = "https://github.com/alacritty/alacritty-theme"
refreshPeriod = "168h"
[".local/share/nvim/site/pack/packer/start/packer.nvim"]
type = "git-repo"
url = "https://github.com/wbthomason/packer.nvim.git"
@ -45,7 +50,10 @@
url = "https://codeberg.org/xmobar/xmobar"
refreshPeriod = "168h"
[".config/alacritty/themes"]
type = "git-repo"
url = "https://github.com/alacritty/alacritty-theme"
[".config/nnn/plugins"]
type = "archive"
url = "https://github.com/jarun/nnn/archive/master.zip"
exact = true
stripComponents = 2
refreshPeriod = "168h"
include = ["*/plugins/**"]

View File

@ -1,3 +1,3 @@
#!/usr/bin/env bash
sudo mount -t cifs -o uid=tstarr,gid=tstarr,rw,vers=3.0,credentials=/home/tstarr/.smb //192.168.1.135/engi /home/tstarr/mnt/engi
sudo mount -t cifs -o rw,vers=3.0,credentials=/home/tstarr/.smb //192.168.1.135/engi /home/tstarr/mnt/engi

View File

@ -7,8 +7,8 @@
set $HOME /home/{{ .user }}
set $DISP_PRI DP-2
set $DISP_SEC HDMI-A-1
set $DISP_SEC DP-2
set $DISP_PRI HDMI-A-1
set $BOR_WIDTH 3
set $GAP_INNER 3
@ -227,12 +227,12 @@ mode scratch {
bindsym Escape mode default
}
output HDMI-A-1 {
output $DISP_SEC {
resolution 2560x1440@143.912Hz
position 0,0
}
output DP-3 {
output $DISP_PRI {
resolution 2560x1440@143.973Hz
position 2560,0
}

View File

@ -14,7 +14,7 @@
export ZSH="$HOME/.oh-my-zsh"
DISABLE_AUTO_UPDATE="true"
plugins=(git zsh-syntax-highlighting)
plugins=(git zsh-syntax-highlighting fzf-dir-navigator)
ZSH_THEME="dracula/dracula"
source $ZSH/oh-my-zsh.sh
@ -31,9 +31,9 @@ export PATH
# Create Aliases
# Nixos
alias nixos-update='cd ~/.local/share/chezmoi/provision/nixos && \
alias nixos-update="cd ~/.local/share/chezmoi/provision/nixos/hosts/$(hostname) && \
sudo nixos-rebuild switch --flake .#$(hostname) && \
cd -'
cd -"
# Sway
alias s='sway'

View File

@ -0,0 +1,72 @@
# Additional Setup
The following documents some NixOS setup that wasn't automated.
## Wireguard Client 
Wireguard is nice for a home vpn and [pivpn](https://pivpn.io/) makes it easy.
Currently my scripts for controlling (and visualizing the state of the vpn)
assume the connection name for the vpn is the same as the hostname of the system.
This may need to be modified in the future if I end up needing multiple vpn
connections.
1. Create client on server and copy resulting `.conf` file to local machine
2. Import to networkmanager with:
```bash
nmcli connection import type wireguard file <conf file from pivpn>
```
3. Use `nm-connection-editor` to disable automatic connection
4. Connect to vpn with `nmcli connection up <vpn connection name>
## Mount network drives 
I find fstab messing about more trobule than it is worth. Credentials are
stored in ~/.smb. Mount network drives when needed with the following command:
```bash
linux-mount-<network drive name>
```
## Syncthing
Syncthing is used to sync folders between various computers and android. The
ansible script should setup and run the service, but shares must be setup
via the web gui. Currently four shares exists:
- `.warrior` - `.task` and `.timewarrior` folders to sync taskwarrior tasks.
These two folders are symlinked to the home folder where taskwarrior/timewarrior
expects them.
- `warrior` - contains text files associated with taskwarrior (mostly from
taskopen).
- `phone photos` - personal photos synched from android.
- `phone screenshots` - personal screenshots synced from android.
- `ssh_keys` - contains ssh keys for git remotes (~/.ssh/keys)
- `vimwiki` - contains text files associate with my personal vimwiki.
## Git SSH for personal and work
- ~/.gitconfig - personal github configuration.
- ~/devel/work/.gitconfig - work gitlab configuration.
Gitconfig files for SSH git push/pull are automaitcally placed. The only
additional configuration required is the transfer of SSH keys (see Syncthing
section).
## Firefox 
Transfer the `.mozilla` folder from install-to-install to maintain Firefox
settings and configurations.
## Yuzu
Copy over the `~/.config/yuzu` and `~/.local/share/yuzu` from prior install.
## Themeing (is that a word?)
### Alacritty
TODO
### ZSH
TODO
### Sway
TODO

View File

@ -33,6 +33,7 @@
# Set networking options
networking.hostName = "kestrel";
networking.networkmanager.enable = true;
networking.firewall.checkReversePath = "loose";
# Set your time zone.
time.timeZone = "America/Los_Angeles";

View File

@ -1,5 +1,5 @@
{
description = "A very basic flake";
description = "Flake for kestrel configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
@ -24,14 +24,14 @@
inherit system;
specialArgs = { inherit user; };
modules = [
./hosts/kestrel/configuration.nix
./hosts/kestrel/hardware.nix
./configuration.nix
./hardware.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user; };
home-manager.users.${user} = {
imports = [ ./hosts/kestrel/home-configuration.nix ];
imports = [ ./home-configuration.nix ];
};
}
];

View File

@ -7,6 +7,7 @@
home.packages = with pkgs; [
chezmoi
rbw
zk
];
home.stateVersion = "23.05";

View File

@ -49,6 +49,7 @@ in {
fzf
# From home config
networkmanagerapplet
pcmanfm
google-chrome
firefox

40
provision/nixos/readme.md Normal file
View File

@ -0,0 +1,40 @@
# Provision Nixos
> \*NixOS was a mistake.\*
Set of configs files to setup NixOS.
## Usage
1. Install NixOS with this [guide](https://nixos.wiki/wiki/NixOS_Installation_Guide).
Use the following paritions and btrfs subvolumes:
| Name | Type | Mount Point | Size |
|---------|-------|-------------|--------------|
| EFI | vfat | /boot | 512MB |
| root | btrfs | / | rest of disk |
| home | btrfs | /home | subvol |
| nix | btrfs | /nix | subvol |
| persist | btrfs | /persist | subvol |
| log | btrfs | /var/log | subvol |
2. Run the following commands:
```bash
nix-shell -p vim git
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
```
Move the installer created hardware.nix to dotfiles.
Copy `.chezmoidata.yaml.example` to `.chezmoidata.yaml` and edit with desired settings then run the following commands:
```bash
nixos-update # Assuming hostname is same as flake name
```
Perform additional setup found in [additional-setup](additional-setup.md)
## Update
`nixos-update` command is aliased assuming the flake is named the same at the
hostname of the machine.