Compare commits

..

No commits in common. "13675147914a67500e3111da50b999d92217a860" and "f9452398e8697d4a2c6e141ce3860cbe20f222c4" have entirely different histories.

15 changed files with 102 additions and 67 deletions

View File

@ -2,7 +2,18 @@
The following documents some NixOS setup that wasn't automated. The following documents some NixOS setup that wasn't automated.
## NIPR email, Teams, etc. ## Encryption Keys
### 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.
@ -77,3 +88,8 @@ 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>`.

View File

@ -2,15 +2,22 @@
{ {
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.enable = true; devices.steamdeck = {
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.
steamdeck-firmware # Firmware package for Valve's Steam Deck, a handheld gaming device. steamdeck-firmware # Firmware package for Valve's Steam Deck, a handheld gaming device.

View File

@ -1,5 +1,10 @@
{ 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";
@ -25,19 +30,4 @@
# 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";
};
} }

View File

@ -0,0 +1,20 @@
{ 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";
};
}

View File

@ -0,0 +1,22 @@
{ 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
'')
];
}

View File

@ -1,5 +1,10 @@
{ 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.
@ -12,11 +17,4 @@
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;
};
};
} }

View File

@ -0,0 +1,9 @@
{ config, pkgs, user, ... }:
{
home-manager.users.${user} = {
programs.vscode = {
enable = true;
package = pkgs.vscode.fhs;
};
};
}

View File

@ -65,7 +65,6 @@
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;

View File

@ -106,7 +106,6 @@
jellyfin.enable = true; jellyfin.enable = true;
}; };
system = { system = {
backup.enable = true;
terminal.enable = true; terminal.enable = true;
ssh.enable = true; ssh.enable = true;
}; };

View File

@ -139,7 +139,6 @@ 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"
]; ];

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./git.nix ./chezmoi.nix ./kitty.nix ]; imports = [ ./chezmoi.nix ./kitty.nix ];
} }

View File

@ -1,26 +0,0 @@
{ 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
'')
];
};
}

View File

@ -1,4 +1,4 @@
{ ... }: { ... }:
{ {
imports = [ ./backup.nix ./nipr.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ]; imports = [ ./nipr.nix ./ssh.nix ./terminal.nix ./wireguard-client.nix ];
} }

View File

@ -5,7 +5,8 @@ Set of configs files to setup NixOS.
## Usage ## Usage
1. Install NixOS with this [guide](https://nixos.wiki/wiki/NixOS_Installation_Guide). Use the following paritions and btrfs subvolumes: 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 | | Name | Type | Mount Point | Size |
|---------|-------|-------------|--------------| |---------|-------|-------------|--------------|
@ -18,18 +19,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!
@ -37,4 +38,5 @@ 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 hostname of the machine. `nixos-rebuild` command is aliased to `nu` assuming the flake is named the same at the
hostname of the machine.