summaryrefslogtreecommitdiff
path: root/nix
diff options
context:
space:
mode:
authorPreston Pan <ret2pop@gmail.com>2026-02-06 15:52:14 -0800
committerPreston Pan <ret2pop@gmail.com>2026-02-06 15:52:14 -0800
commit51116ed17e2febc06dc795e5893d3a31e97962e9 (patch)
tree17ec9ca6f8475931e1f26f94928b753c042e06d1 /nix
parent9e826d9c2bad4a7ccf183257118be37083f26782 (diff)
server and desktop configurations are working fully and booting
Diffstat (limited to 'nix')
-rw-r--r--nix/flake.lock36
-rw-r--r--nix/init.el4
-rw-r--r--nix/modules/configuration.nix11
-rw-r--r--nix/modules/home/default.nix2
-rw-r--r--nix/modules/home/fcitx.nix4
-rw-r--r--nix/modules/home/hyprland.nix65
-rw-r--r--nix/modules/home/zsh.nix1
-rw-r--r--nix/modules/impermanence.nix4
-rw-r--r--nix/modules/pipewire.nix8
-rw-r--r--nix/modules/xserver.nix2
-rw-r--r--nix/modules/znc.nix6
-rw-r--r--nix/systems/home.nix2
-rw-r--r--nix/systems/spontaneity/default.nix3
13 files changed, 87 insertions, 61 deletions
diff --git a/nix/flake.lock b/nix/flake.lock
index 579f864..a20d15b 100644
--- a/nix/flake.lock
+++ b/nix/flake.lock
@@ -333,11 +333,11 @@
]
},
"locked": {
- "lastModified": 1769018862,
- "narHash": "sha256-x3eMpPQhZwEDunyaUos084Hx41XwYTi2uHY4Yc4YNlk=",
+ "lastModified": 1769983422,
+ "narHash": "sha256-/zQdD8Aogh16eD5lgFokRMA0EYCm5uQITKCA90/01Oo=",
"owner": "oddlama",
"repo": "nix-topology",
- "rev": "a15cac71d3399a4c2d1a3482ae62040a3a0aa07f",
+ "rev": "20b5c5c698d45cc0f950889b3f6379ced5ce9c4a",
"type": "github"
},
"original": {
@@ -456,11 +456,11 @@
},
"nixpkgs_3": {
"locked": {
- "lastModified": 1769461804,
- "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
+ "lastModified": 1770197578,
+ "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
+ "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github"
},
"original": {
@@ -472,11 +472,11 @@
},
"nixpkgs_4": {
"locked": {
- "lastModified": 1769461804,
- "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=",
+ "lastModified": 1770197578,
+ "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=",
"owner": "nixos",
"repo": "nixpkgs",
- "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d",
+ "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2",
"type": "github"
},
"original": {
@@ -488,11 +488,11 @@
},
"nixpkgs_5": {
"locked": {
- "lastModified": 1769268028,
- "narHash": "sha256-mAdJpV0e5IGZjnE4f/8uf0E4hQR7ptRP00gnZKUOdMo=",
+ "lastModified": 1769740369,
+ "narHash": "sha256-xKPyJoMoXfXpDM5DFDZDsi9PHArf2k5BJjvReYXoFpM=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "ab9fbbcf4858bd6d40ba2bbec37ceb4ab6e1f562",
+ "rev": "6308c3b21396534d8aaeac46179c14c439a89b8a",
"type": "github"
},
"original": {
@@ -508,11 +508,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
- "lastModified": 1769834069,
- "narHash": "sha256-GjeN/5TdWev/L/Izem3XScV6i/55Z+n+GfjKa1srBcU=",
+ "lastModified": 1770405908,
+ "narHash": "sha256-910mKFyjbU6/t8sPJ2U6S1cxJiTgYFU1OOMuihNJO20=",
"owner": "nix-community",
"repo": "NUR",
- "rev": "2db81de33100ef4d86ebc80dc4bc30df1fe97c5d",
+ "rev": "a84c4ed98604b96fc4cb6a4c2b24350aecd8ac3f",
"type": "github"
},
"original": {
@@ -611,11 +611,11 @@
"nixpkgs": "nixpkgs_5"
},
"locked": {
- "lastModified": 1769469829,
- "narHash": "sha256-wFcr32ZqspCxk4+FvIxIL0AZktRs6DuF8oOsLt59YBU=",
+ "lastModified": 1770145881,
+ "narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=",
"owner": "Mic92",
"repo": "sops-nix",
- "rev": "c5eebd4eb2e3372fe12a8d70a248a6ee9dd02eff",
+ "rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c",
"type": "github"
},
"original": {
diff --git a/nix/init.el b/nix/init.el
index 56d7e4b..65c3327 100644
--- a/nix/init.el
+++ b/nix/init.el
@@ -638,6 +638,10 @@
(emms-player-mpd-server-name "localhost" "Connect to localhost")
(emms-player-mpd-server-port "6600" "Connect to port 6600")
(emms-player-list '(emms-player-mpd) "Use mpd")
+ (emms-lyrics-display-on-modeline t)
+ :hook
+ ((emms-playlist-mode . emms-lyrics-mode)
+ (emms-player-started . emms-lyrics-lrclib-get))
:init
(emms-all)
(add-to-list 'emms-info-functions 'emms-info-mpd)
diff --git a/nix/modules/configuration.nix b/nix/modules/configuration.nix
index c906529..e2d12e2 100644
--- a/nix/modules/configuration.nix
+++ b/nix/modules/configuration.nix
@@ -40,11 +40,10 @@
};
systemd = {
+ services.NetworkManager-wait-online.enable = false;
coredump.enable = false;
network.config.networkConfig.IPv6PrivacyExtensions = "kernel";
tmpfiles.settings = {
- "restricthome"."/home/*".Z.mode = "~0700";
-
"restrictetcnixos"."/etc/nixos/*".Z = {
mode = "0000";
user = "root";
@@ -108,7 +107,6 @@
"pti=on"
"randomize_kstack_offset=on"
"vsyscall=none"
- "module.sig_enforce=1"
# "lockdown=confidentiality"
# cpu
@@ -123,11 +121,10 @@
# mineral
# "init_on_alloc=1"
- "random.trust_cpu=off"
- "random.trust_bootloader=off"
+ # "random.trust_bootloader=off"
# "init_on_free=1"
"quiet"
- "loglevel=0"
+ # "loglevel=0"
];
blacklistedKernelModules = [
@@ -250,7 +247,7 @@
};
jitterentropy-rngd.enable = true;
- resolved.dnssec = true;
+ resolved.settings.Resolve.DNSSEC = true;
# usbguard.enable = true;
usbguard.enable = false;
dbus.apparmor = "enabled";
diff --git a/nix/modules/home/default.nix b/nix/modules/home/default.nix
index f8a1ad5..c991927 100644
--- a/nix/modules/home/default.nix
+++ b/nix/modules/home/default.nix
@@ -186,7 +186,7 @@
imagemagick
supercollider
inkscape
- kdePackages.kdenlive
+ # kdePackages.kdenlive
# kicad
murmur
]) else []);
diff --git a/nix/modules/home/fcitx.nix b/nix/modules/home/fcitx.nix
index b4bb965..1907590 100644
--- a/nix/modules/home/fcitx.nix
+++ b/nix/modules/home/fcitx.nix
@@ -3,12 +3,12 @@
i18n.inputMethod = {
type = "fcitx5";
enable = lib.mkDefault config.monorepo.profiles.graphics.enable;
- fcitx5.addons = with pkgs; [
+ fcitx5.addons = if config.monorepo.profiles.graphics.enable then (with pkgs; [
fcitx5-gtk
qt6Packages.fcitx5-chinese-addons
qt6Packages.fcitx5-configtool
fcitx5-mozc
fcitx5-rime
- ];
+ ]) else [];
};
}
diff --git a/nix/modules/home/hyprland.nix b/nix/modules/home/hyprland.nix
index de343b5..b649e96 100644
--- a/nix/modules/home/hyprland.nix
+++ b/nix/modules/home/hyprland.nix
@@ -32,34 +32,53 @@
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
];
- # layerrule = [
- # "blur:top,waybar"
- # ];
+
monitor = [
"DP-4,2560x1440@165.000000,0x0,1"
"Unknown-1,disable"
];
- windowrulev2 = [
- "workspace 1, class:^(emacs)$"
- "workspace 2, class:^(firefox)$"
- "workspace 2, title:^(.*Tor Browser.*)$"
- "workspace 2, title:^(.*Chromium-browser.*)$"
- "workspace 2, class:^(chromium)$"
- "workspace 3, class:^(discord)$"
- "workspace 3, class:^(vesktop)$"
- "workspace 3, title:^(.*fluffychat.*)$"
- "workspace 3, class:^(.*element-desktop.*)$"
- "workspace 4, class:^(.*qpwgraph.*)$"
- "workspace 4, class:^(.*pavucontrol.*)$"
- "workspace 4, class:^(.*mpv.*)$"
- "workspace 5, title:^(.*Monero.*)$"
- "workspace 5, title:^(.*org\.bitcoin\..*)$"
- "workspace 5, title:^(.*Bitcoin Core - preston.*)$"
- "workspace 5, title:^(.*org\.getmonero\..*)$"
- "workspace 5, title:^(.*Monero - preston.*)$"
- "workspace 5, title:^(.*electrum.*)$"
- "pseudo,title:fcitx"
+
+ layerrule = [
+ {
+ name = "waybar blur";
+ "match:namespace" = "waybar";
+ blur = "on";
+ }
];
+
+ windowrule = [
+ {
+ name = "emacs";
+ "match:class" = "emacs";
+ workspace = 1;
+ }
+ {
+ name = "firefox";
+ "match:class" = "firefox";
+ workspace = 2;
+ }
+ {
+ name = "vesktop";
+ "match:class" = "vesktop";
+ workspace = 3;
+ }
+ {
+ name = "pavucontrol";
+ "match:class" = "pavucontrol";
+ workspace = 4;
+ }
+ {
+ name = "qpwgraph";
+ "match:class" = "qpwgraph";
+ workspace = 4;
+ }
+ {
+ name = "mpv";
+ "match:class" = "mpv";
+ workspace = 4;
+ }
+ ];
+
bind = [
"$mod, F, exec, firefox"
"$mod, Return, exec, kitty"
diff --git a/nix/modules/home/zsh.nix b/nix/modules/home/zsh.nix
index 31468e1..62dcbd5 100644
--- a/nix/modules/home/zsh.nix
+++ b/nix/modules/home/zsh.nix
@@ -37,7 +37,6 @@
usite
= "cd ~/src/publish-org-roam-ui && bash local.sh && rm -rf ~/website_html/graph_view; cp -r ~/src/publish-org-roam-ui/out ~/website_html/graph_view && rsync -azvP --chmod=\"Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r\" ~/website_html/ root@${config.monorepo.vars.remoteHost}:/var/www/${config.monorepo.vars.internetName}-website/";
sai = "eval \"$(ssh-agent -s)\" && ssh-add ~/.ssh/id_ed25519 && ssh-add -l";
- i3 = "exec ${pkgs.i3}/bin/i3";
};
loginExtra = ''
if [[ "$(tty)" = "/dev/tty1" ]]; then
diff --git a/nix/modules/impermanence.nix b/nix/modules/impermanence.nix
index 36b2f7e..ad942ff 100644
--- a/nix/modules/impermanence.nix
+++ b/nix/modules/impermanence.nix
@@ -9,7 +9,7 @@
boot.initrd.postResumeCommands = (if config.monorepo.profiles.impermanence.enable then lib.mkAfter ''
mkdir /btrfs_tmp
- mount /dev/mapper/crypted /btrfs_tmp
+ mount -t btrfs -n -o subvol=/ /dev/mapper/crypted /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
@@ -29,7 +29,7 @@
done
btrfs subvolume create /btrfs_tmp/root
- umount /btrfs_tmp
+ umount -n /btrfs_tmp
'' else "");
boot.initrd.luks.devices = (if (config.monorepo.vars.fileSystem == "btrfs") then {
diff --git a/nix/modules/pipewire.nix b/nix/modules/pipewire.nix
index 4ca3610..0fc2d69 100644
--- a/nix/modules/pipewire.nix
+++ b/nix/modules/pipewire.nix
@@ -3,12 +3,12 @@
services.pipewire = {
enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
alsa = {
- enable = true;
+ enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
support32Bit = true;
};
- pulse.enable = true;
- jack.enable = true;
- wireplumber.enable = true;
+ pulse.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
+ jack.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
+ wireplumber.enable = lib.mkDefault config.monorepo.profiles.pipewire.enable;
extraConfig = {
pipewire."92-low-latency" = {
"context.properties" = {
diff --git a/nix/modules/xserver.nix b/nix/modules/xserver.nix
index 29aec23..7bc40af 100644
--- a/nix/modules/xserver.nix
+++ b/nix/modules/xserver.nix
@@ -8,7 +8,7 @@
windowManager = {
i3 = {
- enable = ! config.monorepo.profiles.ttyonly.enable;
+ enable = (! config.monorepo.profiles.ttyonly.enable);
};
};
diff --git a/nix/modules/znc.nix b/nix/modules/znc.nix
index c2e2079..758f720 100644
--- a/nix/modules/znc.nix
+++ b/nix/modules/znc.nix
@@ -25,6 +25,12 @@
useSSL = true;
modules = [ "simple_away" ];
};
+ "nullring" = {
+ server = "nullring.xyz";
+ port = 6697;
+ useSSL = true;
+ modules = [ "simple_away" "log" ];
+ };
};
};
};
diff --git a/nix/systems/home.nix b/nix/systems/home.nix
index c1252df..7d5939c 100644
--- a/nix/systems/home.nix
+++ b/nix/systems/home.nix
@@ -6,6 +6,6 @@
];
useGlobalPkgs = true;
useUserPackages = true;
- users."${config.monorepo.vars.userName}" = import (./. + "/${config.networking.hostName}/home.nix");
+ users."${config.monorepo.vars.userName}" = (import (./. + "/${config.networking.hostName}/home.nix"));
};
}
diff --git a/nix/systems/spontaneity/default.nix b/nix/systems/spontaneity/default.nix
index 4a734d9..c7d7ed6 100644
--- a/nix/systems/spontaneity/default.nix
+++ b/nix/systems/spontaneity/default.nix
@@ -1,4 +1,4 @@
-{ lib, ... }:
+{ config, lib, ... }:
let
ipv4addr = "66.42.84.130";
ipv6addr = "2001:19f0:5401:10d0:5400:5ff:fe4a:7794";
@@ -38,6 +38,7 @@
prefixLength = 64;
}
];
+ defaultGateway = "66.42.84.1";
firewall.allowedTCPPorts = [
80
143