Get rid of the nixlap host.

Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
Mariano Uvalle 2025-07-12 19:51:49 -07:00
parent 54ccf4e63f
commit dacb7018a3
4 changed files with 0 additions and 707 deletions

View file

@ -1,317 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ lib, config, pkgs, ghostty, ... }:
let
hello-script = import ../../nixos-modules/shell-apps/hello.nix {inherit pkgs; };
print-colors-script = import ../../nixos-modules/shell-apps/print-colors.nix { inherit pkgs; };
in
{
imports = lib.flatten [
# Include the results of the hardware scan.
./hardware-configuration.nix
../common/core
# Set up relative to root.
../common/optional/yubikey.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Firmware updates.
services.fwupd.enable = true;
# Support for the fingerprint reader.
services.fprintd.enable = true;
# bluetooth.
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = false;
services.blueman.enable = true;
# power saving on amd laptops.
services.power-profiles-daemon.enable = true;
# Bonjour
services.murmur.bonjour = true;
yubikey.enable-u2f-auth = true;
# Allow using flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
virtualisation.docker.enable = true;
networking.hostName = "nixlap"; # Define your hostname.
# TODO: Move the passwords to secrets before pushing this to source control.
networking.wireless = { # Enables wireless supprto through wpa supplicant.
enable = true;
secretsFile = config.sops.secrets."wireless.env".path;
networks = {
# Home
"UG_LivingRoom_5G" = {
pskRaw = "ext:home_psk";
};
# Whidbey coffee.
pioneer = {
psk = "Coffee99";
};
"Tim Hortons WiFi" = {};
# Mayne Island cabin
"SHAW-8D81B0" = {
psk = "2511530A6165";
};
# Coffee shops
"Story Coffee" = {
psk = "YOURSTORY";
};
"SoulfoodGuest" = {
psk = "javajava123";
};
"Cedar And Salt 2.4" = {
psk = "Coffeehouse";
};
"Starbucks WiFi" = {};
};
};
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Display
services.xserver = {
enable = true;
enableTearFree = true;
synaptics = {
scrollDelta = -75;
};
windowManager.awesome.enable = true;
xkb = {
layout = "us";
variant = "";
};
};
services.picom = {
enable = true;
vSync = true;
};
# Allow autorandr hot-plug.
services.autorandr.enable = true;
programs.zsh.enable = true;
users.users.jmug = {
isNormalUser = true;
description = "Mariano Uvalle";
extraGroups = [ "wheel" "docker" ];
shell = pkgs.zsh;
};
users.users.root = {
shell = pkgs.zsh;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# iPhone USB tethering.
services.usbmuxd.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
rpi-imager
fzf
ripgrep
i3lock-fancy
# Logitech mouse
logiops
# System
power-profiles-daemon
htop
git
neovim
wget
libnotify
autorandr
# iOS tethering and mounting
libimobiledevice
ifuse
# Custom shell apps
hello-script
print-colors-script
# Terminal
ghostty.packages.x86_64-linux.default
# Thin provisioning tools
thin-provisioning-tools
];
programs.neovim.enable = true;
programs.neovim.defaultEditor = true;
fonts = {
fontDir.enable = true;
packages = with pkgs; [
nerd-fonts.bigblue-terminal
nerd-fonts.fira-code
];
};
# Logiops daemon
systemd.packages = [ pkgs.logiops ];
systemd.services.logid.wantedBy = [ "multi-user.target" ];
environment.etc = {
"logid.cfg" = {
# For some reason scroll inversion does not work for the mx vertical...
text = ''
devices: (
{
name: "Wireless Mouse MX Master 3";
hiresscroll: {
invert: true;
};
thumbwheel: {
invert: true;
};
buttons: (
{
cid: 0x53;
action =
{
type : "Keypress";
keys: ["KEY_LEFTMETA", "KEY_LEFT"];
};
},
{
cid: 0x56;
action =
{
type : "Keypress";
keys: ["KEY_LEFTMETA", "KEY_RIGHT"];
};
}
);
},
{
name: "MX Vertical Advanced Ergonomic Mouse";
hiresscroll: {
hires: true;
invert: false;
target: false;
};
buttons: (
{
cid: 0x53;
action =
{
type : "Keypress";
keys: ["KEY_LEFTMETA", "KEY_PAGEUP"];
};
},
{
cid: 0x56;
action =
{
type : "Keypress";
keys: ["KEY_LEFTMETA", "KEY_PAGEDOWN"];
};
},
{
cid: 0xfd;
action =
{
type : "Keypress";
keys: ["KEY_LEFTMETA"];
};
}
);
}
);
'';
};
};
# Install keyd for system level key remapping.
services.keyd = {
enable = true;
keyboards.colemakdhm = {
ids = [ "0001:0001:70533846" ];
settings = {
main = {
e = "f";
r = "p";
t = "b";
y = "j";
u = "l";
i = "u";
o = "y";
p = ";";
s = "r";
d = "s";
f = "t";
h = "m";
j = "n";
k = "e";
l = "i";
";" = "o";
v = "d";
b = "v";
n = "k";
m = "h";
leftalt = "leftmeta";
leftmeta = "leftalt";
capslock = "leftcontrol";
};
};
};
};
services.acpid = {
enable = true;
# Run autorandr when the lid opens/closes.
lidEventCommands = ''
export PATH=/run/wrappers/bin:/run/current-system/sw/bin:$PATH
export DISPLAY=":0.0"
export XAUTHORITY="/home/jmug/.Xauthority"
sudo -u jmug autorandr --change
'';
};
# USB devices
services.devmon.enable = true;
services.gvfs.enable = true;
services.udisks2.enable = true;
# Smart Cards (required for yubico authenticator)
services.pcscd.enable = true;
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
programs.ssh.startAgent = 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. Its 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 = "24.11"; # Did you read the comment?
}

View file

@ -1,46 +0,0 @@
# 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 = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
# To allow for hibernate.
boot.initrd.systemd.enable = true;
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ac3509f2-1123-461b-89c3-0dcfcb1e2a91";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/DEF4-1192";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/442b1474-627d-4f0d-bd67-5f91e6396d56"; }
];
# 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.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
services.libinput.touchpad.naturalScrolling = true;
services.libinput.mouse.naturalScrolling = true;
}

