sops hosts layout

This commit is contained in:
Hunter Haugen 2025-12-29 12:26:16 -08:00
parent 6b30d11d42
commit f9250db3d8
Signed by: hunner
GPG key ID: EF99694AA599DDAD
20 changed files with 585 additions and 6 deletions

View file

@ -0,0 +1,477 @@
# Config for framework16
{ config, pkgs, lib, nixos-hardware, impermanence, talon-nix, plover-flake, beads-flake, ... }:
{
nix.settings = {
download-buffer-size = 524288000; # 500 MiB
};
imports =
[
nixos-hardware.nixosModules.framework-16-7040-amd
./hardware-configuration.nix
impermanence.nixosModules.impermanence
talon-nix.nixosModules.talon
];
boot = {
loader.systemd-boot.enable = true;
loader.systemd-boot.configurationLimit = 20;
loader.efi.canTouchEfiVariables = true;
#initrd.luks.devices."cryptroot".device = "/dev/disk/by-partlabel/disk-nvme0n1-cryptroot";
initrd.luks.devices."cryptswap".device = "/dev/disk/by-partlabel/disk-nvme0n1-swap";
resumeDevice = "/dev/mapper/cryptswap";
kernelParams = [
"mem_sleep_default=deep"
];
extraModprobeConfig = ''
options amdgpu cwsr_enable=0 # For ROCm to not crash
'';
};
swapDevices = [ {
device = "/dev/mapper/cryptswap";
} ];
services.fwupd.enable = true;
hardware.framework.enableKmod = true;
fileSystems = {
"/" = {
device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=17G" "mode=755" ];
};
"/persist" = {
neededForBoot = true;
};
};
hardware.amdgpu = {
opencl.enable = true;
};
hardware.graphics.enable = true;
services.xserver.videoDrivers = [ "amdgpu" ];
services.ollama = {
enable = true;
loadModels = [ "gemma3" ];
acceleration = "rocm";
rocmOverrideGfx = "11.0.2";
};
networking.hostId = "3294c9a2"; # Required for ZFS
networking.hostName = "liminal";
networking.networkmanager.enable = true;
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.extraHosts =
''
127.0.0.1 keycloak
127.0.0.1 k3d-cmvm
'';
environment.persistence."/persist" = {
hideMounts = true;
directories = [
"/root"
"/etc/nixos"
"/etc/ssh"
"/etc/NetworkManager/system-connections"
];
files = [
"/etc/machine-id"
#"/etc/nix/id_rsa" # Needed?
];
};
# Files are not copied to /persist during install, so need to do so manually
#rsync -azPH /mnt/root/ /mnt/persist/root
#rsync -azPH /mnt/etc/nixos/ /mnt/persist/etc/nixos
#rsync -azPH /mnt/etc/ssh/ /mnt/persist/etc/ssh
#cp /mnt/etc/machine-id /mnt/persist/etc/machine-id
security.sudo.extraConfig = ''
# Don't lecture after reboot
Defaults lecture = never
'';
# 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";
};
virtualisation.docker = {
enable = true;
extraOptions = "--storage-driver=overlay2";
};
programs.hyprland.enable = true;
programs.hyprland.xwayland.enable = false;
programs.hyprland.withUWSM = true;
programs.hyprlock.enable = true;
services.hypridle.enable = true;
programs.waybar.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland
programs.zsh.enable = true;
services.openssh.enable = true;
services.openssh.settings.PermitRootLogin = "yes";
services.tailscale = {
enable = true;
useRoutingFeatures = "client";
extraUpFlags = [
"--accept-dns"
"--accept-routes"
];
};
hardware.brillo.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.displayManager.gdm.enable = true;
services.displayManager.gdm.wayland = true;
services.displayManager.gdm.autoSuspend = true;
services.desktopManager.gnome.enable = true;
services.xserver.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [
pkgs.xdg-desktop-portal-wlr
pkgs.xdg-desktop-portal-gtk
#pkgs.xdg-desktop-portal-hyprland
];
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable bluetooth
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.logind.settings.Login = {
HandlePowerKey = "suspend";
HandleLidSwitch = "suspend";
};
services.upower = {
enable = true;
percentageLow = 15;
percentageCritical = 5;
percentageAction = 3;
criticalPowerAction = "Hibernate";
};
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
services.touchegg.enable = true;
# sops-nix secrets
sops.defaultSopsFile = ./secrets/config.yaml;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.secrets.hashedPassword.neededForUsers = true;
# Define a user account. Don't forget to set a password with 'passwd'.
users.users.hunner = {
isNormalUser = true;
description = "Hunter Haugen";
extraGroups = [ "docker" "networkmanager" "wheel" "audio" "video" "dialout" ];
hashedPasswordFile = config.sops.secrets.hashedPassword.path;
shell = pkgs.zsh;
packages = with pkgs; [
fzf
neovim
asdf-vm
pinentry-gtk2
pinentry-gnome3
gnupg
pkgs.unstable.firefox-devedition
nodejs
slack
mplayer
ffmpeg
jetbrains-toolbox
pass
diff-so-fancy
pkgs.unstable.zed-editor
pkgs.unstable.package-version-server
amdgpu_top
nixd # for zed
rust-analyzer # for zed
nil # for zed
rustc # for zed
rustup # for zed
gcc # for zed
#ruff # for zed
goose-cli
claude-code
pkgs.unstable.codex
neofetch
eww
hyprpaper # for hyprland
hyprcursor # for hyprland
nordzy-icon-theme
nordzy-cursor-theme
wl-clipboard
onlyoffice-desktopeditors
calibre
clipse
plex-desktop
signal-desktop
flyctl
dtach
gromit-mpx
urbanterror
ghostty
talon-nix.packages.${pkgs.stdenv.hostPlatform.system}.default
pyright
just
yt-dlp
socat
plover-flake.packages.${pkgs.stdenv.hostPlatform.system}.plover-full
pkgs.unstable.zoom-us
beads-flake.packages.${pkgs.stdenv.hostPlatform.system}.default
];
};
systemd.user.services = {
polkit-agent = {
description = "PolKit Authentication Agent";
wantedBy = [ "graphical-session.target" ];
wants = [ "graphical-session.target" ];
after = [ "graphical-session.target" ];
serviceConfig = {
Type = "simple";
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
# Enable automatic login for the user.
services.displayManager.autoLogin.enable = false;
services.displayManager.autoLogin.user = "hunner";
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
jq
yq
bat
git
vim
emacs
wget
curl
htop
tmux
file
ripgrep
docker-compose
powertop
alacritty
rofi
wofi
xss-lock
xlockmore
fortune
dzen2
arandr
xclip
shellcheck
scrot
fd
xorg.xrandr
xorg.xsetroot
xorg.xset
xorg.xev
hsetroot
redshift
pkgs.unstable.code-cursor
pwvucontrol
pamixer
helvum
#hp15c
#nonpareil
framework-tool
kitty # for Hyprland
kdePackages.dolphin # file browser in hyprland
cliphist
restic
xscreensaver
unzip
scarlett2
alsa-scarlett-gui
pkgs.unstable.ndi-6
xdg-utils
btrbk
devenv
lsof
#(pkgs.unstable.flameshot.override { enableWlrSupport = true; })
hyprshot
hyprpicker
flameshot
chromium
];
services.clipmenu.enable = true;
services.picom = {
enable = true;
settings = {
inactive-opacity = 1.0;
inactive-dim = 0.0;
inactive-opacity-override = false;
frame-opacity = 1.0;
inactive-dim-fixed = false;
fading = false; # Optional, if you want to disable fading as well
};
};
programs.direnv = {
enable = true;
nix-direnv.enable = true;
#nix-direnv.package = unstable.nix-direnv;
};
programs._1password = {
enable = true;
};
programs._1password-gui = {
enable = true;
polkitPolicyOwners = [ "hunner" ];
};
programs.obs-studio = {
enable = true;
package = pkgs.unstable.obs-studio;
enableVirtualCamera = true;
plugins = with pkgs.unstable.obs-studio-plugins; [
wlrobs
obs-backgroundremoval
obs-pipewire-audio-capture
#obs-ndi
distroav
];
};
fonts.packages = with pkgs; [
nerd-fonts.droid-sans-mono
nerd-fonts.liberation
nerd-fonts.jetbrains-mono
nerd-fonts.sauce-code-pro
nerd-fonts.symbols-only
liberation_ttf
font-awesome
];
# 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;
# };
services.pcscd.enable = true;
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 8080 8081 8082 ];
networking.firewall.allowedUDPPorts = [ 8080 8081 8082 ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
systemd.services.upower.enable = true;
services.avahi = {
enable = true;
nssmdns4 = true; # Enable NSS lookup for .local domains
openFirewall = true;
publish = {
enable = true;
addresses = true;
domain = true;
workstation = true;
};
};
services.dbus = {
enable = true;
packages = [ pkgs.polkit ];
};
environment.etc = {
"1password/custom_allowed_browsers" = {
text = ''
firefox-devedition
'';
mode = "0755";
};
};
programs.dconf.enable = true;
security.polkit.enable = true;
systemd.services."user@".serviceConfig.Delegate = "cpu io memory pids cpuset";
services.fprintd.enable = true;
#security.pam.services = {
# login.fprintAuth = true;
# xscreensaver.fprintAuth = true;
# sudo.fprintAuth = true;
# #gdm.fprintAuth = true;
# gdm-password.fprintAuth = true;
#};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# 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 = "24.11"; # Did you read the comment?
}
# vim: ft=nix ai

88
hosts/liminal/disko.nix Normal file
View file

@ -0,0 +1,88 @@
# Config for framework 16
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount disko.nix
{
disko.devices = {
disk = {
nvme0n1 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
label = "boot";
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" "defaults" ];
};
};
swap = {
size = "70G";
type = "8200";
content = {
type = "swap";
resumeDevice = true;
};
};
cryptroot = {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
crypttabExtraOpts = [ "no-read-workqueue" "no-write-workqueue" ];
};
content = {
type = "btrfs";
extraArgs = [ "-L" "nixos" "-f" ];
subvolumes = {
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" "space_cache=v2" ];
};
"/home" = {
mountpoint = "/home";
mountOptions = [ "compress=zstd" "noatime" "ssd" "space_cache=v2" ];
};
"/var/log" = {
mountpoint = "/var/log";
mountOptions = [ "compress=zstd" "noatime" "ssd" "space_cache=v2" ];
};
"/var/lib" = {
mountpoint = "/var/lib";
mountOptions = [ "compress=zstd" "noatime" "ssd" "space_cache=v2" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "ssd" "space_cache=v2" ];
};
};
};
};
};
};
};
};
};
nodev = {
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"size=4G"
"mode=755"
];
};
};
};
filesystems."/persist".neededForBoot = true;
filesystems."/var/log".neededForBoot = true;
}

357
hosts/liminal/flake.lock generated Normal file
View file

@ -0,0 +1,357 @@
{
"nodes": {
"beads-flake": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1764830699,
"narHash": "sha256-GmK2+kcaorEsQ/O9lweJIVBv21Np6VfW6sE/3F/GBjY=",
"owner": "steveyegge",
"repo": "beads",
"rev": "f4b8a7ad4f7eb3bd47b24357f69f22bc1a75d4b7",
"type": "github"
},
"original": {
"owner": "steveyegge",
"repo": "beads",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"talon-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1693660503,
"narHash": "sha256-B/g2V4v6gjirFmy+I5mwB2bCYc0l3j5scVfwgl6WOl8=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "bd5bdbb52350e145c526108f4ef192eb8e554fa0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1764440730,
"narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixos-hardware",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1760284886,
"narHash": "sha256-TK9Kr0BYBQ/1P5kAsnNQhmWWKgmZXwUQr4ZMjCzWf2c=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cf3f5c4def3c7b5f1fc012b3d839575dbe552d43",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1764667669,
"narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "418468ac9527e799809c900eda37cbff999199b6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1764677808,
"narHash": "sha256-H3lC7knbXOBrHI9hITQ7modLuX20mYJVhZORL5ioms0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1aab89277eb2d87823d5b69bae631a2496cff57a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1764667669,
"narHash": "sha256-7WUCZfmqLAssbDqwg9cUDAXrSoXN79eEEq17qhTNM/Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "418468ac9527e799809c900eda37cbff999199b6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1698318101,
"narHash": "sha256-gUihHt3yPD7bVqg+k/UVHgngyaJ3DMEBchbymBMvK1E=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "63678e9f3d3afecfeafa0acead6239cdb447574c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"plover": {
"flake": false,
"locked": {
"lastModified": 1764131295,
"narHash": "sha256-Q6vrDmn3a0m7oz8EeyuIhkq1V4nXNGHIdJhyQl9CAuE=",
"owner": "openstenoproject",
"repo": "plover",
"rev": "bf2eaa51491d719e65f2afc4b9f999d42230dbdb",
"type": "github"
},
"original": {
"owner": "openstenoproject",
"repo": "plover",
"type": "github"
}
},
"plover-flake": {
"inputs": {
"nixpkgs": "nixpkgs_3",
"plover": "plover",
"plover-machine-hid": "plover-machine-hid",
"plover-stroke": "plover-stroke",
"plover2cat": "plover2cat",
"plover_plugins_registry": "plover_plugins_registry",
"pyobjc": "pyobjc",
"rtf-tokenize": "rtf-tokenize"
},
"locked": {
"lastModified": 1764820984,
"narHash": "sha256-DyBpG7Mh2mPk6HUpC+g2a4vwvBhTHArX3RNJSmIbf6g=",
"owner": "openstenoproject",
"repo": "plover-flake",
"rev": "15dd9b231fd74e7c80416adf94daeb47ba74b8a6",
"type": "github"
},
"original": {
"owner": "openstenoproject",
"repo": "plover-flake",
"type": "github"
}
},
"plover-machine-hid": {
"flake": false,
"locked": {
"lastModified": 1757266704,
"narHash": "sha256-S+NBVnLjWdINTRpNIZvGotNGiMVSnvq1NZRPnKCmZyM=",
"owner": "dnaq",
"repo": "plover-machine-hid",
"rev": "db917f8b2545964fdaa2f664d1d1e2afafae96a1",
"type": "github"
},
"original": {
"owner": "dnaq",
"repo": "plover-machine-hid",
"type": "github"
}
},
"plover-stroke": {
"flake": false,
"locked": {
"lastModified": 1652559629,
"narHash": "sha256-A75OMzmEn0VmDAvmQCp6/7uptxzwWJTwsih3kWlYioA=",
"owner": "openstenoproject",
"repo": "plover_stroke",
"rev": "e717a1983b58dcba644153a542dbf8514425a39b",
"type": "github"
},
"original": {
"owner": "openstenoproject",
"repo": "plover_stroke",
"type": "github"
}
},
"plover2cat": {
"flake": false,
"locked": {
"lastModified": 1757574932,
"narHash": "sha256-kIDuIezGN+n3RDWMOlR6eFlQlQDp6okKgQCk71AgUDs=",
"owner": "greenwyrt",
"repo": "plover2CAT",
"rev": "477163958b1a9e6fc48337be137173570fa7350a",
"type": "github"
},
"original": {
"owner": "greenwyrt",
"repo": "plover2CAT",
"type": "github"
}
},
"plover_plugins_registry": {
"flake": false,
"locked": {
"lastModified": 1761769055,
"narHash": "sha256-OLXZEkKGifMpngZfQ9JO/phKXZPNQMigEvT4DWKtjJo=",
"owner": "openstenoproject",
"repo": "plover_plugins_registry",
"rev": "1420aaf4e792c328acd5233a78f343b9167a72e8",
"type": "github"
},
"original": {
"owner": "openstenoproject",
"repo": "plover_plugins_registry",
"type": "github"
}
},
"pyobjc": {
"flake": false,
"locked": {
"lastModified": 1736669867,
"narHash": "sha256-Kj1CH1+RYTFszao9G7P3fnsgBjTcvsq4ZpxdjHzQ520=",
"owner": "ronaldoussoren",
"repo": "pyobjc",
"rev": "e29d3a0c80b5bb852e4311ce10827efab9844c6c",
"type": "github"
},
"original": {
"owner": "ronaldoussoren",
"ref": "v11.0",
"repo": "pyobjc",
"type": "github"
}
},
"root": {
"inputs": {
"beads-flake": "beads-flake",
"impermanence": "impermanence",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable",
"plover-flake": "plover-flake",
"talon-nix": "talon-nix"
}
},
"rtf-tokenize": {
"flake": false,
"locked": {
"lastModified": 1751102035,
"narHash": "sha256-bM/DFl1mpHgeBItdyA5Tt+Eo9u82Gz+6qwft2h0bM94=",
"owner": "openstenoproject",
"repo": "rtf_tokenize",
"rev": "5c4ad772f4b45ceb35b60584e22a171e90526916",
"type": "github"
},
"original": {
"owner": "openstenoproject",
"repo": "rtf_tokenize",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"talon-nix": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1746431176,
"narHash": "sha256-bwXLFy2pDpNE60EkVltrmiRgwNWLo4eYBesP997p8mg=",
"owner": "nix-community",
"repo": "talon-nix",
"rev": "cc110629c5f0be12e839b2aea6a16880f1822706",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "talon-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

44
hosts/liminal/flake.nix Normal file
View file

@ -0,0 +1,44 @@
{
description = "NixOS configuration for liminal (Framework 16)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware";
impermanence.url = "github:nix-community/impermanence";
talon-nix.url = "github:nix-community/talon-nix";
plover-flake.url = "github:openstenoproject/plover-flake";
beads-flake.url = "github:steveyegge/beads";
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-hardware, impermanence, talon-nix, plover-flake, beads-flake, ... }:
let
system = "x86_64-linux";
# Create unstable overlay
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
in
{
nixosConfigurations.liminal = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit nixos-hardware impermanence talon-nix plover-flake beads-flake;
};
modules = [
# Add unstable overlay
({ config, pkgs, ... }: { nixpkgs.overlays = [ overlay-unstable ]; })
# Import configuration
./configuration.nix
];
};
};
}

View file

@ -0,0 +1,72 @@
# 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 = [ ];
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E270-3DFB";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/8be833f2-6247-49e4-a6cb-f8ebe69619f6";
fsType = "btrfs";
options = [ "subvol=home" ];
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/2fade11e-8347-415d-8629-0578a7c8d534";
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/8be833f2-6247-49e4-a6cb-f8ebe69619f6";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/persist" =
{ device = "/dev/disk/by-uuid/8be833f2-6247-49e4-a6cb-f8ebe69619f6";
fsType = "btrfs";
options = [ "subvol=persist" ];
};
fileSystems."/var/lib" =
{ device = "/dev/disk/by-uuid/8be833f2-6247-49e4-a6cb-f8ebe69619f6";
fsType = "btrfs";
options = [ "subvol=var/lib" ];
};
fileSystems."/var/log" =
{ device = "/dev/disk/by-uuid/8be833f2-6247-49e4-a6cb-f8ebe69619f6";
fsType = "btrfs";
options = [ "subvol=var/log" ];
};
#swapDevices =
# [ { device = "/dev/disk/by-uuid/4ad150c5-5d21-422c-8038-18952e1d999d"; }
# ];
# 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;
}

View file

@ -0,0 +1,57 @@
{ stdenv, fetchzip, autoPatchelfHook, makeWrapper, lib, unstable }:
stdenv.mkDerivation rec {
pname = "hp15c";
version = "4.5.00";
src = fetchzip {
url = "https://www.hpcalc.org/other/pc/HP-15C_4.5.00_Linux_x86_64.zip";
sha256 = "15hxpckif4sab3lwkksqfnsf8agn545g2f5ijm6xrs2b23hdflmv";
stripRoot = false;
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
buildInputs = [
unstable.tcl
unstable.tk
];
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share/hp15c
mkdir -p $out/share/fonts/truetype
# Install the binary
install -Dm755 HP-15C $out/bin/hp15c
# Install the font
install -Dm644 HP-15C_Simulator_Font.ttf $out/share/fonts/truetype/
# Install documentation
cp -r doc $out/share/hp15c/
cp "Read Me & Release Notes.html" $out/share/hp15c/
# Create a wrapper script that sets up the environment
makeWrapper $out/bin/hp15c $out/bin/hp15c-calculator \
--set FONTCONFIG_PATH /etc/fonts \
--set FONTCONFIG_FILE /etc/fonts/fonts.conf \
--prefix TCLLIBPATH : "${unstable.tcl}/lib" \
--prefix TCLLIBPATH : "${unstable.tk}/lib" \
--set TK_LIBRARY "${unstable.tk}/lib/tk8.6" \
--set TCL_LIBRARY "${unstable.tcl}/lib/tcl8.6" \
--prefix LD_LIBRARY_PATH : "${unstable.tcl}/lib" \
--prefix LD_LIBRARY_PATH : "${unstable.tk}/lib"
'';
meta = with lib; {
description = "HP-15C Calculator Simulator";
homepage = "https://www.hpcalc.org/other/pc/";
license = licenses.unfree; # You should check the actual license
platforms = [ "x86_64-linux" ];
maintainers = [ ];
};
}

View file

@ -0,0 +1,37 @@
{ stdenv, lib, fetchFromGitHub, pkg-config, autoreconfHook, pkgs }:
stdenv.mkDerivation rec {
pname = "nonpareil";
version = "unstable-2024-04-25";
src = fetchFromGitHub {
owner = "brouhaha";
repo = "nonpareil";
rev = "c347bc1ab20170c253512042f7aac0d952f304ea";
sha256 = "1d130hmsgvlmj8iy8sdd0frx9gzsc68wp84zdax6i8f7dhqdfxzx"; # You'll need to replace this
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
buildInputs = [
pkgs.gtk2
pkgs.glib
pkgs.libxml2
pkgs.SDL
];
configureFlags = [
"--with-gtk2"
];
meta = with lib; {
description = "Microcode-level simulation of HP calculators";
homepage = "https://github.com/brouhaha/nonpareil";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ ];
};
}

View file

@ -0,0 +1,25 @@
hashedPassword: ENC[AES256_GCM,data:FvSo0j1H/FpP8ljQTYNSRvAPDvvXi1TcIJnIY+WgTRiHZ0vb426+Pp8FNCqA06Rr/a+5T23ni2s1gOgX143LA4rI9xo9CgLxyw==,iv:QlenOW5mUdbS9+mnpoHfmVG/qnKLETuyVn8zOatTY98=,tag:6jslZ2Lth512XioIgHL92Q==,type:str]
sops:
age:
- recipient: age17sdp0gguexd88qel74fa4zeckxh93gqpkayz366fz6yvjauw7vcq7w6y45
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBLdzBYdlZiQXZpNVVkMSs0
QzdtTU82bzFsSHlPY2tSYVB4THFZbmxyVUdzCkZqODVEZlRSSm9SMnFmZnhKTk5U
WEh3V1Zua1QyNTlvVGRHNktyQi9ualUKLS0tIGZFaEIxT0NVZTkvOXZQNFI5VTlP
TDM5czFEc1lCU281R0NKQkQ1bjNLL0kKHtVBtagNiz2fyyudwBJpxhfQBUMt++Be
tE1SGo+TirLPCgFK/ynw2zXUj7IZ8+qANOpGmStroUBgJGfoEHHlwg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1jv3t4pltlsympq86vjhjjr66hvm25hv9utlk2nwa99qxfapc2amq2vmkel
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWL2dOcWpFWnZXYWdOZzhx
Z1hLUnRzTXo4N21ESXd6N1VhTVZUVVNHSFNNCnE2QkJ5clQvaExyY2dWMUZic3RI
NVJyVUNFZXdOTktjQ2ZYT0xER2x6Z1EKLS0tIHQxTFFTYlVnYjdiRUZnQXRDWHVB
WHVZYkQvN1MxaEV4NElLcHFPZmNjZVkKbUHXfK4Wt7MRS2XYBy9v/SQ3a6T4V5FK
bjd0nVVTJeMnE6V9avjNuOCVUkug4PylIzSMSohfpR6AmSy68jYElw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2025-12-29T21:00:07Z"
mac: ENC[AES256_GCM,data:IEWEy84qU3Lzq4tuNITS1JjxfNSNMksQMVTJbDHNyaN+gpVhjgS/SIX3ESU36S+CcgR/iczRvUvURA+s0csiMXCKfx2IwVuTIKqtTArDubjlqivr7fhY94VTkFz2e3ohfcHiJt6uzhzxHNDAAE5Ju9TzIAVyf+FRFZFUMRQwddc=,iv:oqnvxQg7mN7yWYoIahdJnKUestSeIMKvawt7+fDC38o=,tag:fcpPcvy+HTFSPTUM2GZ+0w==,type:str]
unencrypted_suffix: _unencrypted
version: 3.11.0