mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-05-19 10:56:05 -07:00
Compare commits
8 Commits
b773c64e3b
...
0cb5e3d5b6
Author | SHA1 | Date | |
---|---|---|---|
0cb5e3d5b6 | |||
0a6982d730 | |||
d79bc6f744 | |||
918204f8f3 | |||
e98037230a | |||
d04f9610fd | |||
c54a3147aa | |||
d8e63f5099 |
@ -8,7 +8,7 @@
|
|||||||
"network", "custom/separator",
|
"network", "custom/separator",
|
||||||
"cpu", "custom/separator",
|
"cpu", "custom/separator",
|
||||||
"memory", "custom/separator",
|
"memory", "custom/separator",
|
||||||
"custom/mouse", "custom/separator",
|
"custom/laptop_batt", "custom/mouse", "custom/separator",
|
||||||
"pulseaudio", "custom/separator",
|
"pulseaudio", "custom/separator",
|
||||||
"custom/disk", "custom/bits"],
|
"custom/disk", "custom/bits"],
|
||||||
|
|
||||||
@ -48,6 +48,11 @@
|
|||||||
"format-linked": "{ifname} (No IP) ?",
|
"format-linked": "{ifname} (No IP) ?",
|
||||||
"format-disconnected": "",
|
"format-disconnected": "",
|
||||||
"on-click": "nm-connection-editor"
|
"on-click": "nm-connection-editor"
|
||||||
|
},
|
||||||
|
"custom/laptop_batt": {
|
||||||
|
"format": " <span color=\"#{{ .themes.gruvbox.red }}\">{}</span>% ",
|
||||||
|
"interval": 5,
|
||||||
|
"exec": "cat /sys/class/power_supply/BAT0/capacity",
|
||||||
},
|
},
|
||||||
"custom/mouse": {
|
"custom/mouse": {
|
||||||
"format": " <span color=\"#{{ .themes.gruvbox.red }}\">{}</span>% ",
|
"format": " <span color=\"#{{ .themes.gruvbox.red }}\">{}</span>% ",
|
||||||
@ -77,7 +82,7 @@
|
|||||||
"spacing": 10
|
"spacing": 10
|
||||||
},
|
},
|
||||||
"custom/separator": {
|
"custom/separator": {
|
||||||
"format": " | ",
|
"format": " <span color=\"#{{ .themes.gruvbox.green }}\">|</span> ",
|
||||||
"interval": "once",
|
"interval": "once",
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
@ -114,6 +114,10 @@ window#waybar.hidden {
|
|||||||
color: @fg;
|
color: @fg;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#custom-laptop_batt {
|
||||||
|
color: @fg;
|
||||||
|
}
|
||||||
|
|
||||||
#custom-mouse {
|
#custom-mouse {
|
||||||
color: @fg;
|
color: @fg;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
The following documents some NixOS setup that wasn't automated.
|
The following documents some NixOS setup that wasn't automated.
|
||||||
|
|
||||||
|
## Hyprland
|
||||||
|
|
||||||
|
Detecting monitor configs is annoying and I don't feel like it is worth the time
|
||||||
|
to figure out. After doing the first `chezmoi apply` you will need copy `monitors.conf.example`
|
||||||
|
in the hyprland config folder to `monitors.conf` and edit for correct monitor
|
||||||
|
settings.
|
||||||
|
|
||||||
## Encryption Keys
|
## Encryption Keys
|
||||||
|
|
||||||
### Github SSH
|
### Github SSH
|
||||||
@ -109,3 +116,20 @@ launch command to run them within gamescope.
|
|||||||
```bash
|
```bash
|
||||||
gamescope -w 2560 -h 1440 -f %command%
|
gamescope -w 2560 -h 1440 -f %command%
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Obsidian Vault on New machine
|
||||||
|
|
||||||
|
Clone `vulcan` vault from personal github.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://<user>:<token>@git.tstarr.us/tstarr/vulcan.git
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy another `.obsidian` folder for the new host (i.e. `.obsidian-<host>`).
|
||||||
|
|
||||||
|
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>`.
|
||||||
|
@ -51,6 +51,28 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
shivan = lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit user; inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./modules
|
||||||
|
./hosts/shivan/configuration.nix
|
||||||
|
./hosts/shivan/hardware.nix
|
||||||
|
sops-nix.nixosModules.sops
|
||||||
|
home-manager.nixosModules.home-manager {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.extraSpecialArgs = { inherit user; };
|
||||||
|
home-manager.users.${user} = {
|
||||||
|
imports = [
|
||||||
|
./home-modules
|
||||||
|
./hosts/shivan/home-configuration.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
torus = lib.nixosSystem {
|
torus = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; inherit inputs; };
|
specialArgs = { inherit user; inherit inputs; };
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
settings.devices = {
|
settings.devices = {
|
||||||
"bulwark" = { id = "ZGLQ725-OJSDNTE-MXYLIUD-XDB7REJ-2B2DVNU-PAFF6VC-MUUWRI6-4SNPWAK"; };
|
"bulwark" = { id = "ZGLQ725-OJSDNTE-MXYLIUD-XDB7REJ-2B2DVNU-PAFF6VC-MUUWRI6-4SNPWAK"; };
|
||||||
"torus" = { id = "WCZYHD7-5Y33SSU-74JHAQR-V7LYMDM-SDG2NTN-DJ2VKF2-DUBBUE5-PU5CGQN"; };
|
"torus" = { id = "WCZYHD7-5Y33SSU-74JHAQR-V7LYMDM-SDG2NTN-DJ2VKF2-DUBBUE5-PU5CGQN"; };
|
||||||
|
"shivan" = { id = "KUSOQSH-RKLLA32-T3KAPQP-VNJISLL-QSQCGFZ-ZL7ZULE-MJC67DK-2U6G4Q7"; };
|
||||||
};
|
};
|
||||||
settings.folders = {
|
settings.folders = {
|
||||||
"Gamecube Saves" = {
|
"Gamecube Saves" = {
|
||||||
@ -38,6 +39,10 @@
|
|||||||
path = "/home/${user}/.local/share/ares/Saves";
|
path = "/home/${user}/.local/share/ares/Saves";
|
||||||
devices = [ "bulwark" ];
|
devices = [ "bulwark" ];
|
||||||
};
|
};
|
||||||
|
"General Sync" = {
|
||||||
|
path = "/home/${user}/sync";
|
||||||
|
devices = [ "shivan" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
119
provision/hosts/shivan/configuration.nix
Normal file
119
provision/hosts/shivan/configuration.nix
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
{ config, pkgs, user, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./syncthing.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixFlakes;
|
||||||
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
|
||||||
|
settings.auto-optimise-store = true;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Add non-free packages
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" "openssl-1.1.1w" ];
|
||||||
|
nixpkgs.overlays = import ../../lib/overlays.nix;
|
||||||
|
|
||||||
|
# Use zen kernel
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
|
# Hardware options
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.package = pkgs.bluez;
|
||||||
|
hardware.sensor.iio.enable = true;
|
||||||
|
hardware.opengl.enable = true;
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Set networking options
|
||||||
|
networking.hostName = "shivan";
|
||||||
|
networking.firewall.checkReversePath = "loose";
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# Set your time zone.
|
||||||
|
time.timeZone = "America/Los_Angeles";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
|
# Add fonts
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerdfonts
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable docker
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
# Define user account.
|
||||||
|
users.users.${user} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "dialout" "wheel" "docker" "libvirtd" ]; # Enable ‘sudo’ for the user.
|
||||||
|
};
|
||||||
|
|
||||||
|
# Password-less root
|
||||||
|
security.sudo.extraRules = [{
|
||||||
|
users = [ "${user}" ];
|
||||||
|
commands = [{
|
||||||
|
command = "ALL" ;
|
||||||
|
options= [ "NOPASSWD" ];
|
||||||
|
}];
|
||||||
|
}];
|
||||||
|
|
||||||
|
# List packages installed in system profile.
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# One-off stable packages
|
||||||
|
distrobox
|
||||||
|
] ++ [
|
||||||
|
# One-off unstable packages
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable modules
|
||||||
|
modules = {
|
||||||
|
desktop = {
|
||||||
|
sway.enable = true;
|
||||||
|
browser.enable = true;
|
||||||
|
};
|
||||||
|
devel = {
|
||||||
|
engineering.enable = true;
|
||||||
|
notes.enable = true;
|
||||||
|
python.enable = true;
|
||||||
|
tooling.enable = true;
|
||||||
|
};
|
||||||
|
gaming = {
|
||||||
|
steam.enable = false;
|
||||||
|
emulation.enable = false;
|
||||||
|
misc.enable = false;
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
jellyfin.enable = false;
|
||||||
|
peripherals.enable = true;
|
||||||
|
samba-client.enable = true;
|
||||||
|
virt-manager.enable = false;
|
||||||
|
};
|
||||||
|
system = {
|
||||||
|
secrets.enable = true;
|
||||||
|
ssh.enable = true;
|
||||||
|
terminal.enable = true;
|
||||||
|
wireguard-client = {
|
||||||
|
enable = false;
|
||||||
|
#privateKeyFile = "/run/secrets/wireguard/kestrel";
|
||||||
|
#address = [ "192.168.3.3/24" ];
|
||||||
|
#publicKey = "bd7bbZOngl/FTdBlnbIhgCLNf6yx5X8WjiRB7E1NEQQ=";
|
||||||
|
#endpoint = "66.218.43.87";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Did you read the comment?
|
||||||
|
system.stateVersion = "23.11";
|
||||||
|
}
|
38
provision/hosts/shivan/hardware.nix
Normal file
38
provision/hosts/shivan/hardware.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/fe18234e-9b76-4c4e-bb5b-3672fa15e426";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/1940-C125";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
32
provision/hosts/shivan/home-configuration.nix
Normal file
32
provision/hosts/shivan/home-configuration.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{ config, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
home.username = "${user}";
|
||||||
|
home.homeDirectory = "/home/${user}";
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# Setup direnv
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Setup git
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "starr-dusT";
|
||||||
|
userEmail = "starrtyler88@gmail.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enable home modules
|
||||||
|
modules = {
|
||||||
|
desktop = {
|
||||||
|
kitty.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.stateVersion = "23.11";
|
||||||
|
}
|
26
provision/hosts/shivan/syncthing.nix
Normal file
26
provision/hosts/shivan/syncthing.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
{
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8384 22000 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ 22000 21027 ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ syncthing ];
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
user = "${user}";
|
||||||
|
dataDir = "/home/${user}/.local/share/syncthing";
|
||||||
|
configDir = "/home/${user}/.config/syncthing";
|
||||||
|
guiAddress = "0.0.0.0:8384";
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
settings.devices = {
|
||||||
|
"kestrel" = { id = "KYEWTBL-GL343U7-OIM63LT-2IYGJAP-RCL545L-2KJOIY4-6352W6Y-DZRVGAL"; };
|
||||||
|
};
|
||||||
|
settings.folders = {
|
||||||
|
"General Sync" = {
|
||||||
|
path = "/home/${user}/sync";
|
||||||
|
devices = [ "kestrel" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -24,18 +24,16 @@ Set of configs files to setup NixOS.
|
|||||||
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.
|
Move the installer created hardware.nix to dotfiles. E.g. `provision/hosts/<host>/hardware.nix`.
|
||||||
|
|
||||||
Copy `.chezmoidata.yaml.example` to `.chezmoidata.yaml` and edit with desired
|
|
||||||
settings then run the following commands:
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nixos-update # Assuming hostname is same as flake name
|
cd ~/.local/share/chezmoi/provision
|
||||||
|
sudo nixos-rebuild switch --flake .#<host>
|
||||||
```
|
```
|
||||||
|
|
||||||
Perform additional setup found in [additional-setup](additional-setup.md)
|
Perform additional setup found in [additional-setup](additional-setup.md)
|
||||||
|
|
||||||
## Update
|
## Update
|
||||||
|
|
||||||
`nixos-update` command is aliased 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.
|
||||||
|
@ -18,3 +18,4 @@ for information on initial installation.
|
|||||||
| <img src="./resources/img/kestrel.png" width="100"> | [Kestrel](./provision/hosts/kestrel/) | Primary desktop | Main machine that does it all gaming, programming, 3D modelling, etc. |
|
| <img src="./resources/img/kestrel.png" width="100"> | [Kestrel](./provision/hosts/kestrel/) | Primary desktop | Main machine that does it all gaming, programming, 3D modelling, etc. |
|
||||||
| <img src="./resources/img/torus.png" width="100"> | [Torus](./provision/hosts/torus/) | Home server | Primary home server for storage, hosting machine backups, and running services like Jellyfin. |
|
| <img src="./resources/img/torus.png" width="100"> | [Torus](./provision/hosts/torus/) | Home server | Primary home server for storage, hosting machine backups, and running services like Jellyfin. |
|
||||||
| <img src="./resources/img/bulwark.png" width="100"> | [Bulwark](./provision/hosts/bulwark/) | Steam Deck | NixOS based Steam Deck that can has my linux niceties and acts like a Steam Deck using the great [Jovian Nixos](https://github.com/Jovian-Experiments/Jovian-NixOS). |
|
| <img src="./resources/img/bulwark.png" width="100"> | [Bulwark](./provision/hosts/bulwark/) | Steam Deck | NixOS based Steam Deck that can has my linux niceties and acts like a Steam Deck using the great [Jovian Nixos](https://github.com/Jovian-Experiments/Jovian-NixOS). |
|
||||||
|
| <img src="./resources/img/shivan.png" width="100"> | [Shivan](./provision/hosts/shivan/) | Personal Laptop | Personal (and very slow) laptop for basic mobile work. |
|
||||||
|
BIN
resources/img/shivan.png
Normal file
BIN
resources/img/shivan.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 143 KiB |
Loading…
x
Reference in New Issue
Block a user