View file

@ -1,33 +0,0 @@
{ config, pkgs, ... } :
{
imports = [
../../home-modules/default.nix
../../home-modules/nvim.nix
../../home-modules/git.nix
../../home-modules/lazygit.nix
../../home-modules/starship.nix
../../home-modules/zsh.nix
];
home = {
username = "root";
homeDirectory = "/root";
stateVersion = "24.11";
};
programs.zsh = {
shellAliases = {
lg = "lazygit";
n = "nvim";
# TODO: Interpolate the hostname here.
nrsw = "nixos-rebuild switch --flake /home/jmug/nixos#nixlap";
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,311 +0,0 @@
{ lib, config, pkgs, ... } :
let
pathToKeys = ../common/keys/yubi;
yubiKeys =
lib.lists.forEach (builtins.attrNames (builtins.readDir pathToKeys))
(key: lib.substring 0 (lib.stringLength key - lib.stringLength ".pub") key); # Remove .pub suffix.
yubikeyPublicKeyEntries = lib.attrsets.mergeAttrsList (
lib.lists.map
(key: { ".ssh/${key}.pub".source = "${pathToKeys}/${key}.pub"; })
yubiKeys
);
in
{
imports = [
../../home-modules/default.nix
../../home-modules/nvim.nix
../../home-modules/tmux.nix
../../home-modules/git.nix
../../home-modules/lazygit.nix
../../home-modules/starship.nix
../../home-modules/direnv.nix
../../home-modules/zsh.nix
../../home-modules/vscode.nix
../../home-modules/books.nix
../../home-modules/ghostty-config.nix
../../home-modules/sops.nix
../../home-modules/ssh-client.nix
];
# Add the match block for the rasp alarm.
ssh-client.add-alarm = true;
# Let home manager start the X11 session.
xsession = {
enable = true;
windowManager.awesome.enable = true;
initExtra = "
albert &
flameshot &
";
};
home = {
username = "jmug";
homeDirectory = "/home/jmug";
packages = with pkgs; [
gpick
ticktick
galculator
blueman
albert
xclip
fprintd
keyd
librewolf
zig
xorg.xwininfo
neofetch
# For battery widged.
acpid
# Screen management
brightnessctl
# Audio
spotify
spotify-tray
# Communication
discord
slack
# Wallpapers
nitrogen
# Coms
whatsie
discord
# Embedded
usbutils
# Screenshots
flameshot
# xdg-open
xdg-utils
powertop
age
sops
screen
];
file = {
".config/awesome" = {
recursive = true;
source = ../../home-modules/explicit-configs/awesome;
};
} // yubikeyPublicKeyEntries; # Move yubikey stuff to a separate module.
stateVersion = "24.11";
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
name = "Posy_Cursor_Black";
package = pkgs."posy-cursors";
};
programs.zsh = {
shellAliases = {
# TODO BEGIN Interpolate the name of the host here.
flakeconf = "nvim /home/jmug/nixos/flake.nix";
nosconf = "nvim /home/jmug/nixos/hosts/nixlap/configuration.nix";
homeconf = "nvim /home/jmug/nixos/hosts/nixlap/home.nix";
nvconf = "nvim /home/jmug/nixos/home-modules/explicit-configs/nvim/init.lua";
awmconf = "nvim /home/jmug/nixos/home-modules/explicit-configs/awesome/rc.lua";
# TODO END Interpolate the name of the host here.
rshellconf = "source ~/.zshrc";
rlogiops = "sudo systemctl restart logid"; # Restart the logid daemon.
# TODO: Interpolate the name of the host here.
nrsw = "sudo nixos-rebuild switch --flake /home/jmug/nixos#nixlap"; # parametrize this as home dir.
};
};
programs.alacritty = {
enable = true;
settings = {
env = {
TERM = "xterm-256color";
};
font = {
size = 8.6;
normal.family = "BigBlueTermPlus Nerd Font";
};
window.opacity = 0.9;
colors = {
bright = {
black = "#575b70";
blue = "#caa9fa";
cyan = "#9aedfe";
green = "#5af78e";
magenta = "#ff92d0";
red = "#ff6e67";
white = "#e6e6e6";
yellow = "#f4f99d";
};
normal = {
black = "#000000";
blue = "#caa9fa";
cyan = "#8be9fd";
green = "#50fa7b";
magenta = "#ff79c6";
red = "#ff5555";
white = "#bfbfbf";
yellow = "#f1fa8c";
};
primary = {
background = "#282a36";
foreground = "#f8f8f2";
};
};
};
};
services.autorandr.enable = true;
programs.autorandr = {
enable = true;
profiles = {
laptop = {
fingerprint = {
"eDP-1" = "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
};
config = {
"eDP-1" = {
enable = true;
primary = true;
mode = "2256x1504";
};
};
};
docked_open_dp8 = {
fingerprint = {
"eDP-1" = "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
"DP-8" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"eDP-1" = {
position = "592x1440";
enable = true;
mode = "2256x1504";
};
"DP-8" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_closed_dp8 = {
fingerprint = {
"DP-8" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"DP-8" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_open_dp7 = {
fingerprint = {
"eDP-1" = "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
"DP-7" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"eDP-1" = {
position = "592x1440";
enable = true;
mode = "2256x1504";
};
"DP-7" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_closed_dp7 = {
fingerprint = {
"DP-7" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"DP-7" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_open_dp5 = {
fingerprint = {
"eDP-1" = "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
"DP-5" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"eDP-1" = {
position = "592x1440";
enable = true;
mode = "2256x1504";
};
"DP-5" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_closed_dp5 = {
fingerprint = {
"DP-5" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"DP-5" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_open_dp3 = {
fingerprint = {
"eDP-1" = "00ffffffffffff0009e5ca0b000000002f200104a51c137803de50a3544c99260f505400000001010101010101010101010101010101115cd01881e02d50302036001dbe1000001aa749d01881e02d50302036001dbe1000001a000000fe00424f452043510a202020202020000000fe004e4531333546424d2d4e34310a0073";
"DP-3" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"eDP-1" = {
position = "592x1440";
enable = true;
mode = "2256x1504";
};
"DP-3" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
docked_closed_dp3 = {
fingerprint = {
"DP-3" = "00ffffffffffff001e6d5677061e030003210104b5522278ffa105a9564ba4250f5054210800d1c0614001010101010101010101010148d570b0d0a0465038203a00345a3100001a000000fd003064979737010a202020202020000000fc004c472048445220575148440a20000000ff003330334d58554e36303239340a01840203287423090707830100004410040301e2006ae305c000e606050153535d681a00000101306400e2b370b0d0a03b5038203a00345a3100001a0d7f70b0d0a03c5038203a00345a3100001adc6970b0d0a03c5038203a00345a3100001a0000000000000000000000000000000000000000000000000000000000000000004a";
};
config = {
"DP-3" = {
enable = true;
primary = true;
mode = "3440x1440";
rate = "100.00";
};
};
};
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}