Compare commits

..

3 Commits

Author SHA1 Message Date
c3cc94a305 merge common-*.nix files
Some checks failed
Build and Deploy / mreow (push) Successful in 1h37m19s
Build and Deploy / muffin (push) Has been cancelled
Build and Deploy / yarn (push) Has been cancelled
2026-04-22 18:02:05 -04:00
3317ac7997 update 2026-04-22 17:43:05 -04:00
6ad25c0e49 Revert "kernel: add the penguins" (didn't work)
This reverts commit 9ed48ce841.
2026-04-22 17:41:21 -04:00
8 changed files with 99 additions and 123 deletions

View File

@@ -21,7 +21,7 @@ flake.nix # 3 hosts, 2 channels
deploy.sh # wrapper: current-host rebuild or `muffin` deploy-rs deploy.sh # wrapper: current-host rebuild or `muffin` deploy-rs
hosts/<host>/ # host entrypoints (default.nix, home.nix, disk.nix, …) hosts/<host>/ # host entrypoints (default.nix, home.nix, disk.nix, …)
modules/ # flat namespace; see module naming below modules/ # flat namespace; see module naming below
common-*.nix # imported by ALL hosts (nix settings, doas, fish shim) common.nix # imported by ALL hosts (nix settings, doas, fish shim)
desktop-*.nix # imported by mreow/yarn only desktop-*.nix # imported by mreow/yarn only
server-*.nix # imported by muffin only server-*.nix # imported by muffin only
<bare>.nix # scoped by filename (age-secrets, zfs, no-rgb, …) <bare>.nix # scoped by filename (age-secrets, zfs, no-rgb, …)

42
flake.lock generated
View File

@@ -484,11 +484,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776777932, "lastModified": 1776891022,
"narHash": "sha256-0R3Yow/NzSeVGUke5tL7CCkqmss4Vmi6BbV6idHzq/8=", "narHash": "sha256-vEe2f4NEhMvaNDpM1pla4hteaIIGQyAMKUfIBPLasr0=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "5d5640599a0050b994330328b9fd45709c909720", "rev": "508daf831ab8d1b143d908239c39a7d8d39561b2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -564,11 +564,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1776764267, "lastModified": 1776874528,
"narHash": "sha256-gurmzNidkGNDmZKKFNiX0rPI4u4QSyAa+CZQr5mH804=", "narHash": "sha256-X4Y2vMbVBuyUQzbZnl72BzpZMYUsWdE78JuDg2ySDxE=",
"owner": "Jovian-Experiments", "owner": "Jovian-Experiments",
"repo": "Jovian-NixOS", "repo": "Jovian-NixOS",
"rev": "ee1f5dd47ff5658467deb8cbfa5ed8135f8a342b", "rev": "4c8ccc482a3665fb4a3b2cadbbe7772fb7cc2629",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -657,11 +657,11 @@
"treefmt-nix": "treefmt-nix" "treefmt-nix": "treefmt-nix"
}, },
"locked": { "locked": {
"lastModified": 1776828739, "lastModified": 1776883427,
"narHash": "sha256-Uo1SvxXlqcxbpoew8deTAbBWDlA/LnkiXQ1PIb95fUA=", "narHash": "sha256-prHCm++hniRcoqzvWTEFyAiLKT6m+EUVCRaDLrsuEgM=",
"owner": "numtide", "owner": "numtide",
"repo": "llm-agents.nix", "repo": "llm-agents.nix",
"rev": "bb6fb1ef73d5a46877a3fc623fedef5cbf3939e3", "rev": "6fd26c9cb50d9549f3791b3d35e4f72f97677103",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -704,11 +704,11 @@
"xwayland-satellite-unstable": "xwayland-satellite-unstable" "xwayland-satellite-unstable": "xwayland-satellite-unstable"
}, },
"locked": { "locked": {
"lastModified": 1776856212, "lastModified": 1776879043,
"narHash": "sha256-+ctOPF22mhj1CxUuZ8Qog1O4p3Cl8l8sFpUKqcb0RKA=", "narHash": "sha256-M9RjuowtoqQbFRdQAm2P6GjFwgHjRcnWYcB7ChSjDms=",
"owner": "sodiboo", "owner": "sodiboo",
"repo": "niri-flake", "repo": "niri-flake",
"rev": "a27f4b9943c2cf48bfcf83f147522741f28cb512", "rev": "535ebbe038039215a5d1c6c0c67f833409a5be96",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -937,11 +937,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1776560675, "lastModified": 1776734388,
"narHash": "sha256-p68udKWWh7+V4ZPpcMDq0gTHWNZJnr4JPI+kHPPE40o=", "narHash": "sha256-vl3dkhlE5gzsItuHoEMVe+DlonsK+0836LIRDnm6MXQ=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e07580dae39738e46609eaab8b154de2488133ce", "rev": "10e7ad5bbcb421fe07e3a4ad53a634b0cd57ffac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -991,11 +991,11 @@
"noctalia-qs": "noctalia-qs" "noctalia-qs": "noctalia-qs"
}, },
"locked": { "locked": {
"lastModified": 1776774185, "lastModified": 1776888984,
"narHash": "sha256-riCnQWAxvltNd6KrkzQLdG2EMxODNxjQOB2Z67DA4KU=", "narHash": "sha256-Up2F/eoMuPUsZnPVYdH5TMHe1TBP2Ue1QuWd0vWZoxY=",
"owner": "noctalia-dev", "owner": "noctalia-dev",
"repo": "noctalia-shell", "repo": "noctalia-shell",
"rev": "d7b68652e79bce5813dc4fea7e51636a5da3e1b7", "rev": "2c1808f9f8937fc0b82c54af513f7620fec56d71",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -1170,11 +1170,11 @@
"senior_project-website": { "senior_project-website": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1776877770, "lastModified": 1776877896,
"narHash": "sha256-+KreFRvzlt8ZAmkURlBQc1omu9hNXha8oZ7UiYa9rxw=", "narHash": "sha256-IV8Pq9aSchaNpWbDK3Oj2rDr0IdsioFeRb+w1LFOiqA=",
"owner": "Titaniumtown", "owner": "Titaniumtown",
"repo": "senior-project-website", "repo": "senior-project-website",
"rev": "44d08cb8ea11be610ae81c842033b9de2a1c06b5", "rev": "e328189d588eb474f6069163c9b08f1c34f91e90",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -11,10 +11,7 @@
}: }:
{ {
imports = [ imports = [
# common across all hosts ../../modules/common.nix
../../modules/common-doas.nix
../../modules/common-shell-fish.nix
../../modules/common-nix.nix
# muffin-only system modules # muffin-only system modules
./hardware.nix ./hardware.nix
@@ -95,8 +92,6 @@
services.deployGuard.enable = true; services.deployGuard.enable = true;
services.kmscon.enable = true;
# Disable serial getty on ttyS0 to prevent dmesg warnings # Disable serial getty on ttyS0 to prevent dmesg warnings
systemd.services."serial-getty@ttyS0".enable = false; systemd.services."serial-getty@ttyS0".enable = false;
@@ -154,10 +149,6 @@
}; };
}; };
environment.etc = {
"issue".text = "";
};
# Set your time zone. # Set your time zone.
time.timeZone = "America/New_York"; time.timeZone = "America/New_York";
@@ -170,19 +161,12 @@
]; ];
}; };
#fwupd for updating firmware
services.fwupd = {
enable = true;
extraRemotes = [ "lvfs-testing" ];
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
helix helix
lm_sensors lm_sensors
bottom bottom
htop htop
doas-sudo-shim
neofetch neofetch
borgbackup borgbackup
@@ -275,9 +259,6 @@
hashedPasswordFile = config.age.secrets.hashedPass.path; hashedPasswordFile = config.age.secrets.hashedPass.path;
}; };
# programs.fish + bash→fish redirect and security.doas block are in
# modules/common-shell-fish.nix and modules/common-doas.nix.
services.murmur = { services.murmur = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;

View File

@@ -1,15 +0,0 @@
{ username, ... }:
{
# doas replaces sudo on every host
security = {
doas.enable = true;
sudo.enable = false;
doas.extraRules = [
{
users = [ username ];
keepEnv = true;
persist = true;
}
];
};
}

View File

@@ -1,22 +0,0 @@
{ lib, ... }:
{
# Common Nix daemon settings. Host-specific overrides (binary cache substituters,
# gc retention) live in the host's default.nix.
nix = {
optimise.automatic = true;
gc = {
automatic = true;
dates = "weekly";
# Default retention: override per-host via lib.mkForce if different.
options = lib.mkDefault "--delete-older-than 30d";
};
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
};
}

View File

@@ -1,16 +0,0 @@
{ pkgs, lib, ... }:
{
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
# Login shells stay bash but immediately `exec fish` so fish is the effective shell
# without breaking scripts that hardcode #!/bin/bash.
programs.fish.enable = true;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${lib.getExe pkgs.fish} $LOGIN_OPTION
fi
'';
};
}

