-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
224 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# `hina` | ||
|
||
ThinkPad that I bought used for cheap recently. | ||
|
||
## Hardware | ||
|
||
- Lenovo ThinkPad T470s | ||
- Intel i7-7500U @ 2.7GHz | ||
- 16GB memory | ||
- 250GB NVMe SSD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
{ | ||
inputs, | ||
outputs, | ||
}: let | ||
pkgs-unstable = inputs.nixpkgs-unstable.legacyPackages.x86_64-linux; | ||
in | ||
inputs.home-manager.lib.homeManagerConfiguration { | ||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; | ||
extraSpecialArgs = {inherit inputs outputs pkgs-unstable;}; | ||
|
||
modules = [ | ||
../../../modules/home-manager/terminal_environment | ||
../../../modules/home-manager/terminal_environment/hsxkpasswd | ||
../../../modules/home-manager/terminal_environment/rclone | ||
../../../modules/home-manager/terminal_environment/ssh-config | ||
../../../modules/home-manager/desktop_environment | ||
../../../modules/home-manager/borgmatic.nix | ||
../../../modules/home-manager/cad.nix | ||
../../../modules/home-manager/development.nix | ||
../../../modules/home-manager/media.nix | ||
../../../modules/home-manager/office.nix | ||
|
||
({pkgs, ...}: { | ||
home.packages = with pkgs; [ | ||
lightburn | ||
scrcpy | ||
nur.repos.DanNixon.metty | ||
nur.repos.DanNixon.satorictl-unstable | ||
]; | ||
|
||
services.flatpak.packages = [ | ||
"org.chromium.Chromium" | ||
"com.microsoft.Edge" | ||
|
||
"com.adobe.Flash-Player-Projector" | ||
]; | ||
|
||
services.mpd.enable = true; | ||
|
||
programs.borgmatic.backups."main" = { | ||
location = { | ||
sourceDirectories = [ | ||
"/home/dan/docs" | ||
"/home/dan/notebook" | ||
"/home/dan/.local/share/password-store" | ||
"/home/dan/phone" | ||
"/home/dan/tombs" | ||
]; | ||
repositories = ["ssh://[email protected]/./repo"]; | ||
}; | ||
storage.encryptionPasscommand = "pass borg/hina/passphrase"; | ||
}; | ||
|
||
wayland.windowManager.sway = { | ||
checkConfig = false; # Does not work with background image paths | ||
|
||
config = { | ||
input."2:7:SynPS/2_Synaptics_TouchPad" = { | ||
events = "disabled"; | ||
}; | ||
|
||
output = { | ||
LVDS-1 = { | ||
enable = ""; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
programs.i3status-rust.bars.main.blocks = [ | ||
{ | ||
block = "sound"; | ||
driver = "pulseaudio"; | ||
device_kind = "sink"; | ||
} | ||
{ | ||
block = "sound"; | ||
driver = "pulseaudio"; | ||
device_kind = "source"; | ||
} | ||
{ | ||
block = "battery"; | ||
} | ||
{ | ||
block = "time"; | ||
interval = 1; | ||
format = " $timestamp.datetime(f:'%Y-%m-%d %H:%M:%S') "; | ||
} | ||
]; | ||
|
||
programs.bottom.settings.flags.battery = true; | ||
}) | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
inputs, | ||
outputs, | ||
}: | ||
inputs.nixpkgs.lib.nixosSystem { | ||
specialArgs = {inherit inputs outputs;}; | ||
|
||
modules = [ | ||
inputs.disko.nixosModules.disko | ||
({modulesPath, ...}: { | ||
imports = [ | ||
(modulesPath + "/installer/scan/not-detected.nix") | ||
]; | ||
}) | ||
./hardware.nix | ||
./disk-config.nix | ||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t470s | ||
inputs.nixos-hardware.nixosModules.common-pc-ssd | ||
|
||
../../../modules/nixos/base | ||
../../../modules/nixos/dan.nix | ||
../../../modules/nixos/desktop-environment.nix | ||
../../../modules/nixos/dnscrypt-proxy.nix | ||
../../../modules/nixos/networkmanager.nix | ||
../../../modules/nixos/peripherals/adb.nix | ||
../../../modules/nixos/peripherals/probe-rs.nix | ||
../../../modules/nixos/peripherals/scanner.nix | ||
../../../modules/nixos/peripherals/sound.nix | ||
../../../modules/nixos/peripherals/yubikey.nix | ||
../../../modules/nixos/ssh.nix | ||
../../../modules/nixos/syncthing.nix | ||
|
||
{ | ||
networking.hostName = "hina"; | ||
|
||
services.dnscrypt-proxy2.settings.forwarding_rules = "/etc/dnscrypt-proxy2/forwarding-rules.txt"; | ||
environment.etc."dnscrypt-proxy2/forwarding-rules.txt".text = '' | ||
castle.dan-nixon.com 100.103.214.89 | ||
''; | ||
|
||
virtualisation.podman.enable = true; | ||
services.upower.enable = true; | ||
|
||
services.tailscale = { | ||
enable = true; | ||
useRoutingFeatures = "client"; | ||
}; | ||
|
||
dotfiles.dan.groups = ["video" "dialout"]; | ||
dotfiles.dan.initialPassword = "change-me"; | ||
|
||
# Required for Bambu Lab printer discovery | ||
networking.firewall.allowedUDPPorts = [2021]; | ||
} | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
disko.devices.disk = { | ||
sda = { | ||
type = "disk"; | ||
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVLW256HEHP-000L7_S35ENA0K226098"; | ||
|
||
content = { | ||
type = "gpt"; | ||
|
||
partitions = { | ||
boot = { | ||
name = "boot"; | ||
size = "1M"; | ||
type = "EF02"; | ||
}; | ||
|
||
ESP = { | ||
name = "ESP"; | ||
size = "512M"; | ||
type = "EF00"; | ||
|
||
content = { | ||
type = "filesystem"; | ||
format = "vfat"; | ||
mountpoint = "/boot"; | ||
}; | ||
}; | ||
|
||
root = { | ||
name = "root"; | ||
size = "100%"; | ||
|
||
content = { | ||
type = "luks"; | ||
name = "cryptedroot"; | ||
extraOpenArgs = ["--allow-discards"]; | ||
|
||
content = { | ||
type = "filesystem"; | ||
format = "ext4"; | ||
mountpoint = "/"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{...}: { | ||
boot.loader = { | ||
systemd-boot.enable = true; | ||
efi.canTouchEfiVariables = true; | ||
}; | ||
|
||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod"]; | ||
boot.kernelModules = ["kvm-intel"]; | ||
|
||
hardware.cpu.intel.updateMicrocode = true; | ||
|
||
nixpkgs.hostPlatform = "x86_64-linux"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters