mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-22 12:26:06 -07:00
Compare commits
4 Commits
f9452398e8
...
1367514791
Author | SHA1 | Date | |
---|---|---|---|
1367514791 | |||
d89763c0ae | |||
c81030cac0 | |||
93f080432d |
@ -2,18 +2,7 @@
|
|||||||
|
|
||||||
The following documents some NixOS setup that wasn't automated.
|
The following documents some NixOS setup that wasn't automated.
|
||||||
|
|
||||||
## Encryption Keys
|
## NIPR email, Teams, etc.
|
||||||
|
|
||||||
### Github SSH
|
|
||||||
|
|
||||||
Keys for SSH aren't automatically placed with chezmoi `secret` since it complicated
|
|
||||||
things to much. The key for github SSH must be transferred manually from Bitwarden
|
|
||||||
or:
|
|
||||||
|
|
||||||
- `/run/secrets/keys/github_personal` to `~/.ssh/keys/github_personal`.
|
|
||||||
- `/run/secrets/radicale/users` to `~/.config/radicale/users`.
|
|
||||||
|
|
||||||
### NIPR email, Teams, etc.
|
|
||||||
|
|
||||||
- Run `pcscan` and make sure card reader shows up.
|
- Run `pcscan` and make sure card reader shows up.
|
||||||
- Run `pkcs11-register` to register cac.
|
- Run `pkcs11-register` to register cac.
|
||||||
@ -88,8 +77,3 @@ git clone https://<user>:<token>@git.tstarr.us/tstarr/vulcan.git
|
|||||||
Copy another `.obsidian` folder for the new host (i.e. `.obsidian-<host>`).
|
Copy another `.obsidian` folder for the new host (i.e. `.obsidian-<host>`).
|
||||||
|
|
||||||
Open vault folder in obsidian and change the `.obsidian` folder in settings.
|
Open vault folder in obsidian and change the `.obsidian` folder in settings.
|
||||||
|
|
||||||
|
|
||||||
## Wifi on Shivan
|
|
||||||
|
|
||||||
Connect to wifi network with: `nmcli device wifi connect <SSID> password <password>`.
|
|
||||||
|
@ -2,21 +2,14 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(jovian-nixos + "/modules")
|
(jovian-nixos + "/modules")
|
||||||
#home-manager.nixosModule
|
|
||||||
];
|
];
|
||||||
|
|
||||||
jovian = {
|
jovian = {
|
||||||
steam.desktopSession = "gnome";
|
steam.desktopSession = "gnome";
|
||||||
steam.enable = true;
|
steam.enable = true;
|
||||||
steam.autoStart = true;
|
|
||||||
steam.user = "${user}";
|
steam.user = "${user}";
|
||||||
devices.steamdeck = {
|
devices.steamdeck.enable = true;
|
||||||
enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
# Disable gdm (this is required for Jovian-NixOS)
|
|
||||||
services.xserver.displayManager.gdm.enable = lib.mkForce false;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
jupiter-dock-updater-bin # Binary package for updating firmware on Jupiter Dock, a hardware accessory for certain laptops.
|
jupiter-dock-updater-bin # Binary package for updating firmware on Jupiter Dock, a hardware accessory for certain laptops.
|
||||||
|
@ -1,10 +1,5 @@
|
|||||||
{ config, pkgs, user, lib, inputs, ... }:
|
{ config, pkgs, user, lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./git.nix
|
|
||||||
./home-default.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nixFlakes;
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
@ -30,4 +25,19 @@
|
|||||||
|
|
||||||
# Did you read the comment?
|
# Did you read the comment?
|
||||||
system.stateVersion = "23.11";
|
system.stateVersion = "23.11";
|
||||||
|
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
home.username = "${user}";
|
||||||
|
home.homeDirectory = "/home/${user}";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Did you read the comment?
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
{ config, pkgs, user, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users.${user} = {
|
|
||||||
home.username = "${user}";
|
|
||||||
home.homeDirectory = "/home/${user}";
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
programs.direnv = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
nix-direnv.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
];
|
|
||||||
|
|
||||||
# Did you read the comment?
|
|
||||||
home.stateVersion = "23.11";
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,22 +0,0 @@
|
|||||||
{ config, pkgs, user, lib, ... }:
|
|
||||||
{
|
|
||||||
services.borgmatic.enable = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
borgbackup # Deduplicating backup program
|
|
||||||
tree
|
|
||||||
(pkgs.writeScriptBin "stop-docker-containers" ''
|
|
||||||
#!/bin/sh
|
|
||||||
[ -e /tmp/docker_images ] && rm /tmp/docker_images
|
|
||||||
images=$(docker ps -a -q)
|
|
||||||
echo "$images" > /tmp/docker_images
|
|
||||||
docker stop $images
|
|
||||||
'')
|
|
||||||
(pkgs.writeScriptBin "restore-docker-containers" ''
|
|
||||||
#!/bin/sh
|
|
||||||
[ ! -e /tmp/docker_images ] && exit 0
|
|
||||||
docker start $(cat /tmp/docker_images)
|
|
||||||
rm /tmp/docker_images
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +1,5 @@
|
|||||||
{ config, pkgs, user, lib, inputs, ... }:
|
{ config, pkgs, user, lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./home-configuration.nix
|
|
||||||
./backup.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
|
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@ -17,4 +12,11 @@
|
|||||||
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ];
|
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ];
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
programs.vscode = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.vscode.fhs;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
{ config, pkgs, user, ... }:
|
|
||||||
{
|
|
||||||
home-manager.users.${user} = {
|
|
||||||
programs.vscode = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.vscode.fhs;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -65,6 +65,7 @@
|
|||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
};
|
};
|
||||||
system = {
|
system = {
|
||||||
|
backup.enable = true;
|
||||||
nipr.enable = true;
|
nipr.enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
|
@ -106,6 +106,7 @@
|
|||||||
jellyfin.enable = true;
|
jellyfin.enable = true;
|
||||||
};
|
};
|
||||||
system = {
|
system = {
|
||||||
|
backup.enable = true;
|
||||||
terminal.enable = true;
|
terminal.enable = true;
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -139,6 +139,7 @@ in {
|
|||||||
favorite-apps = [
|
favorite-apps = [
|
||||||
"google-chrome.desktop"
|
"google-chrome.desktop"
|
||||||
"kitty.desktop"
|
"kitty.desktop"
|
||||||
|
"org.gnome.Nautilus.desktop"
|
||||||
"steam.desktop"
|
"steam.desktop"
|
||||||
"vesktop.desktop"
|
"vesktop.desktop"
|
||||||
];
|
];
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./chezmoi.nix ./kitty.nix ];
|
imports = [ ./git.nix ./chezmoi.nix ./kitty.nix ];
|
||||||
}
|
}
|
||||||
|
26
provision/modules/system/backup.nix
Normal file
26
provision/modules/system/backup.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ config, pkgs, user, lib, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.system.backup;
|
||||||
|
in {
|
||||||
|
options.modules.system.backup.enable = lib.mkEnableOption "backup";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.borgmatic.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
borgbackup # Deduplicating backup program
|
||||||
|
tree
|
||||||
|
(pkgs.writeScriptBin "stop-docker-containers" ''
|
||||||
|
#!/bin/sh
|
||||||
|
[ -e /tmp/docker_images ] && rm /tmp/docker_images
|
||||||
|
images=$(docker ps -a -q)
|
||||||
|
echo "$images" > /tmp/docker_images
|
||||||
|
docker stop $images
|
||||||
|
'')
|
||||||
|
(pkgs.writeScriptBin "restore-docker-containers" ''
|
||||||
|
#!/bin/sh
|
||||||
|
[ ! -e /tmp/docker_images ] && exit 0
|
||||||
|
docker start $(cat /tmp/docker_images)
|
||||||
|
rm /tmp/docker_images
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./nipr.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ];
|
imports = [ ./backup.nix ./nipr.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ];
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,7 @@ Set of configs files to setup NixOS.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. Install NixOS with this [guide](https://nixos.wiki/wiki/NixOS_Installation_Guide).
|
1. Install NixOS with this [guide](https://nixos.wiki/wiki/NixOS_Installation_Guide). Use the following paritions and btrfs subvolumes:
|
||||||
Use the following paritions and btrfs subvolumes:
|
|
||||||
|
|
||||||
| Name | Type | Mount Point | Size |
|
| Name | Type | Mount Point | Size |
|
||||||
|---------|-------|-------------|--------------|
|
|---------|-------|-------------|--------------|
|
||||||
@ -19,18 +18,18 @@ Set of configs files to setup NixOS.
|
|||||||
|
|
||||||
2. Run the following commands:
|
2. Run the following commands:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix-shell -p vim git
|
nix-shell -p vim git
|
||||||
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
|
git clone https://github.com/starr-dusT/dotfiles ~/.local/share/chezmoi
|
||||||
```
|
```
|
||||||
|
|
||||||
Move the installer created hardware.nix to dotfiles. E.g. `provision/hosts/<host>/hardware.nix`.
|
Move the installer created hardware.nix to dotfiles. E.g. `provision/hosts/<host>/hardware.nix`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd ~/.local/share/chezmoi/provision
|
cd ~/.local/share/chezmoi/provision
|
||||||
sudo nixos-rebuild switch --flake .#<host>
|
sudo nixos-rebuild switch --flake .#<host>
|
||||||
chezmoi init && chezmoi apply
|
chezmoi init && chezmoi apply
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Profit!
|
3. Profit!
|
||||||
|
|
||||||
@ -38,5 +37,4 @@ Perform additional setup found in [additional-setup](additional-setup.md)
|
|||||||
|
|
||||||
## Update
|
## Update
|
||||||
|
|
||||||
`nixos-rebuild` command is aliased to `nu` assuming the flake is named the same at the
|
`nixos-rebuild` command is aliased to `nu` assuming the flake is named the same at the hostname of the machine.
|
||||||
hostname of the machine.
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user