75
modules/common.nix Normal file
View File

@@ -0,0 +1,75 @@
{
config,
lib,
pkgs,
username,
...
}:
{
# Common Nix daemon settings. Host-specific overrides (binary cache substituters,
# gc retention) live in the host's default.nix.
nix = {
optimise.automatic = true;
gc = {
automatic = true;
dates = "weekly";
# Default retention: override per-host via lib.mkForce if different.
options = lib.mkDefault "--delete-older-than 30d";
};
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
};
# https://nixos.wiki/wiki/Fish#Setting_fish_as_your_shell
# Login shells stay bash but immediately `exec fish` so fish is the effective shell
# without breaking scripts that hardcode #!/bin/bash.
programs.fish.enable = true;
programs.bash = {
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${lib.getExe pkgs.fish} $LOGIN_OPTION
fi
'';
};
# doas replaces sudo on every host
security = {
doas.enable = true;
sudo.enable = false;
doas.extraRules = [
{
users = [ username ];
keepEnv = true;
persist = true;
}
];
};
services.kmscon.enable = true;
environment.systemPackages = with pkgs; [
doas-sudo-shim
];
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
environment.etc = {
# override default nixos /etc/issue
"issue".text = "";
};
# for updating firmware
services.fwupd = {
enable = true;
extraRemotes = [ "lvfs-testing" ];
};
}

View File

@@ -10,10 +10,7 @@
}: }:
{ {
imports = [ imports = [
# shared across all hosts ./common.nix
./common-doas.nix
./common-shell-fish.nix
./common-nix.nix
# desktop-only modules # desktop-only modules
./desktop-vm.nix ./desktop-vm.nix
@@ -31,11 +28,6 @@
# allow overclocking (I actually underclock but lol) # allow overclocking (I actually underclock but lol)
hardware.amdgpu.overdrive.ppfeaturemask = "0xFFFFFFFF"; hardware.amdgpu.overdrive.ppfeaturemask = "0xFFFFFFFF";
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
services.kmscon.enable = true;
# Add niri to display manager session packages # Add niri to display manager session packages
services.displayManager.sessionPackages = [ niri-package ]; services.displayManager.sessionPackages = [ niri-package ];
@@ -293,10 +285,6 @@
XZ_DEC_ARM64 = lib.mkForce no; XZ_DEC_ARM64 = lib.mkForce no;
XZ_DEC_SPARC = lib.mkForce no; XZ_DEC_SPARC = lib.mkForce no;
XZ_DEC_RISCV = lib.mkForce no; XZ_DEC_RISCV = lib.mkForce no;
# add the penguins!
LOGO = lib.mkForce yes;
LOGO_LINUX_CLUT224 = lib.mkForce yes;
}; };
} }
]; ];
@@ -354,23 +342,10 @@
# 1gb huge pages # 1gb huge pages
"hugepagesz=1G" "hugepagesz=1G"
"hugepages=3" "hugepages=3"
]; ];
};
environment.etc = {
# override default nixos /etc/issue
"issue".text = "";
}; };
services = { services = {
# fwupd for updating firmware
fwupd = {
enable = true;
extraRemotes = [ "lvfs-testing" ];
};
# auto detect network printers # auto detect network printers
avahi = { avahi = {
enable = true; enable = true;
@@ -470,8 +445,6 @@
dmidecode dmidecode
doas-sudo-shim
glib glib
usbutils usbutils
libmtp libmtp