Modular stuff now working on thinker!
This commit is contained in:
parent
61ad5d24c0
commit
f24240f8ca
8 changed files with 90 additions and 223 deletions
51
daniel.nix
51
daniel.nix
|
@ -12,58 +12,11 @@
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.rtx
|
pkgs.rtx
|
||||||
|
# I use this for managing the following programs' versions instead of nix:
|
||||||
|
# kubectl, aws
|
||||||
|
|
||||||
# TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?)
|
# TODO: os-specific scripts? macOS versus Linux (arch or nixos? do I need to distinguish at that point?)
|
||||||
(pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; })
|
(pkgs.buildEnv { name = "my-scripts"; paths = [ ./scripts ]; })
|
||||||
|
|
||||||
# fortune # fun sayings
|
|
||||||
# steam # games
|
|
||||||
# pulsemixer # audio
|
|
||||||
# file # identify file types
|
|
||||||
# kitty # terminal emulator
|
|
||||||
# unstable.fzf # fuzzy finder
|
|
||||||
# dmenu # TODO: currently only using this for dmenu_path in `bin/launch`
|
|
||||||
# ranger # tui for file management
|
|
||||||
# pass # the standard unix password manager
|
|
||||||
# vulkan-tools # vkcube for making sure vulkan still works
|
|
||||||
# rustup
|
|
||||||
# clang
|
|
||||||
# pavucontrol # gui pulseaudio manager
|
|
||||||
# pamixer # tui pulseaudio manager
|
|
||||||
# strongswan # work vpn
|
|
||||||
# gnumake
|
|
||||||
# elixir
|
|
||||||
# postgresql # database
|
|
||||||
# htop # almost as good as bottom (btm)
|
|
||||||
# unzip # needed by a handful of other utilities
|
|
||||||
# autoconf
|
|
||||||
# automake # autotools
|
|
||||||
# weechat # irc
|
|
||||||
# python39Full # python 3.9
|
|
||||||
# jq # awk for json
|
|
||||||
# xfce.thunar
|
|
||||||
# xfce.thunar-archive-plugin
|
|
||||||
# xfce.thunar-volman # gui file manager
|
|
||||||
# mpd # music player daemon
|
|
||||||
# ncmpcpp # ncurses music player client
|
|
||||||
# vlc # video player
|
|
||||||
# google-chrome # sometimes ya gotta screenshare
|
|
||||||
|
|
||||||
# # TODO: work module?
|
|
||||||
# google-cloud-sdk # gcloud
|
|
||||||
# kubectl # kubernetes cli
|
|
||||||
# awscli # aws cli
|
|
||||||
# zoom-us # video conferencing
|
|
||||||
# lastpass-cli
|
|
||||||
|
|
||||||
# # TODO: move this one to just laptop?
|
|
||||||
# brightnessctl # laptop screen brightness
|
|
||||||
|
|
||||||
# # nix utils
|
|
||||||
# nox # package querying and installation?
|
|
||||||
# # yay is to pacman, nox is to nix-env
|
|
||||||
# niv # dependency pinning?
|
|
||||||
# lorri # project envrc - like asdf-vm?
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.password-store = {
|
programs.password-store = {
|
||||||
|
|
3
modules/amd.nix
Normal file
3
modules/amd.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, lib, ... }: {
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
|
@ -21,6 +21,6 @@
|
||||||
security = {
|
security = {
|
||||||
# I forget why I need these...
|
# I forget why I need these...
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
security.rtkit.enable = true;
|
rtkit.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,6 +33,8 @@ in
|
||||||
{
|
{
|
||||||
imports = [ ./pipewire.nix ];
|
imports = [ ./pipewire.nix ];
|
||||||
|
|
||||||
|
# services.xserver.libinput.enable = true;
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
programs.gnupg.agent = {
|
programs.gnupg.agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -57,7 +59,10 @@ in
|
||||||
|
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
|
||||||
programs.thunar.enable = true;
|
programs.thunar = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
brightnessctl
|
brightnessctl
|
||||||
|
@ -90,10 +95,10 @@ in
|
||||||
vlc
|
vlc
|
||||||
vulkan-tools
|
vulkan-tools
|
||||||
waybar
|
waybar
|
||||||
|
weechat
|
||||||
wine
|
wine
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wofi
|
wofi
|
||||||
zathura
|
zathura
|
||||||
];
|
];
|
||||||
# services.xserver.libinput.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
29
nixos.nix
29
nixos.nix
|
@ -14,25 +14,26 @@ let
|
||||||
scheme
|
scheme
|
||||||
{ _module.args.disks = disks; }
|
{ _module.args.disks = disks; }
|
||||||
];
|
];
|
||||||
nixosSystem = modules: inputs.nixpkgs.lib.nixosSystem {
|
nixosSystem = modules: (inputs.nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [ ./nixos/common.nix ] ++ modules;
|
modules = [
|
||||||
};
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
./nixos/common.nix
|
||||||
|
] ++ modules ++ hms;
|
||||||
|
});
|
||||||
|
diskoNixosSystem = scheme: disks: modules: (nixosSystem ((disko scheme disks) ++ modules));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
# TODO: disko-fy rascal and beefcake?
|
||||||
|
|
||||||
beefcake = nixosSystem [
|
beefcake = nixosSystem [
|
||||||
inputs.sops-nix.nixosModules.sops
|
./nixos/beefcake.nix
|
||||||
./machines/beefcake.nix
|
|
||||||
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
|
inputs.api-lyte-dev.nixosModules.x86_64-linux.api-lyte-dev
|
||||||
] ++ hms;
|
];
|
||||||
|
|
||||||
musicbox = nixosSystem (disko self.diskoConfigurations.unencrypted [ "/dev/sda" ]) ++ [
|
rascal = nixosSystem [ ./nixos/rascal.nix ];
|
||||||
./machines/musicbox.nix
|
musicbox = diskoNixosSystem self.diskoConfigurations.unencrypted [ "/dev/sda" ] [ ./nixos/musicbox.nix ];
|
||||||
] ++ hms;
|
thinker = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/nvme0n1" ] [ ./nixos/thinker.nix ];
|
||||||
|
dragon = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/disk/by-uuid/asdf" ] [ ./machines/dragon.nix ];
|
||||||
thinker = nixosSystem (disko self.diskoConfigurations.standard [ "/dev/nvme0n1" ]) ++ [
|
|
||||||
./machines/thinker.nix
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
] ++ hms;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,13 +19,12 @@
|
||||||
exa
|
exa
|
||||||
fd
|
fd
|
||||||
file
|
file
|
||||||
fwupd
|
|
||||||
git
|
|
||||||
git-lfs
|
|
||||||
gnumake
|
gnumake
|
||||||
|
gron
|
||||||
hexyl
|
hexyl
|
||||||
htop
|
htop
|
||||||
iputils
|
iputils
|
||||||
|
jq
|
||||||
killall
|
killall
|
||||||
kitty # TODO: I really just need the terminfo on servers, though, right?
|
kitty # TODO: I really just need the terminfo on servers, though, right?
|
||||||
less
|
less
|
||||||
|
@ -39,8 +38,7 @@
|
||||||
rsync
|
rsync
|
||||||
sd
|
sd
|
||||||
sops
|
sops
|
||||||
tmux
|
smartmontools
|
||||||
traceroute
|
|
||||||
unzip
|
unzip
|
||||||
watchexec
|
watchexec
|
||||||
wget
|
wget
|
||||||
|
@ -98,6 +96,9 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
useRoutingFeatures = lib.mkDefault "client";
|
useRoutingFeatures = lib.mkDefault "client";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fwupd.enable = true;
|
||||||
|
smartd.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
console = {
|
console = {
|
||||||
|
@ -149,11 +150,25 @@
|
||||||
hostPlatform = lib.mkDefault "x86_64-linux";
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs =
|
programs = {
|
||||||
{
|
|
||||||
fish = {
|
fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
tmux = {
|
||||||
|
enable = true;
|
||||||
|
clock24 = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
traceroute.enable = true;
|
||||||
|
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
lfs = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
time = {
|
time = {
|
||||||
|
|
138
nixos/rascal.nix
138
nixos/rascal.nix
|
@ -1,146 +1,36 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
{ config, modulesPath, ... }: {
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
imports = [
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
../modules/amd.nix
|
||||||
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
let
|
|
||||||
unstable = import <unstable> { config = { allowUnfree = true; }; };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
# Include the results of the hardware scan.
|
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usbhid" "uas" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "usbhid" "uas" "sd_mod" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/2e2ad73a-6264-4a7b-8439-9c05295d903d";
|
device = "/dev/disk/by-uuid/2e2ad73a-6264-4a7b-8439-9c05295d903d";
|
||||||
fsType = "f2fs";
|
fsType = "f2fs";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
version = 2;
|
||||||
|
device = "/dev/sda";
|
||||||
|
};
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking = {
|
||||||
|
hostName = "rascal";
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
networkmanager.enable = true;
|
||||||
|
|
||||||
# Use the GRUB 2 boot loader.
|
|
||||||
boot.loader.grub.enable = true;
|
|
||||||
boot.loader.grub.version = 2;
|
|
||||||
# boot.loader.grub.efiSupport = true;
|
|
||||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
|
||||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
# Define on which hard drive you want to install Grub.
|
|
||||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
|
||||||
|
|
||||||
networking.hostName = "rascal"; # Define your hostname.
|
|
||||||
# Pick only one of the below networking options.
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Chicago";
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.daniel = {
|
|
||||||
shell = pkgs.fish;
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
||||||
packages = with pkgs; [
|
|
||||||
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.beefcake = {
|
users.users.beefcake = {
|
||||||
# used for restic backups
|
# used for restic backups
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = config.users.users.daniel.openssh.authorizedKeys.keys ++ [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAPLXOjupz3ScYjgrF+ehrbp9OvGAWQLI6fplX6w9Ijb daniel@lyte.dev"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7HrojwoyHED+A/FzRjYmIL0hzofwBd9IYHH6yV0oPO root@beefcake"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK7HrojwoyHED+A/FzRjYmIL0hzofwBd9IYHH6yV0oPO root@beefcake"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
system.stateVersion = "22.05";
|
||||||
# $ nix search wget
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
unstable.helix # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
|
||||||
unstable.zellij
|
|
||||||
tmux
|
|
||||||
curl
|
|
||||||
wget
|
|
||||||
exa
|
|
||||||
sd
|
|
||||||
smartmontools
|
|
||||||
fd
|
|
||||||
git
|
|
||||||
fish
|
|
||||||
ripgrep
|
|
||||||
rnix-lsp
|
|
||||||
wireguard-tools
|
|
||||||
tailscale
|
|
||||||
];
|
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
# programs.gnupg.agent = {
|
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
services.smartd.enable = true;
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.openssh.passwordAuthentication = false;
|
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
EDITOR = "hx";
|
|
||||||
FISH_START_ZELLIJ = "true";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ 51820 ];
|
|
||||||
networking.firewall.checkReversePath = "loose";
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
|
||||||
# accidentally delete configuration.nix.
|
|
||||||
system.copySystemConfiguration = true;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
|
||||||
# settings for stateful data, like file locations and database versions
|
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
||||||
# this value at the release version of the first install of this system.
|
|
||||||
# Before changing this value read the documentation for this option
|
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
||||||
system.stateVersion = "22.05"; # Did you read the comment?
|
|
||||||
|
|
||||||
networking.wireguard.interfaces = {
|
|
||||||
wg0 = {
|
|
||||||
ips = [ "10.0.10.15/24" ];
|
|
||||||
listenPort = 51820;
|
|
||||||
privateKeyFile = "/root/wg.key";
|
|
||||||
|
|
||||||
peers = [
|
|
||||||
{
|
|
||||||
publicKey = "c6gERFUqFr8aTSyRF9c4IF2aah8WbUsO/Qo8QJQ2Hzk=";
|
|
||||||
allowedIPs = [ "0.0.0.0/0" ];
|
|
||||||
endpoint = "vpn4.h.lyte.dev:51820"; # ToDo: route to endpoint not automatically configured https://wiki.archlinux.org/index.php/WireGuard#Loop_routing https://discourse.nixos.org/t/solved-minimal-firewall-setup-for-wireguard-client/7577
|
|
||||||
persistentKeepalive = 25;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ modulesPath, lib, ... }: {
|
{ modulesPath, lib, ... }: {
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
../modules/intel.net
|
../modules/intel.nix
|
||||||
../modules/desktop-usage.nix
|
../modules/desktop-usage.nix
|
||||||
../modules/podman.nix
|
../modules/podman.nix
|
||||||
../modules/wifi.nix
|
../modules/wifi.nix
|
||||||
|
|
Loading…
Reference in a new issue