From 93c424af8261238239de7160332662f600f61e38 Mon Sep 17 00:00:00 2001 From: randomuser Date: Sun, 31 Dec 2023 18:54:59 -0600 Subject: [PATCH 1/3] add changes --- boxes/mlg.nix | 1 + boxes/netbox.nix | 34 +++------ common/desktop.nix | 4 +- config/emacs/init.el | 168 ------------------------------------------- 4 files changed, 11 insertions(+), 196 deletions(-) delete mode 100644 config/emacs/init.el diff --git a/boxes/mlg.nix b/boxes/mlg.nix index 2b25dc5..98e4369 100644 --- a/boxes/mlg.nix +++ b/boxes/mlg.nix @@ -22,6 +22,7 @@ libreoffice nomacs vscodium + thunderbird minetest ]; diff --git a/boxes/netbox.nix b/boxes/netbox.nix index 138ea01..0d032fe 100644 --- a/boxes/netbox.nix +++ b/boxes/netbox.nix @@ -42,18 +42,18 @@ jails = { "nginx-bruteforce" = '' enabled = true - filter = nginx-bruteforce - logpath = /var/log/nginx/access.log - backend = auto - maxretry = 6 - findtime = 600 + filter = nginx-bruteforce + logpath = /var/log/nginx/access.log + backend = auto + maxretry = 6 + findtime = 600 ''; "postfix-bruteforce" = '' enabled = true - filter = postfix-bruteforce - maxretry = 6 - findtime = 600 + filter = postfix-bruteforce + maxretry = 6 + findtime = 600 ''; }; }; @@ -175,14 +175,6 @@ }; }; - services.nginx.virtualHosts."ntfy.beepboop.systems" = { - forceSSL = true; - enableACME = true; - locations."/" = { - proxyPass = "http://127.0.0.1:3500"; - }; - }; - services.nginx.virtualHosts."skillissue.agency" = { forceSSL = true; enableACME = true; @@ -212,14 +204,4 @@ enable = true; allowedTCPPorts = [ 5232 55555 22 80 443 ]; }; - -# services.paperless = { -# enable = true; -# passwordFile = "/etc/paperless-password"; -# port = 3004; -# address = "localhost"; -# extraConfig = { -# PAPERLESS_URL = "https://paperless.beepboop.systems"; -# }; -# }; } diff --git a/common/desktop.nix b/common/desktop.nix index cf752e4..9004469 100644 --- a/common/desktop.nix +++ b/common/desktop.nix @@ -3,7 +3,7 @@ let home-manager = builtins.fetchTarball { url = "https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz"; - sha256 = "16078fwcmqq41dqfnm124xxm8l6zykvqlj1kzgi0fvfil4y86slm"; + sha256 = "1caggh7q5674b24ghx5p8l4jmd22afwrqqj2flfvlh3n6p94wfyc"; }; customPolybar = pkgs.polybar.override { alsaSupport = true; @@ -85,7 +85,7 @@ in { (pkgs.callPackage ../builds/pash.nix {}) ]; - fonts.packages = with pkgs; [ + fonts.fonts = with pkgs; [ fantasque-sans-mono ]; diff --git a/config/emacs/init.el b/config/emacs/init.el deleted file mode 100644 index 856a315..0000000 --- a/config/emacs/init.el +++ /dev/null @@ -1,168 +0,0 @@ -;; rndusr's init.el - -;; configure the package manager -(require 'package) -(add-to-list 'package-archives - '("melpa" . "https://melpa.org/packages/")) -(package-initialize) -;; (package-refresh-contents) - -; disable annoying ui features -(menu-bar-mode -1) -(tool-bar-mode -1) -(scroll-bar-mode -1) -(setq auto-save-default nil) -(add-hook 'prog-mode-hook 'display-line-numbers-mode) - -(defun keymap-symbol (keymap) - "Return the symbol to which KEYMAP is bound, or nil if no such symbol exists." - (catch 'gotit - (mapatoms (lambda (sym) - (and (boundp sym) - (eq (symbol-value sym) keymap) - (not (eq sym 'keymap)) - (throw 'gotit sym)))))) - -(defun get-local-map () (interactive) (message "Current mapping: %S" (keymap-symbol (current-local-map)))) - -;; download packages -(unless (package-installed-p 'evil) - (package-install 'evil)) -(unless (package-installed-p 'org) - (package-install 'org)) -(unless (package-installed-p 'org-drill) - (package-install 'org-drill)) -(unless (package-installed-p 'accent) - (package-install 'accent)) -(unless (package-installed-p 'elfeed) - (package-install 'elfeed)) -(unless (package-installed-p 'hackernews) - (package-install 'hackernews)) -(unless (package-installed-p 'emms) - (package-install 'emms)) -(unless (package-installed-p 'company) - (package-install 'company)) -(unless (package-installed-p 'anaconda-mode) - (package-install 'anaconda-mode)) -(unless (package-installed-p 'company-anaconda) - (package-install 'company-anaconda)) -(unless (package-installed-p 'calfw) - (package-install 'calfw)) -(unless (package-installed-p 'calfw-org) - (package-install 'calfw-org)) -(unless (package-installed-p 'calfw-ical) - (package-install 'calfw-ical)) - -;; activate packages -(require 'evil) -(require 'org) -(require 'calfw) -(require 'calfw-org) -(require 'calfw-ical) -(require 'org-drill) -(require 'accent) -(require 'elfeed) -(require 'hackernews) -(require 'emms) -(require 'company) -(require 'anaconda-mode) -(require 'company-anaconda) - -;; configure packages - -;; - evil-mode -(evil-set-initial-state 'elfeed-search 'emacs) - -;; swap ; and : -(with-eval-after-load 'evil-maps - (define-key evil-motion-state-map (kbd ";") 'evil-ex)) - -(evil-set-leader 'normal (kbd "")) -(defun configreload () (interactive) (load "~/.config/emacs/init.el")) -(defun configread () (interactive) (find-file-noselect "~/dot_testing/config/emacs/init.el")) -(defun nixrebuild () (interactive) (term "rebuild")) - -(evil-define-key 'normal 'global (kbd "rr") 'configreload) -(evil-define-key 'normal 'global (kbd "re") 'configread) -(evil-define-key 'normal 'global (kbd "nrr") 'nixrebuild) -(evil-ex-define-cmd "get-current-mapping" 'get-local-map) -(evil-mode 1) - -;; company-mode -(add-hook 'after-init-hook 'global-company-mode) -(setq company-idle-delay 1 - company-tooltip-idle-delay 10 - company-require-match nil - company-frontends - '(company-pseudo-tooltip-unless-just-one-frontend-with-delay - company-preview-frontend - company-echo-metadata-frontend) - company-backends '(company-capf)) -(setq company-tooltip-align-annotations t) -(add-to-list 'company-backends 'company-anaconda) -(add-hook 'python-mode-hook 'anaconda-mode) - -;; org -(setq org-agenda-files '("~/org")) -(setq calendar-week-start-day 1) -(setq org-todo-keywords '((type "MEETING" "CLASS" "TODO" "REHERSAL" "|" "DONE"))) -(setq org-return-follows-link t) - -;; calfw -(defun google-calendar (id) (concatenate 'string "https://calendar.google.com/calendar/ical/" id "%40group.calendar.google.com/public/basic.ics")) - -(defun my-open-calendar () - (interactive) - (cfw:open-calendar-buffer - :contents-sources - (list - (cfw:org-create-source "Green") - (cfw:ical-create-source "wcs" (google-calendar "c_037e243v5md54rj8kp1k898oo4") "IndianRed") - (cfw:ical-create-source "band" (google-calendar "i6bong6iferbcuf1u25jg47t7k") "Blue") - (cfw:ical-create-source "schoology" "https://wcschools.schoology.com/calendar/feed/ical/1692031887/ef3eab3f5ac45935472a9fa6f601a63a/ical.ics" "Yellow") - ))) - -;; emms -(require 'emms-player-simple) -(require 'emms-source-file) -(require 'emms-source-playlist) - -(emms-all) -(emms-default-players) - -(evil-define-key 'normal 'emms-browser-mode-map (kbd "z") 'emms-browser-expand-one-level) -(evil-define-key 'normal 'emms-browser-mode-map (kbd "RET") 'emms-browser-add-tracks-and-play) -(evil-define-key 'normal 'emms-browser-mode-map (kbd "e") 'emms-browser-add-tracks) - -;; - elfeed -(global-set-key (kbd "C-x w") 'elfeed) - -(setq elfeed-feeds - '("http://nullprogram.com/feed/" - "https://drewdevault.com/blog/index.xml" - "https://digitallibrary.un.org/rss?ln=en&p=libya&rg=50&c=Resource%20Type&c=UN%20Bodies" - "https://planet.emacslife.com/atom.xml")) - -(setq elfeed-db-directory "~/.cache/elfeed") - -;; - accent.el -(evil-define-key 'insert 'global (kbd "C-k") 'accent-menu) - -;; fonts -(set-face-attribute 'default nil - :font "Fantasque Sans Mono 10" - :foreground "white" :background "gray8") - -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(package-selected-packages - '(company-anaconda anaconda-mode company emms bongo accent org-drill hackernews evil elfeed))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - ) From 4b40b38e5a275c83b8fffc2ed9f50d5e9bf954f2 Mon Sep 17 00:00:00 2001 From: randomuser Date: Wed, 24 Jan 2024 19:37:55 -0600 Subject: [PATCH 2/3] temporary stop-gap solutions --- boxes/mlg/default.nix | 2 ++ builds/utils/sh/disp | 6 ++++++ flake.lock | 18 +++++++++--------- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/boxes/mlg/default.nix b/boxes/mlg/default.nix index 2a7c461..9a894ec 100644 --- a/boxes/mlg/default.nix +++ b/boxes/mlg/default.nix @@ -49,5 +49,7 @@ services.avahi.nssmdns = true; # enables the mDNS NSS plug-in services.avahi.openFirewall = true; # opens the firewall for UDP port 5353 + nixpkgs.config.allowUnfree = true; networking.hostName = "mlg"; + } diff --git a/builds/utils/sh/disp b/builds/utils/sh/disp index 32411e0..64ff359 100755 --- a/builds/utils/sh/disp +++ b/builds/utils/sh/disp @@ -27,6 +27,12 @@ case "$(hostname)" in bspc monitor VGA-1 -d 1 3 5 7 9 bspc monitor HDMI-1 -d 2 4 6 8 0 ;; + "mlg") + # holdover configuration for the time being + xrandr --output eDP-1 --brightness 0 + xrandr --output DP-1 --primary + bspc monitor DP-1 -d 1 2 3 4 5 6 7 8 9 + ;; "x230t") echo "x230t" case "$1" in diff --git a/flake.lock b/flake.lock index d53acea..2197afe 100644 --- a/flake.lock +++ b/flake.lock @@ -25,11 +25,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1705709716, - "narHash": "sha256-YJdWSN3ra0FsAQT5PXe7uXxMeAXxTR+SY/wVOO1c6Bs=", + "lastModified": 1706081037, + "narHash": "sha256-R2dkUMLZa6qvRl4mXOG7bLHaGvoOYf5vIXWeyRDqML0=", "owner": "rycee", "repo": "nur-expressions", - "rev": "d7ad3362283fced58410547650be31e37f9d0f41", + "rev": "5f23ef51cad74dbf30633366e52eb895c9c633d1", "type": "gitlab" }, "original": { @@ -93,11 +93,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1705641746, - "narHash": "sha256-D6c2aH8HQbWc7ZWSV0BUpFpd94ImFyCP8jFIsKQ4Slg=", + "lastModified": 1705916986, + "narHash": "sha256-iBpfltu6QvN4xMpen6jGGEb6jOqmmVQKUrXdOJ32u8w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "d2003f2223cbb8cd95134e4a0541beea215c1073", + "rev": "d7f206b723e42edb09d9d753020a84b3061a79d8", "type": "github" }, "original": { @@ -209,12 +209,12 @@ }, "locked": { "lastModified": 1, - "narHash": "sha256-iemuV19UU8TriqixcvwdRUTa8lIrxc3Krwt4bHpUUWE=", - "path": "/nix/store/26f187i54ky8clnmd0rbjvv8h3khgc5d-source/builds", + "narHash": "sha256-uu/yGM8VTaGEAqSPHm4gJusVaPFH0wcf8BFMXgFlUPE=", + "path": "/nix/store/hgkpghh249402niaihbsp9h3zdhiaivy-source/builds", "type": "path" }, "original": { - "path": "/nix/store/26f187i54ky8clnmd0rbjvv8h3khgc5d-source/builds", + "path": "/nix/store/hgkpghh249402niaihbsp9h3zdhiaivy-source/builds", "type": "path" } }, From 9fe5e8992887ef08979848a305e74a2dbb72ef4d Mon Sep 17 00:00:00 2001 From: randomuser Date: Wed, 24 Jan 2024 23:04:51 -0600 Subject: [PATCH 3/3] add mlg key --- boxes/mainsail/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/boxes/mainsail/default.nix b/boxes/mainsail/default.nix index d17b946..0a90333 100644 --- a/boxes/mainsail/default.nix +++ b/boxes/mainsail/default.nix @@ -56,7 +56,8 @@ }; users.users.usr.openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbhM3wj0oqjR3pUaZgpfX4Xo4dlzvBTbQ48zHyg7Pwx usr" # x230t + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB2xUbQw9+RCPVw7qCFm4NNCP/MpS2BIArcwMv0KdKOI usr" # mlg ]; system.stateVersion = "23.11";