From 401c441aba65122a2813668eee0abcd7691bdff1 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Fri, 25 Jul 2025 12:22:08 +0000 Subject: [PATCH 01/10] chore(nix): update flake --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index ffd17d5..81b1027 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ ] }, "locked": { - "lastModified": 1740845322, - "narHash": "sha256-AXEgFj3C0YJhu9k1OhbRhiA6FnDr81dQZ65U3DhaWpw=", + "lastModified": 1753181343, + "narHash": "sha256-CLQfNtUqirNVSYoW/kYbvL4PeeNasmZonaPnjO3+1YQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "fcac3d6d88302a5e64f6cb8014ac785e08874c8d", + "rev": "0cdfcdbb525b77b951c889b6131047bc374f48fe", "type": "github" }, "original": { @@ -40,11 +40,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1740695751, - "narHash": "sha256-D+R+kFxy1KsheiIzkkx/6L63wEHBYX21OIwlFV8JvDs=", + "lastModified": 1752950548, + "narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6313551cd05425cd5b3e63fe47dbc324eabb15e4", + "rev": "c87b95e25065c028d31a94f06a62927d18763fdf", "type": "github" }, "original": { From d48a1cd85657dbad6c91ea4f9b7e13ba0d6cd279 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Sun, 27 Jul 2025 11:25:21 +0000 Subject: [PATCH 02/10] fix(nix): configure for dvr --- nix/hosts/framework/home.nix | 8 +++++++- nix/hosts/framework/hw.nix | 2 +- nix/hosts/framework/sys.nix | 16 +++++++++++++++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/nix/hosts/framework/home.nix b/nix/hosts/framework/home.nix index 884f513..d51a165 100644 --- a/nix/hosts/framework/home.nix +++ b/nix/hosts/framework/home.nix @@ -106,7 +106,13 @@ lutris stremio qbittorrent - davinci-resolve + davinci-resolve-studio + + # Required by DVR + kitty + mesa-demos + vulkan-tools + clinfo aspell aspellDicts.en diff --git a/nix/hosts/framework/hw.nix b/nix/hosts/framework/hw.nix index a92091a..3171e5a 100644 --- a/nix/hosts/framework/hw.nix +++ b/nix/hosts/framework/hw.nix @@ -5,7 +5,7 @@ boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = [ "amdgpu" ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; diff --git a/nix/hosts/framework/sys.nix b/nix/hosts/framework/sys.nix index a8582ba..514ff75 100644 --- a/nix/hosts/framework/sys.nix +++ b/nix/hosts/framework/sys.nix @@ -59,7 +59,18 @@ # AMD hardware.cpu.amd.updateMicrocode = true; - hardware.graphics.enable = true; + hardware.graphics = { + enable = true; + extraPackages = with pkgs; [ + mesa + libva + libvdpau-va-gl + vulkan-loader + vulkan-validation-layers + amdvlk + mesa.opencl + ]; + }; hardware.amdgpu.amdvlk.enable = true; # Power @@ -111,6 +122,9 @@ CC = "gcc"; LSP_USE_PLISTS = "true"; MOZ_USE_XINPUT2 = "1"; + RUSTICL_ENABLE="radeonsi"; + ROC_ENABLE_PRE_VEGA = "1"; + QT_QPA_PLATFORM = "xcb"; }; ### Services From 774e5b7a3c5bd0392ea6204e1fd6cf2517b6fa25 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Wed, 6 Aug 2025 09:29:58 +0000 Subject: [PATCH 03/10] fix(emacs): add `message-buffer` command --- .emacs.d/include/priime-edit.el | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.emacs.d/include/priime-edit.el b/.emacs.d/include/priime-edit.el index 52719c8..ebf3b9c 100644 --- a/.emacs.d/include/priime-edit.el +++ b/.emacs.d/include/priime-edit.el @@ -27,6 +27,11 @@ (kill-line) (meow-insert)) +(defun message-buffer () + "Switch to the *Messages* buffer." + (interactive) + (switch-to-buffer "*Messages*")) + (defvar-keymap meow-buffers-keymap "b" #'bufler-switch-buffer "l" #'bufler-list @@ -34,7 +39,8 @@ "n" #'next-buffer "p" #'previous-buffer "r" #'rename-buffer - "s" #'scratch-buffer) + "s" #'scratch-buffer + "m" #'message-buffer) (defvar-keymap meow-windows-keymap "w" #'delete-other-windows @@ -93,6 +99,7 @@ '("9" . digit-argument) '("0" . digit-argument) '("-" . negative-argument) + '("&" . move-end-of-line) '(";" . meow-reverse) '("," . meow-inner-of-thing) '("." . meow-bounds-of-thing) From 4c1565dec2c7e39981c6734a21059640cb024006 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Fri, 8 Aug 2025 13:26:58 +0000 Subject: [PATCH 04/10] chore(emacs): update straight lockfile --- .emacs.d/straight/versions/default.el | 87 +++++++++++++-------------- 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/.emacs.d/straight/versions/default.el b/.emacs.d/straight/versions/default.el index df6b643..3a22bab 100644 --- a/.emacs.d/straight/versions/default.el +++ b/.emacs.d/straight/versions/default.el @@ -1,28 +1,30 @@ (("Emacs-wgrep" . "49f09ab9b706d2312cab1199e1eeb1bcd3f27f6f") ("all-the-icons.el" . "39ef44f810c34e8900978788467cc675870bcd19") ("anzu" . "21cb5ab2295614372cb9f1a21429381e49a6255f") - ("auctex" . "ad3e3290db7a7f11fca183eba1cfff097a882e18") + ("auctex" . "1a97d6a424a8cb45700a382fa0db5e597fdc2951") + ("avy" . "933d1f36cca0f71e4acb5fac707e9ae26c536264") ("bufler.el" . "ef3b28bbdcb1e813a1d5b06a91d09774998967c5") ("burly.el" . "d5b7133b5b629dd6bca29bb16660a9e472e82e25") ("caml-mode" . "744333dc4c4bd8b93e037efa8f7362b0903b96a2") - ("cape" . "50fdb708074e91bc3d465fbc86c68cbda353b319") - ("casual" . "5ffd4d9928947aee957fac82512ecb93a0152242") + ("cape" . "f72ebcaeff4252ca0d7a9ac4636d8db0fdf54c55") + ("casual" . "9c476ea12cdff376f508b1199373257d7e9b8715") ("cdlatex" . "fac070f0164ac9f5859cb4cccba7d29a65c337f3") ("clojure-mode" . "eabe29b076fff19db552d36d4babaa36ecf0b704") ("closql" . "dc7924c1d206483a2555a98470c96fadf419f32d") - ("compat" . "2129e3728e1766ab9bd92bafde71c0a54a08fb4e") - ("consult" . "ce38dd037769ccba93e7b854ab9b0cc0eced84ee") - ("copilot-chat.el" . "17c4bfaafe7cd7da1b333714dfa548cd08a875d7") + ("compat" . "a0444eab265888bcc33c1ddaae8592e56e96e348") + ("consult" . "fa223d826fa3e6e6cce91dbf5432cab84ef83b66") + ("copilot-chat.el" . "fe28abe5ba3ef98d848c036630abf965b65e9ca8") ("copilot.el" . "7d105d708a23d16cdfd5240500be8bb02f95a46e") ("corfu" . "c302b0526ad9d0c99d1d0639df63f6ca65accfc3") - ("dash.el" . "1de9dcb83eacfb162b6d9a118a4770b1281bcd84") - ("dune" . "d9c52fcfb186ac475b19066f045ce0b35b47aa94") + ("dash.el" . "fcb5d831fc08a43f984242c7509870f30983c27c") + ("dune" . "a50813389304f8471668deacfc487a4d2134b924") ("editorconfig-emacs" . "1a9942746cf5b10daae8962f380b5f2a459086f3") - ("eglot" . "ee9b6006605b9426eb1316ad6e2498525d8a7a1b") + ("eglot" . "8711f483bedf01cf9bf8572a306b04b6f9c51ec0") ("eglot-booster" . "e6daa6bcaf4aceee29c8a5a949b43eb1b89900ed") ("el-get" . "ec5cba8d965980b2c47a8a11dce30dd5e845ed2a") - ("eldoc" . "45d4879d23ce8a45b086fd19fa57d51ee978e151") + ("eldoc" . "b25e80819b2faaa329744215baf7e1f07ade5aa1") ("eldoc-box" . "ebc0e2c13791f5a22cf81be050b32f0ebf726855") + ("elisp-refs" . "541a064c3ce27867872cf708354a65d83baf2a6d") ("emacs-async" . "b99658e831bc7e7d20ed4bb0a85bdb5c7dd74142") ("emacs-elixir" . "00d6580a040a750e019218f9392cf9a4c2dac23a") ("emacs-format-all-the-code" . "fd9c013f5f8094fef99ddabde07d9041737b8454") @@ -32,26 +34,25 @@ ("emacs-neotree" . "4a4cd8576157a39c0fdb478a2887c01ccfe1aec9") ("emacs-ob-racket" . "c7b7eee58fcde2ad515b72288742e555e7ec7915") ("emacs-request" . "c22e3c23a6dd90f64be536e176ea0ed6113a5ba6") - ("emacsmirror-mirror" . "36d23671fb5755e405cd729af7f6bd20f4e7a229") + ("emacsmirror-mirror" . "93134bfec109035db8fd47f23a7084d95ccc8415") ("emacsql" . "f111b0acc79eadeeb3c6c1332d943f11fd6932ff") ("embark" . "d5df0eff182b014ab49328a4dbb1d69eb7faafbd") ("envrc" . "2b818ca6e4a2f723e7cab70cd0101c2728581c3a") ("external-completion" . "5a5dcff61f04553ce5093052d445e01782a67a26") ("f.el" . "931b6d0667fe03e7bf1c6c282d6d8d7006143c52") - ("flycheck" . "b9db1379dcc3e59238dc1fdd7db368c66e8734ba") - ("flycheck-ocaml" . "77f8ddbd9bfc3a11957ac7ec7e45d5fa9179b192") ("flymake" . "2e312f0cc6d934d20c4257256950374bd28d5a86") - ("forge" . "29bf441b391ffc59a28fa9e820236df2e182b4ee") - ("ghub" . "af663777c47a3dce64b2144b4409587b35521e47") + ("forge" . "4247e53b811fbce009612597f5ee214747c692a7") + ("ghub" . "75b3ac5491af4cfe5a82c64347426ec36928769f") ("git-gutter" . "0d8ab98892ee26e2f976883603464d6822189103") ("git-link" . "8d0f98cf36f6b9c31285329b054ae77f9a3d9b33") ("gleam-mode" . "75b5b1a2eede31969a94322f117b0c82036ff40b") - ("gnu-elpa-mirror" . "0170e583dfed2f93454a1dd4673b5946c9c7809a") - ("gptel" . "73133590fa34c51bf2c528862be103a97c6463f0") - ("haskell-mode" . "2163e0d8373885789f74c39c214c33a7ea7a59b5") + ("gnu-elpa-mirror" . "d794ff622f3ee2f57131e6c42e488f8018bd7806") + ("gptel" . "b1d9d54f5c9dc5a5cb0bbbc4a4818a5bd92e87ce") + ("haskell-mode" . "2ada981f2447039c070441d37d28cd32cc2906ca") + ("helpful" . "6a4d5e0760ba96a24cd13052233c6edfb34d022c") ("hl-todo" . "0ce21c329b686802121df45bf4ae15ae201137bf") ("ht.el" . "1c49aad1c820c86f7ee35bf9fff8429502f60fef") - ("hydra" . "317e1de33086637579a7aeb60f77ed0405bf359b") + ("hydra" . "59a2a45a35027948476d1d7751b0f0215b1e61aa") ("inf-elixir" . "857210b83f3c6a68673222c1271c40cb0b5641bc") ("inheritenv" . "b9e67cc20c069539698a9ac54d0e6cc11e616c6f") ("irony-mode" . "40e0ce19eb850bdf1f77225f11713cc816250d95") @@ -61,65 +62,63 @@ ("justl.el" . "1c3d0550cd4f53139ce9a63b9954685162e838f7") ("let-alist" . "35a1dae3c540705433a510c13c8af80206b29b5f") ("ligature.el" . "6ac1634612dbd42f7eb81ecaf022bd239aabb954") - ("llama" . "c1b320d6308a68d8841116745310cc55ac5ce74b") + ("llama" . "48e5bc4919a4a29665362832d59ade8e248b0c3e") ("llvm-mode" . "9741e5391ea711474474d8d4aacd5abaae2ba501") - ("magit" . "28d272ce0bcecc2e312d22ed15a48ad4cea564eb") - ("major-mode-hydra.el" . "d0a5dadee97c3752fcdef113cf2ba1923972a480") + ("magit" . "752fce52350c38c9265e5483e7207d718a3645f0") + ("major-mode-hydra.el" . "2494d71e24b61c1f5ef2dc17885e2f65bf98b3b2") ("map" . "016e8711dea9ddbd26016711a64fbe78cba55668") - ("marginalia" . "a527fb03b76a2bce1e360c6e73a095e06922c3f3") - ("markdown-mode" . "0a522bf682c977b39f449b0edc63ebf1db14aa04") - ("melpa" . "33b508111b2e43f0a550386a6e0e109604cd5a8c") - ("meow" . "96fecf530d7b29dfb66f327933ebe37f016df132") - ("merlin" . "56992c4a266045357e3ab25cfa70dd3eda4faacb") - ("merlin-eldoc" . "bf8edc63d85b35e4def352fa7ce4ea39f43e1fd8") + ("marginalia" . "f6c1f50686c5c96761d0b9d12773e2391459487c") + ("markdown-mode" . "d2d960bec164e91e1a3315b176e2bcc324e63c95") + ("melpa" . "0a0a3425d94f48d9804478c0d1a2d77f41c6d6b9") + ("meow" . "57efe6bf3039f2c2eb71683acce1eeea03863ea1") ("nano-theme" . "ffe414c8af9c673caf8b8b05ba89a229cb9ad48b") ("nix-mode" . "719feb7868fb567ecfe5578f6119892c771ac5e5") - ("no-littering" . "0c119d46cce5c018e162fae4b36fd95ef26a76ac") - ("nongnu-elpa" . "e867bf7d9c559ce636516507a04dee244e9e100d") - ("ocamlformat" . "c15447950717dfb6490404c3dbfe17641460cabe") + ("no-littering" . "de767a4952b2375a2ce1a2f7fe17a417bfbf512e") + ("nongnu-elpa" . "8576fdb9e1d8208836989a96e26ade0f976d17a0") + ("ocaml-eglot" . "52e59e3dba1f8af1e90166c556e6f3b567cd9857") ("olivetti" . "845eb7a95a3ca3325f1120c654d761b91683f598") - ("orderless" . "c7cb04499d94ee1c17affb29b1cfcd2a45116c97") - ("org" . "53cd3f83c96728fff22bcc2e51a6ce1fa5aba279") - ("org-modern" . "ab52b6d728a5123b4a5aa55fe3340cf42981a362") + ("orderless" . "254f2412489bbbf62700f9d3d5f18e537841dcc3") + ("org" . "6daeb5da622a7a2a4ab81a145dfcb9f100132a89") + ("org-modern" . "e7a4c5e4a1d309895c60b3a3b3e62ab1f6a926b4") ("org-modern-indent" . "2b3ee1f8cb8be859970ffaee62f12e635f161cd3") - ("org-roam" . "0037daaf3eb2d1c3a1c215efb4d38a32db140224") + ("org-roam" . "db4170a459cba06bd3d36fb6dc748364774ec204") ("paredit" . "af075775af91f2dbc63b915d762b4aec092946c4") ("pdf-tools" . "30b50544e55b8dbf683c2d932d5c33ac73323a16") ("poetry.el" . "1dff0d4a51ea8aff5f6ce97b154ea799902639ad") ("pollen-mode" . "19174fab69ce4d2ae903ef2c3da44054e8b84268") ("polymode" . "74ba75d4bcfbea959ccc9080a95ab9ef759849f2") ("posframe" . "12f540c9ad5da09673b2bca1132b41f94c134e82") - ("project" . "c45d9bf11ef7c375902ceeb217d3373deb85e8f3") - ("projectile" . "30c55d19b9488dcddc9195c9acb7f625d472d96d") + ("project" . "f8123159622f09c60c4d0be6c4c773b57c2a010d") + ("projectile" . "55db082cdf7b849335ccf24b7ba5aa2607d6fe93") ("pyvenv" . "31ea715f2164dd611e7fc77b26390ef3ca93509b") ("queue" . "8df1334d54d4735d2f821790422a850dfaaa08ef") - ("racket-mode" . "eef5e9ab2c8991e7c73d4232bde28a77124005a5") + ("racket-mode" . "cf9227740a240c46da9d32da2da4669655fd148d") ("rg.el" . "94813ba3a7ccf3af68beb23a2c39154a99e8c9ec") ("rjsx-mode" . "b697fe4d92cc84fa99a7bcb476f815935ea0d919") ("rust-mode" . "efd830806c8519bb7f614504eac6bdfdbbac1247") - ("rustic" . "1f5c47b87cded60bec6ccd3c0e7cb3c262709769") + ("rustic" . "22a5ef8bfd5a34ced945c2722938eb29632371d4") ("s.el" . "dda84d38fffdaf0c9b12837b504b402af910d01d") ("scribble-mode" . "12ed55fa0c207437889b5d512ba95944e827e812") ("seq" . "da86da9bf111f68fb81efd466d76d53af5aebc00") ("shell-maker" . "98780ec0a8ac4fe1d6be9e2f8047195cdfad5f70") ("sly" . "c48defcf58596e035d473f3a125fdd1485593146") ("spinner" . "fa117f0893788f3fe24673715a6b83bb34d238dd") - ("straight.el" . "44a866f28f3ded6bcd8bc79ddc73b8b5044de835") + ("straight.el" . "483b205efb2eaa6be7c0dc7078b8c9dafcffb318") ("tablist" . "fcd37147121fabdf003a70279cf86fbe08cfac6f") - ("transient" . "b51a52a9c7a6562c19d03de4ce30b9c071bca8d2") + ("transient" . "52f737a696cad846d528a5a06e412f740a1de38a") ("treepy.el" . "651e2634f01f346da9ec8a64613c51f54b444bc3") ("tuareg" . "1600fdad28bdd2c55e52a87e7987713c6d5d1718") ("typst-ts-mode" . "1367003e2ad55a2f6f9e43178584683028ab56e9") ("undo-tree" . "d8f72bbe7d3c3a2808986febd3bb1a46d4da7f51") ("utop" . "3322adaa5267b1188d14b15e85c802c21fe061cb") - ("vertico" . "ac82acf177a0dfc97deac8626a8a98c06bffc96c") + ("vertico" . "026a81a9c893b1d73cdbcb12436a0fad3ebdeb5f") ("vertico-posframe" . "047474764c6bf9f6296f8e4f959d483de6b5baf7") ("with-editor" . "ca902ae02972bdd6919a902be2593d8cb6bd991b") ("ws-butler" . "d3927f6131f215e9cd3e1f747be5a91e5be8ca9a") - ("xref" . "512b9211589492a4d524df439869fd2ad7eea8dc") + ("xref" . "b547cca3ccf85e564f14d1bc8344f58c15d3185c") ("xterm-color" . "2ad407c651e90fff2ea85d17bf074cee2c022912") ("yaml-mode" . "d91f878729312a6beed77e6637c60497c5786efa") - ("yaml.el" . "09e46d563f1f3ff948852e08360c7d3c76e2acba") + ("yaml.el" . "f99ef76c80e6fc3fcf650c4fe34e10726594a4c4") ("yasnippet" . "5b315f1753480ebe669b157b8242448b5eafcfea") ("yasnippet-snippets" . "46945ccf63122190dc564af4ec26f828eaa29b43")) :gamma From a96642fc4a52d09bbd84aab997ce269c98026b55 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 12:02:04 +0000 Subject: [PATCH 05/10] fix(nix): fine tune amd gpu config --- nix/hosts/framework/sys.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nix/hosts/framework/sys.nix b/nix/hosts/framework/sys.nix index 514ff75..d6c9b80 100644 --- a/nix/hosts/framework/sys.nix +++ b/nix/hosts/framework/sys.nix @@ -11,6 +11,9 @@ # Network Manager networking.networkmanager.enable = true; + # Security + security.rtkit.enable = true; + # Fonts fonts = { fontDir.enable = true; @@ -61,6 +64,7 @@ hardware.cpu.amd.updateMicrocode = true; hardware.graphics = { enable = true; + enable32Bit = true; extraPackages = with pkgs; [ mesa libva @@ -69,6 +73,7 @@ vulkan-validation-layers amdvlk mesa.opencl + rocmPackages.clr.icd ]; }; hardware.amdgpu.amdvlk.enable = true; From a40192bb99552d495db3869fa877ff8badd7c080 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 12:02:34 +0000 Subject: [PATCH 06/10] fix(nix): xdg portal config --- nix/hosts/framework/sys.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/hosts/framework/sys.nix b/nix/hosts/framework/sys.nix index d6c9b80..c6e1672 100644 --- a/nix/hosts/framework/sys.nix +++ b/nix/hosts/framework/sys.nix @@ -94,6 +94,12 @@ # Display Manager services.displayManager.autoLogin.user = "priime"; + xdg.portal = { + enable = true; + extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; + config.common.default = "wlr"; + }; + # Mouse services.libinput.mouse = { middleEmulation = false; }; From 011bda8d02d19a7ba781fa0ac6fa23f844196469 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 13:01:24 +0000 Subject: [PATCH 07/10] feat(nix): add new server --- flake.nix | 10 +++++ nix/hosts/chaewon/home.nix | 18 +++++++++ nix/hosts/chaewon/hw.nix | 11 ++++++ nix/hosts/chaewon/sys.nix | 81 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 120 insertions(+) create mode 100644 nix/hosts/chaewon/home.nix create mode 100644 nix/hosts/chaewon/hw.nix create mode 100644 nix/hosts/chaewon/sys.nix diff --git a/flake.nix b/flake.nix index efc330a..a168203 100644 --- a/flake.nix +++ b/flake.nix @@ -24,5 +24,15 @@ ./nix/hosts/framework/sys.nix ]; }; + + nixosConfigurations.chaewon = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inputs = inputs; }; + modules = [ + home-manager.nixosModules.default + ./nix/hosts/common/sys.nix + ./nix/hosts/chaewon/sys.nix + ]; + }; }; } diff --git a/nix/hosts/chaewon/home.nix b/nix/hosts/chaewon/home.nix new file mode 100644 index 0000000..1584655 --- /dev/null +++ b/nix/hosts/chaewon/home.nix @@ -0,0 +1,18 @@ +{ inputs, configDir, config, pkgs, lib, ... }: { + home.stateVersion = "23.11"; + + home.packages = let + packages = with pkgs; [ + fish + lsof + rsync + git + curl + wget + + tailscale + + nginx + ]; + in packages; +} diff --git a/nix/hosts/chaewon/hw.nix b/nix/hosts/chaewon/hw.nix new file mode 100644 index 0000000..7902335 --- /dev/null +++ b/nix/hosts/chaewon/hw.nix @@ -0,0 +1,11 @@ +{ modulesPath, ... }: { + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + boot.loader.grub.device = "/dev/sda"; + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; + boot.initrd.kernelModules = [ "nvme" ]; + fileSystems."/" = { + device = "/dev/sda1"; + fsType = "ext4"; + }; +} diff --git a/nix/hosts/chaewon/sys.nix b/nix/hosts/chaewon/sys.nix new file mode 100644 index 0000000..ae93434 --- /dev/null +++ b/nix/hosts/chaewon/sys.nix @@ -0,0 +1,81 @@ +{ inputs, config, pkgs, lib, ... }: { + imports = [ ./hw.nix ]; + + # Generated by nixos-infect + boot.tmp.cleanOnBoot = true; + zramSwap.enable = true; + networking.hostName = "chaewon-nixos-ash-1"; + networking.domain = ""; + services.openssh.enable = true; + users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi'' ]; + + # Generated by nixos-infect + networking = { + nameservers = [ "8.8.8.8" ]; + defaultGateway = "172.31.1.1"; + defaultGateway6 = { + address = "fe80::1"; + interface = "eth0"; + }; + dhcpcd.enable = false; + usePredictableInterfaceNames = lib.mkForce false; + interfaces = { + eth0 = { + ipv4.addresses = [{ + address = "178.156.207.225"; + prefixLength = 32; + }]; + ipv6.addresses = [ + { + address = "2a01:4ff:f0:7ccc::1"; + prefixLength = 64; + } + { + address = "fe80::9000:6ff:fe59:7a8b"; + prefixLength = 64; + } + ]; + ipv4.routes = [{ + address = "172.31.1.1"; + prefixLength = 32; + }]; + ipv6.routes = [{ + address = "fe80::1"; + prefixLength = 128; + }]; + }; + + }; + }; + services.udev.extraRules = '' + ATTR{address}=="92:00:06:59:7a:8b", NAME="eth0" + ''; + + # 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"; + }; + + users.users.priime = { + isNormalUser = true; + description = "Lucas"; + extraGroups = [ "wheel" "docker" ]; + packages = with pkgs; [ ]; + shell = pkgs.fish; + openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi'']; + }; + + programs.fish.enable = true; + + system.stateVersion = "23.11"; + home-manager.users.priime = { pkgs, ... }: { imports = [ ./home.nix ]; }; +} From ebd0fce27fa56a46d9f7f079c6663c119e1fb271 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 14:04:08 +0000 Subject: [PATCH 08/10] fix(nix): add acme and nginx simple configuration --- nix/hosts/chaewon/sys.nix | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/nix/hosts/chaewon/sys.nix b/nix/hosts/chaewon/sys.nix index ae93434..a4f1585 100644 --- a/nix/hosts/chaewon/sys.nix +++ b/nix/hosts/chaewon/sys.nix @@ -51,6 +51,13 @@ ATTR{address}=="92:00:06:59:7a:8b", NAME="eth0" ''; + security.acme = { + acceptTerms = true; + defaults.email = "lucas@priime.dev"; + }; + + networking.firewall.allowedTCPPorts = [ 80 443 ]; + # Select internationalisation properties. i18n.defaultLocale = "en_US.UTF-8"; i18n.extraLocaleSettings = { @@ -76,6 +83,17 @@ programs.fish.enable = true; + services.nginx = { + enable = true; + virtualHosts = { + "files.priime.dev" = { + forceSSL = true; + enableACME = true; + locations."/" = { root = "/var/lib/files.priime.dev"; }; + }; + }; + }; + system.stateVersion = "23.11"; home-manager.users.priime = { pkgs, ... }: { imports = [ ./home.nix ]; }; } From e8e5d6e705c8edbbd516953b35dcde41fd0880a4 Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 14:40:14 +0000 Subject: [PATCH 09/10] fix(nix): add timezone and nginx extra config --- nix/hosts/chaewon/sys.nix | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/nix/hosts/chaewon/sys.nix b/nix/hosts/chaewon/sys.nix index a4f1585..da8162b 100644 --- a/nix/hosts/chaewon/sys.nix +++ b/nix/hosts/chaewon/sys.nix @@ -1,13 +1,17 @@ { inputs, config, pkgs, lib, ... }: { imports = [ ./hw.nix ]; + time.timeZone = "America/New_York"; + # Generated by nixos-infect boot.tmp.cleanOnBoot = true; zramSwap.enable = true; networking.hostName = "chaewon-nixos-ash-1"; networking.domain = ""; services.openssh.enable = true; - users.users.root.openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi'' ]; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi" + ]; # Generated by nixos-infect networking = { @@ -78,7 +82,9 @@ extraGroups = [ "wheel" "docker" ]; packages = with pkgs; [ ]; shell = pkgs.fish; - openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi'']; + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBGpnPYxrYnmtFaf591Q80FQPb01dqTwlH58V6uRa7Fi" + ]; }; programs.fish.enable = true; @@ -89,7 +95,14 @@ "files.priime.dev" = { forceSSL = true; enableACME = true; - locations."/" = { root = "/var/lib/files.priime.dev"; }; + locations."/" = { + root = "/var/lib/files.priime.dev"; + extraConfig = '' + autoindex on; + autoindex_exact_size off; + autoindex_localtime on; + ''; + }; }; }; }; From 68c9475a94e6e45c77cc77b231cf539839c8558e Mon Sep 17 00:00:00 2001 From: Lucas Sta Maria Date: Tue, 12 Aug 2025 14:59:31 +0000 Subject: [PATCH 10/10] fix(nix): configure forgejo --- nix/hosts/chaewon/sys.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/nix/hosts/chaewon/sys.nix b/nix/hosts/chaewon/sys.nix index da8162b..71c9179 100644 --- a/nix/hosts/chaewon/sys.nix +++ b/nix/hosts/chaewon/sys.nix @@ -104,6 +104,28 @@ ''; }; }; + "git.priime.dev" = { + forceSSL = true; + enableACME = true; + extraConfig = '' + client_max_body_size 512M; + ''; + locations."/".proxyPass = "http://localhost:3000"; + }; + }; + }; + + services.forgejo = { + enable = true; + database.type = "postgres"; + lfs.enable = true; + settings = { + server = { + DOMAIN = "git.priime.dev"; + ROOT_URL = "https://git.priime.dev/"; + HTTP_PORT = 3000; + }; + service.DISABLE_REGISTRATION = true; }; };