From 72eb542c6b1f05a1c5791246f02f802373dc828d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 27 Jun 2022 01:02:02 +0000 Subject: [PATCH 01/13] flake.lock: Update MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Flake lock file updates: • Updated input 'emacs': 'github:nix-community/emacs-overlay/4392cba3b33ef8abc1a9c007fc58a6ce86cf0ea1' (2022-06-19) → 'github:nix-community/emacs-overlay/b9464569ca17c8b4942bea5f9531b78e01806782' (2022-06-26) • Updated input 'emacs/flake-utils': 'github:numtide/flake-utils/1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1' (2022-05-30) → 'github:numtide/flake-utils/bee6a7250dd1b01844a2de7e02e4df7d8a0a206c' (2022-06-24) • Updated input 'fenix': 'github:nix-community/fenix/55987185def5cf3afc616d38907406293a170cfe' (2022-06-19) → 'github:nix-community/fenix/a5b11b8d6bce93078491465193e41df15583ade7' (2022-06-26) • Updated input 'fenix/nixpkgs': 'github:nixos/nixpkgs/3d7435c638baffaa826b85459df0fff47f12317d' (2022-06-16) → 'github:nixos/nixpkgs/6141b8932a5cf376fe18fcd368cecd9ad946cb68' (2022-06-23) • Updated input 'fenix/rust-analyzer-src': 'github:rust-lang/rust-analyzer/eb9b36075272013984ac5d27128e87a714b90c9a' (2022-06-18) → 'github:rust-lang/rust-analyzer/5bb123d97000a85c7a909fe1ab0b981d54c967f2' (2022-06-24) • Updated input 'home-manager': 'github:nix-community/home-manager/3d8265c5efd5e4d3ad8a90686bc81d49353fdb08' (2022-06-19) → 'github:nix-community/home-manager/9550595502bf437be7eb32f312a924ec891872d1' (2022-06-26) • Removed input 'home-manager/flake-compat' • Removed input 'home-manager/nmd' • Removed input 'home-manager/nmt' • Updated input 'java': 'github:nathans-flakes/java/8e53bfead6195e4440aef47b2f08b0e7f89b1d4d' (2022-06-14) → 'github:nathans-flakes/java/4ade2ae9e949b184ba2d47495ec348f385ab0300' (2022-06-25) • Updated input 'nixpkgs': 'github:NixOS/nixpkgs/d17a56d90ecbd1b8fc908d49598fb854ef188461' (2022-06-17) → 'github:NixOS/nixpkgs/ccf8bdf72624521358be6bb7d9b524c4cbcf7aff' (2022-06-23) • Updated input 'nixpkgs-unstable': 'github:NixOS/nixpkgs/e0a42267f73ea52adc061a64650fddc59906fc99' (2022-06-18) → 'github:NixOS/nixpkgs/f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5' (2022-06-26) • Updated input 'polymc': 'github:PolyMC/PolyMC/03e454b71d83aebbb534c5734ccd9093842da28c' (2022-06-15) → 'github:PolyMC/PolyMC/774ed044fcac9c444f41e0f93435089338e8366c' (2022-06-26) • Updated input 'sops-nix': 'github:Mic92/sops-nix/67af9b179c629dea211ebd83f92c77f5745043be' (2022-06-19) → 'github:Mic92/sops-nix/aff5d8542c9eb566a000302b22fcc10715bc2feb' (2022-06-26) • Updated input 'sops-nix/nixpkgs-21_11': 'github:NixOS/nixpkgs/27dffce7eaa9648b4a13a461e786f169a17c0889' (2022-06-18) → 'github:NixOS/nixpkgs/46af3303651699dc58cfc251d9b18c0f59d857da' (2022-06-25) • Updated input 'sops-nix/nixpkgs-22_05': 'github:NixOS/nixpkgs/57622cb817210146b379adbbd036d3da0d1f367c' (2022-06-18) → 'github:NixOS/nixpkgs/72a1f167077060a1a7b6e0104863245d0483fa7f' (2022-06-25) --- flake.lock | 131 ++++++++++++++++------------------------------------- 1 file changed, 40 insertions(+), 91 deletions(-) diff --git a/flake.lock b/flake.lock index 7df5753..335abc4 100644 --- a/flake.lock +++ b/flake.lock @@ -62,11 +62,11 @@ ] }, "locked": { - "lastModified": 1655672044, - "narHash": "sha256-FamjZO5yOF1irDu3b95NO9Ae6/4Db0gNiXuAAWJtF9k=", + "lastModified": 1656268767, + "narHash": "sha256-5/iFlVpb94WhZrbY+lDvvC1VOdMzYIHNxrn6h5TxjKc=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "4392cba3b33ef8abc1a9c007fc58a6ce86cf0ea1", + "rev": "b9464569ca17c8b4942bea5f9531b78e01806782", "type": "github" }, "original": { @@ -161,11 +161,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1655619932, - "narHash": "sha256-/7L0/ymVXGL0FrQNLAP2P1Ch22RR0kt0N6jfdjm+WVc=", + "lastModified": 1656224696, + "narHash": "sha256-V1xlRG+30OMd48TEtyC7OehKqg7exG3NPiVfRAamJfg=", "owner": "nix-community", "repo": "fenix", - "rev": "55987185def5cf3afc616d38907406293a170cfe", + "rev": "a5b11b8d6bce93078491465193e41df15583ade7", "type": "github" }, "original": { @@ -190,29 +190,13 @@ "type": "github" } }, - "flake-compat_2": { - "flake": false, - "locked": { - "lastModified": 1650374568, - "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "b4a34015c698c7793d592d66adbab377907a2be8", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { - "lastModified": 1653893745, - "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "lastModified": 1656065134, + "narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c", "type": "github" }, "original": { @@ -255,20 +239,17 @@ }, "home-manager": { "inputs": { - "flake-compat": "flake-compat", "nixpkgs": [ "nixpkgs" ], - "nmd": "nmd", - "nmt": "nmt", "utils": "utils" }, "locked": { - "lastModified": 1655679417, - "narHash": "sha256-rUM/VDIQAMm0pLAVBizQoR9I8TELRmak7SsJLaO/NBg=", + "lastModified": 1656274966, + "narHash": "sha256-jU+OTSvUbvKKmbNNl4XkUyW3EGdqZDNEZtGs++NbDlM=", "owner": "nix-community", "repo": "home-manager", - "rev": "3d8265c5efd5e4d3ad8a90686bc81d49353fdb08", + "rev": "9550595502bf437be7eb32f312a924ec891872d1", "type": "github" }, "original": { @@ -285,11 +266,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1655182547, - "narHash": "sha256-gmkb6l13CVKtlRydDJ9O3sifKtamKLgLdUaEASdQ6Ls=", + "lastModified": 1656122108, + "narHash": "sha256-wJrVZLqvBhq+u2Mi3yc4oS8pOtzdxL6uMmmSt+1bNHE=", "owner": "nathans-flakes", "repo": "java", - "rev": "8e53bfead6195e4440aef47b2f08b0e7f89b1d4d", + "rev": "4ade2ae9e949b184ba2d47495ec348f385ab0300", "type": "github" }, "original": { @@ -389,11 +370,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1655400192, - "narHash": "sha256-49OBVVRgb9H/PSmNT9W61+NRdDbuSJVuDDflwXlaUKU=", + "lastModified": 1655983783, + "narHash": "sha256-0h1FzkYWei24IdKNpCX93onkF/FMiXQG8SdEbTc0r8A=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3d7435c638baffaa826b85459df0fff47f12317d", + "rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68", "type": "github" }, "original": { @@ -405,11 +386,11 @@ }, "nixpkgs-21_11": { "locked": { - "lastModified": 1655562720, - "narHash": "sha256-OrN8DkBRZqZMzMuECuQNvSQ5gWoFBCxDvxYXjIQ/pH0=", + "lastModified": 1656198488, + "narHash": "sha256-xe81o3Kin6a0jXA3mTxcR+jeA1jLKw3TCar5LUo/B5c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27dffce7eaa9648b4a13a461e786f169a17c0889", + "rev": "46af3303651699dc58cfc251d9b18c0f59d857da", "type": "github" }, "original": { @@ -421,11 +402,11 @@ }, "nixpkgs-22_05": { "locked": { - "lastModified": 1655584987, - "narHash": "sha256-YmWxPm6ctu+9nV80DtYtMfOBosNymeTpj8+Z0JTDfhU=", + "lastModified": 1656199498, + "narHash": "sha256-/BCpM7j7y1G4het6Z3idlnv9A87/s0O1glVmH7fnWvk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "57622cb817210146b379adbbd036d3da0d1f367c", + "rev": "72a1f167077060a1a7b6e0104863245d0483fa7f", "type": "github" }, "original": { @@ -437,11 +418,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1655567057, - "narHash": "sha256-Cc5hQSMsTzOHmZnYm8OSJ5RNUp22bd5NADWLHorULWQ=", + "lastModified": 1656239181, + "narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e0a42267f73ea52adc061a64650fddc59906fc99", + "rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5", "type": "github" }, "original": { @@ -453,11 +434,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1655456688, - "narHash": "sha256-j2trI5gv2fnHdfUQFBy957avCPxxzCqE8R+TOYHPSRE=", + "lastModified": 1656007306, + "narHash": "sha256-MsC44YZ6wuBwn5Bu8T+RVoQWlp2l5BR6hhmNoAAHIEw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d17a56d90ecbd1b8fc908d49598fb854ef188461", + "rev": "ccf8bdf72624521358be6bb7d9b524c4cbcf7aff", "type": "github" }, "original": { @@ -467,38 +448,6 @@ "type": "github" } }, - "nmd": { - "flake": false, - "locked": { - "lastModified": 1653339422, - "narHash": "sha256-8nc7lcYOgih3YEmRMlBwZaLLJYpLPYKBlewqHqx8ieg=", - "owner": "rycee", - "repo": "nmd", - "rev": "9e7a20e6ee3f6751f699f79c0b299390f81f7bcd", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmd", - "type": "gitlab" - } - }, - "nmt": { - "flake": false, - "locked": { - "lastModified": 1648075362, - "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", - "owner": "rycee", - "repo": "nmt", - "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", - "type": "gitlab" - }, - "original": { - "owner": "rycee", - "repo": "nmt", - "type": "gitlab" - } - }, "nose": { "flake": false, "locked": { @@ -597,18 +546,18 @@ }, "polymc": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat", "libnbtplusplus": "libnbtplusplus", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1655285534, - "narHash": "sha256-g1WTrnRD1YtI2aCVUqatg7NlhmLJ7jIA4p0ke9Zpvx0=", + "lastModified": 1656256455, + "narHash": "sha256-x+1g31ehmekGUIJ31efNOqnp57b8R29FuS5dSPSteuI=", "owner": "PolyMC", "repo": "PolyMC", - "rev": "03e454b71d83aebbb534c5734ccd9093842da28c", + "rev": "774ed044fcac9c444f41e0f93435089338e8366c", "type": "github" }, "original": { @@ -667,11 +616,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1655591884, - "narHash": "sha256-eBjsdPC5vudbUv4/i7AAggrrTATnCTzMfQetCiJndaQ=", + "lastModified": 1656092520, + "narHash": "sha256-HLb4ql9GDuXf/lF5wH6jdlL7E6MARmthGvHOgrpsSl8=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "eb9b36075272013984ac5d27128e87a714b90c9a", + "rev": "5bb123d97000a85c7a909fe1ab0b981d54c967f2", "type": "github" }, "original": { @@ -690,11 +639,11 @@ "nixpkgs-22_05": "nixpkgs-22_05" }, "locked": { - "lastModified": 1655665732, - "narHash": "sha256-Fe+evSlGbMOMNSI9dECLDJx6L3ZvYFxosfaDnaPwSK8=", + "lastModified": 1656215886, + "narHash": "sha256-67fkBb4GUbuMZTHs08mNycg0hBzboy+5boMD76wLpj4=", "owner": "Mic92", "repo": "sops-nix", - "rev": "67af9b179c629dea211ebd83f92c77f5745043be", + "rev": "aff5d8542c9eb566a000302b22fcc10715bc2feb", "type": "github" }, "original": { From 71af271fedefee08d943d877992367077c497c8a Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Mon, 20 Jun 2022 19:30:58 -0400 Subject: [PATCH 02/13] Fix now broken network device name --- flake.lock | 37 +++++++++++++++++++------------------ flake.nix | 2 +- machines/levitation.nix | 4 ++-- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/flake.lock b/flake.lock index 335abc4..1c1e62f 100644 --- a/flake.lock +++ b/flake.lock @@ -62,16 +62,17 @@ ] }, "locked": { - "lastModified": 1656268767, - "narHash": "sha256-5/iFlVpb94WhZrbY+lDvvC1VOdMzYIHNxrn6h5TxjKc=", + "lastModified": 1655120294, + "narHash": "sha256-e0IXVoxH3o1QbLtHxANAg2CHdVE3jZBi5ifhh+6Vpcs=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "b9464569ca17c8b4942bea5f9531b78e01806782", + "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", + "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", "type": "github" } }, @@ -161,11 +162,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1656224696, - "narHash": "sha256-V1xlRG+30OMd48TEtyC7OehKqg7exG3NPiVfRAamJfg=", + "lastModified": 1656311436, + "narHash": "sha256-rXZbZ61Zvn5rE0Srh5bpfNYRXEZHIigqcjkKh2+Cvk4=", "owner": "nix-community", "repo": "fenix", - "rev": "a5b11b8d6bce93078491465193e41df15583ade7", + "rev": "5e2708f04efe0ed2616be471d0913e303ff3a9ee", "type": "github" }, "original": { @@ -245,11 +246,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1656274966, - "narHash": "sha256-jU+OTSvUbvKKmbNNl4XkUyW3EGdqZDNEZtGs++NbDlM=", + "lastModified": 1656367977, + "narHash": "sha256-0hV17V9Up9pnAtPJ+787FhrsPnawxoTPA/VxgjRMrjc=", "owner": "nix-community", "repo": "home-manager", - "rev": "9550595502bf437be7eb32f312a924ec891872d1", + "rev": "3bf16c0fd141c28312be52945d1543f9ce557bb1", "type": "github" }, "original": { @@ -370,11 +371,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1655983783, - "narHash": "sha256-0h1FzkYWei24IdKNpCX93onkF/FMiXQG8SdEbTc0r8A=", + "lastModified": 1656239181, + "narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68", + "rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5", "type": "github" }, "original": { @@ -434,11 +435,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1656007306, - "narHash": "sha256-MsC44YZ6wuBwn5Bu8T+RVoQWlp2l5BR6hhmNoAAHIEw=", + "lastModified": 1656265786, + "narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ccf8bdf72624521358be6bb7d9b524c4cbcf7aff", + "rev": "cd90e773eae83ba7733d2377b6cdf84d45558780", "type": "github" }, "original": { @@ -616,11 +617,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1656092520, - "narHash": "sha256-HLb4ql9GDuXf/lF5wH6jdlL7E6MARmthGvHOgrpsSl8=", + "lastModified": 1656240210, + "narHash": "sha256-CeP1gNUtmYHCQylROkpunvVTR8J8w/Pm6D5rjw8v4Gw=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "5bb123d97000a85c7a909fe1ab0b981d54c967f2", + "rev": "b74e96f509baf0be70281c55f14cb18fefbc6b22", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index d9c1a6d..cce338f 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ inputs.nixpgks.follows = "nixpkgs"; }; emacs = { - url = "github:nix-community/emacs-overlay"; + url = "github:nix-community/emacs-overlay/29dcfbc1b29ae7281e95367e0f2358b44224a46e"; inputs.nixpkgs.follows = "nixpkgs"; }; mozilla = { diff --git a/machines/levitation.nix b/machines/levitation.nix index 008340f..d543e95 100644 --- a/machines/levitation.nix +++ b/machines/levitation.nix @@ -7,8 +7,8 @@ hostName = "levitation"; domain = "mccarty.io"; useDHCP = false; - interfaces.enp5s0.useDHCP = true; - nat.externalInterface = "enp5s0"; + interfaces.enp6s0.useDHCP = true; + nat.externalInterface = "enp6s0"; }; ### ## Enable programs we don't want on every machine From 8b9bb0121a321d57c670815eb9c050200883570e Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Tue, 21 Jun 2022 23:23:36 -0400 Subject: [PATCH 03/13] Add pyright (python lsp) --- applications/devel-core.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/applications/devel-core.nix b/applications/devel-core.nix index 603ca30..f25d753 100644 --- a/applications/devel-core.nix +++ b/applications/devel-core.nix @@ -25,5 +25,7 @@ sops # Just in case neovim + # For python + nodePackages.pyright ]; } From 5724e7cd07b960f06b5bb59e6567d9daeffbc1c0 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Sun, 26 Jun 2022 22:43:45 -0400 Subject: [PATCH 04/13] feat: Add waylandifyed blockbench --- modules/games.nix | 1 + packages/blockbench/default.nix | 50 +++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 packages/blockbench/default.nix diff --git a/modules/games.nix b/modules/games.nix index e2c4314..5e1b9b3 100644 --- a/modules/games.nix +++ b/modules/games.nix @@ -16,6 +16,7 @@ # PolyMC minecraft stuff polymc glfw-patched + (pkgs.callPackage ../packages/blockbench/default.nix {}) ]; unstable-packages = with nixpkgs-unstable.legacyPackages."${pkgs.system}"; [ # Packwiz for maintaing modpacks diff --git a/packages/blockbench/default.nix b/packages/blockbench/default.nix new file mode 100644 index 0000000..a0c183d --- /dev/null +++ b/packages/blockbench/default.nix @@ -0,0 +1,50 @@ +{ lib, stdenv, fetchurl, appimageTools, makeWrapper, electron_17 }: + +stdenv.mkDerivation rec { + pname = "blockbench-electron"; + version = "4.2.5"; + + src = fetchurl { + url = "https://github.com/JannisX11/blockbench/releases/download/v${version}/Blockbench_${version}.AppImage"; + sha256 = "ibgWP3i0QGKnL0ZmDusouo2DoDxOkRZQFqIl8SEChbs="; + name = "${pname}-${version}.AppImage"; + }; + + appimageContents = appimageTools.extractType2 { + name = "${pname}-${version}"; + inherit src; + }; + + dontUnpack = true; + dontConfigure = true; + dontBuild = true; + + nativeBuildInputs = [ makeWrapper ]; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/share/${pname} $out/share/applications + cp -a ${appimageContents}/{locales,resources} $out/share/${pname} + cp -a ${appimageContents}/blockbench.desktop $out/share/applications/${pname}.desktop + cp -a ${appimageContents}/usr/share/icons $out/share + substituteInPlace $out/share/applications/${pname}.desktop \ + --replace 'Exec=AppRun' 'Exec=${pname}' + runHook postInstall + ''; + + postFixup = '' + makeWrapper ${electron_17}/bin/electron $out/bin/${pname} \ + --add-flags $out/share/${pname}/resources/app.asar \ + --add-flags "--enable-features=UseOzonePlatform" \ + --add-flags "--ozone-platform=wayland" \ + --prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ stdenv.cc.cc ]}" + ''; + + meta = with lib; { + description = "A boxy 3D model editor powered by Electron"; + homepage = "https://blockbench.net/"; + license = licenses.gpl3Only; + maintainers = [ maintainers.ckie ]; + platforms = [ "x86_64-linux" ]; + }; +} From 20d3ba6052519fab856ef1f187fe48682e2df3cb Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 04:28:40 -0400 Subject: [PATCH 05/13] Update emacs --- flake.lock | 7 +++---- flake.nix | 2 +- home.nix | 1 + 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/flake.lock b/flake.lock index 1c1e62f..dffd6a7 100644 --- a/flake.lock +++ b/flake.lock @@ -62,17 +62,16 @@ ] }, "locked": { - "lastModified": 1655120294, - "narHash": "sha256-e0IXVoxH3o1QbLtHxANAg2CHdVE3jZBi5ifhh+6Vpcs=", + "lastModified": 1656387960, + "narHash": "sha256-Rcnt6i4i9qScIJamwlXey78q9W3BiKxoN9T74yMoNPk=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", + "rev": "79d813d9d4ebbd8ab34c1f755439cab4aedb2ddb", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", - "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", "type": "github" } }, diff --git a/flake.nix b/flake.nix index cce338f..d9c1a6d 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ inputs.nixpgks.follows = "nixpkgs"; }; emacs = { - url = "github:nix-community/emacs-overlay/29dcfbc1b29ae7281e95367e0f2358b44224a46e"; + url = "github:nix-community/emacs-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; mozilla = { diff --git a/home.nix b/home.nix index ceca74f..b97e959 100644 --- a/home.nix +++ b/home.nix @@ -12,6 +12,7 @@ shell = pkgs.fish; }; }; + home-manager.users.nathan.home.stateVersion = "22.05"; ## Misc packages that were in user.nix # Install general use packages environment.systemPackages = with pkgs; [ From ebd4ae36a1e567896f4e2b85449a93d8908a7dbd Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 04:48:24 -0400 Subject: [PATCH 06/13] feat: Add minecraft container to oracles --- flake.lock | 59 +++++++++++++++++++++++++ flake.nix | 5 +++ machines/oracles.nix | 97 +++++++++++++++++++++++++++++++++++++++++- modules/games.nix | 2 +- secrets/backblaze.yaml | 66 ++++++++++++++++++++++++++++ 5 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 secrets/backblaze.yaml diff --git a/flake.lock b/flake.lock index dffd6a7..b6c424b 100644 --- a/flake.lock +++ b/flake.lock @@ -279,6 +279,28 @@ "type": "github" } }, + "java_2": { + "inputs": { + "nixpkgs": [ + "quilt-server", + "nixpkgs" + ], + "utils": "utils_3" + }, + "locked": { + "lastModified": 1656122108, + "narHash": "sha256-wJrVZLqvBhq+u2Mi3yc4oS8pOtzdxL6uMmmSt+1bNHE=", + "owner": "nathans-flakes", + "repo": "java", + "rev": "4ade2ae9e949b184ba2d47495ec348f385ab0300", + "type": "github" + }, + "original": { + "owner": "nathans-flakes", + "repo": "java", + "type": "github" + } + }, "libnbtplusplus": { "flake": false, "locked": { @@ -566,6 +588,27 @@ "type": "github" } }, + "quilt-server": { + "inputs": { + "java": "java_2", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1656491198, + "narHash": "sha256-IGKH6jTFu5zrYZdkYw04Fbws4vcHAQL9AvUKSe+ZMXA=", + "owner": "forward-progress", + "repo": "quilt-server-nix-container", + "rev": "69fd2911bb627de147b44c0369065e00a79db7b7", + "type": "github" + }, + "original": { + "owner": "forward-progress", + "repo": "quilt-server-nix-container", + "type": "github" + } + }, "revealjs": { "flake": false, "locked": { @@ -594,6 +637,7 @@ "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "polymc": "polymc", + "quilt-server": "quilt-server", "sops-nix": "sops-nix" } }, @@ -681,6 +725,21 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_3": { + "locked": { + "lastModified": 1653893745, + "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index d9c1a6d..a3bff71 100644 --- a/flake.nix +++ b/flake.nix @@ -41,6 +41,10 @@ url = "github:nathans-flakes/java"; inputs.nixpkgs.follows = "nixpkgs"; }; + quilt-server = { + url = "github:forward-progress/quilt-server-nix-container"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = @@ -56,6 +60,7 @@ , polymc , nix-doom-emacs , java + , quilt-server }@attrs: let baseModules = [ diff --git a/machines/oracles.nix b/machines/oracles.nix index c094d6e..815da0d 100644 --- a/machines/oracles.nix +++ b/machines/oracles.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, java, ... }: +{ config, lib, pkgs, java, quilt-server, ... }: { # Use the systemd-boot EFI boot loader. @@ -57,7 +57,99 @@ format = "yaml"; sopsFile = ../secrets/borg.yaml; }; - # Setup the job + sops.secrets."friendpack-backblaze" = { + format = "yaml"; + sopsFile = ../secrets/backblaze.yaml; + }; + + # Setup minecraft container + containers.minecraft = + let + b2AccountID = "00284106ead1ac40000000002"; + b2KeyFile = "${config.sops.secrets."friendpack-backblaze".path}"; + b2Bucket = "ForwardProgressServerBackup"; + in + { + config = { pkgs, lib, ... }@attrs: + let + # OpenJDK 17 + javaPackage = pkgs.jdk; + in + { + imports = [ + quilt-server.nixosModules.default + ]; + ### + ## Container stuff + ### + # Let nix know this is a container + boot.isContainer = true; + # Set system state version + system.stateVersion = "22.05"; + # Setup networking + networking.useDHCP = false; + # Allow minecraft out + networking.firewall.allowedTCPPorts = [ 25565 ]; + + ### + ## User + ### + users = { + mutableUsers = false; + # Enable us to not use a password, this is a container + allowNoPasswordLogin = true; + }; + + ### + ## Configure module + ### + forward-progress = { + services = { + minecraft = { + enable = true; + minecraft-version = "1.18.2"; + quilt-version = "0.17.1-beta.4"; + ram = 6144; + properties = { + motd = "Nathan's Private Modded Minecraft"; + }; + packwiz-url = "https://pack.forward-progress.net/0.3/pack.toml"; + acceptEula = true; + }; + backup = { + enable = true; + backblaze = { + enable = true; + accountId = b2AccountID; + keyFile = b2KeyFile; + bucket = b2Bucket; + }; + }; + }; + }; + }; + autoStart = true; + bindMounts = { + "/var/minecraft" = { + hostPath = "/var/minecraft"; + isReadOnly = false; + }; + }; + forwardPorts = [ + { + containerPort = 25565; + hostPort = 25565; + protocol = "tcp"; + } + { + containerPort = 25565; + hostPort = 25565; + protocol = "udp"; + } + ]; + }; + + # Setup the backup job services.borgbackup.jobs = { files = { paths = [ @@ -73,6 +165,7 @@ "/var/lib/redis" "/var/lib/docker" "/var/log" + "/var/minecraft" ]; repo = "de1955@de1955.rsync.net:computers/oracles"; encryption = { diff --git a/modules/games.nix b/modules/games.nix index 5e1b9b3..9ca50cc 100644 --- a/modules/games.nix +++ b/modules/games.nix @@ -16,7 +16,7 @@ # PolyMC minecraft stuff polymc glfw-patched - (pkgs.callPackage ../packages/blockbench/default.nix {}) + (pkgs.callPackage ../packages/blockbench/default.nix { }) ]; unstable-packages = with nixpkgs-unstable.legacyPackages."${pkgs.system}"; [ # Packwiz for maintaing modpacks diff --git a/secrets/backblaze.yaml b/secrets/backblaze.yaml new file mode 100644 index 0000000..7fe46a0 --- /dev/null +++ b/secrets/backblaze.yaml @@ -0,0 +1,66 @@ +friendpack-backblaze: ENC[AES256_GCM,data:m1QFetDGUMQabN5waGU7tSaxLQm42n3HViPVATiICg==,iv:VpDfdQ8MqqRje6DlZOJ01b7ZHmrD0g+ADtj/KQY+LR0=,tag:EwlRWLqtuldTSdFsaetisQ==,type:str] +sops: + kms: [] + gcp_kms: [] + azure_kv: [] + hc_vault: [] + age: + - recipient: age1ud80054jwf6ff7xx65ta6g7qxx2flc24r5gyyfjz43kvppjutqyskr2qm2 + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBvQWtYK2VSL1NjV2UrYnJE + aFpZUWVYZXFmallsa1lXRndSeW80Ti9FcEdvCjk3YU50M1Z4ZDhFNENUT0wxaTIx + dGorVzNMSGh6SUxOeXFlbEtRSWJlK1UKLS0tIGxTMS95OUxaeHNhclVLWUVCdnJU + NGRJS0xsV3JSNlRhTVMyVFZaWm9iU1kKsvP3YfIqo2ahRUrB+MvucmeaNW93je5s + SBLmbpGl7MxHG/nnsLMh1Qgm+7r3D3KcgneN/CCkgvGEiXBi7/Z/jw== + -----END AGE ENCRYPTED FILE----- + - recipient: age1tsq68swufcjq6qavqpzrtse4474p5gs58v6qp6w7gum49yz45cgsegxhuw + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzdWZQN0MxZm5kVUpHdkNT + b2xVYXZ1eThwWUZWTzVSdkF4WUIreWoyQUcwCmZaNkphbjdlcTNOS1dzekhseWt2 + dndmdGdHSWxHK1hjL2lTVVluMEJtUU0KLS0tIE00SjdIYWY2MkFNMnNDUEphU3JT + SFpEMGFvRi92UXM2dXh4WlRNVm1zV3cK49jAamvCbTbzzS0EGo7JqdmQR/SDaTuV + UpZ63mtgWmmgDLGjJWtdNOR0QNu6i/vNCcJ7uQ5NgOnvuM267pSJYg== + -----END AGE ENCRYPTED FILE----- + - recipient: age12ayrv88xjt4r276fzc9du70x8q0r7xutt85vj627ykf4k8kgms4sc6wywn + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUb1l4ZzFhV3dIVHpsVFcr + K2J3cXEwWUhVTVZEcmFQVWZreTdQSVZCdmdZCmcybEM1djZRK2wrQ0VETDQ2V2Jr + SUlsZWo4MWYzQzVnNlVpb2IxS0czQmcKLS0tIG9YbE1hd3lrb0E0SmQyVnBUVkdH + ZzduU2ZTQ0xYZ2NDRHZ4WkhaN1lXVlUKJepT64ruXsICQELt1OYKkiVcG7VrC8AK + BU7KgpgNQ1S1izdmUsp/YtEOhT1JYFuqPZne1YBarCcxrs9yoe1qdw== + -----END AGE ENCRYPTED FILE----- + - recipient: age1r0aszjkyp4zlcw2w2vrk8hmcyvntshr8rew4ehlu5zad4eh6mspsatuczd + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0dm5pdFJvdEkvQllIc25F + ZjkyT1BrU2FDUGIyK2lOK0hoc3cvekRhZDF3ClI3VGxTY0IrL1FqdHNvWndSQVFq + dVQvbmlEQWMwSmg1dnV5NmVhMlpHWUUKLS0tIGdaQXBNcHNJTUUyMEFoYkN5MFhN + RForSlpVOXY0L3JvRlprelkrRkFnQXMK9R3qCUxOZwuFqRbjKXuy9YMiPZYy0eb0 + ckrnzCAa6kCPTK7z59Ay8/YmrtFHgeJoqSDTvHg0V1H+Ynt+Wd84cg== + -----END AGE ENCRYPTED FILE----- + - recipient: age10zd0y2zpty2z39sh2qe66yuu9jd6hrcd3ag2wqtjp8tc579nmphsymhdla + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWa1ZMVjFaNGJVT3RTVnY3 + c25IWk11Wm5IbE1wV1JaaXNJZGI4eHhERkJJCi9zdTdEdmJQZTQ5ajJ5NHNYblVy + b2tFeEprOEt4V2huSzlDd0Y3c1lLOGsKLS0tIG9jczY3a1JjWDJXTkhRajI2cHhk + NjFqbnE2SlZ2TGhBeGFqbVdTUVBUZ0kKjsiT5P1bPSfI1V1CIkydWzPsat2aAwBi + ANUePn2zhaFDzZsKRVGkVc8M2pw4aQC3lk6r7bPoQZ7fjFIh45wm8A== + -----END AGE ENCRYPTED FILE----- + - recipient: age1pm647k04hhwm2dmqh07hnzflkurfevefcyf8xlhmc83a07n77e3sltyt0d + enc: | + -----BEGIN AGE ENCRYPTED FILE----- + YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTZHlxRjVCZzZkOUhMaS9V + WldSM0tZUzNHQ3Z3L3Myd0cvT2lxUTlyV2xjCk1ZSm94SkJodktoS0NrWFhtZTlp + RU1nSGRnZHlMYzdzVW9QYi92NG45TnMKLS0tIHhMSnBuMHRBUU9CTmpCcTA0NE1Y + ak4waGp0UDJaaVk1eWgvazJhaHpVMzQKnsJLuWk/jzoQ45Po9esJyR8ynBWj88w5 + W3vSgFbAfr/pXaitCEBADMLDA21sNjq9/hm6VddhS3mgmZWuTBHlCA== + -----END AGE ENCRYPTED FILE----- + lastmodified: "2022-06-29T08:33:24Z" + mac: ENC[AES256_GCM,data:532kHcb/qLZSePtoxTwk7497UShNpmklNnMCU4WVWBAkyT5XRvIpKHJRWl1A/Ll0/w9Y9fjVxD97PjxE18LLsP7x8t6dj54Z9k2PVEd7U+GP3iy6QhJYJCwehYLiMmqf9T8wsiLyEVyXDn04pN62NQNw/F5n9kBbeWxSk3wuDtA=,iv:OaWeCvIr2mSUzVgytKcueeFN3tzfBoydyXgMxLSE/pY=,tag:bDkmi+W9cd9avpIVEJTEHw==,type:str] + pgp: [] + unencrypted_suffix: _unencrypted + version: 3.7.3 From 93d3a5cf932d39fa2529967c86a31e9a363bc398 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 05:20:55 -0400 Subject: [PATCH 07/13] fix container --- machines/oracles.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/machines/oracles.nix b/machines/oracles.nix index 815da0d..8af451c 100644 --- a/machines/oracles.nix +++ b/machines/oracles.nix @@ -112,6 +112,8 @@ ram = 6144; properties = { motd = "Nathan's Private Modded Minecraft"; + white-list = true; + enforce-whitelist = true; }; packwiz-url = "https://pack.forward-progress.net/0.3/pack.toml"; acceptEula = true; From eab88a6e5e2bfef839b8f6633379a6622be02c4c Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 05:44:50 -0400 Subject: [PATCH 08/13] update flake.lock --- flake.lock | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index b6c424b..c46b623 100644 --- a/flake.lock +++ b/flake.lock @@ -62,11 +62,11 @@ ] }, "locked": { - "lastModified": 1656387960, - "narHash": "sha256-Rcnt6i4i9qScIJamwlXey78q9W3BiKxoN9T74yMoNPk=", + "lastModified": 1656413262, + "narHash": "sha256-I8X1LaW/qoSWeBLK0N8GPOshIuXG9zyNyZUtKZYa0h4=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "79d813d9d4ebbd8ab34c1f755439cab4aedb2ddb", + "rev": "8772891c73e2809df5e5469d14535ea77e123d3e", "type": "github" }, "original": { @@ -161,11 +161,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1656311436, - "narHash": "sha256-rXZbZ61Zvn5rE0Srh5bpfNYRXEZHIigqcjkKh2+Cvk4=", + "lastModified": 1656397670, + "narHash": "sha256-1Yc6wMr2rHTZAC0xTmTVU0KAARBnnmlQ2ksVuE6t1Qg=", "owner": "nix-community", "repo": "fenix", - "rev": "5e2708f04efe0ed2616be471d0913e303ff3a9ee", + "rev": "3094da922a89a7dfb019224241987abb297951d0", "type": "github" }, "original": { @@ -456,11 +456,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1656265786, - "narHash": "sha256-A9RkoGrxzsmMm0vily18p92Rasb+MbdDMaSnzmywXKw=", + "lastModified": 1656335358, + "narHash": "sha256-t0PZIFCKgjF2WQ0NC6ORigdGgLqQD3vtT+Jx/dhjNsY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cd90e773eae83ba7733d2377b6cdf84d45558780", + "rev": "62de360d75419386b69ea4af4a8ce104949a8242", "type": "github" }, "original": { @@ -596,11 +596,11 @@ ] }, "locked": { - "lastModified": 1656491198, - "narHash": "sha256-IGKH6jTFu5zrYZdkYw04Fbws4vcHAQL9AvUKSe+ZMXA=", + "lastModified": 1656495848, + "narHash": "sha256-IoZqbFHEMZwNVYqoB/sKFH9U02l0HVpr+RHsfGH/xCI=", "owner": "forward-progress", "repo": "quilt-server-nix-container", - "rev": "69fd2911bb627de147b44c0369065e00a79db7b7", + "rev": "08c92c6b33afeb2d02822cfc79b87fcf64193a9c", "type": "github" }, "original": { @@ -660,11 +660,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1656240210, - "narHash": "sha256-CeP1gNUtmYHCQylROkpunvVTR8J8w/Pm6D5rjw8v4Gw=", + "lastModified": 1656333646, + "narHash": "sha256-3dTBwCCtDkYXMWrX3ceqZE9fJu6JBbKoMSuTKEKejjY=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "b74e96f509baf0be70281c55f14cb18fefbc6b22", + "rev": "9eaf96c9ead87703d96558e9b9923a0baea27981", "type": "github" }, "original": { @@ -683,11 +683,11 @@ "nixpkgs-22_05": "nixpkgs-22_05" }, "locked": { - "lastModified": 1656215886, - "narHash": "sha256-67fkBb4GUbuMZTHs08mNycg0hBzboy+5boMD76wLpj4=", + "lastModified": 1656399028, + "narHash": "sha256-re66+rVHGR3y+0QsaDAwoAHCfoi3BlGV24t2EqRZsAE=", "owner": "Mic92", "repo": "sops-nix", - "rev": "aff5d8542c9eb566a000302b22fcc10715bc2feb", + "rev": "d26947f2d6252e2aae5ffddfe9b38b7c4b94e8f9", "type": "github" }, "original": { From 7dcde8db0f825a13daecdf9afbe6cbc8b0cfe7a0 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 05:48:39 -0400 Subject: [PATCH 09/13] Fix sops problem --- machines/oracles.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/machines/oracles.nix b/machines/oracles.nix index 8af451c..a8f5148 100644 --- a/machines/oracles.nix +++ b/machines/oracles.nix @@ -60,6 +60,8 @@ sops.secrets."friendpack-backblaze" = { format = "yaml"; sopsFile = ../secrets/backblaze.yaml; + owner = config.users.users.nathan.name; + group = config.users.users.nathan.group; }; # Setup minecraft container @@ -136,6 +138,9 @@ hostPath = "/var/minecraft"; isReadOnly = false; }; + "/run/secrets" = { + hostPath = "/run/secrets"; + }; }; forwardPorts = [ { From 0a305e29a6a1b713da267343d50b84143bf9f675 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 06:46:55 -0400 Subject: [PATCH 10/13] Add sqlite 3 for emacs --- applications/emacs.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/applications/emacs.nix b/applications/emacs.nix index ec93a24..0a9d6a2 100644 --- a/applications/emacs.nix +++ b/applications/emacs.nix @@ -6,6 +6,7 @@ python39Packages.grip # For graph generation graphviz + sqlite ]; # Utilize home-manager From 12a63f889fdbddf9422017b09e15ce29c9346987 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 29 Jun 2022 12:31:56 -0400 Subject: [PATCH 11/13] downgrade emacs again --- flake.lock | 19 ++++++++++--------- flake.nix | 2 +- modules/protonmail.nix | 2 ++ 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index c46b623..fc0fb08 100644 --- a/flake.lock +++ b/flake.lock @@ -62,16 +62,17 @@ ] }, "locked": { - "lastModified": 1656413262, - "narHash": "sha256-I8X1LaW/qoSWeBLK0N8GPOshIuXG9zyNyZUtKZYa0h4=", + "lastModified": 1655120294, + "narHash": "sha256-e0IXVoxH3o1QbLtHxANAg2CHdVE3jZBi5ifhh+6Vpcs=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "8772891c73e2809df5e5469d14535ea77e123d3e", + "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", + "rev": "29dcfbc1b29ae7281e95367e0f2358b44224a46e", "type": "github" } }, @@ -440,11 +441,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1656239181, - "narHash": "sha256-wW1xRFBn376yGloXZ4QzBE4hjipMawpV18Lshd9QSPw=", + "lastModified": 1656372800, + "narHash": "sha256-1u9SDLXvKix/QejNb2sY2J2QZXnbe/14MnLtn+ln9j0=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f2537a505d45c31fe5d9c27ea9829b6f4c4e6ac5", + "rev": "020c74014b9e2fa905bb4059c979965816cd9118", "type": "github" }, "original": { @@ -456,11 +457,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1656335358, - "narHash": "sha256-t0PZIFCKgjF2WQ0NC6ORigdGgLqQD3vtT+Jx/dhjNsY=", + "lastModified": 1656433693, + "narHash": "sha256-m29hSYsu2U+tnBo5v1/2RGo3lYY6KKb52MHV/89NeCs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "62de360d75419386b69ea4af4a8ce104949a8242", + "rev": "babb041b7167008af3faca4c78f9dd8c6e83ef3a", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index a3bff71..9f70c21 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ inputs.nixpgks.follows = "nixpkgs"; }; emacs = { - url = "github:nix-community/emacs-overlay"; + url = "github:nix-community/emacs-overlay/29dcfbc1b29ae7281e95367e0f2358b44224a46e"; inputs.nixpkgs.follows = "nixpkgs"; }; mozilla = { diff --git a/modules/protonmail.nix b/modules/protonmail.nix index daad5b6..511bfb3 100644 --- a/modules/protonmail.nix +++ b/modules/protonmail.nix @@ -5,5 +5,7 @@ environment.systemPackages = with pkgs; [ protonmail-bridge pass + offlineimap + mu ]; } From 0856ae827f3f717516c237fcf88ec10a390a8371 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 1 Jul 2022 03:42:12 -0400 Subject: [PATCH 12/13] Update quilt server config --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index fc0fb08..704f095 100644 --- a/flake.lock +++ b/flake.lock @@ -597,11 +597,11 @@ ] }, "locked": { - "lastModified": 1656495848, - "narHash": "sha256-IoZqbFHEMZwNVYqoB/sKFH9U02l0HVpr+RHsfGH/xCI=", + "lastModified": 1656661312, + "narHash": "sha256-o1N/HLJDNL8Mvs34NqJiLijpRJlmuNRD2NnLwKZk17Y=", "owner": "forward-progress", "repo": "quilt-server-nix-container", - "rev": "08c92c6b33afeb2d02822cfc79b87fcf64193a9c", + "rev": "339797c0187c2a0d5ea0d34cf46a75df7d6ae2cb", "type": "github" }, "original": { From 29993796077d71ea60f0d7e1675af3587f61b787 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Fri, 1 Jul 2022 20:22:12 -0400 Subject: [PATCH 13/13] Setup org-protocol-capture-html --- applications/emacs.nix | 27 +++++++++++++++++++++++++++ doom.d/config.el | 18 +++++++++++++----- doom.d/config.org | 26 ++++++++++++++++++++------ doom.d/init.el | 2 +- doom.d/packages.el | 2 ++ 5 files changed, 63 insertions(+), 12 deletions(-) diff --git a/applications/emacs.nix b/applications/emacs.nix index 0a9d6a2..69f97ef 100644 --- a/applications/emacs.nix +++ b/applications/emacs.nix @@ -7,6 +7,8 @@ # For graph generation graphviz sqlite + # For latex editing + texlive.combined.scheme-medium ]; # Utilize home-manager @@ -17,8 +19,33 @@ programs.doom-emacs = { enable = true; doomPrivateDir = ../doom.d; + emacsPackagesOverlay = self: super: { + org-protocol-capture-html = self.trivialBuild { + pname = "org-protocol-capture-html"; + ename = "org-protocol-capture-html"; + version = "0.0.0"; + buildInputs = [ self.s ]; + src = pkgs.fetchFromGitHub { + owner = "alphapapa"; + repo = "org-protocol-capture-html"; + rev = "3359ce9a2f3b48df26329adaee0c4710b1024250"; + hash = "sha256-ueEHJCS+aHYCnd4Lm3NKgqg+m921nl5XijE9ZnSRQXI="; + }; + }; + }; emacsPackage = pkgs.emacsPgtkNativeComp; }; + # Configure org protocol handler + home.packages = (with pkgs; [ + (makeDesktopItem { + name = "org-protocol"; + exec = "emacsclient %u"; + comment = "Org protocol"; + desktopName = "org-protocol"; + type = "Application"; + mimeTypes = [ "x-scheme-handler/org-protocol" ]; + }) + ]); # Startup service services.emacs = { enable = pkgs.stdenv.isLinux; diff --git a/doom.d/config.el b/doom.d/config.el index ce0af5a..b4fc045 100644 --- a/doom.d/config.el +++ b/doom.d/config.el @@ -144,11 +144,10 @@ (setq org-hide-emphasis-markers t org-pretty-entities t) -(font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - 0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))) - ("^ *\\([+]\\) " - 0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))) +(use-package! org-superstar + :hook (org-mode . org-superstar-mode) + :config + (setq org-superstart-special-todo-items t)) (defvar nm/org-agenda-files-timer nil "Timer for automatically updating the org-agenda files") @@ -251,6 +250,15 @@ work if it thinks it needs to." '(("d" "default" entry "* %<%I:%M %p>: %?" :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))) +(use-package! org-protocol-capture-html) + +(after! org + (push + '("w" "Web site" entry + (file "") + "* %a :website:\n\n%U %?\n\n%:initial") + org-capture-templates)) + (use-package! magit-todos :hook (magit-mode . magit-todos-mode)) diff --git a/doom.d/config.org b/doom.d/config.org index 1c67777..e28e958 100644 --- a/doom.d/config.org +++ b/doom.d/config.org @@ -218,14 +218,13 @@ Setup some basic cosmetic improvements org-pretty-entities t) #+end_src - Setup font lock for normal (non-heading) list items, to make things a bit more pleasnt to look at +Setup org-superstar-mode, to make lists and bullets pretty #+begin_src emacs-lisp -(font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - 0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))) - ("^ *\\([+]\\) " - 0 (prog1 () (compose-region (match-beginning 1) (match-end 1) ""))))) +(use-package! org-superstar + :hook (org-mode . org-superstar-mode) + :config + (setq org-superstart-special-todo-items t)) #+end_src Automatically add all files in the org dir to the agenda. This performs some filtering of the files returned from ~directory-files~ to exclude some things that would confuse org-agenda. @@ -352,6 +351,21 @@ Here we: '(("d" "default" entry "* %<%I:%M %p>: %?" :if-new (file+head "%<%Y-%m-%d>.org" "#+title: %<%Y-%m-%d>\n"))))) #+end_src +** org-protocol-capture-html +[[https://github.com/alphapapa/org-protocol-capture-html][Capture webpages]] really nice like +#+begin_src emacs-lisp +(use-package! org-protocol-capture-html) +#+end_src +** Capture Templates +The default template for org-protocol-capture-html +#+begin_src emacs-lisp +(after! org + (push + '("w" "Web site" entry + (file "") + "* %a :website:\n\n%U %?\n\n%:initial") + org-capture-templates)) +#+end_src * General Modes ** Magit Further configuration for magit diff --git a/doom.d/init.el b/doom.d/init.el index aabfa7f..8d47dd5 100644 --- a/doom.d/init.el +++ b/doom.d/init.el @@ -81,7 +81,7 @@ (latex +fold) ; writing papers in Emacs has never been so fun markdown ; writing docs for people to ignore nix ; I hereby declare "nix geht mehr!" - (org +pandoc +present +pretty +roam2 +pomodoro) ; organize your plain life in plain text + (org +pandoc +present +roam2 +pomodoro) ; organize your plain life in plain text raku ; the artist formerly known as perl6 rest ; Emacs as a REST client (rust +lsp) diff --git a/doom.d/packages.el b/doom.d/packages.el index 983f723..84d3d3e 100644 --- a/doom.d/packages.el +++ b/doom.d/packages.el @@ -60,3 +60,5 @@ (package! deadgrep) (package! multi-vterm) (package! grip-mode) +(package! org-protocol-capture-html) +(package! org-superstar)