diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 1eafeff..6f2994e --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -hidden/ +ISSUES/ +secrets/ result -rebuild*.log - -secrets/ -!/secrets diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index fcf0a45..0000000 --- a/.sops.yaml +++ /dev/null @@ -1,9 +0,0 @@ -keys: - - &cry age1e5e32alqa20cf40wt9jq8aaa2x3gh32207xj6ea5veszlpxnzgjqd2htm7 - - &idk age1tc9j8mxetvhzeq2razwvgwyy8xdlpu4d9jrp76ga929w9vxjwetq7zwtnq -creation_rules: - - path_regex: secrets/[^/]+\.(yaml|json|env|ini)$ - key_groups: - - pgp: - - *cry - - *idk diff --git a/DEVDOC.md b/DEVDOC.md new file mode 100644 index 0000000..4b8567e --- /dev/null +++ b/DEVDOC.md @@ -0,0 +1,25 @@ +## Users + +#### me +My main personal account, used on my PC and laptop. +Contains a hyprland graphical environment by default. + +#### ae +Primary account on my servers. Contains the bare +essentials for my work, no graphical environment. + + +#### friends +A simple account I let me friends connect to. +Limited functionality, mostly just for letting +them test small things or for giving them files. + + +## Setup Guide +##### Adding a New Server +Enable an ssh server on the remote host, then on the +local machine set `.ssh/config` to have a profile for +your desired host and have a key pair that's authorised +to your desired user. + +NOTE: these keys must have permission 600 (only readable/writable by you) diff --git a/DEV_ENV b/DEV_ENV new file mode 100644 index 0000000..bf545ce --- /dev/null +++ b/DEV_ENV @@ -0,0 +1,3 @@ +- [ ] Stop colmena adding inputs for unmanaged nodes +- [ ] Use latest commit for colmena +- [ ] Program colmena to have an option that adds `--no-check-sigs` to `nix copy` diff --git a/INSPIRATION b/INSPIRATION new file mode 100755 index 0000000..2c5adf0 --- /dev/null +++ b/INSPIRATION @@ -0,0 +1,8 @@ +Godlike + https://github.com/end-4/dots-hyprland + +Gorgeous + https://github.com/prasanthrangan/hyprdots + +Very nice + https://github.com/linuxmobile/hyprland-dots diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 4ae01af..ce2a13b --- a/README.md +++ b/README.md @@ -1,15 +1,51 @@ -## My NixOS Flake ->[!TIP] -> My flake is written using [my Cerulean project](https://github.com/cry128/cerulean). Hopefully -> it can serve as a decent example of my vision with the Cerulean + Snowflake projects. - ### Philosophy ->[!TODO] -> My philosophy has kinda changed since the beginning +I try to use Home Manager as little as possible. When I first started with NixOS I found +it distracting and confusing. NixOS already handles system wide and user packages, so having +another user level package management method was baffling. Obviously I understand now how +it can be useful (so I do use it). But where possible I will instead use the functionality +of Nix rather than Home Manager. -### Links -#### Inspiration -##### Explaining my Vision with r/unixporn posts +###### Structuring Modules +Modules are organised into groups (ie "Core"), from here a module is structured as either: +1. a single `.nix` file (ie bluetooth.nix). I do this when I won't implement an alternative +2. a directory (ie `sound`) containing a set of alternative implementations and a `default.nix` +that simply imports one of the implementations. For the `sound` example I currently have it structured +to default to `pipewire.nix`. I haven't made alternatives yet but the idea is that it is HIGHLY likely +I do in future. + + +### TODO +There are a lot of `TODO` items in this repository. To improve these dotfiles +I should run a command to find files containing "TODO" and then implement the +recommendation I left behind :) + + + +##### Small Explanation of Fonts +There are four types of fonts (to my knowledge at least): +1. serif (funny squigles / small elegant strokes included) +2. sans-serif (meaning "without serifs") +3. monospace (all glyphs are of a uniform size) +4. emoji (cute lil faces) + +Fun fact: on Android, the emojis you are seeing are part of the noto-emoji font :) + +For finding a font for programming I highly recommend trying https://www.codingfont.com/ + + +### My config + +Font: +Iosevka nerd font set as default/prefered font +Terminal uses IosevkaTerm nerd font + +Home-Manager: +I just to use home-manager standalone and not as a NixOS module, thus allowing +my dotfiles to also work on non-NixOS systems. + + + +### Explaining my Vision with r/unixporn posts I want the side panel from https://www.reddit.com/r/unixporn/comments/12wpvyf/hyprland_eww_is_all_i_need/ but not the colour scheme and I'm 50/50 on the bar being on th eleft side lol. Also I love the volume bar on the right! @@ -28,29 +64,22 @@ Their window decorations and bar are great, also being able to hide everything u https://www.reddit.com/r/unixporn/comments/vkcasz/i3gaps_i_prefer_light_mode/ If their colour scheme was a little less white I'd love it but overall one of my favourites every -##### Other Inspiring Shtuff -1. https://github.com/sabrehagen/desktop-environment -#### Wallpaper Sources +### Wallpaper Sources 1. https://www.wallpaperflare.com/ 2. https://alphacoders.com especially this one person: https://alphacoders.com/users/profile/69089/robokoboto and also the lofi category: https://alphacoders.com/lofi -#### Teach Yourself Nix -1. https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles) - Really good security oriented NixOS stuff -2. https://jade.fyi/blog/flakes-arent-real/ - Interesting blog post on using flakes -#### Credits +### Credits 1. https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles - The simplicity of their layout is amazing, was really good to pick out small modules and learn how something works / is configured. +The simplicity of their layout is amazing, was really good to pick out small modules and learn how something works / is configured. 2. https://github.com/Misterio77/nix-starter-configs - Really great starter config for learning how parts interact and how to generally structure flakes +Really great starter config for learning how parts interact and how to generally structure flakes 3. https://nixos.wiki/wiki/Fonts - Wiki page explaining how to install fonts and nerd fonts on NixOS +Wiki page explaining how to install fonts and nerd fonts on NixOS 4. https://github.com/adi1090x/rofi - For the Rofi theme +For the Rofi theme 5. https://github.com/zDyanTB/HyprNova - For the really cool hyprlock theme +For the really cool hyprlock theme diff --git a/TODO b/TODO new file mode 100755 index 0000000..f498088 --- /dev/null +++ b/TODO @@ -0,0 +1,91 @@ +Get Utilities: +1. httpie +2. curlie +3. zoxide +4. doggo + +1. Get helix editor +2. Custom helix +3. Complete helix tutorial + +Get nixcord working +Get thunar working +Set a GTK theme & icon theme +Get better wallpapers +Get hyprcursor working with Bibata-Modern-Ice + +Get a GRUB theme working +Get SDDM and a theme working + +Make a custom hyprlock screen + +Get AGS working +Make an applauncher in AGS +Remove hyprland splash screen on init +Made lolcathost home modular + +Overtime just install more programs that I need regularly: ie +- btop/htop/etc + +Get GTK Bibata Cursors to be the same size as my system cursor (NOT SURE WHAT I DID...) + + +Get waybar (or another bar) working + +Get a QT theme + +Fix pipewire audio sometimes working and sometimes not :( + +Bind new terminal to SUPER+Enter instead of SUPER+Q + +Join Rio Terminal's discord and ask if they support nerdfonts or if I'm doing something wrong + + + +Change Dell loading screen (Boot Graphics Resource Table, aka BGRT) + + + + +Fix: your 131072x1 screen size is bogus. expect trouble + + + +Search for all "TODO" items in my nix dotfiles + +Push nixdots to github + + + + +Check out the Ekala Project (I joined their discord server) + + +Create a program that enables/disables passwordless sudo access + (add to github too) + +Learn to package my own home-manager modules + + + + +Ideal Features: +1. AI assistant +2. searching can also be used to calculate stuff (like I do on my iPad) + + + + +Fork nixcord and fix documentation (the installation is confusing) +But firstly the first code snippet is wrong... +```nix +inputs.nixcord = { + url = "github:kaylorben/nixcord" +}; +``` +Should actually be +```nix +inputs.nixcord = { + url = "github:kaylorben/nixcord"; # dont forget the semicolon +}; +``` diff --git a/TODO.md b/TODO.md deleted file mode 100644 index b20a2be..0000000 --- a/TODO.md +++ /dev/null @@ -1,26 +0,0 @@ -- [ ] get kanshi working with hyprland - -- [ ] Update the README.md -- [ ] switch ssh keys to ECC (fuck RSA) - -- [ ] setup my own VPN -- [ ] connect matcha to my VPN -- [ ] use matcha to build stuff instead of using my laptop - -- [ ] switch to zsh? or maybe elvish? -- [ ] switch to neovim -- [ ] switch to mangowc - -- [ ] fix my fuck ass emojis - -# add sddm profile pic -systemd.tmpfiles.rules = let - imagePath = /${root}/homes/aurora/profile.png; - in - lib.mkIf (builtins.pathExists imagePath) [ - "L /var/lib/AccountsService/icons/${config.home.username} - - - - ${imagePath}" - ]; - - -# Cerulean should automatically add set home-managers `home.username` and `home.homeDirectory` -# (this can be done by using .extendModule from the nixos module system :3) diff --git a/TODO_UI b/TODO_UI new file mode 100755 index 0000000..34b5246 --- /dev/null +++ b/TODO_UI @@ -0,0 +1,3 @@ +1. Create more themes for my applauncher +2. Create more themes for hyprlock + check out: https://github.com/MrVivekRajan/Hyprlock-Styles diff --git a/deploy b/deploy new file mode 100755 index 0000000..4dc0576 --- /dev/null +++ b/deploy @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +set -e + +usage="Usage: $(basename $0) [OPTIONS] + +Options: + -f, --fresh Remove old content in the nixstore (good for debugging) + -b, --bootloader Reinstall the bootloader + -h, --help Show this message (^_^)" + +# delete all cached entries +# to make the system from scratch +collect_garbage () { + sudo nix-collect-garbage --delete-old +} + +rebuild_flake () { + # make sure all changes are visible to nixos + git add . --verbose + if [ "$1" = "reinstall-bootloader" ]; then + sudo nixos-rebuild switch --flake . --install-bootloader + else + sudo nixos-rebuild switch --flake . + #nixos-rebuild build --flake .# --cores 8 -j 1 + fi +} + +# check which flags were given +flag_fresh=false +flag_bootloader=false +for flag in "$@"; do + case "$flag" in + -f|--fresh) + flag_fresh=true ;; + -b|--bootloader) + flag_bootloader=true ;; + -h|--help) + echo "$usage" + exit 0 ;; + *) + echo "[!] Unknown flag \"$flag\"" + exit 1 ;; + esac +done + +# delete cached items in nixstore +if [ "$flag_fresh" = true ]; then + collect_garbage + exit 0 +fi + +# nixos-rebuild switch ... +if [ "$flag_bootloader" = true ]; then + collect_garbage + rebuild_flake "reinstall-bootloader" +else + rebuild_flake +fi diff --git a/deploy-remote b/deploy-remote new file mode 100755 index 0000000..be09c7d --- /dev/null +++ b/deploy-remote @@ -0,0 +1,13 @@ +#!/usr/bin/env bash + +set -e # terminate if any command fails + +echo "[+] Adding keys to ssh-agent" +ssh-add ~/.ssh/id_hyrule +printf "\n" + +git add . +# Deploy to all Colmena hives +colmena build --experimental-flake-eval +colmena apply --experimental-flake-eval +# colmena apply --on hyrule --experimental-flake-eval diff --git a/flake.lock b/flake.lock old mode 100644 new mode 100755 index 4306f69..4e31fa3 --- a/flake.lock +++ b/flake.lock @@ -1,19 +1,40 @@ { "nodes": { - "abseil-src": { - "flake": false, + "ags": { + "inputs": { + "nixpkgs": "nixpkgs", + "systems": "systems" + }, "locked": { - "lastModified": 1722535511, - "narHash": "sha256-51jpDhdZ0n+KLmxh8KVaTz53pZAB0dHjmILFX+OLud4=", - "owner": "abseil", - "repo": "abseil-cpp", - "rev": "4447c7562e3bc702ade25105912dce503f0c4010", + "lastModified": 1728326430, + "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", + "owner": "Aylur", + "repo": "ags", + "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", "type": "github" }, "original": { - "owner": "abseil", - "ref": "20240722.0", - "repo": "abseil-cpp", + "owner": "Aylur", + "repo": "ags", + "type": "github" + } + }, + "ags_2": { + "inputs": { + "nixpkgs": "nixpkgs_5", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1728326430, + "narHash": "sha256-tV1ABHuA1HItMdCTuNdA8fMB+qw7LpjvI945VwMSABI=", + "owner": "Aylur", + "repo": "ags", + "rev": "60180a184cfb32b61a1d871c058b31a3b9b0743d", + "type": "github" + }, + "original": { + "owner": "Aylur", + "repo": "ags", "type": "github" } }, @@ -37,11 +58,11 @@ ] }, "locked": { - "lastModified": 1773436376, - "narHash": "sha256-OUPRrprbgN27BXHuWkMAPSCfLLQ/uwpWghEfKYN2iAg=", + "lastModified": 1730968822, + "narHash": "sha256-NocDjINsh6ismkhb0Xr6xPRksmhuB2WGf8ZmXMhxu7Y=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "43f10d24391692bba3d762931ee35e7f17f8e8b8", + "rev": "a49bc3583ff223f426cb3526fdaa4bcaa247ec14", "type": "github" }, "original": { @@ -50,149 +71,37 @@ "type": "github" } }, - "asio-src": { - "flake": false, - "locked": { - "lastModified": 1702548444, - "narHash": "sha256-8Xo6J6+dTvDtsthjbLMMTInHMDnMMM0rQwzbZu70J/s=", - "owner": "chriskohlhoff", - "repo": "asio", - "rev": "22ccfc94fc77356f7820601f9f33b9129a337d2d", - "type": "github" - }, - "original": { - "owner": "chriskohlhoff", - "ref": "asio-1-30-0", - "repo": "asio", - "type": "github" - } - }, - "awww": { + "colmena": { "inputs": { "flake-compat": "flake-compat", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" + "flake-utils": "flake-utils", + "nix-github-actions": "nix-github-actions", + "nixpkgs": "nixpkgs_2", + "stable": "stable" }, "locked": { - "lastModified": 1770895252, - "narHash": "sha256-TUGZVDcC5xsrWVnpBNosAG1cTy+aWchCWXPyeLZdnGM=", - "ref": "refs/heads/main", - "rev": "2c86d41d07471f518e24f5cd1f586e4d2a32d12c", - "revCount": 1331, - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - }, - "original": { - "type": "git", - "url": "https://codeberg.org/LGFae/awww" - } - }, - "cerulean": { - "inputs": { - "deploy-rs": "deploy-rs", - "microvm": "microvm", - "nixpkgs": [ - "nixpkgs" - ], - "nt": [ - "nt" - ], - "sops-nix": "sops-nix", - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1773743879, - "narHash": "sha256-z81Jxe1CGJXCl1tqPa2wixbgm2qbaNtSsd09Qu182Uo=", - "owner": "cry128", - "repo": "cerulean", - "rev": "6c1a0a5d3395c5416d39e67a47bcdf7c1762613e", + "lastModified": 1734374287, + "narHash": "sha256-rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc=", + "owner": "zhaofengli", + "repo": "colmena", + "rev": "47b6414d800c8471e98ca072bc0835345741a56a", "type": "github" }, "original": { - "owner": "cry128", - "ref": "refactor/snowflake", - "repo": "cerulean", + "owner": "zhaofengli", + "repo": "colmena", + "rev": "47b6414d800c8471e98ca072bc0835345741a56a", "type": "github" } }, - "curl-src": { - "flake": false, - "locked": { - "lastModified": 1743572790, - "narHash": "sha256-huAGWNm2rYBmgzUuYQ21IYp2skyQECelEkXPMBJY3cE=", - "owner": "curl", - "repo": "curl", - "rev": "1c3149881769e7bd79b072e48374e4c2b3678b2f", - "type": "github" - }, - "original": { - "owner": "curl", - "ref": "curl-8_13_0", - "repo": "curl", - "type": "github" - } - }, - "deploy-rs": { - "inputs": { - "flake-compat": "flake-compat_2", - "nixpkgs": [ - "cerulean", - "nixpkgs" - ], - "utils": "utils" - }, - "locked": { - "lastModified": 1770019181, - "narHash": "sha256-hwsYgDnby50JNVpTRYlF3UR/Rrpt01OrxVuryF40CFY=", - "owner": "serokell", - "repo": "deploy-rs", - "rev": "77c906c0ba56aabdbc72041bf9111b565cdd6171", - "type": "github" - }, - "original": { - "owner": "serokell", - "repo": "deploy-rs", - "type": "github" - } - }, - "dobutterfliescry-net": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-unstable": [ - "nixpkgs-unstable" - ], - "systems": [ - "systems" - ] - }, - "locked": { - "lastModified": 1771281537, - "narHash": "sha256-mSFKM4DEvg1mMk3WaE4VQHOEg4UUxfqqfYUnIxeQeQE=", - "ref": "refs/heads/main", - "rev": "3678fe95787bb660c4e9ff9933c5d03693a07a76", - "revCount": 122, - "type": "git", - "url": "https://tearforge.net/cry/site" - }, - "original": { - "type": "git", - "url": "https://tearforge.net/cry/site" - } - }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "owner": "edolstra", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", "type": "github" }, "original": { @@ -204,11 +113,11 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", "owner": "edolstra", "repo": "flake-compat", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { @@ -218,128 +127,63 @@ } }, "flake-compat_3": { - "flake": false, "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { - "locked": { - "lastModified": 1733328505, - "narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=", - "rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec", - "revCount": 69, + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "revCount": 57, "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz" + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz" }, "original": { "type": "tarball", "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1749398372, - "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "mcsr", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772408722, - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_3": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" - }, - "locked": { - "lastModified": 1772408722, - "narHash": "sha256-rHuJtdcOjK7rAHpHphUb1iCvgkU3GpfvicLMwwnfMT0=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f20dc5d9b8027381c474144ecabc9034d6a839a3", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-parts_4": { - "inputs": { - "nixpkgs-lib": [ - "nt", - "nix-unit", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1762440070, - "narHash": "sha256-xxdepIcb39UJ94+YydGP221rjnpkDZUlykKuF54PsqI=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "26d05891e14c88eb4a5d5bee659c0db5afb609d8", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "fmt-src": { + "flake-compat_4": { "flake": false, "locked": { - "lastModified": 1758127535, - "narHash": "sha256-AZDmIeU1HbadC+K0TIAGogvVnxt0oE9U6ocpawIgl6g=", - "owner": "fmtlib", - "repo": "fmt", - "rev": "e424e3f2e607da02742f73db84873b8084fc714c", + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", "type": "github" }, "original": { - "owner": "fmtlib", - "ref": "12.0.0", - "repo": "fmt", + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_5": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, @@ -367,16 +211,14 @@ }, "grub2-themes": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1757136219, - "narHash": "sha256-tKU+vq34KHu/A2wD7WdgP5A4/RCmSD8hB0TyQAUlixA=", + "lastModified": 1730004881, + "narHash": "sha256-8xVIqIW25o2uCL0fxAmP4Sj9sdebarQXmd1+64yMe8o=", "owner": "vinceliuice", "repo": "grub2-themes", - "rev": "80dd04ddf3ba7b284a7b1a5df2b1e95ee2aad606", + "rev": "42c232dfb46bf93c17506cbc1a574e5e89b5e09f", "type": "github" }, "original": { @@ -385,27 +227,6 @@ "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772985280, - "narHash": "sha256-FdrNykOoY9VStevU4zjSUdvsL9SzJTcXt4omdEDZDLk=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "8f736f007139d7f70752657dff6a401a585d6cbc", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.11", - "repo": "home-manager", - "type": "github" - } - }, "hyprcursor": { "inputs": { "hyprlang": [ @@ -422,11 +243,11 @@ ] }, "locked": { - "lastModified": 1772461003, - "narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=", + "lastModified": 1728669738, + "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7", + "rev": "0264e698149fcb857a66a53018157b41f8d97bb0", "type": "github" }, "original": { @@ -435,61 +256,25 @@ "type": "github" } }, - "hyprgraphics": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1772461523, - "narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, "hyprland": { "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", - "hyprland-guiutils": "hyprland-guiutils", "hyprland-protocols": "hyprland-protocols", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "hyprwire": "hyprwire", - "nixpkgs": [ - "nixpkgs-unstable" - ], + "nixpkgs": "nixpkgs_4", "pre-commit-hooks": "pre-commit-hooks", - "systems": [ - "systems" - ], + "systems": "systems_2", "xdph": "xdph" }, "locked": { - "lastModified": 1774136452, - "narHash": "sha256-pSwj8WNWXMuZaDqCyhQwlngRD3JyNmZwldSe6UqWAos=", + "lastModified": 1730969692, + "narHash": "sha256-4Ly9zkqnRB6qLjMeddfUyd4iRLvq+RDspBWABS8DGN4=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "bf31f642b08a8d8ca796a1b713285f2580805c2f", + "rev": "e58e97b0a38b8ccc87a4304c9e4e2b37c9966875", "type": "github" }, "original": { @@ -498,52 +283,6 @@ "type": "github" } }, - "hyprland-guiutils": { - "inputs": { - "aquamarine": [ - "hyprland", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprtoolkit": "hyprtoolkit", - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1772467975, - "narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=", - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-guiutils", - "type": "github" - } - }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -556,11 +295,11 @@ ] }, "locked": { - "lastModified": 1772460177, - "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", + "lastModified": 1728345020, + "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", + "rev": "a7c183800e74f337753de186522b9017a07a8cee", "type": "github" }, "original": { @@ -585,11 +324,11 @@ ] }, "locked": { - "lastModified": 1772459629, - "narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=", + "lastModified": 1728168612, + "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "7615ee388de18239a4ab1400946f3d0e498a8186", + "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", "type": "github" }, "original": { @@ -598,55 +337,22 @@ "type": "github" } }, - "hyprtoolkit": { + "hyprpanel": { "inputs": { - "aquamarine": [ - "hyprland", - "hyprland-guiutils", - "aquamarine" - ], - "hyprgraphics": [ - "hyprland", - "hyprland-guiutils", - "hyprgraphics" - ], - "hyprlang": [ - "hyprland", - "hyprland-guiutils", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-guiutils", - "hyprutils" - ], - "hyprwayland-scanner": [ - "hyprland", - "hyprland-guiutils", - "hyprwayland-scanner" - ], - "nixpkgs": [ - "hyprland", - "hyprland-guiutils", - "nixpkgs" - ], - "systems": [ - "hyprland", - "hyprland-guiutils", - "systems" - ] + "ags": "ags_2", + "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1772462885, - "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", - "owner": "hyprwm", - "repo": "hyprtoolkit", - "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", + "lastModified": 1731270736, + "narHash": "sha256-N0unlLf/7BqkrYx3BO9svv1+oLzKpArgiqLzkmNpD3Q=", + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", + "rev": "a7855baf13c6abdd0b0e988e4390112cd7deda67", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprtoolkit", + "owner": "Jas-SinghFSU", + "repo": "HyprPanel", "type": "github" } }, @@ -662,11 +368,11 @@ ] }, "locked": { - "lastModified": 1773948364, - "narHash": "sha256-S76omfIVQ1TpGiXFbqih6o6XcH3sA5+5QI+SXB4HvlY=", + "lastModified": 1730968903, + "narHash": "sha256-zFvzLXcSm0Ia4XI1SE4FQ9KE63hlGrRWhLtwMolWuR8=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "b85b779e3e3a1adcd9b098e3447cf48f9e780b35", + "rev": "3ce0cde8709cdacbfba471f8e828433b58a561e9", "type": "github" }, "original": { @@ -687,11 +393,11 @@ ] }, "locked": { - "lastModified": 1772459835, - "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", + "lastModified": 1726874836, + "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", + "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", "type": "github" }, "original": { @@ -700,301 +406,18 @@ "type": "github" } }, - "hyprwire": { - "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1773074819, - "narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=", - "owner": "hyprwm", - "repo": "hyprwire", - "rev": "f68afd0e73687598cc2774804fedad76693046f0", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprwire", - "type": "github" - } - }, - "incbin-src": { - "flake": false, - "locked": { - "lastModified": 1748303270, - "narHash": "sha256-vgOfViZnWTKpBB6vDNDJSB3YuuGGVhg++zsi9Ubatno=", - "owner": "graphitemaster", - "repo": "incbin", - "rev": "22061f51fe9f2f35f061f85c2b217b55dd75310d", - "type": "github" - }, - "original": { - "owner": "graphitemaster", - "repo": "incbin", - "rev": "22061f51fe9f2f35f061f85c2b217b55dd75310d", - "type": "github" - } - }, - "json-src": { - "flake": false, - "locked": { - "lastModified": 1744360948, - "narHash": "sha256-cECvDOLxgX7Q9R3IE86Hj9JJUxraDQvhoyPDF03B2CY=", - "owner": "nlohmann", - "repo": "json", - "rev": "55f93686c01528224f448c19128836e7df245f72", - "type": "github" - }, - "original": { - "owner": "nlohmann", - "ref": "v3.12.0", - "repo": "json", - "type": "github" - } - }, - "libgit2-src": { - "flake": false, - "locked": { - "lastModified": 1749227175, - "narHash": "sha256-/xI3v7LNhpgfjv/m+sZwYDhhYvS6kQYxiiiG3+EF8Mw=", - "owner": "libgit2", - "repo": "libgit2", - "rev": "0060d9cf5666f015b1067129bd874c6cc4c9c7ac", - "type": "github" - }, - "original": { - "owner": "libgit2", - "ref": "v1.9.1", - "repo": "libgit2", - "type": "github" - } - }, - "luajit-src": { - "flake": false, - "locked": { - "lastModified": 1763177035, - "narHash": "sha256-oYD86MqmlJpiCuEs4LwVtxvarPtz1RPWm8nJqNE0sBs=", - "owner": "SteamClientHomebrew", - "repo": "LuaJIT", - "rev": "89550023569c3e195e75e12951c067fe5591e0d2", - "type": "github" - }, - "original": { - "owner": "SteamClientHomebrew", - "ref": "v2.1", - "repo": "LuaJIT", - "type": "github" - } - }, - "luajson-src": { - "flake": false, - "locked": { - "lastModified": 1763065879, - "narHash": "sha256-5Mdp4jp+rqz2ufkBa1gMfd8nep+Um+mBdr6+Ut6yz9I=", - "owner": "SteamClientHomebrew", - "repo": "LuaJSON", - "rev": "0c1fabf07c42f3907287d1e4f729e0620c1fe6fd", - "type": "github" - }, - "original": { - "owner": "SteamClientHomebrew", - "repo": "LuaJSON", - "rev": "0c1fabf07c42f3907287d1e4f729e0620c1fe6fd", - "type": "github" - } - }, - "mango": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ], - "scenefx": "scenefx" - }, - "locked": { - "lastModified": 1773034081, - "narHash": "sha256-tH1yy1LQYtmGWnCU7whsdX0iGpc2dvaJ+7p6rvuKkHg=", - "owner": "DreamMaoMao", - "repo": "mango", - "rev": "db30977196b91cfe2e5db8e9829faafe13417bd9", - "type": "github" - }, - "original": { - "owner": "DreamMaoMao", - "repo": "mango", - "type": "github" - } - }, - "mcsr": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771756753, - "narHash": "sha256-8+yCKpZr+BFdVFjvZZVzkZem/ggafyGsOxX5nhqtLvY=", - "rev": "657da45185894ef03709e4c100bb8038a972dc59", - "type": "tarball", - "url": "https://git.uku3lig.net/api/v1/repos/uku/mcsr-nixos/archive/657da45185894ef03709e4c100bb8038a972dc59.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://git.uku3lig.net/uku/mcsr-nixos/archive/main.tar.gz" - } - }, - "microvm": { - "inputs": { - "nixpkgs": [ - "cerulean", - "nixpkgs" - ], - "spectrum": "spectrum" - }, - "locked": { - "lastModified": 1773018425, - "narHash": "sha256-fpgZBmZpKoEXEowBK/6m8g9FcOLWQ4UxhXHqCw2CpSM=", - "owner": "microvm-nix", - "repo": "microvm.nix", - "rev": "25ebda3c558e923720c965832dc9a04f559a055c", - "type": "github" - }, - "original": { - "owner": "microvm-nix", - "repo": "microvm.nix", - "type": "github" - } - }, - "millennium": { - "inputs": { - "abseil-src": "abseil-src", - "asio-src": "asio-src", - "curl-src": "curl-src", - "fmt-src": "fmt-src", - "incbin-src": "incbin-src", - "json-src": "json-src", - "libgit2-src": "libgit2-src", - "luajit-src": "luajit-src", - "luajson-src": "luajson-src", - "millennium-src": "millennium-src", - "minhook-src": "minhook-src", - "mini-src": "mini-src", - "minizip-src": "minizip-src", - "nixpkgs": [ - "nixpkgs-unstable" - ], - "re2-src": "re2-src", - "websocketpp-src": "websocketpp-src", - "zlib-src": "zlib-src" - }, - "locked": { - "dir": "packages/nix", - "lastModified": 1774360398, - "narHash": "sha256-IvuZMTxTe5osTszZp4r27X/F0R7FVhLWkP7g6pYMgTs=", - "owner": "SteamClientHomebrew", - "repo": "millennium", - "rev": "4378aac79283a11912dd1a7adf89f79ab3736a87", - "type": "github" - }, - "original": { - "dir": "packages/nix", - "owner": "SteamClientHomebrew", - "repo": "millennium", - "type": "github" - } - }, - "millennium-src": { - "flake": false, - "locked": { - "lastModified": 1770463863, - "narHash": "sha256-MceGTpXobCAh5Ll/1iTWcEf6/nHY3Ll1t06JxbYc+Co=", - "owner": "SteamClientHomebrew", - "repo": "Millennium", - "rev": "1bc62c94a06f25f7e8d7e269f11cd968cf576bff", - "type": "github" - }, - "original": { - "owner": "SteamClientHomebrew", - "repo": "Millennium", - "rev": "1bc62c94a06f25f7e8d7e269f11cd968cf576bff", - "type": "github" - } - }, - "minhook-src": { - "flake": false, - "locked": { - "lastModified": 1743163800, - "narHash": "sha256-0eGFfg365bb4zic1WTHMvKHbxuhhGp72/clu8OklHXs=", - "owner": "TsudaKageyu", - "repo": "minhook", - "rev": "c3fcafdc10146beb5919319d0683e44e3c30d537", - "type": "github" - }, - "original": { - "owner": "TsudaKageyu", - "ref": "v1.3.4", - "repo": "minhook", - "type": "github" - } - }, - "mini-src": { - "flake": false, - "locked": { - "lastModified": 1743356736, - "narHash": "sha256-zBFFOlECbie7+62fTGf+NP4gNmfv2Qddw3ys6xn7o9U=", - "owner": "metayeti", - "repo": "mINI", - "rev": "52b66e987cb56171dc91d96115cdf094b6e4d7a0", - "type": "github" - }, - "original": { - "owner": "metayeti", - "ref": "0.9.18", - "repo": "mINI", - "type": "github" - } - }, - "minizip-src": { - "flake": false, - "locked": { - "lastModified": 1746408966, - "narHash": "sha256-I3CZwtfJMsZYQOMdGhooUN8vssnQj6rCzv8F+rne3vg=", - "owner": "zlib-ng", - "repo": "minizip-ng", - "rev": "f3ed731e27a97e30dffe076ed5e0537daae5c1bd", - "type": "github" - }, - "original": { - "owner": "zlib-ng", - "ref": "4.0.10", - "repo": "minizip-ng", - "type": "github" - } - }, "nix-flatpak": { "locked": { - "lastModified": 1767983141, - "narHash": "sha256-7ZCulYUD9RmJIDULTRkGLSW1faMpDlPKcbWJLYHoXcs=", + "lastModified": 1711997201, + "narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "440818969ac2cbd77bfe025e884d0aa528991374", + "rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd", "type": "github" }, "original": { "owner": "gmodena", - "ref": "latest", + "ref": "v0.4.1", "repo": "nix-flatpak", "type": "github" } @@ -1002,17 +425,16 @@ "nix-github-actions": { "inputs": { "nixpkgs": [ - "nt", - "nix-unit", + "colmena", "nixpkgs" ] }, "locked": { - "lastModified": 1737420293, - "narHash": "sha256-F1G5ifvqTpJq7fdkT34e/Jy9VCyzd5XfJ9TO8fHhJWE=", + "lastModified": 1729742964, + "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", "owner": "nix-community", "repo": "nix-github-actions", - "rev": "f4158fa080ef4503c8f4c820967d946c2af31ec9", + "rev": "e04df33f62cdcf93d73e9a04142464753a16db67", "type": "github" }, "original": { @@ -1021,153 +443,32 @@ "type": "github" } }, - "nix-unit": { - "inputs": { - "flake-parts": "flake-parts_4", - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "nt", - "nixpkgs" - ], - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1762774186, - "narHash": "sha256-hRADkHjNt41+JUHw2EiSkMaL4owL83g5ZppjYUdF/Dc=", - "owner": "nix-community", - "repo": "nix-unit", - "rev": "1c9ab50554eed0b768f9e5b6f646d63c9673f0f7", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-unit", - "type": "github" - } - }, - "nixcats": { - "locked": { - "lastModified": 1770584904, - "narHash": "sha256-9Zaz8lbKF2W9pwXZEnbiGsicHdBoU+dHt3Wv3mCJoZ8=", - "owner": "BirdeeHub", - "repo": "nixCats-nvim", - "rev": "538fdde784d2909700d97a8ef307783b33a86fb1", - "type": "github" - }, - "original": { - "owner": "BirdeeHub", - "repo": "nixCats-nvim", - "type": "github" - } - }, "nixcord": { "inputs": { - "flake-compat": "flake-compat_4", - "flake-parts": "flake-parts_3", - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-nixcord": "nixpkgs-nixcord" + "flake-compat": "flake-compat_3", + "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1774312874, - "narHash": "sha256-mFc7Iy+Oqwr7Vwb7CmNIWilSYiTw2857imf6Rb75ITg=", - "owner": "FlameFlag", + "lastModified": 1730720546, + "narHash": "sha256-5147A6X0MH6u/YDxLe+Nnva3oxfLQanC716LarG/uoo=", + "owner": "kaylorben", "repo": "nixcord", - "rev": "71f4b3f92ca534c3665deb63e229195955d96cf9", + "rev": "e3e27c77316f7526b1a846778ae9c759c9377611", "type": "github" }, "original": { - "owner": "FlameFlag", + "owner": "kaylorben", "repo": "nixcord", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1772822230, - "narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-lib": { - "locked": { - "lastModified": 1748740939, - "narHash": "sha256-rQaysilft1aVMwF14xIdGS3sj1yHlI6oKQNBRTF40cc=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "656a64127e9d791a334452c6b6606d17539476e2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-lib_2": { - "locked": { - "lastModified": 1772328832, - "narHash": "sha256-e+/T/pmEkLP6BHhYjx6GmwP5ivonQQn0bJdH9YrRB+Q=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "c185c7a5e5dd8f9add5b2f8ebeff00888b070742", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs-master": { - "locked": { - "lastModified": 1773068446, - "narHash": "sha256-MCEmktH6AFJH8Pg1rBGB2Q0FhS5z5K87IsMbUU8uzHI=", + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "70b7278e2c0acc26ad3360551bf9c15c5ccc0acd", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "master", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-nixcord": { - "locked": { - "lastModified": 1773222311, - "narHash": "sha256-BHoB/XpbqoZkVYZCfXJXfkR+GXFqwb/4zbWnOr2cRcU=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0590cd39f728e129122770c029970378a79d076a", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable": { - "locked": { - "lastModified": 1772773019, - "narHash": "sha256-E1bxHxNKfDoQUuvriG71+f+s/NT0qWkImXsYZNFFfCs=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "aca4d95fce4914b3892661bcb80b8087293536c6", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", "type": "github" }, "original": { @@ -1177,57 +478,166 @@ "type": "github" } }, - "nixpkgs_2": { + "nixpkgs-stable": { "locked": { - "lastModified": 1767313136, - "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "lastModified": 1730741070, + "narHash": "sha256-edm8WG19kWozJ/GqyYx2VjW99EdhjKwbY3ZwdlPAAlo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "rev": "d063c1dd113c91ab27959ba540c0d9753409edf3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-25.05", + "ref": "nixos-24.05", "repo": "nixpkgs", "type": "github" } }, - "nt": { - "inputs": { - "nix-unit": "nix-unit", - "nixpkgs": "nixpkgs_2", - "systems": "systems_2" - }, + "nixpkgs_2": { "locked": { - "lastModified": 1773738366, - "narHash": "sha256-oH22HyNHEdCoCQo734sQCHUr6C0jmGQJMZ13dsgEHkk=", - "ref": "refs/heads/main", - "rev": "f32c3a726a3d608d30aaaa1df2301c1eaf5ef8f4", - "revCount": 206, - "type": "git", - "url": "https://tearforge.net/cry/nt" + "lastModified": 1734119587, + "narHash": "sha256-AKU6qqskl0yf2+JdRdD0cfxX4b9x3KKV5RqA6wijmPM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "3566ab7246670a43abd2ffa913cc62dad9cdf7d5", + "type": "github" }, "original": { - "type": "git", - "url": "https://tearforge.net/cry/nt" + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1730808093, + "narHash": "sha256-oOenwoxpzQsBNi7KltgnXqq6e0+CxlfNXKn3k27w6cQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c1a390f74b2c93f69a6805142f11a215a689cec1", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1725634671, + "narHash": "sha256-v3rIhsJBOMLR8e/RNWxr828tB+WywYIoajrZKFM+0Gg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "574d1eac1c200690e27b8eb4e24887f8df7ac27c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1729880355, + "narHash": "sha256-RP+OQ6koQQLX5nw0NmcDrzvGL8HDLnyXt/jHhL1jwjM=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "18536bf04cd71abd345f9579158841376fdd0c5a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_7": { + "locked": { + "lastModified": 1730768919, + "narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_8": { + "locked": { + "lastModified": 1739357830, + "narHash": "sha256-9xim3nJJUFbVbJCz48UP4fGRStVW5nv4VdbimbKxJ3I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0ff09db9d034a04acd4e8908820ba0b410d7a33a", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_9": { + "locked": { + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" } }, "pre-commit-hooks": { "inputs": { - "flake-compat": "flake-compat_3", + "flake-compat": "flake-compat_2", "gitignore": "gitignore", "nixpkgs": [ "hyprland", "nixpkgs" - ] + ], + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1772893680, - "narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=", + "lastModified": 1730814269, + "narHash": "sha256-fWPHyhYE6xvMI1eGY3pwBTq85wcy1YXqdzTZF+06nOg=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "8baab586afc9c9b57645a734c820e4ac0a604af9", + "rev": "d70155fdc00df4628446352fc58adc640cd705c2", "type": "github" }, "original": { @@ -1236,161 +646,33 @@ "type": "github" } }, - "re2-src": { - "flake": false, - "locked": { - "lastModified": 1762353507, - "narHash": "sha256-0J1HVk+eR7VN0ymucW9dNlT36j16XIfCzcs1EVyEIEU=", - "owner": "google", - "repo": "re2", - "rev": "927f5d53caf8111721e734cf24724686bb745f55", - "type": "github" - }, - "original": { - "owner": "google", - "ref": "2025-11-05", - "repo": "re2", - "type": "github" - } - }, "root": { "inputs": { - "awww": "awww", - "cerulean": "cerulean", - "dobutterfliescry-net": "dobutterfliescry-net", + "ags": "ags", + "colmena": "colmena", "grub2-themes": "grub2-themes", - "home-manager": "home-manager", "hyprland": "hyprland", - "mango": "mango", - "mcsr": "mcsr", - "millennium": "millennium", + "hyprpanel": "hyprpanel", "nix-flatpak": "nix-flatpak", - "nixcats": "nixcats", "nixcord": "nixcord", - "nixpkgs": "nixpkgs", - "nixpkgs-master": "nixpkgs-master", - "nixpkgs-unstable": "nixpkgs-unstable", - "nt": "nt", - "sddm-silent": "sddm-silent", + "nixpkgs": "nixpkgs_8", "spicetify-nix": "spicetify-nix", - "systems": "systems_3", - "zen-browser": "zen-browser" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "awww", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1764038373, - "narHash": "sha256-M6w2wNBRelcavoDAyFL2iO4NeWknD40ASkH1S3C0YGM=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "ab3536fe850211a96673c6ffb2cb88aab8071cc9", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "scenefx": { - "inputs": { - "nixpkgs": [ - "mango", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1750785057, - "narHash": "sha256-tGX6j4W91rcb+glXJo43sjPI9zQvPotonknG1BdihR4=", - "owner": "wlrfx", - "repo": "scenefx", - "rev": "3a6cfb12e4ba97b43326357d14f7b3e40897adfc", - "type": "github" - }, - "original": { - "owner": "wlrfx", - "repo": "scenefx", - "type": "github" - } - }, - "sddm-silent": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1771956684, - "narHash": "sha256-+EtzmEzGA2xqwIvKrP0euYaOzrmTQWEWAiWV+k2WBEM=", - "owner": "uiriansan", - "repo": "SilentSDDM", - "rev": "34f82e1fb8412fff78b82a0dcce763492b36054c", - "type": "github" - }, - "original": { - "owner": "uiriansan", - "repo": "SilentSDDM", - "type": "github" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "cerulean", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1773096132, - "narHash": "sha256-M3zEnq9OElB7zqc+mjgPlByPm1O5t2fbUrH3t/Hm5Ag=", - "owner": "Mic92", - "repo": "sops-nix", - "rev": "d1ff3b1034d5bab5d7d8086a7803c5a5968cd784", - "type": "github" - }, - "original": { - "owner": "Mic92", - "repo": "sops-nix", - "type": "github" - } - }, - "spectrum": { - "flake": false, - "locked": { - "lastModified": 1772189877, - "narHash": "sha256-i1p90Rgssb//aNiTDFq46ZG/fk3LmyRLChtp/9lddyA=", - "ref": "refs/heads/main", - "rev": "fe39e122d898f66e89ffa17d4f4209989ccb5358", - "revCount": 1255, - "type": "git", - "url": "https://spectrum-os.org/git/spectrum" - }, - "original": { - "type": "git", - "url": "https://spectrum-os.org/git/spectrum" + "swww": "swww" } }, "spicetify-nix": { "inputs": { + "flake-compat": "flake-compat_4", "nixpkgs": [ - "nixpkgs-unstable" - ], - "systems": [ - "systems" + "nixpkgs" ] }, "locked": { - "lastModified": 1773007504, - "narHash": "sha256-4NtiCDH3RunKbrlWvPCB6dyTjCwqdrHaBDeMCzG6gIA=", + "lastModified": 1730780158, + "narHash": "sha256-ZJkCFn4PL49rINz7xrjlBqw9nF8wWJE7fSVqbHlCWSA=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "434e63b851f9139aaeddc3b8de44d47992828b3b", + "rev": "2791c6662002731d3dfc00312307aef547e1c8be", "type": "github" }, "original": { @@ -1399,33 +681,69 @@ "type": "github" } }, + "stable": { + "locked": { + "lastModified": 1730883749, + "narHash": "sha256-mwrFF0vElHJP8X3pFCByJR365Q2463ATp2qGIrDUdlE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "dba414932936fde69f0606b4f1d87c5bc0003ede", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "swww": { + "inputs": { + "flake-compat": "flake-compat_5", + "nixpkgs": "nixpkgs_9", + "utils": "utils" + }, + "locked": { + "lastModified": 1730424990, + "narHash": "sha256-+8YUJsNzvgAeZYLfbHYfYlad/iS+6Eec/LWzL1ZIGfY=", + "owner": "LGFae", + "repo": "swww", + "rev": "0db3f4eb192f1c9bf914efcc1d2aba809da5d78a", + "type": "github" + }, + "original": { + "owner": "LGFae", + "repo": "swww", + "type": "github" + } + }, "systems": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, "systems_2": { "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default", + "repo": "default-linux", "type": "github" } }, @@ -1444,38 +762,31 @@ "type": "github" } }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "nt", - "nix-unit", - "nixpkgs" - ] - }, + "systems_4": { "locked": { - "lastModified": 1762410071, - "narHash": "sha256-aF5fvoZeoXNPxT0bejFUBXeUjXfHLSL7g+mjR/p5TEg=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "97a30861b13c3731a84e09405414398fbf3e109f", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { - "owner": "numtide", - "repo": "treefmt-nix", + "owner": "nix-systems", + "repo": "default", "type": "github" } }, "utils": { "inputs": { - "systems": "systems" + "systems": "systems_4" }, "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "lastModified": 1726560853, + "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", "type": "github" }, "original": { @@ -1484,23 +795,6 @@ "type": "github" } }, - "websocketpp-src": { - "flake": false, - "locked": { - "lastModified": 1587320717, - "narHash": "sha256-9fIwouthv2GcmBe/UPvV7Xn9P2o0Kmn2hCI4jCh0hPM=", - "owner": "zaphoyd", - "repo": "websocketpp", - "rev": "56123c87598f8b1dd471be83ca841ceae07f95ba", - "type": "github" - }, - "original": { - "owner": "zaphoyd", - "ref": "0.8.2", - "repo": "websocketpp", - "type": "github" - } - }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -1529,11 +823,11 @@ ] }, "locked": { - "lastModified": 1772669058, - "narHash": "sha256-XhnY0aRuDo5LT8pmJVPofPOgO2hAR7T+XRoaQxtNPzQ=", + "lastModified": 1730743262, + "narHash": "sha256-iTLqj3lU8kFehPm5tXpctzkD274t/k1nwSSq3qCWXeg=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "906d0ac159803a7df2dc1f948df9327670380f69", + "rev": "09b23cef06fe248e61cec8862c04b9bcb62f4b6d", "type": "github" }, "original": { @@ -1541,46 +835,6 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } - }, - "zen-browser": { - "inputs": { - "home-manager": [ - "home-manager" - ], - "nixpkgs": [ - "nixpkgs-unstable" - ] - }, - "locked": { - "lastModified": 1772945022, - "narHash": "sha256-Fv14NttjL/7xfi6eVwrSEBAyBvDjI00RLiRNqA5apcw=", - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "rev": "3a6a5ca7fb48cc8fd8183386506a06579d1d79dc", - "type": "github" - }, - "original": { - "owner": "0xc000022070", - "repo": "zen-browser-flake", - "type": "github" - } - }, - "zlib-src": { - "flake": false, - "locked": { - "lastModified": 1754565515, - "narHash": "sha256-c2RYqHi3hj/ViBzJcYWoNib27GAbq/B1SJUfvG7CPG4=", - "owner": "zlib-ng", - "repo": "zlib-ng", - "rev": "425439062b114a0f6cf625022c41d929c7e879f9", - "type": "github" - }, - "original": { - "owner": "zlib-ng", - "ref": "2.2.5", - "repo": "zlib-ng", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix old mode 100644 new mode 100755 index c6d00fb..861295a --- a/flake.nix +++ b/flake.nix @@ -1,107 +1,147 @@ { - description = "im gonna cry again ;-;"; + description = "Emile's Nix Dotfiles"; inputs = { - systems.url = "github:nix-systems/default-linux"; + # nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; + #nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; - nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixpkgs-master.url = "github:NixOS/nixpkgs/master"; - - home-manager = { - url = "github:nix-community/home-manager/release-25.11"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nt.url = "git+https://tearforge.net/cry/nt"; - - cerulean = { - url = "github:cry128/cerulean/refactor/snowflake"; - inputs = { - nt.follows = "nt"; - systems.follows = "systems"; - nixpkgs.follows = "nixpkgs"; - }; - }; - - grub2-themes = { - url = "github:vinceliuice/grub2-themes"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - sddm-silent = { - url = "github:uiriansan/SilentSDDM"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - mango = { - url = "github:DreamMaoMao/mango"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - hyprland = { - url = "github:hyprwm/Hyprland"; - - inputs = { - nixpkgs.follows = "nixpkgs-unstable"; - systems.follows = "systems"; - }; - }; - - awww = { - url = "git+https://codeberg.org/LGFae/awww"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - nixcats.url = "github:BirdeeHub/nixCats-nvim"; - - nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=latest"; - - nixcord = { - url = "github:FlameFlag/nixcord"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - - millennium = { - url = "github:SteamClientHomebrew/millennium?dir=packages/nix"; - inputs.nixpkgs.follows = "nixpkgs-unstable"; - }; + #home-manager = { + # url = "github:nix-community/home-manager"; + # inputs.nixpkgs.follows = "nixpkgs"; + #}; spicetify-nix = { url = "github:Gerg-L/spicetify-nix"; - inputs = { - systems.follows = "systems"; - nixpkgs.follows = "nixpkgs-unstable"; - }; - }; - - zen-browser = { - url = "github:0xc000022070/zen-browser-flake"; - inputs = { - nixpkgs.follows = "nixpkgs-unstable"; - home-manager.follows = "home-manager"; - }; - }; - - dobutterfliescry-net = { - url = "git+https://tearforge.net/cry/site"; - inputs = { - nixpkgs.follows = "nixpkgs"; - nixpkgs-unstable.follows = "nixpkgs-unstable"; - systems.follows = "systems"; - }; - }; - - mcsr = { - url = "https://git.uku3lig.net/uku/mcsr-nixos/archive/main.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nixcord.url = "github:kaylorben/nixcord"; + + grub2-themes.url = "github:vinceliuice/grub2-themes"; + + # is this necessary? (aren't I enabling it in `configuration.nix` anyways?) + hyprland.url = "github:hyprwm/Hyprland"; + + swww.url = "github:LGFae/swww"; + + # TODO: declarative flatpak management + nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1"; + + ags.url = "github:Aylur/ags"; + + hyprpanel.url = "github:Jas-SinghFSU/HyprPanel"; + + # colmena.url = "github:zhaofengli/colmena"; + colmena.url = "github:zhaofengli/colmena/?rev=47b6414d800c8471e98ca072bc0835345741a56a"; + # alternative to colmena (currently in testing) + #deploy-rs.url = "github:serokell/deploy-rs"; + + #wishlist.url = "path:/home/me/nixdots/flakes/wishlist"; }; - nixConfig = { - extra-experimental-features = "pipe-operators"; - }; + outputs = { + self, + nixpkgs, + #home-manager, + hyprland, + grub2-themes, + nixcord, + colmena, + #deploy-rs, + ... + } @ inputs: let + system = "x86_64-linux"; - outputs = {cerulean, ...} @ inputs: - cerulean.snow.flake inputs ./.; + pkgs = import nixpkgs { + inherit system; + + config = { + allowUnfree = true; + }; + }; + + # TODO: come back to this its really cool + # this is just something I'm experimenting with + PROJECT_ROOT = builtins.toString ./.; + in { + # `nix develop` shell + devShells."x86_64-linux".default = pkgs.mkShell { + buildInputs = [ + #colmena-new + ]; + }; + + nixosConfigurations = { + # i be on my puter fr + myputer = nixpkgs.lib.nixosSystem { + # nix passes these to every single module + specialArgs = {inherit inputs pkgs;}; + + modules = [ + ./hosts/myputer + grub2-themes.nixosModules.default + ]; + }; + + # my laptop 0w0 + lolcathost = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs pkgs;}; + + modules = [ + ./hosts/lolcathost + grub2-themes.nixosModules.default + ]; + }; + + # meine vps + # hyrule = nixpkgs.lib.nixosSystem { + # # manually set system architecture since + # # this is for a remote deployment + # system = "x86_64-linux"; + # specialargs = {inherit inputs pkgs;}; + # + # modules = [ + # ./hosts/hyrule + # ]; + # }; + }; + + # remote deployment with deploy-rs + # deploy.nodes.hyrule = { + # hostname = "imbored.dev"; + # # create a primary profile called "system" + # profiles.system = { + # user = "root"; # user to deploy to + # path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.hyrule; + # + # # ssh configuration for reaching the server + # sshUser = "ae"; + # #interactiveSudo = true; # TODO: use this and revoke passwordless sudo for ae + # sshOpts = ["-i" "/home/me/.ssh/id_hyrule"]; + # remoteBuild = false; # build locally then deploy to remote host + # }; + # }; + + # remote deployment to my servers!! + colmenaHive = colmena.lib.makeHive { + meta = { + # set nixpkgs global + nixpkgs = pkgs; + # set nixpkgs per server + nodeNixpkgs = { + hyrule = import nixpkgs { + system = "x86_64-linux"; + config.allowUnfree = false; + }; + }; + + # we can use `specialArgs.inputs` to inject wishlist into hyrule's module + #specialArgs.inputs = with inputs; {inherit wishlist;}; + }; + + # meine vps + hyrule = import ./hosts/hyrule; + }; + }; } diff --git a/flakes/wishlist/README b/flakes/wishlist/README new file mode 100644 index 0000000..5c662bb --- /dev/null +++ b/flakes/wishlist/README @@ -0,0 +1,31 @@ +#### wishlist.nix +This is a simple Nix flake defining a service from which +wishlist can run automatically. This flake runs wishlist-0.15.1 +and lacks configurability unfortunately. However this was an +intentional choice, allowing wishlist to read from the user's +`~/.ssh/config` file, which can be configured seperately using +the something akin to the follow home-manager snippet: +```nix +programs.ssh = { + enable = true; + addKeysToAgent = "yes"; # always add keys to ssh-agent + + matchBlocks = { + hyrule = { + hostname = "imbored.dev"; + user = "ae"; + port = 22; + identityFile = "/home/me/.ssh/id_hyrule"; + }; + }; +}; + +``` + +This decision was mostly selfish as it was easiest... +But it comes at the cost of not being able to set the +port wishlist listens on. So for now you're stuck with `2222`. + +###### The Future!! (woooowwww) +Create an option for wishlist that is used to construct +the `config.yaml` file diff --git a/flakes/wishlist/flake.nix b/flakes/wishlist/flake.nix new file mode 100644 index 0000000..a98561a --- /dev/null +++ b/flakes/wishlist/flake.nix @@ -0,0 +1,93 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { + self, + config, + nixpkgs, + lib, + flake-utils, + }: let + cfg = config.services.wishlist; + supportedSystems = ["x86_64-linux" "i686-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin"]; + in { + # TODO: 1. add options (ie one to set whether the server should be enabled), + # 2. create a systemd service + # 3. create a main program + # 4. celibrate + + # TODO: do I need to make this a home-manager option and set the yaml config? + + # define what settings a user can change + options = { + services.wishlist = with lib; { + enable = mkEnableOption "wishlist"; + + port = mkOption { + type = types.port; + default = 2222; + description = "Port to listen on"; + }; + + package = mkOption { + type = types.package; + default = self.packages.${nixpkgs.system}.default; + description = "Package to use"; + }; + }; + }; + + # define a systemd service for wishlist ^_^ + config = lib.mkIf cfg.enable { + systemd.services.wishlist = { + description = "Single entrypoint for multiple SSH endpoints"; + wantedBy = ["multi-user.target"]; + + serviceConfig = { + DynamicUser = "yes"; + ExecStart = "${cfg.package}/bin/wishlist serve"; + Restart = "always"; + RestartSec = "2s"; + }; + }; + }; + + packages = flake-utils.lib.eachSystem supportedSystems ( + system: let + version = "0.15.1"; + #pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = false; + }; + #lib = pkgs.lib; + in rec { + defaultPackage = self.packages.${system}.wishlist; + wishlist = pkgs.buildGoModule { + pname = "wishlist"; + inherit version; + meta = with lib; { + description = "Single entrypoint for multiple SSH endpoints"; + homepage = "https://github.com/charmbracelet/wishlist"; + changelog = "https://github.com/charmbracelet/wishlist/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [caarlos0 penguwin]; + mainProgram = "wishlist"; + }; + + src = pkgs.fetchFromGitHub { + owner = "charmbracelet"; + repo = "wishlist"; + rev = "v${version}"; + # rev = "d7f058e115a8b4a4131406d01dde84fb4a8e93c4"; + hash = "53fojA+gdvpSVNjx6QncH16F8/x+lpY5SkNs7obW2XQ="; + }; + vendorSha256 = "0x6rss3fwv2398wrd5kyzkrqaphzvh4ykwfqai9glxm01y6fhxz7"; + }; + } + ); + }; +} diff --git a/flakes/wishlist/wishlist.nix b/flakes/wishlist/wishlist.nix new file mode 100644 index 0000000..1bdb24b --- /dev/null +++ b/flakes/wishlist/wishlist.nix @@ -0,0 +1,99 @@ +# NOTE: Wishlist service fails on nix because of readonly file system +# and it can't find a config file for itself, it needs to write that +# itself I suppose :( +# So: +# 1. Get it to write that file, and +# 2. Allow it to inherit profiles from configured ssh +{ + self, + config, + pkgs, + lib, +}: let + cfg = config.services.wishlist; +in { + options = { + services.wishlist = with lib; { + enable = mkEnableOption "wishlist"; + + name = mkOption { + type = types.str; + default = + }; + + port = mkOption { + type = types.port; + default = 2222; + description = "Port to listen on"; + }; + + #configPath = mkOption { + # type = types.path; + # default = ; + # description = "Path to config file"; + #}; + + package = mkOption { + type = types.package; + default = self.packages.${nixpkgs.system}.default; + description = "Package to use"; + }; + }; + }; + + # define a systemd service for wishlist ^_^ + config = lib.mkIf cfg.enable { + systemd.services.wishlist = { + description = "Single entrypoint for multiple SSH endpoints"; + wantedBy = ["multi-user.target"]; + + serviceConfig = let + wishlistServiceConfig = pkgs.writeText "config.yaml" '' + hello world! + ''; + in { + DynamicUser = "yes"; + ExecStart = "${pkgs.wishlist}/bin/wishlist serve --config ${wishlistServiceConfig}"; + Restart = "always"; + RestartSec = "2s"; + }; + }; + }; + + /* + packages = flake-utils.lib.eachSystem supportedSystems ( + system: let + version = "0.15.1"; + #pkgs = nixpkgs.legacyPackages.${system}; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = false; + }; + #lib = pkgs.lib; + in rec { + defaultPackage = self.packages.${system}.wishlist; + wishlist = pkgs.buildGoModule { + pname = "wishlist"; + inherit version; + meta = with lib; { + description = "Single entrypoint for multiple SSH endpoints"; + homepage = "https://github.com/charmbracelet/wishlist"; + changelog = "https://github.com/charmbracelet/wishlist/releases/tag/v${version}"; + license = licenses.mit; + maintainers = with maintainers; [caarlos0 penguwin]; + mainProgram = "wishlist"; + }; + + src = pkgs.fetchFromGitHub { + owner = "charmbracelet"; + repo = "wishlist"; + rev = "v${version}"; + # rev = "d7f058e115a8b4a4131406d01dde84fb4a8e93c4"; + hash = "53fojA+gdvpSVNjx6QncH16F8/x+lpY5SkNs7obW2XQ="; + }; + vendorSha256 = "0x6rss3fwv2398wrd5kyzkrqaphzvh4ykwfqai9glxm01y6fhxz7"; + }; + } + ); + */ +} diff --git a/groups/all/default.nix b/groups/all/default.nix deleted file mode 100644 index 0ba6d11..0000000 --- a/groups/all/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - imports = [ - ./modules/flatpak.nix - ]; - - security.sudo-rs = { - enable = true; - wheelNeedsPassword = lib.mkOverride 200 true; - }; - - networking = { - networkmanager.enable = true; - - nftables.enable = true; - firewall = { - enable = lib.mkDefault true; - allowPing = lib.mkDefault true; - }; - - # Use CloudFlare's WARP+ 1.1.1.1 DNS service - nameservers = [ - "1.1.1.1" - "1.0.0.1" - ]; - }; - - programs.nh = { - enable = true; - clean.enable = true; - clean.extraArgs = "--keep-since 7d --keep 3"; - # TODO: move nh config to be home-manager - flake = "/home/me/flake"; # sets NH_OS_FLAKE variable for you - }; - - nix.settings = { - # make wheel group trusted users allows my "ae" user - # to import packages not signed by a trusted key - # (aka super duper easier to remote deploy) - trusted-users = ["root" "@wheel"]; - experimental-features = [ - "nix-command" - "flakes" - "pipe-operators" - ]; - download-buffer-size = 524288000; # 500 MiB - }; - - time.timeZone = lib.mkDefault "Australia/Brisbane"; - - i18n.defaultLocale = lib.mkDefault "en_US.UTF-8"; - console = { - font = "Lat2-Terminus16"; - keyMap = "us"; - }; - - users.defaultUserShell = pkgs.bash; - - environment.systemPackages = with pkgs; [ - git - vim - wget - tree - ]; -} diff --git a/groups/all/modules/flatpak.nix b/groups/all/modules/flatpak.nix deleted file mode 100644 index fbc2b38..0000000 --- a/groups/all/modules/flatpak.nix +++ /dev/null @@ -1,12 +0,0 @@ -{...}: { - services.flatpak = { - # DEBUG: remotes = [ - # DEBUG: { - # DEBUG: location = "https://dl.flathub.org/repo/flathub.flatpakrepo"; - # DEBUG: name = "flathub"; - # DEBUG: } - # DEBUG: ]; - - # DEBUG: uninstallUnmanaged = true; - }; -} diff --git a/groups/cryde/default.nix b/groups/cryde/default.nix deleted file mode 100644 index 9ac0450..0000000 --- a/groups/cryde/default.nix +++ /dev/null @@ -1,127 +0,0 @@ -{ - inputs, - pkgs, - lib, - config, - ... -}: { - imports = [ - ./programs.nix - - ../../hosts/modules/bashistrans.nix - ../../hosts/modules/wm/hyprland.nix - ../../hosts/modules/gaming/steam.nix - ../../hosts/modules/obsidian.nix - ]; - - boot.loader.grub2-theme = { - enable = true; - # GitHub: vinceliuice/grub2-themes - theme = "whitesur"; # stylish, vimix, or whitesur - footer = true; - customResolution = "1920x1080"; - }; - - services = { - # Set display manager (login screen) - displayManager = { - # sddm relies on pkgs.libsForQt5.qt5.qtgraphicaleffects - sddm = { - enable = true; - wayland.enable = ! config.services.xserver.enable; # experimental - # theme = lib.mkForce "silent"; - }; - - # defaultSession = "mango"; # DEBUG - defaultSession = - if config.programs.hyprland.withUWSM == true - then "hyprland-uwsm" - else "hyprland"; - }; - - tumbler.enable = true; # Thunar image thumbnail support - gvfs.enable = true; # Thunar mount, trash, and other functionality - }; - - home-manager.sharedModules = [ - inputs.mango.hmModules.mango - ]; - - programs = { - zsh.enable = true; - fish.enable = true; - - nix-ld.enable = true; - - mango.enable = true; - - # silentSDDM = { - # enable = true; - # theme = "rei"; - # }; - - # Thunar also uses: `services.tumbler` & `services.gvfs` - thunar = { - enable = true; - plugins = with pkgs.xfce; [ - thunar-volman # for removable drives (ie USBs) - thunar-archive-plugin # create and extract archives - thunar-media-tags-plugin # change metadata for media files - ]; - }; - - # mozilla's email client - thunderbird.enable = true; - }; - - # ----- FONTS ----- - fonts = { - enableDefaultPackages = true; # no clue what this line does tbh - packages = with pkgs; - [ - geist-font # for my hyprlock theme - # texlive maintains a noto-emoji flake - texlivePackages.noto-emoji - ] - ++ builtins.filter lib.attrsets.isDerivation ( - builtins.attrValues pkgs.nerd-fonts - ); - - # TODO: change my default fonts - fontconfig = { - defaultFonts = { - serif = ["Geist"]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font - sansSerif = ["Geist"]; - monospace = ["Cousine"]; - emoji = ["Noto Emoji"]; - }; - }; - }; - - # ---- ENVIRONMENT VARIABLES ---- - environment = { - sessionVariables = { - # Hint Electrons apps to use Wayland - NIXOS_OZONE_WL = "1"; - }; - # systemPackages = with pkgs; [ - # sddm-theme-corners - # ]; - }; - - # ------- USERS ------- - users = { - users = { - # literally me fr (personal account) - me = { - isNormalUser = true; - extraGroups = ["wheel" "netdev" "docker"]; - shell = pkgs.bash; - packages = with pkgs; [ - firefox - gitkraken - ]; - }; - }; - }; -} diff --git a/groups/cryde/programs.nix b/groups/cryde/programs.nix deleted file mode 100644 index 4505a42..0000000 --- a/groups/cryde/programs.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - pkgs, - upkgs, - ... -}: { - # ---- SYSTEM PACKAGES ----- - environment.systemPackages = with pkgs; [ - # User Environment - awww # swww - helvum - easyeffects - pavucontrol - ani-cli - bluetui - wl-clipboard # clipboard for wayland - hyprpicker # color picker - hyprshot # screenshot utility - wl-screenrec # screen recording utility - qbittorrent # torrenting - signal-desktop - kdePackages.gwenview # image viewer - video-trimmer - element-desktop - vlc - - # Games - upkgs.olympus # celeste - upkgs.ekphos - - prismlauncher # minecraft - libxtst # used for MCSR modpack - ]; -} diff --git a/groups/cryos/default.nix b/groups/cryos/default.nix deleted file mode 100644 index dd4af16..0000000 --- a/groups/cryos/default.nix +++ /dev/null @@ -1,131 +0,0 @@ -{...}: { - imports = [ - ./programs.nix - ./keybinds.nix - ]; - - boot.loader = { - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - grub = { - efiSupport = true; - device = "nodev"; - # useOSProber = true; - }; - }; - - # Enable initrd hook for virtual console customisation - # aka cool colours when bootting yay!! - console = { - enable = true; - earlySetup = true; # initrd pre hook - keyMap = "us"; - font = "Lat2-Terminus16"; - # ANSI 24-bit color definitions (theme: dracula) - colors = [ - "21222c" - "ff5555" - "50fa7b" - "f1fa8c" - "bd93f9" - "ff79c6" - "8be9fd" - "f8f8f2" - "6272a4" - "ff6e6e" - "69ff94" - "ffffa5" - "d6acff" - "ff92df" - "a4ffff" - "ffffff" - ]; - }; - - hardware = { - graphics = { - enable = true; - enable32Bit = true; - }; - - bluetooth = { - enable = true; - powerOnBoot = true; - }; - }; - - virtualisation.docker.enable = true; - - services = { - # systemd-resolved provides network name resolution - # to local processes via a D-Bus interface. - resolved = { - enable = true; - dnssec = "true"; - domains = ["~."]; - # Use CloudFlare's WARP+ 1.1.1.1 DNS service - fallbackDns = [ - "1.1.1.1#one.one.one.one" - "1.0.0.1#one.one.one.one" - ]; - dnsovertls = "true"; - }; - - # Multimedia Framework - # With backwards compatability for alsa/pulseaudio/jack - pipewire = { - enable = true; - audio.enable = true; - wireplumber.enable = true; - - alsa.enable = true; - alsa.support32Bit = true; - # pulse.enable = true; - # jack.enable = true; - - # disable X11 bell module, which plays a sound on urgency hint - extraConfig = { - pipewire."99-silent-bell.conf" = { - "context.properties" = { - "module.x11.bell" = false; - }; - }; - }; - }; - }; - - # allows pipewire to use the realtime scheduler for increased performance - security.rtkit.enable = true; - - # ---- ENVIRONMENT VARIABLES ---- - environment = { - # always install "dev" derivation outputs - extraOutputsToInstall = ["dev" "man"]; - - sessionVariables = { - # folder names with capitalisation look awful! - XDG_DOWNLOAD_DIR = "$HOME/downloads"; - XDG_CONFIG_HOME = "$HOME/.config"; - }; - }; - - documentation = { - enable = true; - doc.enable = true; # install /share/doc packages - man = { - enable = true; # install manpages - - # https://discourse.nixos.org/t/slow-build-at-building-man-cache/52365/4 - generateCaches = false; - }; - info.enable = true; # install GNU info - dev.enable = true; # install docs intended for developers - nixos = { - enable = true; # install NixOS documentation (ie man -k nix, & nixos-help) - options.splitBuild = true; - includeAllModules = false; - }; - }; -} diff --git a/groups/cryos/keybinds.nix b/groups/cryos/keybinds.nix deleted file mode 100644 index 25a3f19..0000000 --- a/groups/cryos/keybinds.nix +++ /dev/null @@ -1,19 +0,0 @@ -{...}: { - services.keyd = { - enable = true; - keyboards.default = { - ids = ["*"]; - settings = { - main = { - capslock = "meta"; - - # NOTE: unsure whether or not i like oneshot... - # shift = "oneshot(shift)"; - # control = "oneshot(control)"; - # leftalt = "oneshot(alt)"; - # rightalt = "oneshot(rightalt)"; - }; - }; - }; - }; -} diff --git a/groups/cryos/programs.nix b/groups/cryos/programs.nix deleted file mode 100644 index 9d7eaa7..0000000 --- a/groups/cryos/programs.nix +++ /dev/null @@ -1,125 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - # Shell - bash - fish - shellcheck - grc # colorise command outputs - moreutils - - # Systems Emulation - qemu # Fellice Bellard's Quick Emulator - # Binaries - binutils - strace - ltrace - perf-tools # ftrace + perf - radare2 - gdb - hexyl - # ASM - nasm - x86-manpages - # C Family - gcc - clang - clang-tools - gnumake - cmake - - # Rust - cargo - rustc - rustfmt - # Go - go - # Nim - nim - nimble - # Haskell - ghc - ghcid - ormolu - - # Nix - nix-prefetch-git - nix-index - nix-unit - ns # nix-search-tv overlay - - # Python - python312 # I use 3.12 since it's in a pretty stable state now - python314 # also 3.14 for latest features - poetry - # Sage - sageWithDoc # SageMath + HTML Documentation - - # .NET - dotnetCorePackages.dotnet_9.sdk - dotnetCorePackages.dotnet_9.aspnetcore - dotnetCorePackages.dotnet_9.runtime - - openvpn - inetutils - wireguard-tools - - # security tools - rustscan - nmap - dig - gobuster - nth - zap - - httpie - curlie - zoxide - doggo - tlrc - btop - eza - yazi - exiftool # for yazi - ripgrep - viddy # modern `watch` command - timg # terminal image (sixel) viewer - wormhole-rs - - # Pretty necessary - git - git-filter-repo - brightnessctl - acpi - # upower - vim - powertop - imagemagick - ffmpeg - usbutils - - # "Standard" Unix Commands - file - wget - tree - pstree - zip - unzip - unrar-free - lz4 - man-pages - man-pages-posix - - # Cryptography - openssl - libargon2 - ]; - - services.pcscd.enable = true; - programs = { - gnupg.agent = { - enable = true; - # pinentryPackage = pkgs.pinentry-curses; - enableSSHSupport = true; - }; - }; -} diff --git a/groups/server/default.nix b/groups/server/default.nix deleted file mode 100644 index 20da14e..0000000 --- a/groups/server/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - networking = { - firewall = { - allowedTCPPorts = [ - 42069 # ssh - ]; - }; - nftables.enable = true; - }; - - security = { - # accept Lets Encrypt's security policy - acme = { - acceptTerms = true; - defaults.email = "them@dobutterfliescry.net"; - }; - - # allow SSH keys for passwordless auth - pam = { - sshAgentAuth.enable = true; - services.sudo.sshAgentAuth = true; # pam_ssh_agent_auth module - }; - }; - - services = { - openssh = { - enable = true; - ports = [42069]; - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; - AllowUsers = ["cry"]; # DO NOT ALLOW ALL - UseDns = true; - X11Forwarding = false; - }; - }; - }; - - # simple fail2ban config (not production ready or anything though) - # refer to: https://nixos.wiki/wiki/Fail2Ban - services.fail2ban = { - enable = true; - - ignoreIP = ["192.168.0.0/16"]; - maxretry = 5; - bantime = "10m"; # 10 minute ban - bantime-increment = { - enable = true; - formula = "ban.Time * math.exp(float(ban.Count+1)*banFactor)/math.exp(1*banFactor)"; - # multipliers = "1 2 4 8 16 32 64"; - maxtime = "168h"; # dont ban for more than 1 week - overalljails = true; - }; - }; - - users = { - users = { - # primary user - cry = { - isNormalUser = true; - createHome = true; - home = "/home/cry"; - extraGroups = ["wheel"]; - openssh.authorizedKeys.keys = lib.mkDefault [ - (throw '' - You goofy goober :3 - Hosts in the `server` group must set `users.users.cry.openssh.authorizedKeys.keys = [ ... ]`. - '') - ]; - }; - }; - }; - - environment.systemPackages = with pkgs; [ - unixtools.netstat - ]; -} diff --git a/homes/ae/default.nix b/homes/ae/default.nix new file mode 100644 index 0000000..b92f739 --- /dev/null +++ b/homes/ae/default.nix @@ -0,0 +1,56 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + nixpkgs = { + config.allowUnfree = false; + }; + + imports = [ + ]; + + home = { + username = "ae"; + homeDirectory = "/home/ae"; + }; + + programs = { + }; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + + # ssh = { + # enable = true; + # forwardAgent = true; + # addKeysToAgent = "yes"; + + # matchBlocks = { + # hyrule = { + # hostname = "imbored.dev"; + # user = "ae"; + # port = 22; + # identityFile = "/home/ae/.ssh/id_hyrule"; + # }; + # }; + # }; + + # SERVICE: webfishing (example for wishlist) + #systemd.user.services.webfishing = { + # Unit.Description = "I be out here webfishing frfr"; + + # Install.WantedBy = ["default.target"]; + + # Service = { + # Type = "exec"; + # ExecStart = "echo $HOME; cat $HOME/.ssh/config"; + # Restart = "always"; + # }; + #}; + + home.stateVersion = "24.11"; # DO NOT MODIFY +} diff --git a/homes/cry/default.nix b/homes/cry/default.nix deleted file mode 100644 index 2403b1d..0000000 --- a/homes/cry/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{...}: { - imports = [ - ../modules/fish.nix - ../modules/bat.nix - ../modules/btop.nix - ]; - - home = { - username = "cry"; - homeDirectory = "/home/cry"; - }; - - # Nicely reload system units when changing configs - systemd.user.startServices = "sd-switch"; - - home.stateVersion = "24.11"; # DO NOT MODIFY -} diff --git a/homes/me/default.nix b/homes/me/default.nix index b800d70..b858211 100755 --- a/homes/me/default.nix +++ b/homes/me/default.nix @@ -1,51 +1,52 @@ -{pkgs, ...}: { +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + nixpkgs = { + config.allowUnfree = true; + }; + imports = [ - ./modules/cli/git.nix - ./modules/cli/ssh.nix - - ../modules/term/foot.nix - ../modules/shell/zsh.nix - ../modules/shell/zsh.nix - ../modules/shell/fish.nix - ../modules/shell/elvish.nix + ../modules/git.nix + ../modules/bat.nix + ../modules/fish.nix ../modules/editor/helix.nix - ../modules/editor/neovim - ../modules/cli/bat.nix - ../modules/cli/btop.nix - ../modules/cli/hyfetch.nix - ../modules/cli/tmux.nix + ../modules/btop.nix + ../modules/rio.nix + ../modules/firefox.nix + ../modules/nixcord.nix - ../modules/apps/firefox.nix - ../modules/apps/zen-browser.nix - ../modules/apps/thunderbird.nix - ../modules/apps/nixcord.nix - ../modules/apps/spicetify.nix - - ../modules/wm/hyprland - ../modules/wm/mango - ../modules/de/mako.nix - ../modules/de/waybar + #../modules/hypr/hypridle.nix + #../modules/hypr/hyprlock.nix + ../modules/kanshi.nix + ../modules/ags ]; - programs.elvish.enable = true; + /* + programs.spicetify = + let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in + { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + shuffle # shuffle+ (special characters are sanitized out of extension names) + ]; + theme = spicePkgs.themes.catppuccin; + colorScheme = "mocha"; + }; + */ home = { - shellAliases = { - # nix - nd = "nix develop"; - ntv = "nix-search-tv"; - rebuild = "nh os switch ~/flake"; - trybuild = "nh os test ~/flake"; - - # shell utilities - ls = "eza --color=auto"; - l = "eza -Alh --color=auto --icons=auto"; - ll = "eza -lh --color=auto --icons=auto"; - li = "eza --color=auto --git-ignore"; - rgf = "rg --files | rg"; - watch = "viddy"; - }; + username = "me"; + homeDirectory = "/home/me"; pointerCursor = { gtk.enable = true; @@ -54,18 +55,6 @@ name = "Bibata-Modern-Ice"; size = 16; }; - - packages = with pkgs; [ - # for services.gnome-keyring - gcr # provides org.gnome.keyring.SystemPrompter - seahorse # gui - - krita - tor-browser - - fuzzel - speedtest-cli - ]; }; gtk = { @@ -82,21 +71,99 @@ # TODO: use a variable to mirror this cursor size # with the `home.pointerCurser.size` cursorTheme = { + # dont set the theme (use system default instead) + # only set size to match the system package = pkgs.bibata-cursors; name = "Bibata-Modern-Ice"; size = 16; }; }; + # TODO: this lowkey doesnt work... (maybe the name "Dracula" is wrong?) qt = { enable = true; platformTheme.name = "gtk2"; style.name = "gtk2"; }; - services = { - gnome-keyring.enable = true; + programs = { + # these are both required for home-manager to work + home-manager.enable = true; + + # DEBUG: testing if my xdg-desktop-portal-hyprland is working or not + obs-studio = { + enable = true; + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-backgroundremoval + obs-pipewire-audio-capture + ]; + }; + + # set ssh profiles + # (all we need is hyrule, everything else is through wishlist) + # NOTE: (IMPORTANT) this DOES NOT start the ssh-agent + # for that you need to use `services.ssh-agent.enable` + ssh = { + enable = true; + forwardAgent = true; + addKeysToAgent = "yes"; # always add keys to ssh-agent + + matchBlocks = { + hyrule = { + hostname = "imbored.dev"; + user = "ae"; + port = 22; + identityFile = "~/.ssh/id_hyrule"; + }; + subspace = { + hostname = "imbored.dev"; + user = "subspace"; + port = 22; + identityFile = "~/.ssh/id_subspace"; + }; + }; + }; + + # I want to use fish as my login shell but it always + # goes terrible cause it isn't POSIX compliant, so + # instead Bash is my login and it will just exec fish + #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 ${pkgs.fish}/bin/fish $LOGIN_OPTION + # fi + # ''; + #}; + + /* + spicetify = + let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in + { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + #shuffle + ]; + theme = spicePkgs.themes.catppuccin; + colorScheme = "mocha"; + }; + */ }; + # enable OpenSSH private key agent + services.ssh-agent.enable = true; + # the ssh-agent won't set this for itself... + systemd.user.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/ssh-agent"; + #home.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/ssh-agent"; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + home.stateVersion = "24.05"; # don't change this } diff --git a/homes/me/modules/cli/git.nix b/homes/me/modules/cli/git.nix deleted file mode 100755 index c0c60a5..0000000 --- a/homes/me/modules/cli/git.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ - config, - pkgs, - ... -}: { - home.packages = with pkgs; [ - delta # git diff viewer - ]; - - programs = { - git = { - enable = true; - lfs.enable = true; - - signing = { - key = "F68745A836CA0412"; - format = "openpgp"; - signByDefault = true; - }; - - settings = { - user.name = "_cry64"; - user.email = "them@dobutterfliescry.net"; - - alias = { - s = "status"; - d = "diff"; - l = "log"; - c = "commit"; - p = "push"; - }; - - color.ui = true; - core.editor = "hx"; - github.user = "cry128"; - - # delta diff viewer - core.pager = "delta"; - interactive.diffFilter = "delta --color-only"; - delta = { - navigate = true; - line-numbers = true; - side-by-side = true; - }; - merge.conflictStyle = "zdiff3"; - - init = { - defaultBranch = "main"; - }; - url = { - "git@github.com:" = { - insteadOf = [ - "gh:" - "github:" - ]; - }; - "https://gitlab.com/" = { - insteadOf = [ - "gl:" - "gitlab:" - ]; - }; - "git@codeberg.org:" = { - insteadOf = [ - "cb:" - "codeberg:" - ]; - }; - "git@tearforge.net/" = { - insteadOf = [ - "cry:" - "forge:" - ]; - }; - }; - }; - - includes = [ - { - path = "/home/me/agribit/.gitconfig"; - condition = "gitdir:/home/me/agribit/**"; - } - # { - # path = "/home/me/luminary/.gitconfig"; - # condition = "gitdir:/home/me/luminary/**"; - # } - ]; - }; - - lazygit = { - enable = true; - enableFishIntegration = true; - enableZshIntegration = true; - - shellWrapperName = "lg"; - - settings = { - gui = { - useHunkModeInStagingView = false; - - skipDiscardChangeWarning = false; - skipStashWarning = true; - - animateExplosion = true; # FUCK YEAHHHHHHHHHHHHHHHHHHHHHHHHH - - theme = { - lightTheme = false; - activeBorderColor = ["green" "bold"]; - inactiveBorderColor = ["white"]; - selectedLineBgColor = ["default"]; - }; - }; - - git.pagers = [ - { - pager = "delta --dark --pager=never"; - } - ]; - }; - }; - }; -} diff --git a/homes/me/modules/cli/ssh.nix b/homes/me/modules/cli/ssh.nix deleted file mode 100644 index 34247c8..0000000 --- a/homes/me/modules/cli/ssh.nix +++ /dev/null @@ -1,46 +0,0 @@ -{...}: { - # set ssh profiles - # WARNING: this DOES NOT start the ssh-agent - # WARNING: for that you need to use `services.ssh-agent.enable` - programs.ssh = { - enable = true; - forwardAgent = false; - addKeysToAgent = "yes"; - - matchBlocks = { - butterfly = { - hostname = "dobutterfliescry.net"; - user = "cry"; - port = 42069; - identityFile = "~/keys/butterfly"; - setEnv = { - TERM = "xterm-256color"; - }; - }; - hyrule = { - hostname = "hyrule.dobutterfliescry.net"; - user = "cry"; - port = 42069; - identityFile = "~/keys/hyrule"; - setEnv = { - TERM = "xterm-256color"; - }; - }; - matcha = { - hostname = "192.168.88.250"; - user = "cry"; - port = 22; - identityFile = "~/keys/matcha"; - }; - youcue = { - hostname = "moss.labs.eait.uq.edu.au"; - user = "s4740056"; - port = 22; - identityFile = "~/keys/other/youcue"; - setEnv = { - TERM = "xterm-256color"; - }; - }; - }; - }; -} diff --git a/homes/modules/ags/config.js b/homes/modules/ags/config.js new file mode 100755 index 0000000..904ba9e --- /dev/null +++ b/homes/modules/ags/config.js @@ -0,0 +1,26 @@ +import { AppLauncher } from "./widgets/applauncher.js" +import { Notifications } from "./widgets/notifications.js" + +const date = Variable('', { + poll: [1000, 'date'], +}) + +const Bar = (monitor = 0) => Widget.Window({ + monitor, + name: 'bar${monitor}', + anchor: ['top', 'left', 'right'], + child: Widget.Label({ label: date.bind() }), + }) + +App.config({ + style: "./style.css", + // icons: "./assets", + windows: [ + Bar(), + AppLauncher, + Notifications() + ] + // gtkTheme: "Adwaita-dark", + // cursorTheme: "Qogir", + // iconTheme: "MoreWaita",[] +}) diff --git a/homes/modules/ags/default.nix b/homes/modules/ags/default.nix new file mode 100644 index 0000000..448e32e --- /dev/null +++ b/homes/modules/ags/default.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: { + programs.ags = { + enable = true; + configDir = ./.; + + extraPackages = with pkgs; [ + gtksourceview + webkitgtk + accountsservice + ]; + }; +} diff --git a/homes/modules/ags/style.css b/homes/modules/ags/style.css new file mode 100755 index 0000000..e69de29 diff --git a/homes/modules/ags/widgets/applauncher.js b/homes/modules/ags/widgets/applauncher.js new file mode 100755 index 0000000..d94244a --- /dev/null +++ b/homes/modules/ags/widgets/applauncher.js @@ -0,0 +1,125 @@ +const { query } = await Service.import("applications"); +const WINDOW_NAME = "applauncher"; + +const AppItem = app => Widget.Button({ + on_clicked: () => { + App.closeWindow(WINDOW_NAME) + app.launch() + }, + attribute: { app }, + child: Widget.Box({ + children: [ + Widget.Icon({ + icon: app.icon_name || "", + size: 42, + }), + Widget.Label({ + class_name: "title", + label: app.name, + xalign: 0, + vpack: "center", + truncate: "end", + css: "margin-left: 10px;" + }), + ], + }), +}) + +const AppLauncherWidget = ({ width = 500, height = 500, spacing = 12 }) => { + let applications = query("").map(AppItem) + + const list = Widget.Box({ + vertical: true, + children: applications, + spacing, + }) + + function refresh() { + applications = query("").map(AppItem) + list.children = applications + } + + const entry = Widget.Entry({ + placeholder_text: "Search", + hexpand: true, + css: "min-height: 50px;", + + // launch first item when Enter is pressed + on_accept: () => { + // only consider applications that are visible in the list + const results = applications.filter((item) => item.visible); + if (results[0]) { + App.toggleWindow(WINDOW_NAME); + results[0].attribute.app.launch() + } + }, + + // filter the applications based on search term + on_change: ({ text }) => applications.forEach(item => { + item.visible = item.attribute.app.match(text ?? "") + }), + }) + + return Widget.Box({ + vertical: false, + children: [ + // LEFT + Widget.Box({ + vertical: true, + css: `min-width: ${width}px;` + + `min-height: ${height}px;` + + "background-image: url('https://images2.alphacoders.com/135/1351579.png');" + + "background-size: cover;" + + "background-position: center;" + + "background-repeat: no-repeat;", + children: [ + // align the entry field with the app list + Widget.Box({ + css: `margin: ${spacing * 2}px;`, + child: entry, + }), + ], + }), + + // RIGHT + Widget.Box({ + vertical: true, + css: `margin: ${spacing * 2}px;`, + child: + // make scrollable + Widget.Scrollable({ + hscroll: "never", + css: `min-width: ${width}px; min-height: ${height}px;`, + child: list, + }), + + setup: self => self.hook(App, (_, windowName, visible) => { + if (windowName !== WINDOW_NAME) + return + + // when the launcher becomes visible + if (visible) { + refresh() + entry.text = "" + entry.grab_focus() + } + }), + }), + ], + }) +} + +// the app launcher should be a singleton +export const AppLauncher = Widget.Window({ + name: WINDOW_NAME, + setup: self => self.keybind("Escape", () => { + App.closeWindow(WINDOW_NAME) + }), + visible: false, + keymode: "exclusive", + child: AppLauncherWidget({ + width: 500, + height: 500, + spacing: 12, + }), +}) diff --git a/homes/modules/ags/widgets/bar.ts b/homes/modules/ags/widgets/bar.ts new file mode 100755 index 0000000..8f361ac --- /dev/null +++ b/homes/modules/ags/widgets/bar.ts @@ -0,0 +1,38 @@ +import options from "options"p + +const { start, center, end } = options.bar.layout + +// place all your bar widgets in here +const widgets = { + expander: () => Widget.Box({ expand: true}), +} + + +//export type BarWidget = keyof typeof widget; + +export default (monitor: number) => Widget.Window({ + monitor, + class_name: "bar", + name: "bar-${monitor}", + // anchor: position.bind().as(pos => [pos, "left", "right"]), + anchor: ["top", "left", "right"], + child: Widget.CenterBox({ + // ensure bar is shown + css: "min-width: 2px; min-height: 2px;" + startWidget: Widget.Box({ + hexpand: true, + // map all start widgets to be childen + childen: start.bind().as(s => s.map(w => widgets[w]())) + }), + centerWidget: Widget.Box({ + hpack: "center", + // map all center widgets to be childen + childen: center.bind().as(c => c.map(w => widgets[w]())) + }), + endWidget: Widget.Box({ + hexpand: true + // map all end widgets to be childen + childen: end.bind().as(e => e.map(w => widgets[w]())) + }), + }) +}) diff --git a/homes/modules/ags/widgets/fullscreen.js b/homes/modules/ags/widgets/fullscreen.js new file mode 100755 index 0000000..a6c60f0 --- /dev/null +++ b/homes/modules/ags/widgets/fullscreen.js @@ -0,0 +1,23 @@ +const WINDOW_NAME = "fullscreen"; + +const Fullscreen = (children) => Widget.Box({ + vertical: true, + css: "background-image: url('https://images2.alphacoders.com/135/1351579.png');" + + "background-size: cover;" + + "background-position: center;" + + "background-repeat: no-repeat;", + children: children, +}) + +export const fullscreen = Widget.Window({ + name: WINDOW_NAME, + setup: self => self.keybind("Escape", () => { + App.closeWindow(WINDOW_NAME) + }), + anchor: ["top", "bottom", "left", "right"], + visible: false, + keymode: "exclusive", + child: Fullscreen( + Widget.Label({"Hello World"}); + ) +}) diff --git a/homes/modules/ags/widgets/notifications.js b/homes/modules/ags/widgets/notifications.js new file mode 100644 index 0000000..3af9fcf --- /dev/null +++ b/homes/modules/ags/widgets/notifications.js @@ -0,0 +1,122 @@ +const notifications = await Service.import("notifications"); + +function NotificationIcon({ app_entry, app_icon, image}) { + if (image) { + return Widget.Box({ + css: `background-image: url("${image}");` + + "background-size: contain;" + + "background-repeat: no-repeat;" + + "background-position: center;" + }) + } + + let icon = "dialog-information-symbolic" + if (Utils.lookUpIcon(app_icon)) + icon = app_icon + + if (app_entry && Utils.lookUpIcon(app_entry)) + icon = app_entry + + return Widget.Box({ + child: Widget.Icon(icon), + }) +} + + +function Notification(n) { + const icon = Widget.Box({ + vpack: "start", + class_name: "icon", + child: NotificationIcon(n), + }) + + const title = Widget.Label({ + class_name: "title", + xalign: 0, + justification: "left", + hexpand: true, + max_width_chars: 24, + truncate: "end", + wrap: true, + label: n.summary, + use_markup: true, + }) + + const body = Widget.Label({ + class_name: "body", + hexpand: true, + use_markup: true, + xalign: 0, + justification: "left", + label: n.body, + wrap: true, + }) + + const actions = Widget.Box({ + class_name: "actions", + children: n.actions.map(({ id, label}) => Widget.Button({ + class_name: "action-button", + on_clicked: () => { + n.invoke(id), + n.dismiss() + }, + hexpand: true, + child: Widget.Label(label), + })), + }) + + return Widget.EventBox( + { + attribute: {id: n.id}, + on_primary_click: n.dismiss, + }, + Widget.Box( + { + class_name: `notification ${n.urgency}`, + vertical: true, + }, + Widget.Box([ + icon, + Widget.Box( + { vertical: true }, + title, + body, + ), + ]), + actions, + ), + ) +} + +export function Notifications(monitor = 0) { + const list = Widget.Box({ + vertical: true, + children: notifications.popups.map(Notification), + }) + + function onNotified(_, id) { + const n = notifications.getNotification(id) + if (n) + list.children = [Notification(n), ...list.children] + } + + function onDismissed(_, id) { + list.children.find(n => n.attribute.id === id)?.destroy() + } + + list.hook(notifications, onNotified, "notified") + .hook(notifications, onDismissed, "dismissed") + + return Widget.Window({ + monitor, + class_name: "notifications-widget", + name: `notifications-${monitor}`, + anchor: ["top", "left"], + child: Widget.Box({ + css: "min-width: 2px; min-height: 2px;", + class_name: "notifications", + vertical: true, + child: list, + }), + }) +} diff --git a/homes/modules/apps/nixcord.nix b/homes/modules/apps/nixcord.nix deleted file mode 100644 index 2913e85..0000000 --- a/homes/modules/apps/nixcord.nix +++ /dev/null @@ -1,262 +0,0 @@ -{ - inputs, - pkgs, - ... -}: { - imports = [ - inputs.nixcord.homeModules.nixcord - ]; - - home.packages = with pkgs; [ - discordo - ]; - - programs.nixcord = { - enable = true; - equibop.enable = true; - - discord = { - vencord.enable = false; - equicord.enable = true; - }; - - config = { - enabledThemes = [ - "aurorastheme.css" - "base16-colors.css" - ]; - plugins = { - invisibleChat.enable = true; - anonymiseFileNames = { - enable = true; - anonymiseByDefault = true; - method = 0; - randomisedLength = 16; - }; - betterSessions = { - backgroundCheck = true; - checkInterval = 1; - }; - biggerStreamPreview.enable = true; - callTimer.enable = true; - fixYoutubeEmbeds.enable = true; - fixSpotifyEmbeds.enable = true; - tidalEmbeds.enable = true; - youtubeAdblock.enable = true; - followVoiceUser.enable = true; - friendsSince.enable = true; - ircColors = { - enable = true; - lightness = 80; - memberListColors = true; - applyColorOnlyInDms = false; - applyColorOnlyToUsersWithoutColor = false; - }; - messageLogger = { - enable = true; - showEditDiffs = true; - separatedDiffs = false; - }; - fakeNitro.enable = true; - ghosted.enable = false; - noF1.enable = true; - noMaskedUrlPaste.enable = true; - messageLatency = { - enable = false; - latency = -1; - showMillis = true; - }; - openInApp.enable = true; - crashHandler.enable = true; - disableCallIdle.enable = true; - experiments.enable = true; - expressionCloner.enable = true; - favoriteGifSearch.enable = true; - fixImagesQuality.enable = true; - forceOwnerCrown.enable = true; - forwardAnywhere.enable = true; - spotifyCrack.enable = true; - spotifyShareCommands.enable = true; - fullUserInChatbox.enable = true; - gifPaste.enable = true; - ignoreActivities = { - enable = true; - ignorePlaying = true; - ignoreStreaming = true; - ignoreListening = true; - ignoreWatching = true; - ignoreCompeting = true; - }; - imageLink.enable = true; - imageZoom.enable = true; - memberCount.enable = true; - noDevtoolsWarning.enable = true; - noUnblockToJump.enable = true; - pauseInvitesForever.enable = true; - permissionsViewer.enable = true; - pictureInPicture = { - enable = true; - loop = true; - }; - platformIndicators.enable = true; - previewMessage.enable = true; - relationshipNotifier.enable = true; - revealAllSpoilers.enable = true; - serverInfo.enable = true; - serverListIndicators.enable = true; - musicControls = { - enable = true; - showSpotifyControls = true; - showSpotifyLyrics = true; - }; - showHiddenChannels.enable = true; - showHiddenThings.enable = true; - showTimeoutDuration = { - enable = true; - displayStyle = "tooltip"; - }; - silentTyping = { - enable = true; - enabledGlobally = true; - }; - startupTimings.enable = true; - typingIndicator.enable = true; - unlockedAvatarZoom = { - enable = true; - zoomMultiplier = 4.0; - }; - userMessagesPronouns.enable = true; - validUser.enable = true; - validReply.enable = true; - viewIcons = { - enable = true; - format = "webp"; - imgSize = "4096"; - }; - voiceChatDoubleClick.enable = true; - voiceDownload.enable = true; - voiceMessages = { - enable = true; - noiseSuppression = false; - echoCancellation = true; - }; - volumeBooster.enable = true; - webKeybinds.enable = true; - webScreenShareFixes.enable = true; - whoReacted.enable = true; - whosWatching.enable = true; - quickReply.enable = true; - shikiCodeblocks = { - enable = true; - useDevIcon = "COLOR"; - theme = "https://raw.githubusercontent.com/shikijs/textmate-grammars-themes/2d87559c7601a928b9f7e0f0dda243d2fb6d4499/packages/tm-themes/themes/kanagawa-wave.json"; - }; - }; - }; - }; - - programs.nixcord.config.plugins.PinDMs = { - enable = true; - canCollapseDmSection = true; - # userBasedCategoryList = { - # "1202666382760607774" = [ - # { - # id = "i9dflmraztc"; - # name = "🏳️‍⚧️ girlfriends!!! :3 🏳️‍⚧️"; - # color = 16359423; - # collapsed = false; - # channels = [ - # "1436964273162289185" - # "1436988320474206311" - # "1449837047383855119" - # "1436965652861685891" - # "1436968495190642722" - # "1465424321919975454" - # "1468324280445046824" - # ]; - # } - # { - # id = "p2v1f5y9zbd"; - # name = "🦋 best frens <3 🦋"; - # color = 10223511; - # collapsed = false; - # channels = [ - # "1436985374286155799" - # "1436965657076826222" - # "1429921297160212681" - # "1394808379381387385" - # "1433593753183977545" - # "1438254055452446881" - # "1436966389549236376" - # "1202678007026819134" - # "1437151552224624660" - # "1441906462094921789" - # "1450340272079769712" - # "1458123717124165764" - # "1436975341129306155" - # "1461885176534794427" - # "1462155159470866443" - # "1468735915076878407" - # "1461929299727749145" - # "1470963392121536657" - # ]; - # } - # { - # id = "c0mg5w635j8"; - # name = "🏳️‍🌈 close frens x3 🏳️‍🌈"; - # color = 10780927; - # collapsed = false; - # channels = [ - # "1437077103873888290" - # "1436975346338762823" - # "1437123353101205590" - # "1441516692164575283" - # "1419557866502754334" - # "1436985041203892315" - # "1438071327515742229" - # ]; - # } - # { - # id = "ghjrq5el3b"; - # name = "frens :3"; - # color = 7334399; - # collapsed = false; - # channels = [ - # "1437007154132422701" - # "1437006448948416526" - # "1446781617422209068" - # "1444723474835837103" - # "1437098569483161721" - # "1437237573146771469" - # "1436973705421914123" - # "1437135359359320125" - # "1438010723837022343" - # "1440553969461104740" - # "1437097082887475201" - # "1447222320015085740" - # "1462624704027164824" - # "1449513783893692589" - # "1463737720961634461" - # "1463000874392748249" - # "1436984534712451105" - # "1436983282582683813" - # "1437283420312047659" - # "1437089201651847315" - # "1467307140443148288" - # ]; - # } - # { - # id = "zbmj00xw7d8"; - # name = "goop chats"; - # color = 14876549; - # collapsed = false; - # channels = [ - # "1437132769141719040" - # "1445549416516681902" - # "1458849972815663209" - # ]; - # } - # ]; - # }; - }; -} diff --git a/homes/modules/apps/obs.nix b/homes/modules/apps/obs.nix deleted file mode 100755 index 37db38f..0000000 --- a/homes/modules/apps/obs.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - pkgs, - ... -}: { - programs = { - obs-studio = { - enable = true; - plugins = with pkgs.obs-studio-plugins; [ - wlrobs - obs-backgroundremoval - obs-pipewire-audio-capture - ]; - }; - }; -} diff --git a/homes/modules/apps/spicetify.nix b/homes/modules/apps/spicetify.nix deleted file mode 100644 index 7fa740e..0000000 --- a/homes/modules/apps/spicetify.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ - inputs, - upkgs, - system, - ... -}: let - spicetifyPkgs = inputs.spicetify-nix.legacyPackages.${system}; -in { - imports = [inputs.spicetify-nix.homeManagerModules.default]; - programs.spicetify = { - enable = true; - - enabledExtensions = with spicetifyPkgs.extensions; [ - adblock - shuffle - keyboardShortcut - { - src = - (upkgs.fetchFromGitHub { - owner = "Spikerko"; - repo = "spicy-lyrics"; - rev = "568c83326aa6aba6ded28c95df6fcfb25cab3648"; - hash = "sha256-lej93EDzGkmyrg5YMdPSqzrxlIfKsfaDBZosTvxoTNw="; - }) - + /builds; - name = "spicy-lyrics.mjs"; - } - ]; - theme = spicetifyPkgs.themes.comfy; - colorScheme = "Sakura"; - }; -} diff --git a/homes/modules/apps/thunderbird.nix b/homes/modules/apps/thunderbird.nix deleted file mode 100644 index dd4f861..0000000 --- a/homes/modules/apps/thunderbird.nix +++ /dev/null @@ -1,10 +0,0 @@ -{...}: { - programs.thunderbird = { - enable = true; - profiles = { - "me" = { - isDefault = true; - }; - }; - }; -} diff --git a/homes/modules/apps/zen-browser.nix b/homes/modules/apps/zen-browser.nix deleted file mode 100644 index dee6846..0000000 --- a/homes/modules/apps/zen-browser.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ - inputs, - system, - ... -}: let - inherit (inputs) zen-browser; -in { - imports = [ - zen-browser.homeModules.twilight - ]; - - programs.zen-browser = { - enable = true; - package = zen-browser.packages.${system}.twilight; - # suppressXdgMigrationWarning = true; - }; -} diff --git a/homes/modules/bat.nix b/homes/modules/bat.nix new file mode 100755 index 0000000..f29f49b --- /dev/null +++ b/homes/modules/bat.nix @@ -0,0 +1,15 @@ +{ + config, + pkgs, + ... +}: { + # like `/bin/cat` but with syntax highlighting + # TODO: change the pager (maybe use Github:sachaos/viddy instead) + programs.bat = { + enable = true; + config = { + pager = "less -FR"; + theme = "Dracula"; + }; + }; +} diff --git a/homes/modules/cli/btop.nix b/homes/modules/btop.nix similarity index 99% rename from homes/modules/cli/btop.nix rename to homes/modules/btop.nix index 765ccea..119da4f 100644 --- a/homes/modules/cli/btop.nix +++ b/homes/modules/btop.nix @@ -16,7 +16,7 @@ # UI background_update = true; - update_ms = 100; + update_ms = 2000; rounded_corners = false; graph_symbol = "braille"; # braille/block/tty graph_symbol_cpu = "default"; diff --git a/homes/modules/cli/bat.nix b/homes/modules/cli/bat.nix deleted file mode 100755 index 70268f5..0000000 --- a/homes/modules/cli/bat.nix +++ /dev/null @@ -1,109 +0,0 @@ -let - # Module Meta Configuration - setShellAliases = true; - supportBash = true; - supportZsh = true; - supportFish = true; -in - { - osConfig, - config, - pkgs, - lib, - username, - ... - }: let - inherit - (builtins) - elemAt - ; - - inherit - (lib) - flip - mkIf - optional - splitString - ; - - cfg = config.programs.bat; - - # NOTE: `.pname` can be used instead of `.meta.mainProgram` - # NOTE: but then `pkgs.bash` would return `"bash-interactive"` which is annoying... - shellPkg = osConfig.users.users.${username}.shell; - shell = shellPkg.meta.mainProgram; - - pager = - cfg.config.pager - |> splitString " " - |> flip elemAt 0; - in { - programs.bat = { - enable = true; - config = { - # WARNING: pager must be set for this module to function - # NOTE: not sure whether to use ov/moor/viddy as my pager? - pager = "less -FR"; - # theme = "Dracula"; - }; - }; - - home = { - shellAliases = mkIf setShellAliases { - bat = "prettybat"; - cat = "prettybat"; - diff = "batdiff"; - brg = "batgrep"; - man = "batman"; - # watch = "batwatch"; # NOTE: using viddy instead atm - }; - - sessionVariables = { - PAGER = pager; - - # REF: https://github.com/eth-p/bat-extras/blob/master/doc/batpipe.md - BATPIPE_ENABLE_COLOR = "true"; - BATPIPE_INSIDE_LESS = "true"; - BATPIPE_TERM_WIDTH = "-"; # hyphone -> auto detect - }; - - packages = with pkgs.bat-extras; - [ - batdiff - batgrep - batman - batpipe - batwatch - prettybat - ] - ++ (with pkgs; [ - bat - entr # required by pkgs.bat-extras.batwatch - ripgrep # required by pkgs.bat-extras.batgrep - delta # required by pkgs.bat-extras.batdiff - ]) - ++ optional (pkgs?${pager}) pkgs.${pager}; - }; - - # Configure the user's shell to source batpipe - # WARNING: only currently supports bash, zsh, & fish - programs = { - bash = mkIf (supportBash || shell == "bash") { - initExtra = '' - eval "$(batpipe)" - ''; - }; - - zsh = mkIf (supportZsh || shell == "zsh") { - initContent = '' - eval "$(batpipe)" - ''; - }; - - fish = mkIf (supportFish || shell == "fish") { - interactiveShellInit = '' - eval (batpipe) - ''; - }; - }; - } diff --git a/homes/modules/cli/hyfetch.nix b/homes/modules/cli/hyfetch.nix deleted file mode 100644 index b0a64a0..0000000 --- a/homes/modules/cli/hyfetch.nix +++ /dev/null @@ -1,22 +0,0 @@ -{...}: { - programs.hyfetch = { - enable = true; - settings = { - backend = "neofetch"; - args = null; - distro = null; - - preset = "transfeminine"; # "nonbinary"; - pride_month_disable = false; - custom_ascii_path = null; - - mode = "rgb"; - light_dark = "dark"; - auto_detect_light_dark = true; - lightness = 0.65; - color_align = { - mode = "horizontal"; - }; - }; - }; -} diff --git a/homes/modules/cli/tmux.nix b/homes/modules/cli/tmux.nix deleted file mode 100644 index e5946c0..0000000 --- a/homes/modules/cli/tmux.nix +++ /dev/null @@ -1,5 +0,0 @@ -{...}: { - programs.tmux = { - enable = true; - }; -} diff --git a/homes/modules/de/mako.nix b/homes/modules/de/mako.nix deleted file mode 100644 index dca8a73..0000000 --- a/homes/modules/de/mako.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ - lib, - hostname, - ... -}: let - dracula = rec { - background = "#282A36"; - border = cyan; - - cyan = "#8BE9FD"; - yellow = "#F1FA8C"; - red = "#FF5555"; - }; - - theme = dracula; -in { - # notification daemon for Wayland - services.mako = { - enable = true; - settings = { - actions = true; - output = lib.optionalString (hostname == "myputer") "DP-2"; - anchor = "top-right"; - layer = "overlay"; - sort = "-time"; - - height = 100; - width = 300; - margin = 50; - background-color = theme.background; - border-color = theme.border; - border-radius = 20; - border-size = 4; - font = "monospace 10"; - - markup = true; - icons = true; - max-icon-size = 64; - - default-timeout = 5000; - ignore-timeout = false; - - "actionable=true" = { - anchor = "top-right"; - }; - - "urgency=low" = { - border-color = theme.border; - }; - "urgency=normal" = { - border-color = theme.yellow; - }; - "urgency=high" = { - default-timeout = 0; - border-color = theme.red; - }; - }; - }; -} diff --git a/homes/modules/de/waybar/colors.css b/homes/modules/de/waybar/colors.css deleted file mode 100644 index 98bb26f..0000000 --- a/homes/modules/de/waybar/colors.css +++ /dev/null @@ -1,19 +0,0 @@ -@define-color colorbg #26233a; -@define-color colorfg #eb6f92; - -@define-color color00 #26233a; /* black (Overlay) */ -@define-color color01 #eb6f92; /* red (Love) */ -@define-color color02 #9ccfd8; /* green (Foam) */ -@define-color color03 #f6c177; /* yellow (Gold) */ -@define-color color04 #31748f; /* blue (Pine) */ -@define-color color05 #c4a7e7; /* magenta (Iris) */ -@define-color color06 #ebbcba; /* cyan (Rose) */ -@define-color color07 #e0def4; /* white (Text) */ -@define-color color08 #47435d; /* bright black (lighter Overlay) */ -@define-color color09 #ff98ba; /* bright red (lighter Love) */ -@define-color color10 #c5f9ff; /* bright green (lighter Foam) */ -@define-color color11 #ffeb9e; /* bright yellow (lighter Gold) */ -@define-color color12 #5b9ab7; /* bright blue (lighter Pine) */ -@define-color color13 #eed0ff; /* bright magenta (lighter Iris) */ -@define-color color14 #ffe5e3; /* bright cyan (lighter Rose) */ -@define-color color15 #fefcff; /* bright white (lighter Text) */ diff --git a/homes/modules/de/waybar/default.nix b/homes/modules/de/waybar/default.nix deleted file mode 100644 index 96be196..0000000 --- a/homes/modules/de/waybar/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{...}: { - programs.waybar = { - enable = true; - settings = { - mainBar = { - layer = "top"; - position = "top"; - height = 30; - - modules-left = ["hyprland/workspaces"]; - modules-center = ["clock"]; - modules-right = ["cpu" "memory" "network" "pulseaudio" "privacy" "tray"]; - - # left - "hyprland/workspaces" = { - format = "{id}"; - }; - "ext/workspaces" = { - # not enabled yet, hyprland and mango need two different configs ;-; - format = "{id}"; - ignore-hidden = true; - on-click = "activate"; - }; - - # center - "clock" = { - format = "{:%b %a | %d %r}"; - interval = 1; - tooltip = false; - }; - - # right - "cpu" = { - format = " {usage}%"; - interval = 1; - }; - "memory" = { - format = " {used:0.1f} / {total:0.1f} GiB"; - interval = 1; - }; - "network" = { - format = "{bandwidthUpBits}  {bandwidthDownBits}  {ifname}"; - format-wifi = " {bandwidthUpBits}  {bandwidthDownBits}  {ifname}"; - format-ethernet = "󰈀 {bandwidthUpBits}  {bandwidthDownBits}  {ifname}"; - format-disconnected = "no internet ~ rawr! ~ ;w;"; # empty format hides module - interval = 1; - max-length = 32; - }; - "pulseaudio" = { - format = "{icon} {volume}%"; - format-muted = " {volume}%"; - format-icons = { - default = [ - "" - "" - "" - ]; - }; - "scroll-step" = 5; - }; - "privacy" = { - icon-size = 12; - icon-spacing = 5; - transition-duration = 200; - modules = [ - { - type = "screenshare"; - tooltip = true; - tooltip-icon-size = 12; - } - { - type = "audio-in"; - tooltip = true; - tooltip-icon-size = 12; - } - ]; - }; - "tray" = { - icon-size = 12; - spacing = 10; - # fixes spotify not showing up when "close button should minimize the Spotify window" is false - show-passive-items = true; - }; - }; - }; - - style = - builtins.readFile ./colors.css - + builtins.readFile ./style.css; - }; -} diff --git a/homes/modules/de/waybar/style.css b/homes/modules/de/waybar/style.css deleted file mode 100644 index 09740c6..0000000 --- a/homes/modules/de/waybar/style.css +++ /dev/null @@ -1,165 +0,0 @@ -* { - border: none; - border-radius: 0; - font-family: 'GeistMono Nerd Font'; - font-size: 15px; - font-weight: bold; - min-height: 10px; -} -window#waybar { - background: rgba(0, 0, 0, 0); -} -/* -adds a margin around the edge of the taskbar, surrounding the modules, -spacing it out from the edge of the screen and windows below -*/ -window#waybar > box { - margin: 0px 12px; -} - -tooltip { - background: @colorbg; - color: @colorfg; - opacity: 0.9; - padding: 4px; - border-radius: 12px; - border: 1px solid @color01; -} -tooltip label { - background: rgba(0, 0, 0, 0); - color: @colorfg; -} - -#clock, -#memory, -#network, -#workspaces, -#taskbar, -#cpu, -#pulseaudio, -#privacy, -#tray, -#custom-media { - background: @colorbg; - color: @colorfg; - opacity: 0.9; - padding: 4px 16px; - border-radius: 32px; - border: 1px solid @color01; -} - -/* -left-side modules -*/ -#workspaces, -#taskbar, -#custom-media { - margin: 4px 4px 4px 0px; -} - -/* -center modules -*/ -#clock { - margin: 4px 0px 4px 0px; -} - -/* -right-side modules -*/ -#memory, -#network, -#cpu, -#pulseaudio, -#tray, -#privacy { - margin: 4px 0px 4px 4px; -} - -#workspaces, -#taskbar { - padding: 0px; -} - -#taskbar.empty { - opacity: 0; - padding: 0px; - margin: 0px; - border: none; -} -#tray.empty { - opacity: 0; - padding: 0; - margin: 0; - border: none; -} - -/* - connects the workspace and taskbar together :3 -*/ -/* -#workspaces { - margin: 4px 0px 4px 12px; - padding: 0px 8px 0px 0px; - border-radius: 100px 0px 0px 100px; - border-width: 1px 0px 1px 1px; -} -#taskbar { - margin: 4px 0px 4px 0px; - padding: 0px 0px 0px 8px; - border-radius: 0px 100px 100px 0px; -} -*/ - -#cpu { - margin: 4px 0 4px 0; - border-radius: 32px 0px 0px 32px; -} -#memory { - margin: 4px 0 4px 0; - border-radius: 0px; - border-width: 1px 0px 1px 0px; -} -#network { - margin: 4px 0 4px 0; - border-radius: 0px 32px 32px 0px; - min-width: 100px; /* surely there's a better way to fix the size? */ -} - -#workspaces button { - padding: 2px 4px; - border-radius: 32px; - color: @colorfg; -} -#workspaces button:hover { - background: @colorfg; - color: @colorbg; - opacity: 0.8; -} -#workspaces button.active { - background: @colorfg; - color: @colorbg; -} - -#taskbar button { - padding: 2px 4px; - border-radius: 32px; - color: @colorfg; -} -#taskbar button:hover { - background: @colorfg; - color: @colorbg; - opacity: 0.8; -} -#taskbar button.active { - background: @colorfg; - color: @colorbg; -} -/* - icons in each button on the taskbar to correct - for them not being properly centred sometimes :3 -*/ -#taskbar button box image { - padding-left: 2px; -} - diff --git a/homes/modules/editor/helix.nix b/homes/modules/editor/helix.nix index 818e222..4a66841 100755 --- a/homes/modules/editor/helix.nix +++ b/homes/modules/editor/helix.nix @@ -1,69 +1,13 @@ { + config, pkgs, - # upkgs, ... -}: let - lsps = { - bash-language-server = { - pkg = pkgs.bash-language-server; - cmd = "bash-language-server"; - }; - - clangd = { - pkg = pkgs.clang-tools; - cmd = "clangd"; - }; - - glsl_analyzer = { - pkg = pkgs.glsl_analyzer; - cmd = "glsl_analyzer"; - }; - - haskell-language-server = { - pkg = pkgs.haskell-language-server; - cmd = "haskell-language-server-wrapper"; - }; - - # TODO: once upgraded past Nix-24.07 this line won't be necessary (I think) - # helix will support nixd by default - # SOURCE: https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md#Helix - nixd = { - pkg = pkgs.nixd; - cmd = "nixd"; - }; - - OmniSharp = { - pkg = pkgs.omnisharp-roslyn; - cmd = "OmniSharp"; - }; - - rust-analyzer = { - pkg = pkgs.rust-analyzer; - cmd = "rust-analyzer"; - }; - - ty = { - pkg = pkgs.ty; # DEBUG: upkgs.ty; - cmd = "ty"; - }; - - typescript-language-server = { - pkg = pkgs.typescript-language-server; - cmd = "typescript-language-server"; - }; - }; -in { - home.packages = - lsps - |> builtins.attrValues - |> map (lsp: lsp.pkg); - - # REF: https://docs.helix-editor.com/editor.html +}: { + # read https://docs.helix-editor.com/editor.html programs.helix = { enable = true; settings = { theme = "dracula"; - editor = { line-number = "absolute"; popup-border = "all"; @@ -132,7 +76,7 @@ in { hidden = true; # show hidden files follow-symlinks = true; deduplicate-links = true; - git-ignore = true; # dont read .gitignore files + git-ignore = false; # dont read .gitignore files ignore = true; # use .ignore for helix instead of .gitignore }; @@ -163,107 +107,29 @@ in { }; }; - languages = { - language = [ - { - name = "nix"; - indent = { - tab-width = 2; - unit = " "; - }; - block-comment-tokens = { - start = "/*"; - end = "*/"; - }; - auto-format = true; - formatter.command = "${pkgs.alejandra}/bin/alejandra"; - language-servers = ["nixd"]; - } - { - name = "python"; - indent = { - tab-width = 4; - unit = " "; - }; - auto-format = false; # my python is beautiful ^_^ - rulers = [80]; - language-servers = ["ty"]; - } - { - name = "c"; - file-types = ["c" "h"]; # use .hpp for C++ - auto-format = true; - formatter.command = "${pkgs.clang-tools}/bin/clang-format"; - language-servers = ["clangd"]; - } - { - name = "cpp"; - file-types = ["cc" "hh" "cpp" "hpp" "cxx" "hxx"]; - } - { - name = "haskell"; - auto-format = true; - formatter.command = "${pkgs.ormolu}/bin/ormolu"; - language-servers = ["haskell-language-server"]; - } - { - name = "rust"; - indent = { - tab-width = 2; - unit = " "; - }; - auto-format = true; - formatter.command = "${pkgs.rustfmt}/bin/rustfmt"; - language-servers = ["rust-analyzer"]; - } - { - name = "c-sharp"; - file-types = ["cs"]; - indent = { - tab-width = 4; - unit = " "; - }; - block-comment-tokens = { - start = "/*"; - end = "*/"; - }; - # auto-format = true; - # formatter.command = "${pkgs.omnisharp-roslyn}/bin/OmniSharp"; - # language-servers = ["OmniSharp"]; - } - { - name = "javascript"; - file-types = ["js"]; - indent = { - tab-width = 2; - unit = " "; - }; - block-comment-tokens = { - start = "/*"; - end = "*/"; - }; - auto-format = true; - language-servers = ["typescript-language-server"]; - } - { - name = "glsl"; - file-types = ["glsl"]; - indent = { - tab-width = 2; - unit = " "; - }; - block-comment-tokens = { - start = "/*"; - end = "*/"; - }; - auto-format = false; - language-servers = ["glsl_analyzer"]; - } - ]; - - language-server = - lsps - |> builtins.mapAttrs (_: lsp: {command = "${lsp.pkg}/bin/${lsp.cmd}";}); - }; + languages.language = [ + { + name = "nix"; + indent = { + tab-width = 2; + unit = " "; + }; + block-comment-tokens = { + start = "/*"; + end = "*/"; + }; + auto-format = true; + formatter.command = "${pkgs.alejandra}/bin/alejandra"; + } + { + name = "python"; + indent = { + tab-width = 4; + unit = " "; + }; + auto-format = false; # my python is beautiful ^_^ + rulers = [80]; + } + ]; }; } diff --git a/homes/modules/editor/neovim/default.nix b/homes/modules/editor/neovim/default.nix deleted file mode 100644 index 35f4c54..0000000 --- a/homes/modules/editor/neovim/default.nix +++ /dev/null @@ -1,236 +0,0 @@ -# TODO: look into changing to this: -# https://github.com/BirdeeHub/nix-wrapper-modules -{ - inputs, - lib, - ... -}: let - inherit - (inputs.nixcats) - utils - ; -in { - imports = [ - inputs.nixcats.homeModule - ]; - - nixCats = { - enable = true; - nixpkgs_version = inputs.nixpkgs-unstable; - addOverlays = - [ - (utils.standardPluginOverlay inputs) - ] - ++ lib.optional (builtins.pathExists ./overlays.nix) ./overlays.nix; - - # see the packageDefinitions below. - # This says which of those to install. - packageNames = ["cryvim"]; - - luaPath = ./.; - - # NOTE: the .replace vs .merge options are for modules based on existing configurations, - # NOTE: they refer to how multiple categoryDefinitions get merged together by the module. - # NOTE: for useage of this section, refer to :h nixCats.flake.outputs.categories - categoryDefinitions.replace = { - pkgs, - settings, - categories, - extra, - name, - mkNvimPlugin, - ... - } @ packageDef: { - lspsAndRuntimeDeps = with pkgs; { - general = [ - ripgrep - fd - ]; - treesitter = [ - tree-sitter - ]; - lang = { - lua = [ - lua-language-server - stylua - ]; - nix = [ - nil - nix-doc # TODO: i forgot what this is for - nixfmt - ]; - rust = [ - rust-analyzer - rustfmt - ]; - zig = [ - zls - ]; - elixir = [ - elixir-ls - ]; - gleam = [ - gleam - ]; - haskell = [ - haskell-language-server - ormolu - ]; - java = [ - jdt-language-server - javaPackages.compiler.openjdk17 - javaPackages.compiler.openjdk21 - ]; - protobuf = [ - protols - buf - ]; - }; - }; - - startupPlugins = with pkgs.vimPlugins; { - general = [ - lze - plenary-nvim - nvim-notify - nvim-web-devicons - base16-nvim - mini-nvim - ]; - treesitter = [ - nvim-treesitter-textobjects - nvim-treesitter.withAllGrammars - ]; - }; - - optionalPlugins = with pkgs.vimPlugins; { - general = [ - ]; - ui = [ - dressing-nvim - ]; - qol = [ - undotree - mini-hipatterns - ]; - telescope = [ - telescope-nvim - telescope-fzf-native-nvim - telescope-ui-select-nvim - ]; - fyler = [ - fyler-nvim - ]; - lsp = [ - nvim-lspconfig - ]; - completion = [ - blink-cmp - nvim-cmp - luasnip - friendly-snippets - cmp_luasnip - cmp-buffer - cmp-path - cmp-nvim-lua - cmp-nvim-lsp - cmp-cmdline - cmp-nvim-lsp-signature-help - cmp-cmdline-history - lspkind-nvim - ]; - format = [ - conform-nvim - ]; - comment = [ - comment-nvim - ]; - lang = { - java = [ - nvim-jdtls - ]; - }; - }; - - # shared libraries to be added to nvim runtime's LD_LIBRARY_PATH - sharedLibraries = { - general = with pkgs; [ - # libgit2 - ]; - }; - - environmentVariables = { - lang = { - rust.lsp = { - # it literally won't see the rust-analyzer provided to it - RUST_ANALYZER_CMD = "${pkgs.rust-analyzer}/bin/rust-analyzer"; - }; - elixir.lsp = { - ELIXIR_LS_CMD = "${pkgs.elixir-ls}/scripts/language_server.sh"; - }; - java.lsp = { - JAVA_HOME = "${pkgs.javaPackages.compiler.openjdk17}"; - OPENJDK_17 = "${pkgs.javaPackages.compiler.openjdk17}"; - OPENJDK_21 = "${pkgs.javaPackages.compiler.openjdk21}"; - }; - }; - }; - - extraWrapperArgs = {}; - # lists of the functions you would have passed to - # python.withPackages or lua.withPackages - - # get the path to this python environment - # in your lua config via - # vim.g.python3_host_prog - # or run from nvim terminal via :!-python3 - extraPython3Packages = {}; - # populates $LUA_PATH and $LUA_CPATH - extraLuaPackages = {}; - }; - - # REF: :help nixCats.flake.outputs.packageDefinitions - packageDefinitions.replace = { - # these are the names of your packages - # you can include as many as you wish. - cryvim = {pkgs, ...}: { - # they contain a settings set defined above - # REF: :help nixCats.flake.outputs.settings - settings = { - wrapRc = true; - aliases = [ - "ce" - ]; - }; - - # and a set of categories that you want - # (and other information to pass to lua) - categories = { - general = true; - - ui = true; - qol = true; - telescope = true; - fyler = true; - lsp = true; - completion = true; - treesitter = true; - format = true; - comment = true; - - lang = { - lua = true; - nix = true; - rust = true; - zig = true; - elixir = true; - gleam = true; - haskell = true; - java = true; - protobuf = true; - }; - }; - }; - }; - }; -} diff --git a/homes/modules/editor/neovim/init.lua b/homes/modules/editor/neovim/init.lua deleted file mode 100644 index 696587c..0000000 --- a/homes/modules/editor/neovim/init.lua +++ /dev/null @@ -1,9 +0,0 @@ -vim.g.mapleader = " " - -vim.opt.termguicolors = true -- use terminal colors -vim.opt.relativenumber = true -vim.opt.wrap = false -vim.opt.colorcolumn = "80" - -require("plugins") -require("lsp") diff --git a/homes/modules/editor/neovim/lua/lsp/capabilities.lua b/homes/modules/editor/neovim/lua/lsp/capabilities.lua deleted file mode 100644 index 7e9957b..0000000 --- a/homes/modules/editor/neovim/lua/lsp/capabilities.lua +++ /dev/null @@ -1,66 +0,0 @@ -local M = {} - -function M.on_attach(_, bufnr) - -- we create a function that lets us more easily define mappings specific - -- for LSP related items. It sets the mode, buffer and description for us each time. - - local nmap = function(keys, func, desc) - if desc then - desc = "LSP: " .. desc - end - - vim.keymap.set("n", keys, func, { buffer = bufnr, desc = desc }) - end - - nmap("rn", vim.lsp.buf.rename, "[R]e[n]ame") - nmap("ca", vim.lsp.buf.code_action, "[C]ode [A]ction") - - nmap("gd", vim.lsp.buf.definition, "[G]oto [D]efinition") - - -- NOTE: why are these functions that call the telescope builtin? - -- because otherwise they would load telescope eagerly when this is defined. - -- due to us using the on_require handler to make sure it is available. - if nixCats("general.telescope") then - nmap("gr", function() - require("telescope.builtin").lsp_references() - end, "[G]oto [R]eferences") - nmap("gI", function() - require("telescope.builtin").lsp_implementations() - end, "[G]oto [I]mplementation") - nmap("ds", function() - require("telescope.builtin").lsp_document_symbols() - end, "[D]ocument [S]ymbols") - nmap("ws", function() - require("telescope.builtin").lsp_dynamic_workspace_symbols() - end, "[W]orkspace [S]ymbols") - nmap("dd", "Telescope diagnostics bufnr=0", "[D]ocument [D]iagnostics") - nmap("wd", "Telescope diagnostics", "[W]orkspace [D]iagnostics") - end -- TODO: someone who knows the builtin versions of these to do instead help me out please. - - nmap("D", vim.lsp.buf.type_definition, "Type [D]efinition") - nmap("e", vim.diagnostic.open_float, "Show [E]rror") - - -- See `:help K` for why this keymap - nmap("K", vim.lsp.buf.hover, "Hover Documentation") - nmap("", vim.lsp.buf.signature_help, "Signature Documentation") - - -- Lesser used LSP functionality - nmap("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") - nmap("wa", vim.lsp.buf.add_workspace_folder, "[W]orkspace [A]dd Folder") - nmap("wr", vim.lsp.buf.remove_workspace_folder, "[W]orkspace [R]emove Folder") - nmap("wl", function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, "[W]orkspace [L]ist Folders") - - -- Create a command `:Format` local to the LSP buffer - vim.api.nvim_buf_create_user_command(bufnr, "Format", function(_) - vim.lsp.buf.format() - end, { desc = "Format current buffer with LSP" }) -end - -function M.get(server_name) - local capabilities = require("blink.cmp").get_lsp_capabilities() - - return capabilities -end -return M diff --git a/homes/modules/editor/neovim/lua/lsp/completion.lua b/homes/modules/editor/neovim/lua/lsp/completion.lua deleted file mode 100644 index b408f23..0000000 --- a/homes/modules/editor/neovim/lua/lsp/completion.lua +++ /dev/null @@ -1,103 +0,0 @@ -return { - { - "friendly-snippets", - dep_of = { "blink.cmp" }, - }, - { - "blink.cmp", - event = { "InsertEnter", "CmdlineEnter" }, - on_require = "blink", - load = function(name) - vim.cmd.packadd(name) - end, - after = function(plugin) - local blink = require("blink.cmp") - - blink.setup({ - keymap = { - [""] = { "show", "show_documentation", "hide_documentation" }, - [""] = { "hide", "fallback" }, - [""] = { "select_and_accept", "fallback" }, - - [""] = { "select_prev", "fallback_to_mappings" }, - [""] = { "select_next", "fallback_to_mappings" }, - [""] = { "select_prev", "fallback" }, - [""] = { "select_next", "fallback" }, - - [""] = { "scroll_documentation_up", "fallback" }, - [""] = { "scroll_documentation_down", "fallback" }, - - [""] = { "snippet_forward", "fallback" }, - [""] = { "snippet_backward", "fallback" }, - - [""] = { "show_signature", "hide_signature", "fallback" }, - }, - - appearance = { - nerd_font_variant = "mono", - }, - - sources = { - default = { "lsp", "path", "snippets", "buffer" }, - providers = { - lsp = { - name = "LSP", - module = "blink.cmp.sources.lsp", - enabled = true, - }, - path = { - name = "Path", - module = "blink.cmp.sources.path", - enabled = true, - }, - snippets = { - name = "Snippets", - module = "blink.cmp.sources.snippets", - enabled = true, - }, - buffer = { - name = "Buffer", - module = "blink.cmp.sources.buffer", - enabled = true, - }, - }, - }, - - completion = { - accept = { - auto_brackets = { - enabled = true, - }, - }, - - menu = { - border = "rounded", - max_height = 12, - scrolloff = 2, - - draw = { - columns = { - { "kind_icon", gap = 1 }, - { "label", "label_description", gap = 1 }, - }, - }, - }, - - documentation = { - auto_show = false, - window = { - border = "rounded", - }, - }, - }, - - signature = { - enabled = true, - window = { - border = "rounded", - }, - }, - }) - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/lsp/indentation.lua b/homes/modules/editor/neovim/lua/lsp/indentation.lua deleted file mode 100644 index 5deae31..0000000 --- a/homes/modules/editor/neovim/lua/lsp/indentation.lua +++ /dev/null @@ -1,20 +0,0 @@ -vim.api.nvim_create_autocmd("FileType", { - pattern = { "lua", "nix", "gleam" }, - callback = function() - vim.opt_local.shiftwidth = 2 - vim.opt_local.tabstop = 2 - vim.opt_local.expandtab = true - end, -}) - -vim.api.nvim_create_autocmd("User", { - pattern = "TelescopePreviewerLoaded", - callback = function(args) - local ft = args.data.filetype - if vim.tbl_contains({ "lua", "nix", "gleam", "rust" }, ft) then - vim.bo.shiftwidth = 2 - vim.bo.tabstop = 2 - vim.bo.expandtab = true - end - end, -}) diff --git a/homes/modules/editor/neovim/lua/lsp/init.lua b/homes/modules/editor/neovim/lua/lsp/init.lua deleted file mode 100644 index e2d09ed..0000000 --- a/homes/modules/editor/neovim/lua/lsp/init.lua +++ /dev/null @@ -1,6 +0,0 @@ -require("lze").load({ - { import = "lsp.completion" }, -}) - -require("lsp.indentation") -require("lsp.lsp") diff --git a/homes/modules/editor/neovim/lua/lsp/lsp.lua b/homes/modules/editor/neovim/lua/lsp/lsp.lua deleted file mode 100644 index d115a00..0000000 --- a/homes/modules/editor/neovim/lua/lsp/lsp.lua +++ /dev/null @@ -1,134 +0,0 @@ -local servers = {} - -servers.lua_ls = { - settings = { - Lua = { - formatters = { - ignoreComments = false, - }, - signatureHelp = { enable = true }, - diagnostics = { - globals = { "nixCats", "vim" }, - -- disable = { 'missing-fields' }, - }, - workspace = { - -- make the server aware of the neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - }, - telemetry = { enabled = false }, - }, -} - -servers.nil_ls = { - settings = {}, -} - -local rust_analyzer_cmd = os.getenv("RUST_ANALYZER_CMD") -servers.rust_analyzer = { - cmd = { rust_analyzer_cmd }, - settings = { - server = { - -- For debugging rust-analyzer, to see log location do :LspInfo in neovim - -- extraEnv = { {["RA_LOG"]="project_model=debug"} }, - }, - cargo = { - allFeatures = false, - allTargets = false, - buildScripts = { enable = true }, - target = "x86_64-unknown-linux-gnu", - }, - diagnostics = { - enable = true, - }, - }, -} - -servers.zls = { - settings = {}, -} - -local elixir_ls_cmd = os.getenv("ELIXIR_LS_CMD") -servers.elixirls = { - cmd = { elixir_ls_cmd }, - settings = {}, -} - -servers.gleam = { - settings = {}, -} - -servers.hls = { - settings = {}, -} - -local java_home = os.getenv("JAVA_HOME") -servers.jdtls = { - settings = { - java = { - contentProvider = { preferred = "fernflower" }, - configuration = { - runtimes = { - { - name = "OpenJDK 17", - path = os.getenv("OPENJDK_17"), - }, - { - name = "OpenJDK 21", - path = os.getenv("OPENJDK_21"), - }, - }, - }, - }, - }, -} - -servers.protols = { - settings = {}, -} - --- Taken from nixCats example: --- If you were to comment out this autocommand --- and instead pass the on attach function directly to --- nvim-lspconfig, it would do the same thing. --- come to think of it, it might be better because then lspconfig doesnt have to be called before lsp attach? --- but you would still end up triggering on a FileType event anyway, so, it makes little difference. -vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("nixCats-lsp-attach", { clear = true }), - callback = function(event) - require("lsp.capabilities").on_attach(vim.lsp.get_client_by_id(event.data.client_id), event.buf) - end, -}) - -require("lze").load({ - { - "nvim-lspconfig", - event = "FileType", - after = function(plugin) - -- Just register configs, don't enable yet - for server_name, cfg in pairs(servers) do - vim.lsp.config(server_name, { - capabilities = require("lsp.capabilities").get(server_name), - settings = (cfg or {}).settings, - filetypes = (cfg or {}).filetypes, - cmd = (cfg or {}).cmd, - root_pattern = (cfg or {}).root_pattern, - }) - end - - -- Enable on-demand per filetype - for server_name, cfg in pairs(servers) do - local filetypes = cfg.filetypes or vim.lsp.config[server_name].filetypes - if filetypes then - vim.api.nvim_create_autocmd("FileType", { - pattern = filetypes, - callback = function() - vim.lsp.enable(server_name) - end, - }) - end - end - end, - }, -}) diff --git a/homes/modules/editor/neovim/lua/plugins/comment.lua b/homes/modules/editor/neovim/lua/plugins/comment.lua deleted file mode 100644 index caae704..0000000 --- a/homes/modules/editor/neovim/lua/plugins/comment.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - { - "comment.nvim", - event = { "BufReadPost", "BufNewFile" }, - after = function(plugin) - require("Comment").setup({ - toggler = { - line = "cc", - block = "bc", - }, - opleader = { - line = "c", - block = "b", - }, - extra = { - above = "c", - below = "co", - eol = "cA", - }, - }) - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/dressing.lua b/homes/modules/editor/neovim/lua/plugins/dressing.lua deleted file mode 100644 index 42e7280..0000000 --- a/homes/modules/editor/neovim/lua/plugins/dressing.lua +++ /dev/null @@ -1,5 +0,0 @@ -return { - { - "dressing.nvim", - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/format.lua b/homes/modules/editor/neovim/lua/plugins/format.lua deleted file mode 100644 index 2cd28a4..0000000 --- a/homes/modules/editor/neovim/lua/plugins/format.lua +++ /dev/null @@ -1,34 +0,0 @@ --- docs -> https://github.com/stevearc/conform.nvim -return { - { - "conform.nvim", - enabled = nixCats("format") or false, - keys = { - { "p", desc = "Format File (pretty :3)" }, - }, - after = function(plugin) - local conform = require("conform") - - conform.setup({ - formatters_by_ft = { - lua = nixCats("lang.lua") and { "stylua" } or nil, - nix = nixCats("lang.nix") and { "nixfmt" } or nil, - rust = nixCats("lang.rust") and { "rustfmt", lsp_format = "fallback" } or nil, - haskell = nixCats("lang.haskell") and { "ormolu" } or nil, - proto = nixCats("lang.protobuf") and { "buf" } or nil, - }, - format_on_save = { - timeout_ms = 500, - }, - }) - - vim.keymap.set({ "n", "v" }, "p", function() - conform.format({ - lsp_fallback = false, - async = false, - timeout_ms = 1000, - }) - end, { desc = "Format File (pretty :3)" }) - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/fyler.lua b/homes/modules/editor/neovim/lua/plugins/fyler.lua deleted file mode 100644 index 2737b78..0000000 --- a/homes/modules/editor/neovim/lua/plugins/fyler.lua +++ /dev/null @@ -1,22 +0,0 @@ -return { - { - "fyler.nvim", - cmd = { "Fyler" }, - keys = { - { - "tf", - function() - return require("fyler").toggle({ kind = "split_right" }) - end, - mode = { "n" }, - desc = "Open [F]yler", - }, - }, - load = function(name) - vim.cmd.packadd(name) - end, - after = function(plugin) - local fyler = require("fyler").setup() - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/init.lua b/homes/modules/editor/neovim/lua/plugins/init.lua deleted file mode 100644 index 62de146..0000000 --- a/homes/modules/editor/neovim/lua/plugins/init.lua +++ /dev/null @@ -1,9 +0,0 @@ -require("lze").load({ - { import = "plugins.dressing" }, - { import = "plugins.telescope" }, - { import = "plugins.treesitter" }, - { import = "plugins.fyler" }, - { import = "plugins.mini-hipatterns" }, - { import = "plugins.format" }, - { import = "plugins.comment" }, -}) diff --git a/homes/modules/editor/neovim/lua/plugins/mini-hipatterns.lua b/homes/modules/editor/neovim/lua/plugins/mini-hipatterns.lua deleted file mode 100644 index f41688e..0000000 --- a/homes/modules/editor/neovim/lua/plugins/mini-hipatterns.lua +++ /dev/null @@ -1,76 +0,0 @@ -return { - { - "mini.hipatterns", - after = function(plugin) - local hipatterns = require("mini.hipatterns") - - -- Returns hex color group for matching short hex color. - -- - ---@param match string - ---@return string - local hex_color_short = function(_, match) - local style = "fg" -- 'fg' or 'bg', for extmark_opts_inline use 'fg' - local r, g, b = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4) - local hex = string.format("#%s%s%s%s%s%s", r, r, g, g, b, b) - return hipatterns.compute_hex_color_group(hex, style) - end - - -- Returns hex color group for matching alpha hex color. - -- - ---@param match string - ---@return string - local hex_color_alpha = function(_, match) - local style = "fg" -- 'fg' or 'bg', for extmark_opts_inline use 'fg' - local r, g, b = match:sub(2, 3), match:sub(4, 5), match:sub(6, 7) - local hex = string.format("#%s%s%s", r, g, b) - return hipatterns.compute_hex_color_group(hex, style) - end - - -- Returns extmark opts for highlights with virtual inline text. - -- - ---@param data table Includes `hl_group`, `full_match` and more. - ---@return table - local extmark_opts_inline = function(_, _, data) - return { - virt_text = { { "󰧞", data.hl_group } }, - virt_text_pos = "inline", - right_gravity = false, - } - end - - -- Returns extmark opts for highlights with virtual inline text. - -- - ---@param data table Includes `hl_group`, `full_match` and more. - ---@return table - local extmark_opts_inline_alpha = function(_, _, data) - return { - virt_text = { { "󱡓", data.hl_group } }, - virt_text_pos = "inline", - right_gravity = false, - } - end - - hipatterns.setup({ - highlighters = { - -- #rrggbb - hex_color = hipatterns.gen_highlighter.hex_color({ - style = "inline", - inline_text = "󰧞", - }), - -- #rgb - hex_color_short = { - pattern = "#%x%x%x%f[%X]", - group = hex_color_short, - extmark_opts = extmark_opts_inline, - }, - -- #rrggbbaa - hex_color_alpha = { - pattern = "#%x%x%x%x%x%x%x%x%f[%X]", - group = hex_color_alpha, - extmark_opts = extmark_opts_inline_alpha, - }, - }, - }) - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/telescope.lua b/homes/modules/editor/neovim/lua/plugins/telescope.lua deleted file mode 100644 index a61f19c..0000000 --- a/homes/modules/editor/neovim/lua/plugins/telescope.lua +++ /dev/null @@ -1,78 +0,0 @@ -return { - { - "telescope.nvim", - cmd = { "Telescope" }, - keys = { - { - "f", - function() - return require("telescope.builtin").find_files() - end, - mode = { "n" }, - desc = "Telescope search [F]iles", - }, - { - "tr", - function() - return require("telescope.builtin").oldfiles() - end, - mode = { "n" }, - desc = "[T]elescope search [R]ecent files", - }, - { - "ts", - function() - return require("telescope.builtin").live_grep() - end, - mode = { "n" }, - desc = "[T]elescope [S]earch cwd with grep", - }, - { - "tw", - function() - return require("telescope.builtin").grep_string() - end, - mode = { "n" }, - desc = "[T]elescope search current [W]ord", - }, - { - "tk", - function() - return require("telescope.builtin").keymaps() - end, - mode = { "n" }, - desc = "[T]elescope search [K]eymaps", - }, - { - "tb", - function() - return require("telescope.builtin").buffers() - end, - mode = { "n" }, - desc = "[T]elescope search [B]uffers", - }, - }, - load = function(name) - vim.cmd.packadd(name) - vim.cmd.packadd("telescope-fzf-native.nvim") - end, - after = function(plugin) - local telescope = require("telescope") - local actions = require("telescope.actions") - - telescope.setup({ - defaults = { - mappings = { - i = { - [""] = actions.move_selection_previous, -- move to prev result - [""] = actions.move_selection_next, -- move to next result - [""] = actions.send_selected_to_qflist + actions.open_qflist, - }, - }, - }, - }) - - pcall(telescope.load_extension, "fzf") - end, - }, -} diff --git a/homes/modules/editor/neovim/lua/plugins/treesitter.lua b/homes/modules/editor/neovim/lua/plugins/treesitter.lua deleted file mode 100644 index 55984c7..0000000 --- a/homes/modules/editor/neovim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,95 +0,0 @@ --- to help me write this after nvim-treesitter updated, i used: --- https://github.com/BirdeeHub/nixCats-nvim/blob/3c9bc4d7123e1b48d92f25ba505b889af541e897/templates/example/lua/myLuaConf/plugins/treesitter.lua - -return { - { - "nvim-treesitter", - lazy = false, - after = function(plugin) - --@param buf integer - --@param language string - local function treesitter_try_attach(buf, language) - --check if parser exists and load it - if not vim.treesitter.language.add(language) then - return - end - - -- enables syntax highlight and other treesitter features - vim.treesitter.start(buf, language) - - -- enables treesitter based folds - vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()" - - -- enables treesiter based indentation - vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()" - end - - local available_parsers = require("nvim-treesitter").get_available() - vim.api.nvim_create_autocmd("FileType", { - callback = function(args) - local buf, filetype = args.buf, args.match - local language = vim.treesitter.language.get_lang(filetype) - if not language then - return - end - - local installed_parsers = require("nvim-treesitter").get_installed("parsers") - - if vim.tbl_contains(installed_parsers, language) then - -- enable the parser if it is installed - treesitter_try_attach(buf, language) - elseif vim.tbl_contains(available_parsers, language) then - -- if a parser is available in `nvim-treesitter` enable it after ensuring it is installed - require("nvim-treesitter").install(language):await(function() - treesitter_try_attach(buf, language) - end) - else - -- try to enable treesitter features in case the parser exists but is not available from `nvim-treesitter` - treesitter_try_attach(buf, language) - end - end, - }) - end, - }, - { - "nvim-treesitter-textobjects", - lazy = false, - before = function(plugin) - vim.g.no_plugin_maps = true - end, - after = function(plugin) - require("nvim-treesitter-textobjects").setup({ - select = { - lookahead = true, - selection_modes = { - ["@parameter.outer"] = "v", -- charwise - ["@function.outer"] = "V", -- linewise - }, - include_surrounding_whitespace = false, - }, - }) - - -- keymaps - vim.keymap.set({ "x", "o" }, "am", function() - require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects") - end) - vim.keymap.set({ "x", "o" }, "im", function() - require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects") - end) - vim.keymap.set({ "x", "o" }, "ac", function() - require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects") - end) - vim.keymap.set({ "x", "o" }, "ic", function() - require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects") - end) - -- You can also use captures from other query groups like `locals.scm` - vim.keymap.set({ "x", "o" }, "as", function() - require("nvim-treesitter-textobjects.select").select_textobject("@local.scope", "locals") - end) - - -- NOTE: for more textobjects options, see the following link. - -- This template is using the new `main` branch of the repo. - -- https://github.com/nvim-treesitter/nvim-treesitter-textobjects/tree/main - end, - }, -} diff --git a/homes/modules/editor/nixvim.nix b/homes/modules/editor/nixvim.nix new file mode 100755 index 0000000..9197417 --- /dev/null +++ b/homes/modules/editor/nixvim.nix @@ -0,0 +1,24 @@ +{ + config, + pkgs, + ... +}: { + programs.nixvim = { + enable = true; + # TODO: allow clipboard to be configurable based on system clipboard + colorschemes.dracula.enable = true; + plugins = { + lualine.enable = true; + treesitter.enable = true; + }; + + opts = { + number = true; + tabstop = 4; + softtabstop = 4; + shiftwidth = 4; + }; + + clipboard.providers.wl-copy.enable = true; + }; +} diff --git a/homes/modules/editor/vscode.nix b/homes/modules/editor/vscode.nix deleted file mode 100644 index 7724723..0000000 --- a/homes/modules/editor/vscode.nix +++ /dev/null @@ -1,133 +0,0 @@ -{ - lib, - pkgs, - vscodium ? false, - secret-service ? "gnome-libsecret", - vscode-argv ? ".vscode/argv.json", - ... -}: { - nixpkgs.overlays = [ - ( - self: super: { - vscode-extensions = super.vscode-extensions.overrideAttrs (prev: let - mkVscMarketplaceExtension = { - publisher, - name, - version, - hash, - description ? "", - homepage ? null, - changelog ? null, - license ? null, - maintainers ? [], - }: - with pkgs.vscode-utils.buildVscodeMarketplaceExtension; { - ${publisher}.${name} = buildVscodeMarketplaceExtension { - mktplcRef = { - inherit - publisher - name - version - hash - ; - }; - - meta = { - inherit - ( - if license != null - then {license = license;} - else {} - ) - description - homepage - maintainers - ; - downloadPage = "https://marketplace.visualstudio.com/items?itemName=${publisher}.${name}"; - changelog = - if changelog != null - then changelog - else "https://marketplace.visualstudio.com/items/${publisher}.${name}/changelog"; - }; - }; - }; - in - lib.mergeAttrsList [ - (mkVscMarketplaceExtension { - publisher = "ms-dotnettools"; - name = "dotnet-maui"; - version = "1.11.14"; - hash = lib.fakeHash; - - description = "Extend C# Dev Kit with tools for building .NET Multi-platform App UI (MAUI) apps"; - homepage = "https://github.com/microsoft/vscode-dotnettools"; - license = lib.licenses.unfree; - }) - ]); - } - ) - ]; - - # REF: https://home-manager-options.extranix.com/?query=vscode&release=release-25.05 - programs.vscode = { - enable = true; - # TODO: clean up - package = - ( - if vscodium - then pkgs.vscodium - else pkgs.vscode - ).overrideAttrs (oldAttrs: { - # runtimeDependencies = oldAttrs.runtimeDependencies ++ [] - }); - - mutableExtensionsDir = true; - - profiles.default = { - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - # extension format: USER.PACKAGENAME - extensions = with pkgs.vscode-extensions; [ - # .NET - ms-dotnettools.csharp - ms-dotnettools.csdevkit - ms-dotnettools.vscode-dotnet-runtime - # TODO: these extensions aren't packaged :( - # deitry.solution-syntax - # ms-dotnettools.vscode-dotnet-pack - # ms-dotnettools.dotnet-maui - - # Python - ms-python.python - - # GitLens by GitKraken - eamodio.gitlens - ms-azuretools.vscode-docker - - github.copilot - github.copilot-chat - - # Colors & Themes - dracula-theme.theme-dracula - catppuccin.catppuccin-vsc - catppuccin.catppuccin-vsc-icons - mvllow.rose-pine - ]; - - userSettings = { - "workbench.colorTheme" = "Dracula Theme"; - "github.copilot.nextEditSuggestions.enabled" = true; - }; - }; - }; - - # TODO: this is super ugly, make sure the JSON is formatted!! - home.file.${vscode-argv}.text = builtins.toJSON { - password-store = secret-service; - - disable-hardware-acceleration = false; - disable-color-correct-rendering = false; - enable-crash-reporter = false; - # crash-report-id = ...; - }; -} diff --git a/homes/modules/editor/vscodium.nix b/homes/modules/editor/vscodium.nix deleted file mode 100644 index ecde271..0000000 --- a/homes/modules/editor/vscodium.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - lib, - pkgs, - ... -}: { - # REF: https://home-manager-options.extranix.com/?query=vscode&release=release-25.05 - programs.vscode = { - enable = true; - package = pkgs.vscodium; - - mutableExtensionsDir = true; - - profiles.default = { - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - # extension format: USER.PACKAGENAME - extensions = with pkgs.vscode-extensions; [ - # .NET - ms-dotnettools.csharp - ms-dotnettools.csdevkit - ms-dotnettools.vscode-dotnet-runtime - # ms-dotnettools.vscode-dotnet-pack - # ms-dotnettools.dotnet-maui - - # Colors & Themes - dracula-theme.theme-dracula - catppuccin.catppuccin-vsc - catppuccin.catppuccin-vsc-icons - mvllow.rose-pine - ]; - - userSettings = { - "workbench.colorTheme" = "Dracula Theme"; - }; - }; - }; -} diff --git a/homes/modules/apps/firefox.nix b/homes/modules/firefox.nix similarity index 100% rename from homes/modules/apps/firefox.nix rename to homes/modules/firefox.nix diff --git a/homes/modules/fish.nix b/homes/modules/fish.nix new file mode 100755 index 0000000..e46175d --- /dev/null +++ b/homes/modules/fish.nix @@ -0,0 +1,19 @@ +{ + config, + pkgs, + ... +}: { + programs.fish = { + enable = true; + interactiveShellInit = '' + #set -g fish_greeting "Welcome weary traveler to my shop" + cat ~/banner + ''; + plugins = [ + { + name = "grc"; + src = pkgs.fishPlugins.grc.src; + } + ]; + }; +} diff --git a/homes/modules/git.nix b/homes/modules/git.nix new file mode 100755 index 0000000..c98ab4e --- /dev/null +++ b/homes/modules/git.nix @@ -0,0 +1,11 @@ +{ + config, + pkgs, + ... +}: { + programs.git = { + enable = true; + userName = "Emile Clark-Boman"; + userEmail = "eclarkboman@gmail.com"; + }; +} diff --git a/homes/modules/wm/hyprland/hypridle.nix b/homes/modules/hypr/hypridle.nix similarity index 100% rename from homes/modules/wm/hyprland/hypridle.nix rename to homes/modules/hypr/hypridle.nix diff --git a/homes/modules/hypr/hyprland.nix b/homes/modules/hypr/hyprland.nix new file mode 100755 index 0000000..e69de29 diff --git a/homes/modules/wm/hyprland/hyprlock.nix b/homes/modules/hypr/hyprlock.nix similarity index 100% rename from homes/modules/wm/hyprland/hyprlock.nix rename to homes/modules/hypr/hyprlock.nix diff --git a/homes/modules/wm/hyprland/kanshi.nix b/homes/modules/kanshi.nix similarity index 96% rename from homes/modules/wm/hyprland/kanshi.nix rename to homes/modules/kanshi.nix index 919eee7..906f6a8 100755 --- a/homes/modules/wm/hyprland/kanshi.nix +++ b/homes/modules/kanshi.nix @@ -1,9 +1,13 @@ -{...}: { +{ + config, + pkgs, + ... +}: { # Change monitor positions # TODO: find a way to make this modular (ie put something different for my laptop) # my idea is to have a "monitors" module and use kanshi for wayland services.kanshi = { - enable = false; + enable = true; systemdTarget = "hyprland-session.target"; # You can find your monitors in hyprland by using `hyprctl monitors all` settings = [ diff --git a/homes/modules/nixcord.nix b/homes/modules/nixcord.nix new file mode 100755 index 0000000..a006c0e --- /dev/null +++ b/homes/modules/nixcord.nix @@ -0,0 +1,16 @@ +{ + config, + pkgs, + ... +}: { + programs.nixcord = { + enable = true; + config = { + frameless = true; + plugins = { + # TODO: remove this plugin + hideAttachments.enable = true; + }; + }; + }; +} diff --git a/homes/modules/term/rio.nix b/homes/modules/rio.nix similarity index 89% rename from homes/modules/term/rio.nix rename to homes/modules/rio.nix index 3b540dd..84ea3a2 100755 --- a/homes/modules/term/rio.nix +++ b/homes/modules/rio.nix @@ -1,14 +1,10 @@ -{pkgs, ...}: { - home = { - packages = [ - pkgs.rio - ]; - - # currently set to ghostty (on lolcathost) - #sessionVariables.TERMINAL = "rio"; - }; - +{ + config, + pkgs, + ... +}: { # The terminal I use + # TODO: this is dependent on nvim being installed # TODO: make this into a module with a configurable editor option programs.rio = { enable = true; diff --git a/homes/modules/rofi.nix b/homes/modules/rofi.nix new file mode 100755 index 0000000..6d05543 --- /dev/null +++ b/homes/modules/rofi.nix @@ -0,0 +1,13 @@ +{ + config, + pkgs, + ... +}: { + programs.rofi = { + enable = true; + package = pkgs.rofi-wayland; + font = "JetBrains Mono Nerd Font 10"; + location = "center"; + terminal = "${pkgs.rio}/bin/rio"; + }; +} diff --git a/homes/modules/server/fail2ban.nix b/homes/modules/server/fail2ban.nix new file mode 100755 index 0000000..0681c68 --- /dev/null +++ b/homes/modules/server/fail2ban.nix @@ -0,0 +1,17 @@ +{...}: { + # simple fail2ban config (not production ready or anything though) + # refer to: https://nixos.wiki/wiki/Fail2Ban + services.fail2ban = { + enable = true; + + maxretry = 5; + bantime = "10m"; # 10 minute ban + bantime-increment = { + enable = true; + formula = "ban.Time * math.exp(float(ban.Count+1)*banFactor)/math.exp(1*banFactor)"; + multipliers = "1 2 4 8 16 32 64"; + maxtime = "168h"; # dont ban for more than 1 week + overalljails = true; + }; + }; +} diff --git a/homes/modules/server/nginx.nix b/homes/modules/server/nginx.nix new file mode 100755 index 0000000..a11b65c --- /dev/null +++ b/homes/modules/server/nginx.nix @@ -0,0 +1,35 @@ +{...}: { + services = { + # use nginx as the reverse proxy + # (also will use certbot and Let's Encrypt) + # refer to: https://nixos.wiki/wiki/Nginx + nginx = { + enable = true; + + recommendedProxySettings = true; + recommendedTlsSettings = true; + recommendedGzipSettings = true; + recommendedOptimisation = true; + + # https://imbored.dev + virtualHosts = { + "imbored.dev" = { + forceSSL = true; + enableACME = true; + # config reverse proxy paths + locations = { + "/" = { + # TODO + proxyPass = "http://127.0.0.1:12345"; + }; + }; + }; + }; + }; + }; + + security.acme = { + acceptTerms = true; + defaults.email = "eclarkboman@gmail.com"; + }; +} diff --git a/homes/modules/server/ssh.nix b/homes/modules/server/ssh.nix new file mode 100755 index 0000000..b898468 --- /dev/null +++ b/homes/modules/server/ssh.nix @@ -0,0 +1,13 @@ +{...}: { + services.openssh = { + enable = true; + ports = [22]; + settings = { + PasswordAuthentication = true; + PermitRootLogin = "no"; + AllowUsers = null; # allow all users by default + UseDns = true; + X11Forwarding = false; + }; + }; +} diff --git a/homes/modules/services/ssh-agent.nix b/homes/modules/services/ssh-agent.nix deleted file mode 100644 index a0b505c..0000000 --- a/homes/modules/services/ssh-agent.nix +++ /dev/null @@ -1,16 +0,0 @@ -{osConfig, ...}: { - assertions = [ - { - assertion = !osConfig.services.gnupg.agent.enable; - message = '' - It is not recommended to enable both `homeConfig.services.ssh-agent.enable` and `osConfig.services.gnupg.agent.enable`! - ''; - } - ]; - - # enable OpenSSH private key agent - services.ssh-agent.enable = true; - - # WARNING: the ssh-agent won't set this for itself... - systemd.user.sessionVariables.SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/ssh-agent"; -} diff --git a/homes/modules/shell/elvish.nix b/homes/modules/shell/elvish.nix deleted file mode 100644 index 44a19dd..0000000 --- a/homes/modules/shell/elvish.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: let - cfg = config.programs.elvish; -in { - options.programs.elvish = { - enable = lib.mkEnableOption "elvish"; - }; - - config = lib.mkIf cfg.enable { - home = { - packages = with pkgs; [elvish]; - - file.".elvish/nix.elv".source = let - elvish-modules = pkgs.fetchFromGitHub { - owner = "zzamboni"; - repo = "elvish-modules"; - rev = "9005c970346ab06214b3cd3ed3e70f04f3c632ba"; - hash = "sha256-/Dwtl12QzPvMoMMGoj+v3dwX2ZwFT8t/bohVy1zDE0c="; - }; - in - builtins.toPath "${elvish-modules}/nix.elv"; - # /${builtins.toPath elvish-modules.outPath}/nix.elv; - }; - }; -} diff --git a/homes/modules/shell/fish.nix b/homes/modules/shell/fish.nix deleted file mode 100755 index 07f3f59..0000000 --- a/homes/modules/shell/fish.nix +++ /dev/null @@ -1,71 +0,0 @@ -{pkgs, ...}: { - programs.fish = { - enable = true; - generateCompletions = true; - - interactiveShellInit = let - greetings = - [ - # Official _cry64 quotes - "Do butterflies cry when they're sad?" - "I hope they do" - "I think Alice is lost..." - "I once again retreat to the sanctuary of my virtual realm" - - # Unknown - "Welcome weary traveler to my shop" - - # Legend of Zelda - "It's dangerous to go alone! Take this." - - # ULTRAKILL - "Something wicked this way comes" - "May your L's be many... and your bitches few" - - # Terraria - "What a horrible night to have a curse." - "The ancient spirits of light and dark have been released." - - # Calamity - "The god of the stars rejects your offering. The ritual can only be performed at night." - "You should have just died..." - "Supreme Witch, Calamitas has killed every player!" - - # Key Fairy - "A broken heart beats in fractals" - - # Signalis - "Remember our promise" - ] - |> map (x: "\"${x}\"") - |> builtins.concatStringsSep " "; - in '' - # add dotnet completions if it exists (ie we're in a virtual environment) - if type -q dotnet - complete -f -c dotnet -a "(dotnet complete (commandline -cp))" - end - - function rand_greet - set greetings ${greetings} - echo -n $greetings[(random 1 (count $greetings))] - end - - function gitignore -a type - curl -sL "https://www.gitignore.io/api/$type" - end - - function decompile - objdump --disassemble --demangle --debugging --debugging-tags $argv | bat --language asm - end - - set -g fish_greeting (rand_greet) - ''; - - plugins = [ - { - name = "grc"; - src = pkgs.fishPlugins.grc.src; - } - ]; - }; -} diff --git a/homes/modules/shell/zsh.nix b/homes/modules/shell/zsh.nix deleted file mode 100644 index 361191e..0000000 --- a/homes/modules/shell/zsh.nix +++ /dev/null @@ -1,17 +0,0 @@ -{...}: { - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - - history = { - size = 10000; - ignoreAllDups = true; - path = "$HOME/.zsh_history"; - ignorePatterns = [ - "rm *" - ]; - }; - }; -} diff --git a/homes/modules/term/foot.nix b/homes/modules/term/foot.nix deleted file mode 100644 index 4fdaad5..0000000 --- a/homes/modules/term/foot.nix +++ /dev/null @@ -1,328 +0,0 @@ -# DEBUG: {upkgs, ...}: { -{pkgs, ...}: { - programs.foot = { - enable = true; - package = pkgs.foot; # DEBUG: upkgs.foot; - - server.enable = true; - - settings = let - none = "\"\""; - in { - main = { - term = "foot"; # set $TERM - login-shell = "no"; - title = "foot"; - locked-title = "no"; - - # font = "GeistMono Nerd Font:size=12"; - # font = "Mononoki Nerd Font Mono:size=12"; - # font = "0xProto Nerd Font Mono:size=12"; - font = "JetBrainsMonoNL Nerd Font:size=12"; - # font-bold = ""; - # font-italice = ""; - # font-bold-italice = ""; - # font-size-adjustment = 0.5; - # line-height = ...; - # letter-spacing = 0; - # horizontal-letter-offset = 0; - # vertical-letter-offset = 0; - # underline-offset = ...; - # underline-thickness = ...; - # strikeout-thickness = ...; - box-drawings-uses-font-glyphs = "no"; - dpi-aware = "no"; - gamma-correct-blending = "no"; - - initial-color-theme = "1"; - # initial-window-size-pixels = "700x500"; # pixel COLSxROWS - initial-window-size-chars = "90x26"; # char COLSxROWS - initial-window-mode = "windowed"; - pad = "32x32 center-when-maximized-and-fullscreen"; - resize-by-cells = "yes"; - resize-keep-grid = "yes"; - resize-delay-ms = "100"; - - bold-text-in-bright = "no"; - word-delimiters = ",│`|:\"'()[]{}<>"; - selection-target = "primary"; - # workers = ...; # number of logical CPUs - }; - - # environment = { - # name = "value"; - # } - - security = { - osc52 = "enabled"; - }; - - bell = { - system = "no"; - urgent = "no"; - notify = "no"; - visual = "no"; - # command = ...; - # command-focused = "no"; - }; - - desktop-notifications = { - command = "notify-send --wait --app-name \${app-id} --icon \${app-id} --category \${category} --urgency \${urgency} --expire-time \${expire-time} --hint STRING:image-path:\${icon} --hint BOOLEAN:suppress-sound:\${muted} --hint STRING:sound-name:\${sound-name} --replace-id \${replace-id} \${action-argument} --print-id -- \${title} \${body}"; - command-action-argument = "--action \${action-name=\${action-label}}"; - close = none; - inhibit-when-focused = "no"; - }; - - scrollback = { - lines = 1000; - multiplier = 1.0; - indicator-position = "relative"; - indicator-format = none; - }; - - url = { - launch = "xdg-open \${url}"; - label-letters = "sadfjklewcmpgh"; - osc8-underline = "url-mode"; - regex = "(((https?://|mailto:|ftp://|file:|ssh:|ssh://|git://|tel:|magnet:|ipfs://|ipns://|gemini://|gopher://|news:)|www\\.)([0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]+|\\([]\\[\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\)|\\[[\\(\\)\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\]|\"[]\\[\\(\\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\"|'[]\\[\\(\\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]*')+([0-9a-zA-Z/#@$&*+=~_%^\\-]|\\([]\\[\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\)|\\[[\\(\\)\"0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\\]|\"[]\\[\\(\\)0-9a-zA-Z:/?#@!$&'*+,;=.~_%^\\-]*\"|'[]\\[\\(\\)0-9a-zA-Z:/?#@!$&*+,;=.~_%^\\-]*'))"; - }; - - # "regex:your-fancy-name" = { - # regex = ...; - # launch = "[path to script/application] \${match}" - # }; - # - # key-bindings = { - # regex-launch = "[your-fancy-name] Control+Shift+q"; - # regex-copy = "[your-fancy-name] Control+Alt+shift+q"; - # }; - - cursor = { - style = "block"; - blink = "no"; - # blink-rate = 500; - beam-thickness = 1.0; - # underline-thickness = ...; - }; - - mouse = { - hide-when-typing = "yes"; - alternate-scroll-mode = "yes"; - }; - - touch = { - long-press-delay = 400; - }; - - # Theme: Dracula - # REF: https://github.com/dracula/foot - colors = { - alpha = 1.0; - alpha-mode = "default"; # default/matching/all - - background = "282a36"; - foreground = "f8f8f2"; - - ## Normal/regular colors (color palette 0-7) - regular0 = "21222c"; # black - regular1 = "ff5555"; # red - regular2 = "50fa7b"; # green - regular3 = "f1fa8c"; # yellow - regular4 = "bd93f9"; # blue - regular5 = "ff79c6"; # magenta - regular6 = "8be9fd"; # cyan - regular7 = "f8f8f2"; # white - - ## Bright colors (color palette 8-15) - bright0 = "6272a4"; # bright black - bright1 = "ff6e6e"; # bright red - bright2 = "69ff94"; # bright green - bright3 = "ffffa5"; # bright yellow - bright4 = "d6acff"; # bright blue - bright5 = "ff92df"; # bright magenta - bright6 = "a4ffff"; # bright cyan - bright7 = "ffffff"; # bright white - - ## Misc colors - selection-foreground = "ffffff"; - selection-background = "44475a"; - # jump-labels= # black-on-yellow - # scrollback-indicator= # black-on-bright-blue - # search-box-no-match= # black-on-red - # search-box-match= # black-on-yellow - urls = "8be9fd"; - - flash = "7f7f00"; - flash-alpha = 0.5; - }; - - # Alternative colour palette (see `man 5 foot.ini`) - colors2 = { - alpha = 1.0; - alpha-mode = "default"; - - background = "191724"; - foreground = "e0def4"; - - regular0 = "26233a"; # black (Overlay) - regular1 = "eb6f92"; # red (Love) - regular2 = "9ccfd8"; # green (Foam) - regular3 = "f6c177"; # yellow (Gold) - regular4 = "31748f"; # blue (Pine) - regular5 = "c4a7e7"; # magenta (Iris) - regular6 = "ebbcba"; # cyan (Rose) - regular7 = "e0def4"; # white (Text) - - bright0 = "47435d"; # bright black (lighter Overlay) - bright1 = "ff98ba"; # bright red (lighter Love) - bright2 = "c5f9ff"; # bright green (lighter Foam) - bright3 = "ffeb9e"; # bright yellow (lighter Gold) - bright4 = "5b9ab7"; # bright blue (lighter Pine) - bright5 = "eed0ff"; # bright magenta (lighter Iris) - bright6 = "ffe5e3"; # bright cyan (lighter Rose) - bright7 = "fefcff"; # bright white (lighter Text) - - selection-foreground = "ffffff"; - selection-background = "393553"; - - urls = "ebbcba"; # Rose - - flash = "f6c177"; # yellow (Gold) - flash-alpha = 0.5; - - cursor = "191724 e0def4"; - }; - - # csd = { - # preferred = "server"; - # size = 26; - # font = ...; - # color = ...; # foreground color - # hide-when-maximized = "no"; - # border-width = 0; - # border-color = ...; - # button-width = 26; - # button-color = ...; # background color - # button-minimize-color = ...; - # button-maximize-color = ...; - # button-close-color = ...; - # }; - - key-bindings = { - scrollback-up-page = "Shift+Page_Up Shift+KP_Page_Up"; - # scrollback-up-half-page = "none"; - # scrollback-up-line = "none"; - scrollback-down-page = "Shift+Page_Down Shift+KP_Page_Down"; - # scrollback-down-half-page = "none"; - # scrollback-down-line = "none"; - # scrollback-home = "none"; - # scrollback-end = "none"; - - clipboard-copy = "Control+Shift+c XF86Copy"; - clipboard-paste = "Control+Shift+v XF86Paste"; - primary-paste = "Shift+Insert"; - search-start = "Control+Shift+r"; - - font-increase = "Control+plus Control+equal Control+KP_Add"; - font-decrease = "Control+minus Control+KP_Subtract"; - font-reset = "Control+0 Control+KP_0"; - - spawn-terminal = "Control+Shift+n"; - # minimize = "none"; - # maximize = "none"; - # fullscreen = "none"; - - pipe-visible = "[sh -c \"xurls | fuzzel | xargs -r firefox\"] none"; - pipe-scrollback = "[sh -c \"xurls | fuzzel | xargs -r firefox\"] none"; - pipe-selected = "[xargs -r firefox] none"; - pipe-command-output = "[wl-copy] none"; - - show-urls-launch = "Control+Shift+o"; - # show-urls-copy = "none"; - # show-urls-persistent = "none"; - - prompt-prev = "Control+Shift+z"; - prompt-next = "Control+Shift+x"; - - unicode-input = "Control+Shift+u"; - # color-theme-switch-1 = "none"; - # color-theme-switch-2 = "none"; - color-theme-toggle = "Control+Alt+p"; - - # noop = "none"; - # quit = "none"; - }; - - search-bindings = { - cancel = "Control+g Control+c Escape"; - commit = "Return KP_Enter"; - - find-prev = "Control+r"; - find-next = "Control+s"; - - cursor-left = "Left Control+b"; - cursor-left-word = "Control+Left Mod1+b"; - cursor-right = "Right Control+f"; - cursor-right-word = "Control+Right Mod1+f"; - cursor-home = "Home Control+a"; - cursor-end = "End Control+e"; - - delete-prev = "BackSpace"; - delete-prev-word = "Mod1+BackSpace Control+BackSpace"; - delete-next = "Delete"; - delete-next-word = "Mod1+d Control+Delete"; - delete-to-start = "Control+u"; - delete-to-end = "Control+k"; - - extend-char = "Shift+Right"; - extend-to-word-boundary = "Control+w Control+Shift+Right"; - extend-to-next-whitespace = "Control+Shift+w"; - extend-line-down = "Shift+Down"; - extend-backward-char = "Shift+Left"; - extend-backward-to-word-boundary = "Control+Shift+Left"; - # extend-backward-to-next-whitespace = "none"; - extend-line-up = "Shift+Up"; - - clipboard-paste = "Control+v Control+Shift+v Control+y XF86Paste"; - primary-paste = "Shift+Insert"; - - # unicode-input = "none"; - - scrollback-up-page = "Shift+Page_Up Shift+KP_Page_Up"; - # scrollback-up-half-page = "none"; - # scrollback-up-line = "none"; - scrollback-down-page = "Shift+Page_Down Shift+KP_Page_Down"; - # scrollback-down-half-page = "none"; - # scrollback-down-line = "none"; - # scrollback-home = "none"; - # scrollback-end = "none"; - }; - - url-bindings = { - cancel = "Control+g Control+c Control+d Escape"; - toggle-url-visible = "t"; - }; - - text-bindings = { - "\\x03" = "Mod4+c"; # map Super+c -> Control+c - }; - - mouse-bindings = { - scrollback-up-mouse = "BTN_WHEEL_BACK"; - scrollback-down-mouse = "BTN_WHEEL_FORWARD"; - font-increase = "Control+BTN_WHEEL_BACK"; - font-decrease = "Control+BTN_WHEEL_FORWARD"; - selection-override-modifiers = "Shift"; - primary-paste = "BTN_MIDDLE"; - select-begin = "BTN_LEFT"; - select-begin-block = "Control+BTN_LEFT"; - select-extend = "BTN_RIGHT"; - select-extend-character-wise = "Control+BTN_RIGHT"; - select-word = "BTN_LEFT-2"; - select-word-whitespace = "Control+BTN_LEFT-2"; - select-quote = "BTN_LEFT-3"; - select-row = "BTN_LEFT-4"; - }; - }; - }; -} diff --git a/homes/modules/term/ghostty.nix b/homes/modules/term/ghostty.nix deleted file mode 100644 index 4c0b130..0000000 --- a/homes/modules/term/ghostty.nix +++ /dev/null @@ -1,45 +0,0 @@ -{pkgs, ...}: { - home = { - packages = [ - pkgs.ghostty - ]; - - sessionVariables.TERMINAL = "ghostty"; - }; - - programs.ghostty = { - enable = true; - - settings = { - theme = "Dracula"; - font-family = "Geist Nerd Font"; - font-feature = ["liga" "calt"]; - - window-padding-x = 12; - window-padding-y = 6; - window-theme = "system"; - - window-height = 26; - window-width = 90; - copy-on-select = true; - gtk-single-instance = false; - adw-toolbar-style = "flat"; - - # disable close confirmations - confirm-close-surface = false; - - keybind = [ - "ctrl+shift+plus=increase_font_size:1" - "ctrl+shift+minus=decrease_font_size:1" - - "ctrl+h=goto_split:left" - "ctrl+l=goto_split:right" - ]; - }; - - #themes = { - #aylur-dark = colors (import ./colors.nix {scheme = "dark";}); - #aylur-light = colors (import ./colors.nix {scheme = "light";}); - #}; - }; -} diff --git a/homes/modules/theme.rasi b/homes/modules/theme.rasi new file mode 100755 index 0000000..07c375d --- /dev/null +++ b/homes/modules/theme.rasi @@ -0,0 +1,209 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + modi: "drun,run,filebrowser,window"; + show-icons: true; + display-drun: "APPS"; + display-run: "RUN"; + display-filebrowser: "FILES"; + display-window: "WINDOW"; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; +} + +/*****----- Global Properties -----*****/ +* { + font: "JetBrains Mono Nerd Font 10"; + background: #11092D; + background-alt: #281657; + foreground: #FFFFFF; + selected: #DF5296; + active: #6E77FF; + urgent: #8E3596; +} + +/*****----- Main Window -----*****/ +window { + /* properties for window widget */ + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 1000px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + border-radius: 15px; + cursor: "default"; + background-color: @background; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 0px; + background-color: transparent; + orientation: horizontal; + children: [ "imagebox", "listbox" ]; +} + +imagebox { + padding: 20px; + background-color: transparent; + background-image: url("~/.config/rofi/images/j.jpg", height); + orientation: vertical; + children: [ "inputbar", "dummy", "mode-switcher" ]; +} + +listbox { + spacing: 20px; + padding: 20px; + background-color: transparent; + orientation: vertical; + children: [ "message", "listview" ]; +} + +dummy { + background-color: transparent; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + padding: 15px; + border-radius: 10px; + background-color: @background-alt; + text-color: @foreground; + children: [ "textbox-prompt-colon", "entry" ]; +} +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search"; + placeholder-color: inherit; +} + +/*****----- Mode Switcher -----*****/ +mode-switcher{ + enabled: true; + spacing: 20px; + background-color: transparent; + text-color: @foreground; +} +button { + padding: 15px; + border-radius: 10px; + background-color: @background-alt; + text-color: inherit; + cursor: pointer; +} +button selected { + background-color: @selected; + text-color: @foreground; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 1; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 10px; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 15px; + padding: 8px; + border-radius: 10px; + background-color: transparent; + text-color: @foreground; + cursor: pointer; +} +element normal.normal { + background-color: inherit; + text-color: inherit; +} +element normal.urgent { + background-color: @urgent; + text-color: @foreground; +} +element normal.active { + background-color: @active; + text-color: @foreground; +} +element selected.normal { + background-color: @selected; + text-color: @foreground; +} +element selected.urgent { + background-color: @urgent; + text-color: @foreground; +} +element selected.active { + background-color: @urgent; + text-color: @foreground; +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 32px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Message -----*****/ +message { + background-color: transparent; +} +textbox { + padding: 15px; + border-radius: 10px; + background-color: @background-alt; + text-color: @foreground; + vertical-align: 0.5; + horizontal-align: 0.0; +} +error-message { + padding: 15px; + border-radius: 20px; + background-color: @background; + text-color: @foreground; +} diff --git a/homes/modules/wm/hyprland/default.nix b/homes/modules/wm/hyprland/default.nix deleted file mode 100755 index f77e554..0000000 --- a/homes/modules/wm/hyprland/default.nix +++ /dev/null @@ -1,379 +0,0 @@ -# NOTE: hyprland must be enabled in BOTH your host config (for running hyprland) -# NOTE: and your home-manager config (for managing hyprland's config files) -{ - hostname, - pkgs, - ... -}: { - imports = [ - ./kanshi.nix - ]; - - home.packages = with pkgs; [ - playerctl - ]; - - wayland.windowManager.hyprland = { - enable = true; - package = null; - portalPackage = null; - - xwayland.enable = true; - - # systemd= { - # enable = true; - # # enable autostart of applications - # # REF: `man 8 systemd-xdg-autostart-generator` - # enableXdgAutostart = true; - # }; - - settings = { - "$MOD" = - if hostname == "myputer" - then "ALT" # my SUPER key broke ;w; - else "SUPER"; - - # applications - "$editor" = "hx"; - "$terminal" = "foot"; - "$menu" = "fuzzel"; - "$colorpicker" = "hyprpicker | head -c 7 | wl-copy"; - "$screenshot_region" = "hyprshot -m region --clipboard-only"; - "$screenshot_window" = "hyprshot -m window --clipboard-only"; - "$cursorLock" = "~/scripts/bin/hyprland-cursor-lock"; - - # startup programs - exec-once = [ - # TODO: make these independent of hyprland, add these to the - "mako &" - "awww-daemon &" - "waybar &" - - # "wl-paste --type text --watch cliphist store" - # "wl-paste --type image --watch cliphist store" - # "wl-clip-persist --clipboard regular" - # "playerctld daemon" - ]; - - # monitor configuration - monitor = - if hostname == "lolcathost" - then [ - "eDP-1, highres@highrr, 0x0, 1.0" # Programming - # "eDP-1, highres@highrr, 0x0, 1.5" # Comfy - ] - else if hostname == "myputer" - then [ - "DP-2, 3840x2160@60.00Hz, 0x0, 1.0" - "HDMI-A-1, 1920x1080@119.98Hz, 3840x0, 1.0" - ] - else []; - - # .__. .___ __..___. . . .___ .___. ._. __ __. - # [__] [__ (__ | |__| [__ | | / ` (__ - # | | [___ .__) | | | [___ | _|_ \__. .__) - general = { - gaps_in = 12; # margin between windows - gaps_out = 25; # margin from windows to monitor edge - gaps_workspaces = 0; # margin between workspaces (stacks with gaps_out) - # float_gaps = 0; # gaps_out but for floating windows - - border_size = 4; - - "col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg"; - "col.inactive_border" = "rgba(00000000)"; - - # Enable resizing windows by clicking and dragging the border - resize_on_border = true; - - # REF: https://wiki.hyprland.org/Configuring/Tearing/ - allow_tearing = false; - - layout = "dwindle"; - - snap = { - enabled = false; - window_gap = 10; - monitor_gap = 10; - border_overlap = false; - # respect_gaps = false; - }; - }; - - decoration = { - rounding = 20; - rounding_power = 4.0; # Lp norm - border_part_of_window = true; # consider border as part of its window - # screen_shader = ...; # path to custom GLSL fragment shader - - # window Transparency - active_opacity = 1.0; - inactive_opacity = 0.95; - fullscreen_opacity = 1.0; # fullscreened windows - # inactive Window Dimming - dim_inactive = false; - dim_strength = 0.5; - dim_special = 0.2; - dim_around = 0.4; - - blur = { - enabled = true; - new_optimizations = true; - xray = false; # floating windows xray through tiling windows - ignore_opacity = true; - - # blur Parameters - size = 8; - passes = 1; - noise = 0.0117; # default - contrast = 0.8916; # default - brightness = 0.8172; # default - vibrancy = 0.1696; # default - vibrancy_darkness = 0.0; # default - - # blurring For Specific Window Types - special = false; # blur special windows - popups = false; # blur popups - popups_ignorealpha = 0.2; - input_methods = false; - input_methods_ignorealpha = 0.2; - }; - - shadow = { - enabled = true; - ignore_window = true; # only render at edges (not behind) - - range = 3; - render_power = 1; # falloff rate - sharp = false; # aka infinite shadow.render_power - offset = "0 0"; # vec2 - scale = 1.0; - - color = "rgba(00000000)"; - color_inactive = "rgba(000000ff)"; # defaults to shadow.color if unset - }; - }; - - # REF: https://cubic-bezier.com - bezier = [ - "easeOutQuint,0.23,1,0.32,1" - "easeInOutCubic,0.65,0.05,0.36,1" - "linear,0,0,1,1" - "almostLinear,0.5,0.5,0.75,1.0" - "quick,0.15,0,0.1,1" - ]; - - # REF: https://wiki.hyprland.org/Configuring/Animations - # Animation Declaration Format: - # "animation = NAME, ENABLE, SPEED, BEZIER [,STYLE]" - # NOTE: SPEED is in ds (where 1ds = 100ms) - animations = [ - "global, 1, 10, default" - "border, 1, 5.39, easeOutQuint" - - "windowsIn, 1, 4, linear, slide bottom" - "windowsOut, 1, 10, linear, popin" - - "fadeIn, 1, 1.73, almostLinear" - "fadeOut, 1, 1.46, almostLinear" - "fade, 1, 3.03, quick" - - "layers, 1, 3.81, easeOutQuint" - "layersIn, 1, 4, easeOutQuint, fade" - "layersOut, 1, 1.5, linear, fade" - - "fadeLayersIn, 1, 1.79, almostLinear" - "fadeLayersOut, 1, 1.39, almostLinear" - - "workspaces, 1, 1.94, almostLinear, fade" - "workspacesIn, 1, 1.21, almostLinear, fade" - "workspacesOut, 1, 1.94, almostLinear, fade" - ]; - - # REF: https://wiki.hyprland.org/Configuring/Dwindle-Layout - dwindle = { - # master switch for pseudotiling. enabling is bound to MOD + P in the keybinds section below - pseudotile = true; - preserve_split = true; # You probably want this - }; - - # REF: https://wiki.hyprland.org/Configuring/Master-Layout - master = { - new_status = "master"; - }; - - misc = { - #force_default_wallpaper = -1; # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = true; - disable_splash_rendering = true; - - enable_anr_dialog = false; - font_family = "Geist Mono"; - }; - - input = { - # kb_layout = "us"; - # kb_variant = - # kb_model = - # kb_options = - # kb_rules = - - follow_mouse = 1; - - sensitivity = 0; # -1.0 - 1.0, 0 means no modification - accel_profile = "flat"; - force_no_accel = false; # not recommended to turn on - - repeat_rate = 50; - repeat_delay = 300; - - touchpad = { - natural_scroll = hostname == "lolcathost"; - }; - }; - - cursor.no_hardware_cursors = true; - - # standard keypress bindings - bind = [ - # terminal commands - "$MOD, RETURN, exec, $terminal" - "$MOD SHIFT, RETURN, exec, $terminal -D `[ -f ~/cry/.projdir ] && cat ~/cry/.projdir || echo ~`" - - # btop - "$MOD, P, exec, bash -c \"{ hyprctl clients | rg '^\w*title: btop' &>/dev/null; } && hyprctl dispatch closewindow title:btop || $terminal -T btop btop & disown\"" - - "$MOD, R, exec, $menu" - - # lock mouse to window (mostly, for gaming) - "$MOD, F1, exec, pkill hyprland-cursor || $cursorLock" - "$MOD, F2, exec, $colorpicker" - - # screenshots - "$MOD, S, exec, $screenshot_region" - "$MOD SHIFT, S, exec, $screenshot_window" - - "$MOD, F, fullscreen" - "$MOD SHIFT, F, fullscreenstate, 0 3" # fakefullscreen - "$MOD, C, killactive" - "$MOD SHIFT, Delete, exit" - - # switch window - "$MOD, left, movefocus, l" - "$MOD, right, movefocus, r" - "$MOD, up, movefocus, u" - "$MOD, down, movefocus, d" - "$MOD, H, movefocus, l" - "$MOD, J, movefocus, d" - "$MOD, K, movefocus, u" - "$MOD, L, movefocus, r" - - # switch workspaces - "$MOD, 1, workspace, 1" - "$MOD, 2, workspace, 2" - "$MOD, 3, workspace, 3" - "$MOD, 4, workspace, 4" - "$MOD, 5, workspace, 5" - "$MOD, 6, workspace, 6" - "$MOD, 7, workspace, 7" - "$MOD, 8, workspace, 8" - "$MOD, 9, workspace, 9" - "$MOD, 0, workspace, 10" - "$MOD SHIFT, left, workspace, e-1" - "$MOD SHIFT, right, workspace, e+1" - - # move window to workspace - "$MOD SHIFT, 1, movetoworkspace, 1" - "$MOD SHIFT, 2, movetoworkspace, 2" - "$MOD SHIFT, 3, movetoworkspace, 3" - "$MOD SHIFT, 4, movetoworkspace, 4" - "$MOD SHIFT, 5, movetoworkspace, 5" - "$MOD SHIFT, 6, movetoworkspace, 6" - "$MOD SHIFT, 7, movetoworkspace, 7" - "$MOD SHIFT, 8, movetoworkspace, 8" - "$MOD SHIFT, 9, movetoworkspace, 9" - "$MOD SHIFT, 0, movetoworkspace, 10" - - # move workspace to monitor - "$MOD TAB, 1, movecurrentworkspacetomonitor, DP-2" - "$MOD TAB, 2, movecurrentworkspacetomonitor, HDMA-A-1" - ]; - - # bindings for mouse - bindm = [ - "$MOD, mouse:272, movewindow" - "$MOD, mouse:273, resizewindow" - ]; - - # bindings that work even while screen is locked - bindl = [ - # WARNING: requires `pkgs.playerctl` - ", XF86AudioNext, exec, playerctl next" - ", XF86AudioPause, exec, playerctl play-pause" - ", XF86AudioPlay, exec, playerctl play-pause" - ", XF86AudioPrev, exec, playerctl previous" - ]; - - # bindings that work even while screen is locked - # and also repeat when the key is held - bindel = [ - ",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" - ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - ",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - ",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - ",XF86MonBrightnessUp, exec, brightnessctl s 10%+" - ",XF86MonBrightnessDown, exec, brightnessctl s 10%-" - ]; - - windowrule = [ - # btop process manager - { - name = "terminal-manager"; - "match:class" = "^(foot)$"; - "match:title" = "^(btop)$"; - float = true; - center = true; - size = "(monitor_w*0.65) (monitor_h*0.65)"; - } - - # ignore maximize requests from apps - { - name = "suppress-maximize"; - suppress_event = "maximize"; - "match:class" = ".*"; - } - - # fix some dragging issues with XWayland - { - name = "no-focus"; - no_focus = "on"; - "match:class" = "^$"; - "match:title" = "^$"; - "match:xwayland" = true; - "match:float" = true; - "match:fullscreen" = false; - "match:pin" = false; - } - - # TODO: style fakefullscreen windows to clearly indicate their difference - # { - # name = "fake-fullscreen"; - # } - ]; - - # █▀▀ █▄░█ █░█   █░█ ▄▀█ █▀█ - # ██▄ █░▀█ ▀▄▀   ▀▄▀ █▀█ █▀▄ - env = [ - "XCURSOR_THEME,Bibata-Modern-Ice" - "XCURSOR_SIZE,16" - "HYPRCURSOR_THEME,Bibata-Modern-Ice" - "HYPRCURSOR_SIZE,16" - - "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME,xdgdesktopportal" # makes portals work correctly - "XDG_MENU_PREFIX,arch-" - "XDG_CURRENT_DESKTOP,Hyprland" - ]; - }; - }; -} diff --git a/homes/modules/wm/mango/default.nix b/homes/modules/wm/mango/default.nix deleted file mode 100644 index 737558e..0000000 --- a/homes/modules/wm/mango/default.nix +++ /dev/null @@ -1,107 +0,0 @@ -{...}: { - home.shellAliases = { - logoff = "mmsg -q"; - }; - - wayland.windowManager.mango = { - enable = true; - - systemd = { - enable = true; - - # enable autostart of applications - # REF: `man 8 systemd-xdg-autostart-generator` - xdgAutostart = true; - }; - - settings = '' - # REF: config.conf - exec-once = awww-daemon - exec-once = mako - - bind=SUPER,Return,spawn,foot - bind=SUPER,R,spawn,fuzzel - - bind=SUPER+SHIFT,R,reload_config - bind=SUPER,Q,killclient - - # Brightness - bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl -e4 -n2 set 5%+ - bind=NONE,XF86MonBrightnessDown,spawn,brightnessctl -e4 -n2 set 5%- - bind=SUPER+SHIFT,-,spawn brightnessctl -e4 -n2 set 5%+ - bind=SUPER+SHIFT,+,spawn brightnessctl -e4 -n2 set 5%- - - # Window Options - bind=SUPER,F,togglefullscreen - bind=SUPER+SHIFT,F,togglefakefullscreen - - # Window Movement - bind=SUPER,Tab,focusstack,next - bind=SUPER,h,focusdir,left - bind=SUPER,l,focusdir,right - bind=SUPER,k,focusdir,up - bind=SUPER,j,focusdir,down - bind=SUPER,Left,focusdir,left - bind=SUPER,Right,focusdir,right - bind=SUPER,Up,focusdir,up - bind=SUPER,Down,focusdir,down - - keymode=resize - bind=NONE,Left,resizewin,-10.0 - bind=NONE,Right,resizewin,+10.0 - bind=NONE,Escape,setkeymode,default - - # Keyboard - repeat_rate=25 - repeat_delay=300 - numlockon=0 - xkb_rules_layout=us - - # Laptop Specific Things - # disable_trackpad=0 - # mouse_natural_scrolling=1 - - - bind=SUPER,1,view,1,0 - bind=SUPER,2,view,2,0 - bind=SUPER,3,view,3,0 - bind=SUPER,4,view,4,0 - bind=SUPER,5,view,5,0 - bind=SUPER,6,view,6,0 - bind=SUPER,7,view,7,0 - bind=SUPER,8,view,8,0 - bind=SUPER,9,view,9,0 - bind=SUPER+SHIFT,1,tag,1,0 - bind=SUPER+SHIFT,2,tag,2,0 - bind=SUPER+SHIFT,3,tag,3,0 - bind=SUPER+SHIFT,4,tag,4,0 - bind=SUPER+SHIFT,5,tag,5,0 - bind=SUPER+SHIFT,6,tag,6,0 - bind=SUPER+SHIFT,7,tag,7,0 - bind=SUPER+SHIFT,8,tag,8,0 - bind=SUPER+SHIFT,9,tag,9,0 - - bind=SUPER+SHIFT,h,focusmon,left - bind=SUPER+SHIFT,l,focusmon,right - bind=SUPER+SHIFT,k,focusmon,up - bind=SUPER+SHIFT,j,focusmon,down - - # bind=SUPER,Left,tagmon,left - # bind=SUPER,Right,tagmon,right - # bind=SUPER,Up,tagmon,up - # bind=SUPER,Down,tagmon,down - - bind=SUPER,g,toggleglobal - bind=SUPER,o,toggleoverlay - bind=SUPER,a,togglefloating - bind=SUPER,z,toggle_scratchpad - - ''; - autostart_sh = '' - # REF: autostart.sh - - # XDG_CURRENT_DESKTOP=mango - # dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP - ''; - }; -} diff --git a/homes/modules/wofi.nix b/homes/modules/wofi.nix new file mode 100755 index 0000000..81a25d3 --- /dev/null +++ b/homes/modules/wofi.nix @@ -0,0 +1,183 @@ +{ + lib, + config, + pkgs, + ... +}: { + programs.wofi = { + enable = true; + settings = { + location = "center"; + allow_markup = true; + width = 250; + }; + # Force the style to stop Stylix being a bitch and overwriting it + style = lib.mkForce '' + @define-color rosewater #f2d5cf; + @define-color rosewater-rgb rgb(242, 213, 207); + @define-color flamingo #eebebe; + @define-color flamingo-rgb rgb(238, 190, 190); + @define-color pink #f4b8e4; + @define-color pink-rgb rgb(244, 184, 228); + @define-color mauve #ca9ee6; + @define-color mauve-rgb rgb(202, 158, 230); + @define-color red #e78284; + @define-color red-rgb rgb(231, 130, 132); + @define-color maroon #ea999c; + @define-color maroon-rgb rgb(234, 153, 156); + @define-color peach #ef9f76; + @define-color peach-rgb rgb(239, 159, 118); + @define-color yellow #e5c890; + @define-color yellow-rgb rgb(229, 200, 144); + @define-color green #a6d189; + @define-color green-rgb rgb(166, 209, 137); + @define-color teal #81c8be; + @define-color teal-rgb rgb(129, 200, 190); + @define-color sky #99d1db; + @define-color sky-rgb rgb(153, 209, 219); + @define-color sapphire #85c1dc; + @define-color sapphire-rgb rgb(133, 193, 220); + @define-color blue #8caaee; + @define-color blue-rgb rgb(140, 170, 238); + @define-color lavender #babbf1; + @define-color lavender-rgb rgb(186, 187, 241); + @define-color text #c6d0f5; + @define-color text-rgb rgb(198, 208, 245); + @define-color subtext1 #b5bfe2; + @define-color subtext1-rgb rgb(181, 191, 226); + @define-color subtext0 #a5adce; + @define-color subtext0-rgb rgb(165, 173, 206); + @define-color overlay2 #949cbb; + @define-color overlay2-rgb rgb(148, 156, 187); + @define-color overlay1 #838ba7; + @define-color overlay1-rgb rgb(131, 139, 167); + @define-color overlay0 #737994; + @define-color overlay0-rgb rgb(115, 121, 148); + @define-color surface2 #626880; + @define-color surface2-rgb rgb(98, 104, 128); + @define-color surface1 #51576d; + @define-color surface1-rgb rgb(81, 87, 109); + @define-color surface0 #414559; + @define-color surface0-rgb rgb(65, 69, 89); + @define-color base #303446; + @define-color base-rgb rgb(48, 52, 70); + @define-color mantle #292c3c; + @define-color mantle-rgb rgb(41, 44, 60); + @define-color crust #232634; + @define-color crust-rgb rgb(35, 38, 52); + + * { + font-family: 'FiraCode Nerd Font'; + font-size: 16px; + } + + /* Window */ + window { + margin: 0px; + padding: 10px; + border: 0.16em solid @teal; + border-radius: 0.5em; + background-color: @base; + animation: slideIn 0.25s ease-in-out both; + } + + /* Slide In */ + @keyframes slideIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Inner Box */ + #inner-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; + /*animation: fadeIn 0.5s ease-in-out both;*/ + } + + /* Fade In */ + @keyframes fadeIn { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } + } + + /* Outer Box */ + #outer-box { + margin: 5px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Scroll */ + #scroll { + margin: 0px; + padding: 10px; + border: none; + background-color: @base; + } + + /* Input */ + #input { + margin: 5px 20px; + padding: 10px; + border: none; + border-radius: 0.25em; + color: @text; + background-color: @base; + animation: fadeIn 0.25s ease-in-out both; + } + + #input image { + border: none; + color: @red; + } + + #input * { + outline: 4px solid @red!important; + } + + /* Text */ + #text { + margin: 5px; + border: none; + color: @text; + animation: fadeIn 0.5s ease-in-out both; + } + + #entry { + background-color: @base; + } + + #entry arrow { + border: none; + color: @teal; + } + + /* Selected Entry */ + #entry:selected { + border: 0.10em solid @teal; + border-radius: 0.25em; + } + + #entry:selected #text { + color: @teal; + } + + #entry:drop(active) { + background-color: @lavender!important; + } + ''; + }; +} diff --git a/homes/subspace/default.nix b/homes/subspace/default.nix new file mode 100644 index 0000000..6b1c0fa --- /dev/null +++ b/homes/subspace/default.nix @@ -0,0 +1,72 @@ +{ + inputs, + outputs, + lib, + config, + pkgs, + ... +}: { + nixpkgs = { + config.allowUnfree = false; + }; + + imports = [ + ]; + + home = { + username = "subspace"; + homeDirectory = "/home/subspace"; + }; + + programs = { + fish = { + enable = true; + # Extra commands to run when entering a interactive shell + # (for the subspace user this will be exiting fish to + # run wishlist instead, a shell should not pop up!) + loginShellInit = '' + clear + exec wishlist + ''; + }; + + ssh = { + enable = true; + forwardAgent = true; + addKeysToAgent = "yes"; + + matchBlocks = { + hyrule = { + hostname = "imbored.dev"; + user = "ae"; + port = 22; + identityFile = "~/.ssh/id_hyrule"; + }; + YearnForTheMines = { + hostname = "deadlyserver.com"; + user = "emile"; + port = 29843; + identityFile = "~/.ssh/id_deadlyserver"; + }; + }; + }; + }; + + # Nicely reload system units when changing configs + systemd.user.startServices = "sd-switch"; + + # SERVICE: webfishing (example for wishlist) + #systemd.user.services.webfishing = { + # Unit.Description = "I be out here webfishing frfr"; + + # Install.WantedBy = ["default.target"]; + + # Service = { + # Type = "exec"; + # ExecStart = "echo $HOME; cat $HOME/.ssh/config"; + # Restart = "always"; + # }; + #}; + + home.stateVersion = "24.11"; # DO NOT MODIFY +} diff --git a/hosts/butterfly/default.nix b/hosts/butterfly/default.nix deleted file mode 100755 index 9ac9111..0000000 --- a/hosts/butterfly/default.nix +++ /dev/null @@ -1,91 +0,0 @@ -{...}: { - imports = [ - ./hardware.nix - - ./services - ]; - - # super duper minimum grub2 config - boot.loader.grub = { - enable = true; - device = "/dev/vda"; - }; - - networking = { - hostName = "butterfly"; - - firewall = { - allowedTCPPorts = [ - 22 # forgejo ssh - 80 # nginx - # 143 # IMAP4 - 443 # nginx - # 587 # SMTPS - 2222 # TEMP: forgejo ssh - # 3000 (INTERNAL) forgejo - # 3306 (INTERNAL) forgejo sqlite3 database - # 8222 (INTERNAL) vaultwarden - 42069 # ssh - 45000 # minecaft server - ]; - allowedUDPPorts = [ - 54231 # Wireguard - ]; - }; - - # wg-quick.interfaces = { - # wg0 = { - # address = [ - # "10.10.10.4/24" - # ]; - # dns = ["10.10.10.1"]; - # privateKeyFile = "/root/wg_agrivpn_hyrule"; - # peers = [ - # { - # # peer's public key - # publicKey = "iZ4aqYjbT8O8tfUHEuV+yWLtdoQbdBb6Nt0M4usMSiY="; - - # # choose which traffic to forward - # allowedIPs = [ - # "10.0.51.0/24" - # "10.10.10.0/24" - # ]; - # endpoint = "150.242.34.33:54231"; - # } - # ]; - # }; - # }; - }; - - services.pixiecore = { - enable = false; - - port = 1234; - statusPort = 1234; - openFirewall = true; - listen = "0.0.0.0"; - - quick = "xyz"; - mode = "boot"; - }; - - users.users = { - cry = { - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCsUZY45rgezi+8iROdcR5vPeacJ2fbMjlDijfUrH9hRX2FzCsg/4e3aFKhi2seZMmyTfbstxmDrrH8paUS5TibFgLFBGNngaF3CTjg85i5pm25Hr4IVo31oziBnTWaG6j3buYKtz5e1qSPzXywinJR+5+FCUJU7Fxa+EWTZcOX4wYgArSj4q73rZmvk5N0X44Mudt4nvpD2chvxygsdTzD6ph92qCuaJ/AbfmOoC7b/xvOaOVydUfgDLpHi9VZbd3akvvKxRfW6ZklldgXEzPXKMuastN0mwcBxvIb5G1Vkj8jtSVtKPc5psZ9/NWA5l38xH4qZ6z7eib6thtEMdtcKmTZEEWDADjqTea5Gj61c1n18cr6f3Tff+0bn/cxsl4Y0esi+aDeuCXYiIYNmeKBx0ttDNIxpk4J5Fdh6Xs+AZif5lnJErtu8TPy2aC0bc9wehTjMyvilTHfyerOD1ZJXhN2XwRVDGN7t7leAJZISJlPjqTDcw3Vfvzte/5JqS+FR+hbpG4uz2ix8kUa20u5YF2oSdGl8+zsdozVsdQm10Iv9WSXBV7t4m+oyodgtfzydBpmXq7aBXudCiEKw+7TC7F+1a4YFrVrCNXKFgKUpd1MiVLl7DIbzm5U9MD2BB3Fy7BPCzr3tW6/ExOhhpBWY+HnzVGQfkNr7dRcqfipKw== ae@dobutterfliescry.net" - ]; - }; - foxora = { - isNormalUser = true; - createHome = true; - home = "/home/foxora"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSBRYKap1p5lPocRTkguhJN72D2R2CImt5cFYx3Qa7h aurora@nixarawrui" - ]; - }; - }; - - virtualisation.docker.enable = true; - - system.stateVersion = "24.11"; # DO NOT MODIFY -} diff --git a/hosts/butterfly/services/default.nix b/hosts/butterfly/services/default.nix deleted file mode 100644 index b7d96af..0000000 --- a/hosts/butterfly/services/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{...}: { - imports = [ - ./nginx.nix - ./forgejo.nix - ./vaultwarden.nix - ]; -} diff --git a/hosts/butterfly/services/forgejo.nix b/hosts/butterfly/services/forgejo.nix deleted file mode 100644 index 65a126f..0000000 --- a/hosts/butterfly/services/forgejo.nix +++ /dev/null @@ -1,181 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.services.forgejo; -in { - # REF: https://github.com/NixOS/nixpkgs/blob/nixos-25.11/nixos/modules/services/misc/forgejo.nix - # REF: forgejo doesn't create the user/group by default if its name isn't "forgejo" - users.users = lib.mkIf (cfg.user != "forgejo") { - ${cfg.user} = { - home = cfg.stateDir; - useDefaultShell = true; - group = cfg.group; - isSystemUser = true; - }; - }; - users.groups = lib.mkIf (cfg.group != "forgejo") { - ${cfg.group} = {}; - }; - - # more options here: https://mynixos.com/nixpkgs/options/services.forgejo - # TODO: set a favicon https://forgejo.org/docs/next/contributor/customization/#changing-the-logo - # (might need me to override settings in the nixpkg) - # TODO: create a custom theme for forgejo (modify the source files most likely) - services.forgejo = { - enable = true; - - # XXX: WARNING: XXX: WARNING: XXX: TODO: set user="git" and settings.server.SSH_PORT=22 - # XXX: WARNING: XXX: WARNING: XXX: TODO: (currently both cause errors) - # XXX: WARNING: XXX: WARNING: XXX: TODO: THE USER FAILS I THINK CAUSE THE DIRECTORY DOESNT CHANGE THE USER PERMISSIONS - - user = "git"; # user forgejo runs as - # group = "forgejo"; # group forgejo runs as - # stateDir = "/var/lib/forgejo"; - - # enable support for Git Large File Storage - lfs.enable = true; - database = { - type = "sqlite3"; # postgres - host = "127.0.0.1"; - port = "3306"; # 5432 if postgres - }; - # settings are written directly to the `app.ini` config file - # refer to: https://forgejo.org/docs/latest/admin/config-cheat-sheet/ - settings = { - server = { - # ENABLE_ACME = true; - # ACME_EMAIL = "them@dobutterfliescry.net"; - DOMAIN = "tearforge.net"; - ROOT_URL = "https://tearforge.net"; - # address and port to listen on - HTTP_ADDR = "127.0.0.1"; - HTTP_PORT = 3000; - PROTOCOL = "http"; # http internally, reverse proxy uses https externally - - START_SSH_SERVER = true; - DISABLE_SSH = false; - SSH_PORT = 2222; - - SSH_SERVER_CIPHERS = "chacha20-poly1305@openssh.com,"; - SSH_SERVER_KEY_EXCHANGES = "sntrup761x25519-sha512,mlkem768x25519-sha256"; - }; - - DEFAULT = { - APP_NAME = "tearforge"; - APP_SLOGIN = "but cozy"; - APP_DISPLAY_NAME_FORMAT = "{APP_NAME} ::{APP_SLOGAN}::"; - }; - - repository = { - DEFAULT_PRIVATE = "private"; # last, private, public - # repo/org created on push to non-existent - ENABLE_PUSH_CREATE_USER = true; - ENABLE_PUSH_CREATE_ORG = true; - DEFAULT_PUSH_CREATE_PRIVATE = true; - MAX_CREATION_LIMIT = -1; - }; - - "repository.upload" = { - # max per-file size in MB - FILE_MAX_SIZE = 50; - # max number of files per upload - MAX_FILES = 5; - }; - - badges = let - # flat, flat-square, plastic, for-the-badge, social - style = "for-the-badge"; - in { - ENABLED = true; - GENERATOR_URL_TEMPLATE = "https://img.shields.io/badge/{{.label}}-{{.text}}-{{.color}}?style=${style}"; - }; - - ui = { - DEFAULT_THEME = "forgejo-dark"; - THEMES = "forgejo-auto,forgejo-light,forgejo-dark"; - }; - "ui.meta" = { - AUTHOR = "_cry64"; - DESCRIPTION = "This is my personal self-hosted git forge, where I keep and maintain personal projects! PS do butterflies cry when they're sad?"; - KEYWORDS = "emile,clark,boman,clarkboman,emileclarkb,cry,_cry64,cry64,dobutterfliescry,butterfly,butterflies,git,forge,forgejo,self-hosted,tearforge"; - }; - - markdown = { - ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true; - ENABLE_MATH = true; - }; - - admin = { - DEFAULT_EMAIL_NOTIFICATIONS = "enabled"; - SEND_NOTIFICATION_EMAIL_ON_NEW_USER = true; - }; - - security = { - # Controls access to the installation page. - # When set to “true”, the installation page is not accessible. - #INSTALL_LOCK = false; - - PASSWORD_HASH_ALGO = "argon2"; # ARGON2 BEST ALGO FR!! (default: argon2$2$65536$8$50) - MIN_PASSWORD_LENGTH = 12; - PASSWORD_COMPLEXITY = "lower,upper,digit,spec"; - PASSWORD_CHECK_PWN = true; - }; - - service = { - DISABLE_REGISTRATION = true; # toggle for new users - #DEFAULT_USER_IS_RESTRICTED = true; - # Forbid login with third-party services (ie github) - ALLOW_ONLY_INTERNAL_REGISTRATION = true; - ENABLE_CAPTCHA = true; - REQUIRE_CAPTCHA_FOR_LOGIN = true; - REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA = true; - LOGIN_REMEMBER_DAYS = 365; - ENABLE_NOTIFY_MAIL = true; - }; - "service.explore" = { - REQUIRE_SIGNIN_VIEW = false; - DISABLE_USERS_PAGE = false; - DISABLE_ORGANIZATIONS_PAGE = false; - DISABLE_CODE_PAGE = false; - }; - - cache = { - ADAPTER = "twoqueue"; - HOST = "{\"size\":100, \"recent_ratio\":0.25, \"ghost_ratio\":0.5}"; - ITEM_TTL = "16h"; - }; - - # TODO: fill this in once my mail server is configured - # email.incoming = { ... }; - - # optional - mailer = { - ENABLED = false; - SMTP_ADDR = "mail.tearforge.net"; - FROM = "noreply@tearforge.net"; - USER = "noreply@tearforge.net"; - }; - - log = { - MODE = "file"; - LEVEL = "Info"; # "Trace", "Debug", "Info", "Warn", "Error", "Critical" - ENABLE_SSH_LOG = true; - }; - - cron = { - ENABLED = true; - RUN_AT_START = false; - }; - - other = { - SHOW_FOOTER_VERSION = true; - SHOW_FOOTER_TEMPLATE_LOAD_TIME = true; - SHOW_FOOTER_POWERED_BY = true; - ENABLE_SITEMAP = true; - ENABLE_FEED = true; - }; - }; - }; -} diff --git a/hosts/butterfly/services/mailserver.nix b/hosts/butterfly/services/mailserver.nix deleted file mode 100644 index 7602302..0000000 --- a/hosts/butterfly/services/mailserver.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - config, - pkgs, - ... -}: { - imports = [ - (builtins.fetchTarball { - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/nixos-25.05/nixos-mailserver-nixos-25.05.tar.gz"; - sha256 = "0jpp086m839dz6xh6kw5r8iq0cm4nd691zixzy6z11c4z2vf8v85"; - }) - ]; - - # simple-nixos-mailserver - # DOCS: https://nixos-mailserver.readthedocs.io/en/latest - mailserver = { - enable = true; - # stateVersion = 3; - # Manually open the firewall instead - openFirewall = false; - virusScanning = false; # expensive memory usage - - fqdn = "mail.imbored.dev"; - domains = ["imbored.dev"]; - - # NOTE: generate hashes with `mkpasswd -sm bcrypt` - loginAccounts = { - "them@dobutterfliescry.net" = { - aliases = ["cry@dobutterfliescry.net"]; - hashedPasswordFile = let - CWD = builtins.getEnv "PWD"; - # XXX: TODO: use a secrets manager! - in "${CWD}/secrets/passwd/me"; - }; - }; - - certificateScheme = "acme-nginx"; - }; -} diff --git a/hosts/butterfly/services/minecraft-server.nix b/hosts/butterfly/services/minecraft-server.nix deleted file mode 100644 index 3bdb51c..0000000 --- a/hosts/butterfly/services/minecraft-server.nix +++ /dev/null @@ -1,65 +0,0 @@ -{ - pkgs, - upkgs, - ... -}: { - services.minecraft-server = { - enable = true; - package = upkgs.minecraft-server; # use latest version only! - declarative = true; - - eula = true; - - openFirewall = false; # do this manually instead - - whitelist = { - "SECRET1" = ""; - "SECRET2" = ""; - }; - - # REF: https://minecraft.wiki/w/Server.properties#Java_Edition - serverProperties = { - server-ip = "195.114.14.69"; # listen on all addresses if unset - server-port = 45000; # connection port - "query.port" = 45000; # share game info/advertising information - user-native-transport = true; # Linux packet RX/TX optimizations - - # Users Connections - enforce-secure-profile = true; - online-mode = true; # don't allow unlicensed minecraft accounts to join - prevent-proxy-connections = false; - rate-limit = 0; - - # Server Functionality - enable-status = true; # where the server appears as "online" - hide-online-players = false; - log-ips = true; - pause-when-empty-seconds = 60; # pause server when no player online for x seconds - view-distance = 10; # range: 3-32 - simulation-distance = 10; # range: 3-32 - - # Players - motd = "M&M's Cozycraft Realm <3"; - max-players = 2; - white-list = true; - idle-player-timeout = 0; # never kick idle players - - # Gameplay - gamemode = "survival"; - force-gamemode = true; - difficulty = "normal"; - hardcore = false; - pvp = true; - allow-cheats = true; - - # World - level-name = "M&M's Cozycraft"; # world name - # level-seed = "" # random seed if unset - level-type = "minecraft:normal"; # world generation preset - generate-structures = true; - spawn-monsters = true; - spawn-protection = 0; - }; - jvmOpts = "-Xms2046M -Xmx2046M -XX:+UseG1GC -XX:ParallelGCThreads=2 -XX:MinHeapFreeRatio=5 -XX:MaxHeapFreeRatio=10"; - }; -} diff --git a/hosts/butterfly/services/nginx.nix b/hosts/butterfly/services/nginx.nix deleted file mode 100644 index 9d5bc08..0000000 --- a/hosts/butterfly/services/nginx.nix +++ /dev/null @@ -1,57 +0,0 @@ -{pkgs, ...}: { - services.nginx = { - enable = true; - # NOTE: in wake of CVE-2022-3602/CVE-2022-3786 nginxStable is overlayed - package = pkgs.nginx; - - # recommendedGzipSettings = true; - # recommendedOptimisation = true; - # recommendedProxySettings = true; - # recommendedTlsSettings = true; - - # streamConfig = '' - # server { - # listen 127.0.0.1:53 udp reuseport; - # proxy_timeout 20s; - # proxy_pass 192.168.0.1:53535; - # } - # ''; - - virtualHosts = let - localhost = "http://127.0.0.1"; - std = { - # TODO: should I run over QUIC+HTTP3? (experimental) - # quic = true; - # http3 = true; - enableACME = true; - # kTLS = true; # offload TLS to the linux kernel - }; - in { - "dobutterfliescry.net" = - { - default = true; - addSSL = true; # addSSL NOT forceSSL <3 - root = "${pkgs.dobutterfliescry-net}/www"; - # extraConfig = '' - # error_page 404 /custom_404.html; - # ''; - } - // std; - "vault.imbored.dev" = - { - forceSSL = true; - locations."/".proxyPass = "${localhost}:8222"; - } - // std; - "tearforge.net" = - { - forceSSL = true; - extraConfig = '' - client_max_body_size 512M; - ''; - locations."/".proxyPass = "${localhost}:3000"; - } - // std; - }; - }; -} diff --git a/hosts/butterfly/services/vaultwarden.nix b/hosts/butterfly/services/vaultwarden.nix deleted file mode 100644 index 6cde9ab..0000000 --- a/hosts/butterfly/services/vaultwarden.nix +++ /dev/null @@ -1,25 +0,0 @@ -{...}: { - services.vaultwarden = { - enable = true; - dbBackend = "sqlite"; - - # backupDir = "/var/backup/vaultwarden"; # disable with null - - # https://mynixos.com/nixpkgs/option/services.vaultwarden.config - config = { - # internal address and port to listen on - ROCKET_ADDRESS = "127.0.0.1"; - ROCKET_PORT = 8222; - - # hostname to listen for - DOMAIN = "https://vault.imbored.dev"; - - # signup policy - SIGNUPS_ALLOWED = false; - SIGNUPS_VERIFY = true; - INVITATIONS_ALLOWED = true; - }; - # https://mynixos.com/nixpkgs/option/services.vaultwarden.environmentFile - environmentFile = "/var/lib/vaultwarden/vaultwarden.env"; - }; -} diff --git a/hosts/hyrule/default.nix b/hosts/hyrule/default.nix index a072583..11048b6 100755 --- a/hosts/hyrule/default.nix +++ b/hosts/hyrule/default.nix @@ -1,8 +1,65 @@ -{...}: { +{ + pkgs, + inputs, + lib, + ... +}: let + home-manager = builtins.fetchTarball { + url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; + sha256 = "0c07xj74vsj37d3a8f98i9rhhhr99ckwlp45n40f0qkmigm3pk8s"; + }; +in { imports = [ - ./hardware.nix + ./hardware-configuration.nix + (import "${home-manager}/nixos") + #../../flakes/wishlist/wishlist.nix + #../modules/server/nginx.nix + #../modules/server/ssh.nix + #../modules/server/fail2ban.nix ]; + # override wishlist with the new cool one! + #pkgs.config.packageOverrides = { + # wishlist = inputs.wishlist.packages.x86_64-linux.wishlist; + #}; + + nix.settings = { + # make wheel group trusted users allows my "ae" user + # to import packages not signed by a trusted key + # (aka super duper easier to remote deploy) + trusted-users = ["root" "@wheel"]; + experimental-features = [ + "nix-command" + "flakes" + ]; + }; + + time.timeZone = "Australia/Brisbane"; + + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + # colmena deployment configuration + deployment = { + targetHost = "imbored.dev"; + targetUser = "ae"; + targetPort = 22; + # the following line is unnecessary if using an ssh agent + #sshOptions = ["-i /home/me/.ssh/id_hyrule"]; + #keys = { + # "imbored.dev" = { + # # text, keyCommand, or keyFile must be set + # # text = ""; + # #keyCommand = [ "" ]; + # keyFile = "/home/me/.ssh/id_hyrule"; + # }; + #}; + buildOnTarget = false; # build locally then deploy + }; + # super duper minimum grub2 config boot.loader.grub = { enable = true; @@ -11,31 +68,419 @@ networking = { hostName = "hyrule"; + networkmanager.enable = true; + firewall = { + enable = true; allowedTCPPorts = [ - ]; - allowedUDPPorts = [ + 22 # sshd + 80 # nginx + # 143 # IMAP4 + 443 # nginx + # 587 # SMTPS + 2222 # forgejo ssh + 2035 # debug (for my job) + # 3000 (INTERNAL) forgejo + # 3306 (INTERNAL) forgejo sqlite3 database + 5000 # debug (for my job) + # 8222 (INTERNAL) vaultwarden ]; }; }; - users.users = { - cry = { - openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCsUZY45rgezi+8iROdcR5vPeacJ2fbMjlDijfUrH9hRX2FzCsg/4e3aFKhi2seZMmyTfbstxmDrrH8paUS5TibFgLFBGNngaF3CTjg85i5pm25Hr4IVo31oziBnTWaG6j3buYKtz5e1qSPzXywinJR+5+FCUJU7Fxa+EWTZcOX4wYgArSj4q73rZmvk5N0X44Mudt4nvpD2chvxygsdTzD6ph92qCuaJ/AbfmOoC7b/xvOaOVydUfgDLpHi9VZbd3akvvKxRfW6ZklldgXEzPXKMuastN0mwcBxvIb5G1Vkj8jtSVtKPc5psZ9/NWA5l38xH4qZ6z7eib6thtEMdtcKmTZEEWDADjqTea5Gj61c1n18cr6f3Tff+0bn/cxsl4Y0esi+aDeuCXYiIYNmeKBx0ttDNIxpk4J5Fdh6Xs+AZif5lnJErtu8TPy2aC0bc9wehTjMyvilTHfyerOD1ZJXhN2XwRVDGN7t7leAJZISJlPjqTDcw3Vfvzte/5JqS+FR+hbpG4uz2ix8kUa20u5YF2oSdGl8+zsdozVsdQm10Iv9WSXBV7t4m+oyodgtfzydBpmXq7aBXudCiEKw+7TC7F+1a4YFrVrCNXKFgKUpd1MiVLl7DIbzm5U9MD2BB3Fy7BPCzr3tW6/ExOhhpBWY+HnzVGQfkNr7dRcqfipKw== ae@dobutterfliescry.net" - ]; - }; - foxora = { - isNormalUser = true; - createHome = true; - home = "/home/foxora"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDSBRYKap1p5lPocRTkguhJN72D2R2CImt5cFYx3Qa7h aurora@nixarawrui" - ]; + # grant passwordless sudo to wheel group + security.sudo.wheelNeedsPassword = false; + + users = { + defaultUserShell = pkgs.bash; + + users = { + # primary user + ae = { + isNormalUser = true; + extraGroups = ["wheel" "networkmanager" "docker"]; + shell = pkgs.bash; + home = "/home/ae"; # TEMP: remove and replace with home-manager + packages = with pkgs; [ + ]; + }; + + subspace = let + # override + wishlistBash = + pkgs.bash.override { + }; + in { + isNormalUser = true; + shell = pkgs.bash; + home = "/home/subspace"; + packages = with pkgs; [ + wishlist + ]; + }; + + # user for friends to ssh into + friends = { + isNormalUser = true; + shell = pkgs.bash; + home = "/home/friends"; # TEMP: remove and replace with home-manager + packages = with pkgs; [ + ]; + }; }; }; virtualisation.docker.enable = true; - system.stateVersion = "25.11"; # DO NOT MODIFY + home-manager = { + users = { + ae = import ../../homes/ae; + subspace = import ../../homes/subspace; + }; + sharedModules = []; + }; + + services = { + # simple nginx instance to host static construction page + # TODO: I want sshd and forgejo's ssh server to both be bound to port 22 + # So change sshd to listen on a different address/port (ie 2222 or 127.0.0.3:22, etc) + # and change forgejo to use 127.0.0.2:22 (use port 22, ONLY change loopback address) + nginx = { + enable = true; + + # in wake of CVE-2022-3602/CVE-2022-3786 + package = pkgs.nginxStable.override {openssl = pkgs.libressl;}; + + #virtualHosts."imbored.dev".locations."/" = { + virtualHosts = { + "imbored.dev" = { + # "http:imbored.dev" = { + default = true; + # serverName = "imbored.dev"; + # listenAddresses = ["imbored.dev"]; + enableACME = true; + addSSL = true; # forceSSL = true; + root = "/var/www/imbored"; + #index = "index.html"; + #root = pkgs.writeTextDir "index.html" '' + # + # + # Give me your mittens! + # + # + #''; + }; + # "ssh:imbored.dev" = { + # serverName = "imbored.dev"; + # listen = [{ + # addr = "imbored.dev"; + # port= 22; + # }]; + # locations."/".proxyPass = "ssh://127.0.0.1:2222"; + # }; + # Route "vault" subdomain to vaultwarden + "vault.imbored.dev" = { + enableACME = true; + forceSSL = true; + locations."/".proxyPass = "http://127.0.0.1:8222"; + }; + # Route "forge" subdomain to forgejo + "forge.imbored.dev" = { + # "https:forge.imbored.dev" = { + #serverName = "forge.imbored.dev"; + #listenAddresses = ["forge.imbored.dev"]; # NOTE: I think this is wrong + enableACME = true; # TODO: maybe use `forgejo.settings.server.ENABLE_ACME` instead? + forceSSL = true; + extraConfig = '' + client_max_body_size 512M; + ''; + locations."/".proxyPass = "http://127.0.0.1:3000"; + }; + # NOTE: would it work if I used "ssh://forge.imbored.dev" and "https://forge.imbored.dev" instead? + # "ssh:forge.imbored.dev" = { + # serverName = "forge.imbored.dev"; + # listen = [{ + # addr = "forge.imbored.dev"; + # port = 22; + # }]; + # locations."/".proxyPass = "ssh://127.0.0.2:22"; + # }; + }; + }; + + openssh = { + enable = true; + ports = [22]; + settings = { + PasswordAuthentication = true; + PermitRootLogin = "no"; + AllowUsers = ["ae" "subspace"]; # allow all users by default + UseDns = true; + X11Forwarding = false; + }; + }; + + vaultwarden = { + enable = true; + dbBackend = "sqlite"; + + # backupDir = "/var/backup/vaultwarden"; # disable with null + + # https://mynixos.com/nixpkgs/option/services.vaultwarden.config + config = { + # internal address and port to listen on + ROCKET_ADDRESS = "127.0.0.1"; + ROCKET_PORT = 8222; + + # hostname to listen for + DOMAIN = "https://vault.imbored.dev"; + SIGNUPS_ALLOWED = false; + }; + # https://mynixos.com/nixpkgs/option/services.vaultwarden.environmentFile + environmentFile = "/var/lib/vaultwarden/vaultwarden.env"; + }; + + # stalwart-mail = let + # domain = "imbored.dev"; + # in { + # enable = false; # true; + # # openFirewall = true; # im doing this manually rn + # settings = { + # certificate."${domain}" = { + # cert = "file://${certs.${domain}.cert}"; + # private-key = "file://${certs.${domain}.key}"; + # }; + # server = { + # hostname = domain; + # tls = { + # certificate = "${domain}"; + # enable = true; + # implicit = false; + # }; + # listener = { + # "smtp-submission" = { + # bind = ["127.0.0.1:587"]; + # protocol = "smtp"; + # }; + # "imap" = { + # bind = ["127.0.0.1:143"]; + # protocol = "imap"; + # }; + # }; + # }; + # session = { + # rcpt.directory = "in-memory"; + # auth = { + # mechanisms = ["PLAIN"]; + # directory = "in-memory"; + # }; + # }; + # jmap.directory = "in-memory"; + # queue.outbound.next-hop = ["local"]; + # directory."in-memory" = { + # type = "memory"; + # users = [ + # { + # name = "me"; + # secret = "foobar"; + # email = ["me@${domain}"]; + # } + # { + # name = "Emile"; + # secret = "foobar"; + # email = ["emile@${domain}"]; + # } + # ]; + # }; + # }; + # }; + + # more options here: https://mynixos.com/nixpkgs/options/services.forgejo + # TODO: set a favicon https://forgejo.org/docs/next/contributor/customization/#changing-the-logo + # (might need me to override settings in the nixpkg) + # TODO: create a custom theme for forgejo (modify the source files most likely) + forgejo = { + enable = true; + # enable support for Git Large File Storage + lfs.enable = true; + database = { + type = "sqlite3"; # postgres + host = "127.0.0.1"; + port = "3306"; # 5432 if postgres + }; + # settings are written directly to the `app.ini` config file + # refer to: https://forgejo.org/docs/latest/admin/config-cheat-sheet/ + settings = { + server = { + # ENABLE_ACME = true; + # ACME_EMAIL = "eclarkboman@gmail.com"; # change this to "me@imbored.dev" + DOMAIN = "forge.imbored.dev"; # should this be "imbored.dev"? + ROOT_URL = "https://forge.imbored.dev"; # full public URL of the Forgejo server + # address and port to listen on + HTTP_ADDR = "127.0.0.1"; + HTTP_PORT = 3000; + PROTOCOL = "http"; # http internally, reverse proxy uses https externally + + START_SSH_SERVER = true; + DISABLE_SSH = false; + SSH_PORT = 2222; + }; + + DEFAULT = { + APP_NAME = "Emile's Forge"; + APP_SLOGIN = "Cozy"; + APP_DISPLAY_NAME_FORMAT = "{APP_NAME}: {APP_SLOGAN}"; + }; + + repository = { + DEFAULT_PRIVATE = "private"; # last, private, public + DEFAULT_PUSH_CREATE_PRIVATE = true; + MAX_CREATION_LIMIT = -1; + }; + + "repository.upload" = { + # max per-file size in MB + FILE_MAX_SIZE = 50; + # max number of files per upload + MAX_FILES = 5; + }; + + badges = let + # flat, flat-square, plastic, for-the-badge, social + style = "for-the-badge"; + in { + ENABLED = true; + GENERATOR_URL_TEMPLATE = "https://img.shields.io/badge/{{.label}}-{{.text}}-{{.color}}?style=${style}"; + }; + + ui = { + DEFAULT_THEME = "forgejo-dark"; + THEMES = "forgejo-auto,forgejo-light,forgejo-dark"; + }; + "ui.meta" = { + AUTHOR = "Emile Clark-Boman - emileclarkb"; + DESCRIPTION = "This is my personal self-hosted git forge, where I keep and maintain personal projects!"; + KEYWORDS = "emileclarkb,git,forge,forgejo,self-hosted"; + }; + + markdown = { + ENABLE_HARD_LINE_BREAK_IN_COMMENTS = true; + ENABLE_MATH = true; + }; + + admin = { + DEFAULT_EMAIL_NOTIFICATIONS = "enabled"; + SEND_NOTIFICATION_EMAIL_ON_NEW_USER = true; + }; + + security = { + # Controls access to the installation page. + # When set to “true”, the installation page is not accessible. + #INSTALL_LOCK = false; + + PASSWORD_HASH_ALGO = "argon2"; # ARGON2 BEST ALGO FR!! + MIN_PASSWORD_LENGTH = 12; + PASSWORD_COMPLEXITY = "lower,upper,digit,spec"; + PASSWORD_CHECK_PWN = true; + }; + + service = { + # toggle to create an admin user + DISABLE_REGISTRATION = true; + #DEFAULT_USER_IS_RESTRICTED = true; + # Forbid login with third-party services (ie github) + ALLOW_ONLY_INTERNAL_REGISTRATION = true; + ENABLE_CAPTCHA = true; + REQUIRE_CAPTCHA_FOR_LOGIN = true; + REQUIRE_EXTERNAL_REGISTRATION_CAPTCHA = true; + LOGIN_REMEMBER_DAYS = 365; + ENABLE_NOTIFY_MAIL = true; + }; + "service.explore" = { + REQUIRE_SIGNIN_VIEW = false; + DISABLE_USERS_PAGE = false; + DISABLE_ORGANIZATIONS_PAGE = false; + DISABLE_CODE_PAGE = false; + }; + + cache = { + ADAPTER = "twoqueue"; + HOST = "{\"size\":100, \"recent_ratio\":0.25, \"ghost_ratio\":0.5}"; + ITEM_TTL = "16h"; + }; + + # TODO: fill this in once my mail server is configured + # email.incoming = { ... }; + + # optional + # TODO: fill this in once my mail server is configured + mailer = { + ENABLED = false; + SMTP_ADDR = "mail.imbored.dev"; + FROM = "noreply@imbored.dev"; + USER = "noreply@imbored.dev"; + }; + + log = { + MODE = "file"; + LEVEL = "Info"; # "Trace", "Debug", "Info", "Warn", "Error", "Critical" + ENABLE_SSH_LOG = true; + }; + + cron = { + ENABLED = true; + RUN_AT_START = false; + }; + + other = { + SHOW_FOOTER_VERSION = true; + SHOW_FOOTER_TEMPLATE_LOAD_TIME = true; + SHOW_FOOTER_POWERED_BY = true; + ENABLE_SITEMAP = true; + ENABLE_FEED = true; + }; + }; + }; + }; + # accept Lets Encrypt's security policy (for nginx) + security.acme = { + acceptTerms = true; + # TODO: change this to me@imbored.dev + defaults.email = "eclarkboman@gmail.com"; + }; + + environment.systemPackages = with pkgs; [ + vim + helix + + #wishlist + ]; + + programs = { + fish.enable = true; + + 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 ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + }; + + #systemd.services.wishlist = { + # description = "Single entrypoint for multiple SSH endpoints"; + # wantedBy = ["multi-user.target"]; + # + # serviceConfig = { + # DynamicUser = "yes"; + # ExecStart = "${pkgs.wishlist}/bin/wishlist serve --config /home/$USER/.ssh/config"; + # Restart = "always"; + # RestartSec = "2s"; + # }; + #}; + + system.stateVersion = "24.11"; # DO NOT MODIFY } diff --git a/hosts/butterfly/hardware.nix b/hosts/hyrule/hardware-configuration.nix similarity index 100% rename from hosts/butterfly/hardware.nix rename to hosts/hyrule/hardware-configuration.nix diff --git a/hosts/hyrule/hardware.nix b/hosts/hyrule/hardware.nix deleted file mode 100644 index 13fe39a..0000000 --- a/hosts/hyrule/hardware.nix +++ /dev/null @@ -1,37 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-label/NIXROOT"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-label/NIXBOOT"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.ens3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/hosts/imbored/default.nix b/hosts/imbored/default.nix new file mode 100755 index 0000000..df99d85 --- /dev/null +++ b/hosts/imbored/default.nix @@ -0,0 +1,83 @@ +{ + pkgs, + inputs, + lib, + ... +}: let + home-manager = builtins.fetchTarball { + url = "https://github.com/nix-community/home-manager/archive/master.tar.gz"; + sha256 = "19w63qccz78v0spx03911z98w1bvlxvd07hb0ma14a4vdzi4ninj"; + }; +in { + # TODO: + # - add github:charmbracelet/soft-serve + # - add forgejo + + imports = [ + ../modules/server/nginx.nix + ../modules/server/ssh.nix + ../modules/server/fail2ban.nix + ]; + + system.stateVersion = "24.05"; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + time.timeZone = "Australia/Brisbane"; + + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + boot.loader = { + # TODO + }; + + networking = { + hostName = "imbored"; + networkmanager.enable = true; + firewall.allowedTCPPorts = [ + 22 # sshd + ] + }; + + users = { + defaultUserShell = pkgs.bash; + + users = { + # primary user + dev = { + isNormalUser = true; + extraGroups = ["wheel"]; + shell = pkgs.bash; + packages = with pkgs; [ + ]; + }; + + # user for friends to ssh into + friends = { + isNormalUser = true; + shell = pkgs.bash; + packages = with pkgs; [ + ]; + }; + }; + }; + + #home-manager = { + # users = { + # dev = import ../../homes/dev; + # friends = import ../../homes/friends; + # }; + #}; + + environment.SystemPackages = with pkgs; [ + ]; + + programs = { + }; +} diff --git a/hosts/lolcathost/default.nix b/hosts/lolcathost/default.nix index 2e2e450..e8c0989 100755 --- a/hosts/lolcathost/default.nix +++ b/hosts/lolcathost/default.nix @@ -1,58 +1,298 @@ { - root, - config, pkgs, + inputs, + lib, ... -}: { +}: let + home-manager = builtins.fetchTarball { + url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; + sha256 = "15k41il0mvmwyv6jns4z8k6khhmb22jk5gpcqs1paym3l01g6abn"; + }; +in { imports = [ - ./hardware.nix + ./hardware-configuration.nix + (import "${home-manager}/nixos") + inputs.spicetify-nix.nixosModules.default ]; + programs.spicetify = let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + shuffle # shuffle+ (special characters are sanitized out of extension names) + ]; + #theme = spicePkgs.themes.catppuccin; + #colorScheme = "mocha"; + }; + + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + grub = { + efiSupport = true; + #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system + device = "nodev"; + useOSProber = true; + }; + # GitHub: vinceliuice/grub2-themes + grub2-theme = { + enable = true; + theme = "whitesur"; # stylish, vimix, or whitesur + footer = true; + customResolution = "1920x1080"; # Optional: Set a custom resolution + }; + }; + + # Set your time zone. + time.timeZone = "Australia/Brisbane"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + #packages = with pkgs; [ + # nerdfonts + #]; + }; + + # ----- NETWORKING SECTION ----- networking.hostName = "lolcathost"; + networking.networkmanager.enable = true; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = true; # ----- SERVICES ----- services = { - # dbus = { - # # NOTE: programs.uwsm.enable sets implementation to dbus-broker, - # # NOTE: however this seems to break dbus - # implementation = lib.mkForce "dbus"; - # }; + # Set display manager (login screen) + displayManager = { + # sddm relies on pkgs.libsForQt5.qt5.qtgraphicaleffects + sddm = { + enable = true; + wayland.enable = true; # enable experimental sddm support for wayland + theme = "corners"; + }; + defaultSession = "hyprland"; + }; - # Touchpad support + # Enable sound + #hardware.pulseaudio.enable = false; + pipewire = { + enable = true; + wireplumber.enable = true; + + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + # Enable touchpad support libinput.enable = true; + + tumbler.enable = true; # Thunar image thumbnail support + gvfs.enable = true; # Thunar mount, trash, and other functionality + }; + security.rtkit.enable = true; # I *think* this is for pipewire + + # allow wheel group to use passwordless sudo + users = { + # using fish as the login shell tends + # to go very poorly because it isn't + # POSIX compliant, so we'll just use + # simple Bash then :) + defaultUserShell = pkgs.bash; + + users = { + # literally me fr (personal account) + me = { + isNormalUser = true; + extraGroups = ["wheel"]; + shell = pkgs.bash; #pkgs.fish + packages = with pkgs; [ + firefox + nitch + starfetch + + # flatpak requires gnome-software + # for graphical applications + flatpak + gnome-software + ]; + }; + + # user for my professional jobs and stuff + ae = { + isNormalUser = true; + extraGroups = ["wheel"]; + shell = pkgs.bash; #pkgs.fish + packages = with pkgs; [ + ]; + }; + + # # This is the user account for servers + # dev = { + # isNormalUser = true; + # extraGroups = ["wheel"]; + # shell = pkgs.bash; #pkgs.zsh + # packages = with pkgs; [ + # ]; + # }; + + # user for friends to ssh into + friends = { + isNormalUser = true; + shell = pkgs.fish; + packages = with pkgs; [ + ]; + }; + }; }; - # users = { - # users = { - # # literally me fr (personal account) - # ilovecry = { - # isNormalUser = true; - # extraGroups = ["wheel"]; - # shell = pkgs.bash; - # # hashedPasswordFile = config.sops.secrets.ilovecryPassword.path; - # }; - # }; + home-manager = { + users.me = import ../../homes/me; + sharedModules = [ + inputs.nixcord.homeManagerModules.nixcord + inputs.ags.homeManagerModules.default + {nixpkgs.overlays = [inputs.hyprpanel.overlay];} + ]; + }; + + # ---- SYSTEM PACKAGES ----- + environment.systemPackages = with pkgs; [ + # User Environment + inputs.swww.packages.${pkgs.system}.swww + helvum + easyeffects + ani-cli + wl-clipboard # clipboard for wayland + hyprpicker + + (callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners + # dependencies for my sddm theme: + pkgs.libsForQt5.qt5.qtgraphicaleffects + + python311 # I use 3.11 since it's in a pretty stable state now + poetry # python dependency management and packaging + + # fish plugins + grc # colorise command outputs + + httpie + curlie + zoxide + doggo + tldr + btop + + # Pretty necessary + git + brightnessctl + acpi + vim + + # Unix Commands + wget + tree + unzip + ]; + + # Enable the use of certain programs + programs = { + hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + + xwayland.enable = true; + }; + + zsh.enable = true; + fish.enable = true; + + # I want to use fish as my login shell but it always goes terrible + # cause it isn't POSIX compliant, so instead Bash is my login and + # will just exec fish (^-^) + 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 ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + + # Thunar also uses: `services.tumbler` & `services.gvfs` + thunar = { + enable = true; + plugins = with pkgs.xfce; [ + thunar-volman # for removable drives (ie USBs) + thunar-archive-plugin # create and extract archives + thunar-media-tags-plugin # change metadata for media files + ]; + }; + }; + + # ----- FONTS ----- + fonts = { + enableDefaultPackages = true; # no clue what this line does tbh + packages = with pkgs; [ + #(nerdfonts.override { + # fonts = [ + # "Cousine" + # "Iosevka" + # "JetBrainsMono" + # ]; + # }) + nerdfonts + geist-font # for my hyprlock theme + + # texlive maintains a noto-emoji flake + texlivePackages.noto-emoji + ]; + + # TODO: change my default fonts + fontconfig = { + defaultFonts = { + serif = ["Iosevka"]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font + sansSerif = ["Iosevka "]; + monospace = ["Cousine"]; + emoji = ["Noto Emoji"]; + }; + }; + }; + + # Enable the new CLI commands and the flakes as experimental features + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; # }; - # sops = { - # defaultSopsFile = /${root}/secrets/user.yaml; - # # age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"]; - # secrets = { - # "hashedPassword" = { - # neededForUsers = true; - # }; - # "ilovecryPassword" = { - # neededForUsers = true; - # }; - # # "gitlab/oauth_token" = {}; - # # "tailscale/authkey" = {}; - # # "guest_accounts.json" = {}; - # # "npmrc" = { - # # owner = "youruser"; - # # path = "/home/youruser/.npmrc"; - # # }; - # }; - # }; + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Enable OpenGL + hardware = { + graphics.enable = true; + }; # DO NOT MODIFY system.stateVersion = "24.05"; # Did you read the comment? diff --git a/hosts/lolcathost/hardware.nix b/hosts/lolcathost/hardware-configuration.nix similarity index 100% rename from hosts/lolcathost/hardware.nix rename to hosts/lolcathost/hardware-configuration.nix diff --git a/hosts/matcha/default.nix b/hosts/matcha/default.nix deleted file mode 100644 index ac62e39..0000000 --- a/hosts/matcha/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{...}: { - imports = [ - ./hardware.nix - ./state.nix - ]; - - boot.loader = { - efi = { - canTouchEfiVariables = true; - efiSysMountPoint = "/boot/efi"; - }; - grub = { - efiSupport = true; - device = "nodev"; - }; - }; - - networking.hostName = "matcha"; - - users.users.cry = { - openssh.authorizedKeys.keys = [ - "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAGEvtRs3C4hjSuvVm2lukqOvObCz5gVlFthcvpGHAqlBgZo47CNJM78WoviEQWceqtu9ZzJdRJ7qEK9ZGvTM0XTSgExkOs6YdS3J7M3i3YS1vcj9KVPinLhiE90aED/319pbYKFrRs/lRzl8XLeaPNqenNMNJBqeary8+r5u9JC6zYCeQ== me@lolcathost" - ]; - }; -} diff --git a/hosts/matcha/hardware.nix b/hosts/matcha/hardware.nix deleted file mode 100644 index aadc3d1..0000000 --- a/hosts/matcha/hardware.nix +++ /dev/null @@ -1,33 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/d54a5644-744b-4b2a-8c4b-c12836498724"; - fsType = "ext4"; - }; - - fileSystems."/boot/efi" = - { device = "/dev/disk/by-uuid/12CE-A600"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/9513ded6-662e-42f7-926e-64d198c2ae7c"; } - ]; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/matcha/state.nix b/hosts/matcha/state.nix deleted file mode 100644 index f6f238f..0000000 --- a/hosts/matcha/state.nix +++ /dev/null @@ -1,20 +0,0 @@ -{...}: { - # This option defines the first version of NixOS you have installed on this particular machine, - # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. - # - # Most users should NEVER change this value after the initial install, for any reason, - # even if you've upgraded your system to a new NixOS release. - # - # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, - # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how - # to actually do that. - # - # This value being lower than the current NixOS release does NOT mean your system is - # out of date, out of support, or vulnerable. - # - # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, - # and migrated your data accordingly. - # - # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . - system.stateVersion = "25.11"; # Did you read the comment? -} diff --git a/hosts/modules/apps/rider.nix b/hosts/modules/apps/rider.nix deleted file mode 100644 index b484f33..0000000 --- a/hosts/modules/apps/rider.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - pkgs, - upkgs, - dotnetVersions ? [8 9 10], - ... -}: { - imports = [ - ../langs/dotnet.nix - ]; - - environment.systemPackages = with pkgs; [ - # Ensure latest stable Rider version (not necessarily stable on NixOS) - upkgs.jetbrains.rider - - # NOTE: Blazor requires a Chromium-based browser - chromium - ]; - - programs.nix-ld = { - enable = true; - libraries = with pkgs; [ - icu - ]; - }; -} diff --git a/hosts/modules/apps/winbox.nix b/hosts/modules/apps/winbox.nix deleted file mode 100644 index eaf8b7c..0000000 --- a/hosts/modules/apps/winbox.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: { - programs.winbox = { - enable = true; - openFirewall = false; # port: 5678 - }; -} diff --git a/hosts/modules/bashistrans.nix b/hosts/modules/bashistrans.nix deleted file mode 100644 index e9d74ae..0000000 --- a/hosts/modules/bashistrans.nix +++ /dev/null @@ -1,27 +0,0 @@ -{pkgs, ...}: { - # I want to use fish as my login shell but it always goes terrible - # cause it isn't POSIX compliant, so instead Bash is my login and - # will just exec fish (^-^) - programs = { - fish.enable = true; - - bash = { - blesh.enable = false; # ble.sh replacement for GNU readline - completion.enable = true; - - interactiveShellInit = '' - # help bash transition into a beautiful fish! - if [[ -z $CRY_BASH_IS_TRANS ]] - then - 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 ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi - fi - # bash is trans now! (no more transitioning required) - export CRY_BASH_IS_TRANS=true - ''; - }; - }; -} diff --git a/hosts/modules/gaming/steam.nix b/hosts/modules/gaming/steam.nix deleted file mode 100644 index 8bffdf3..0000000 --- a/hosts/modules/gaming/steam.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - pkgs, - upkgs, - ... -}: { - nixpkgs.overlays = [ - (self: super: { - lutris = super.lutris.overrideAttrs (final: prev: { - # WARNING: pkgs.mbedtls_2 is marked insecure! - # Replace pkgs.mbedtls_2 (v2.28.10) with pkgs.mbedtls (v3.6.4) - targetPkgs = pkgs: ( - (builtins.filter (p: p != pkgs.mbedtls_2) (prev.targetPkgs pkgs)) - ++ [pkgs.mbedtls] - ); - }); - }) - ]; - - programs = { - steam = { - enable = true; - package = upkgs.millennium-steam; - gamescopeSession.enable = false; # .desktop entry for gamescope - - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - - extraCompatPackages = with pkgs; [ - proton-ge-bin - ]; - }; - - gamemode.enable = true; - }; - - environment.systemPackages = with pkgs; [ - steamcmd - - mangohud - protonup-qt - - # XXX: DEBUG: disable lutris - # XXX: NOTE: pkgs.lutris depends on pkgs.mbedtls_2 which is marked insecure! - # XXX: NOTE: Use the provided overlay to patch pkgs.mbedtls_2 -> pkgs.mbedtls - # lutris - - bottles - ]; -} diff --git a/hosts/modules/langs/dotnet.nix b/hosts/modules/langs/dotnet.nix deleted file mode 100644 index 74ba955..0000000 --- a/hosts/modules/langs/dotnet.nix +++ /dev/null @@ -1,60 +0,0 @@ -{ - lib, - pkgs, - upkgs, - ... -}: let - dotnetVersions = [8 9 10]; - - dotnetCombined = - pkgs.dotnetCorePackages.combinePackages - (builtins.concatMap - (v: let - # dotnet = pkgs.dotnetCorePackages."dotnet_${builtins.toString x}"; - in [ - # dotnet.sdk - - # the runtime+aspnetcore packaged with the sdk - pkgs.dotnetCorePackages."sdk_${builtins.toString v}_0" - ]) - dotnetVersions); - - # Custom packaged tools - dotnetTools = with lib; { - uno-check = with pkgs.dotnetCorePackages; - buildDotnetGlobalTool { - pname = "Uno.Check"; - version = "1.32.17"; - - nugetHash = "sha256-BfTVF5uHu9/nyLXqdDEOHCxq6BVQWhsnDBbARzdLDAE="; - - executables = "uno-check"; - - dotnet-sdk = dotnet_9.sdk; - dotnet-runtime = dotnet_9.runtime; - - meta = { - homepage = "https://github.com/unoplatform/uno.check"; - license = licenses.mit; - }; - }; - }; -in { - environment.systemPackages = with pkgs; [ - # .NET - dotnetCombined - - # .NET Tools - dotnetTools.uno-check - - # Mono - mono - # NOTE: nixupkgs uses .NET8 SDK - # WARNING: nixpkgs-25.05 uses .NET6 SDK (now marked insecure) - upkgs.msbuild - - # .NET Framework Tools/Services - omnisharp-roslyn - netcoredbg - ]; -} diff --git a/hosts/modules/obsidian.nix b/hosts/modules/obsidian.nix deleted file mode 100644 index ed800c3..0000000 --- a/hosts/modules/obsidian.nix +++ /dev/null @@ -1,5 +0,0 @@ -{pkgs, ...}: { - environment.systemPackages = with pkgs; [ - obsidian - ]; -} diff --git a/hosts/modules/wm/hyprland.nix b/hosts/modules/wm/hyprland.nix deleted file mode 100644 index 5fb29ea..0000000 --- a/hosts/modules/wm/hyprland.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - inputs, - pkgs, - lib, - system, - ... -}: let - # hyprpkgs = inputs.hyprland.packages.${system}; - hyprpkgs = inputs.hyprland.inputs.nixpkgs.legacyPackages.${system}; -in { - environment.defaultPackages = with pkgs; [ - hyprsunset - ]; - - xdg.portal = { - enable = true; - - wlr.enable = true; - }; - - programs = { - hyprland = { - enable = true; - package = inputs.hyprland.packages.${system}.hyprland; - portalPackage = inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; - - # withUWSM = true; # Universal Wayland Session Manager - xwayland.enable = true; - }; - }; - - hardware.graphics = { - package = lib.mkForce hyprpkgs.mesa; - package32 = lib.mkForce hyprpkgs.pkgsi686Linux.mesa; - }; -} diff --git a/hosts/myputer/default.nix b/hosts/myputer/default.nix index 6f5074c..73d2eb1 100755 --- a/hosts/myputer/default.nix +++ b/hosts/myputer/default.nix @@ -1,73 +1,226 @@ { pkgs, - upkgs, + inputs, lib, + wishlist, ... -}: { +}: let + home-manager = builtins.fetchTarball { + url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz"; + sha256 = "1dga3vsd60v9mfyhwgbil13mrchw5crbpgh4zjw9fghv1vyk89vq"; + }; +in { imports = [ - ./hardware.nix - ./modules/gamergrl + ./hardware-configuration.nix + (import "${home-manager}/nixos") + inputs.spicetify-nix.nixosModules.default ]; - # services.wa2k = { - # enable = true; - # port = 8080; - # openFirewall = true; - # }; + programs.spicetify = let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + adblock + hidePodcasts + shuffle # shuffle+ (special characters are sanitized out of extension names) + ]; + #theme = spicePkgs.themes.catppuccin; + #colorScheme = "mocha"; + }; - networking = { - hostName = "myputer"; - - firewall = { - allowedTCPPorts = [ - 22 # SSH - 80 # HTTP - 443 # HTTPS - 5678 # MikroTik WinBox - 25565 # Minecraft LAN - ]; + boot.loader.systemd-boot.enable = false; + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; #/boot/efi + }; + grub = { + efiSupport = true; + #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system + device = "nodev"; + #useOSProber = true; + }; + grub2-theme = { + enable = true; + theme = "whitesur"; # stylish, vimix, or whitesur + footer = true; + customResolution = "1920x1080"; }; }; + # Set your time zone. + time.timeZone = "Australia/Brisbane"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + console = { + font = "Lat2-Terminus16"; + keyMap = "us"; + }; + + # ----- NETWORKING SECTION ----- + networking.hostName = "myputer"; + networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + networking.firewall.enable = true; + # ----- SERVICES ----- services = { - flatpak.enable = true; + # Set display manager (login screen) + displayManager = { + sddm = { + enable = true; + wayland.enable = true; # enable experimental sddm support for wayland + theme = "corners"; + }; + defaultSession = "hyprland"; + }; - udev = { + # Enable sound + pipewire = { enable = true; - packages = with pkgs; [ - via - ]; + wireplumber.enable = true; - # Microdia AK820 (AJAZZ Keeb) - # REF: https://get.vial.today/manual/linux-udev.html - # KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", ATTRS{idVendor}=="0c45", ATTRS{idProduct}=="8009", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; - # (AJAZZ Keeb) - # REF: https://get.vial.today/manual/linux-udev.html - # KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{serial}=="*vial:f64c2b3c*", ATTRS{idVendor}=="d010", ATTRS{idProduct}=="1601", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl" - extraRules = '' - SUBSYSTEM=="hidraw", ATTRS{idVendor}=="d010", ATTRS{idProduct}=="1601", TAG+="uaccess" - SUBSYSTEM=="usb", ATTRS{idVendor}=="d010", ATTRS{idProduct}=="1601", TAG+="uaccess" - ''; + tumbler.enable = true; # Thunar image thumbnail support + gvfs.enable = true; # Thunar mount, trash, and other functionality + }; + security.rtkit.enable = true; # I *think* this is for pipewire + + # allow wheel group to use passwordless sudo + security.sudo.wheelNeedsPassword = false; + users = { + # using fish as the login shell tends + # to go very poorly because it isn't + # POSIX compliant, so we'll just use + # simple Bash then :) + defaultUserShell = pkgs.bash; + + users = { + # just me fr (personal account) + me = { + isNormalUser = true; + extraGroups = ["wheel" "docker"]; + shell = pkgs.bash; #pkgs.fish + packages = let + # TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax + # instead to use colmena's flake.nix by specifying a rev hash in the flake input? + colmena-src = pkgs.fetchFromGitHub { + owner = "zhaofengli"; + repo = "colmena"; + rev = "47b6414d800c8471e98ca072bc0835345741a56a"; + sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc="; + }; + colmena-new = pkgs.callPackage "${colmena-src}/package.nix" {}; + in + with pkgs; [ + firefox + nitch + starfetch + + # flatpak requires gnome-software + flatpak + gnome-software + + colmena-new + + gitkraken + # NOTE: downloadthing this causes my PC to freak!! ("too many open files" error) + #keyguard # bitwarden client app + ]; + }; + + # user for my professional jobs and stuff + ae = { + isNormalUser = true; + extraGroups = ["wheel"]; + shell = pkgs.bash; #pkgs.fish + packages = with pkgs; [ + ]; + }; }; }; - security.sudo-rs.wheelNeedsPassword = lib.mkForce false; + home-manager = { + users.me = import ../../homes/me; + sharedModules = [ + inputs.nixcord.homeManagerModules.nixcord + inputs.ags.homeManagerModules.default + {nixpkgs.overlays = [inputs.hyprpanel.overlay];} + ]; + }; + + # set environment variables + environment.sessionVariables = { + # folder names with capitalisation look awful! + XDG_DOWNLOAD_DIR = "$HOME/downloads"; + + # Hint Electrons apps to use Wayland + NIXOS_OZONE_WL = "1"; + }; # ---- SYSTEM PACKAGES ----- environment.systemPackages = with pkgs; [ # User Environment - libreoffice - via # makes my keek worky :3 [DEBUG] - vial # gui for keeb DEBUG + inputs.swww.packages.${pkgs.system}.swww + helvum + easyeffects + pavucontrol + ani-cli + wl-clipboard # clipboard for wayland + hyprpicker - # Games - prismlauncher # minecraft - upkgs.olympus # CELESTE!! <3 :3 - discord + #(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners + # dependencies for my sddm theme: + pkgs.libsForQt5.qt5.qtgraphicaleffects - melonloader + python311 # I use 3.11 since it's in a pretty stable state now + poetry # python dependency management and packaging + + nixd # lsp for nix + + neofetch # TODO: remove (installed to debug something) + + # fish plugins + grc # colorise command outputs + + httpie + curlie + zoxide + doggo + tldr + #btop + + tesseract # for my work with Agribit + + # TODO: remove this and host my nix flake on github instead + #wishlist + + # Pretty necessary + git + brightnessctl + acpi + vim + nix-prefetch-git + + # Unix Commands + wget + tree + unzip + + # Cryptography + openssl + libargon2 ]; # DEBUG: configuring xdg portal here instead? @@ -86,6 +239,121 @@ # ]; #}; + # Enable the use of certain programs + programs = { + hyprland = { + enable = true; + # TODO: uncomment, I did this when hyprland wasn't working + #package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; + #portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland; + + xwayland.enable = true; + }; + + zsh.enable = true; + fish.enable = true; + + neovim = { + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + configure = { + customRC = '' + set number + set tabstop=4 + set shiftwidth=4 + ''; + }; + }; + + # I want to use fish as my login shell but it always goes terrible + # cause it isn't POSIX compliant, so instead Bash is my login and + # will just exec fish (^-^) + 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 ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi + ''; + }; + + # Thunar also users: `services.tumbler` & `services.gvfs` + thunar = { + enable = true; + plugins = with pkgs.xfce; [ + thunar-volman # for removable drives (ie USBs) + thunar-archive-plugin # create and extract archives + thunar-media-tags-plugin # change metadata for media files + ]; + }; + + # mozilla's email client + thunderbird.enable = true; + }; + + # ----- FONTS ----- + fonts = { + enableDefaultPackages = true; # no clue what this line does tbh + packages = with pkgs; [ + /* + (nerdfonts.override { + fonts = [ + "Cousine" # its already i guess + "Iosevka" # nah nah + "IosevkaTerm" # big nah + "CascadiaCode" # potential + "FiraCode" # potential + "JetBrainsMono" # for my rofi theme + "Hasklig" + "Hack" + ]; + }) + */ + nerdfonts + geist-font # for my hyprlock theme + + # texlive maintains a noto-emoji flake + texlivePackages.noto-emoji + ]; + + # TODO: change my default fonts + fontconfig = { + defaultFonts = { + serif = ["Iosevka"]; + sansSerif = ["Iosevka "]; + monospace = ["Cousine"]; + emoji = ["Noto Emoji"]; + }; + }; + }; + + # Enable the new CLI commands and the flakes as experimental features + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + virtualisation.docker.enable = true; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + #programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + #}; + + # Enable the OpenSSH daemon. + # services.openssh.enable = true; + + # Enable OpenGL + hardware = { + graphics.enable = true; + }; + # DO NOT MODIFY system.stateVersion = "24.05"; # Did you read the comment? } diff --git a/hosts/myputer/hardware.nix b/hosts/myputer/hardware-configuration.nix old mode 100644 new mode 100755 similarity index 75% rename from hosts/myputer/hardware.nix rename to hosts/myputer/hardware-configuration.nix index ed6ef8a..904a0c2 --- a/hosts/myputer/hardware.nix +++ b/hosts/myputer/hardware-configuration.nix @@ -12,25 +12,24 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; + boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-amd"]; boot.extraModulePackages = []; fileSystems."/" = { - device = "/dev/disk/by-uuid/b5eb6fbc-b9c7-453b-955f-e77011bce094"; + device = "/dev/disk/by-uuid/ff19e1b0-cacc-4270-a94b-7922f7224ae2"; fsType = "ext4"; }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/1554-FFF9"; + fileSystems."/boot/efi" = { + device = "/dev/disk/by-uuid/7046-177A"; fsType = "vfat"; options = ["fmask=0077" "dmask=0077"]; }; swapDevices = [ - # {device = "/dev/disk/by-uuid/7f7e9d69-78e0-49f1-b792-6be26ed8e040";} - {device = "/dev/disk/by-uuid/32ecabb6-7bb9-4861-8a2a-13a99f1338d2";} + {device = "/dev/disk/by-uuid/7f7e9d69-78e0-49f1-b792-6be26ed8e040";} ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking @@ -38,9 +37,7 @@ # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.enp34s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; # networking.interfaces.wlp38s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/hosts/myputer/modules/gamergrl/default.nix b/hosts/myputer/modules/gamergrl/default.nix deleted file mode 100644 index 6863798..0000000 --- a/hosts/myputer/modules/gamergrl/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{upkgs, ...}: { - imports = [ - ./flatpak.nix - ./mcsr - ]; - - environment.systemPackages = with upkgs; [ - hydralauncher - ]; -} diff --git a/hosts/myputer/modules/gamergrl/flatpak.nix b/hosts/myputer/modules/gamergrl/flatpak.nix deleted file mode 100644 index f295398..0000000 --- a/hosts/myputer/modules/gamergrl/flatpak.nix +++ /dev/null @@ -1,11 +0,0 @@ -{...}: { - services.flatpak = { - packages = [ - { - # Linux Runtime for Roblox - appId = "org.vinegarhq.Sober"; - origin = "flathub"; - } - ]; - }; -} diff --git a/hosts/myputer/modules/gamergrl/mcsr/default.nix b/hosts/myputer/modules/gamergrl/mcsr/default.nix deleted file mode 100644 index 72994c3..0000000 --- a/hosts/myputer/modules/gamergrl/mcsr/default.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ - inputs, - pkgs, - lib, - config, - ... -}: let - cfg = config.programs.waywall; - - inherit (inputs) mcsr; - mcsrPkgs = mcsr.packages.${pkgs.stdenv.hostPlatform.system}; -in { - imports = [mcsr.nixosModules.waywall]; - - options = { - programs.waywall = { - width = lib.mkOption { - type = lib.types.int; - default = 1920; - }; - - height = lib.mkOption { - type = lib.types.int; - default = 1080; - }; - }; - }; - - config = { - environment.systemPackages = [ - mcsrPkgs.ninjabrain-bot - - (pkgs.prismlauncher.override { - jdks = [mcsrPkgs.graalvm-21]; - }) - ]; - - programs.waywall = { - enable = true; - config = { - enableWaywork = true; - programs = [mcsrPkgs.ninjabrain-bot]; - files = { - thin_bg = ./vibing-on-my-puter.png; - wide_bg = ./vibing-on-my-puter.png; - }; - - source = ./waywall.lua; - }; - }; - }; -} diff --git a/hosts/myputer/modules/gamergrl/mcsr/vibing-on-my-puter.png b/hosts/myputer/modules/gamergrl/mcsr/vibing-on-my-puter.png deleted file mode 100755 index cfcd606..0000000 Binary files a/hosts/myputer/modules/gamergrl/mcsr/vibing-on-my-puter.png and /dev/null differ diff --git a/hosts/myputer/modules/gamergrl/mcsr/waywall.lua b/hosts/myputer/modules/gamergrl/mcsr/waywall.lua deleted file mode 100644 index 723b125..0000000 --- a/hosts/myputer/modules/gamergrl/mcsr/waywall.lua +++ /dev/null @@ -1,233 +0,0 @@ --- vim: foldmethod=marker -local waywall = require("waywall") -local helpers = require("waywall.helpers") - -local Scene = require("waywork.scene") -local Modes = require("waywork.modes") -local Keys = require("waywork.keys") -local Processes = require("waywork.processes") - -local scene = Scene.SceneManager.new(waywall) -local ModeManager = Modes.ModeManager.new(waywall) - --- config -- -local thin_res = { w = resolution.h * 0.28, h = resolution.h } -local wide_res = { w = resolution.w, h = resolution.h / 3.6 } -local tall_res = { w = 384, h = 16384 } - -local pie_colors = { - { input = "#e145c2", output = "#a000a0" }, - { input = "#e96d4d", output = "#aa3310" }, - { input = "#45cb65", output = "#00a000" }, - { input = "#4de1ca", output = "#1a7286" }, - { input = "#c46de1", output = "#ff55ff" }, -} - --- https://arjuncgore.github.io/waywall-boat-eye-calc/ --- https://github.com/Esensats/mcsr-calcsens -local normal_sens = 13.117018998967824 -local tall_sens = 0.88486625532087 - --- utils {{{ -function smart_enable_group(mode, status) - scene:enable_group(mode, status) - scene:enable_group("normal", not status) -end - -function mode_guard() - return not waywall.get_key("F3") and waywall.state().screen == "inworld" and waywall.state().inworld == "unpaused" -end - -function piechart_src(res) - return { x = res.w - 93, y = res.h - 221, w = 33, h = 42 } -end - -function piechart_dst(res) - -- x = right_of_thin - 11 (gap between edge and pie) - 160 (pie width / 2) - 99 (mirror width / 2) - if res.w == resolution.w and res.h == resolution.h then - return { x = res.w - 270, y = res.h - 390, w = 33 * 6, h = 42 * 6 } - else - return { x = (resolution.w + res.w) / 2 - 270, y = (resolution.h + res.h) / 2 - 390, w = 33 * 6, h = 42 * 6 } - end -end - -local ensure_ninjabrain = Processes.ensure_application(waywall, programs.ninjabrain_bot)("ninjabrain.*\\.jar") --- }}} - --- background images {{{ -for _, name in ipairs({ "wide", "thin", "tall" }) do - scene:register(name .. "_bg", { - kind = "image", - path = files[name], - options = { - dst = { x = 0, y = 0, w = resolution.w, h = resolution.h }, - depth = -1, - }, - groups = { name }, - }) -end --- }}} - --- thin {{{ -local e_scale = resolution.w > 2560 and 20 or 10 -local left_middle = (resolution.w - thin_res.w) / 4 - -scene:register("e_counter", { - kind = "mirror", - options = { - src = { x = 1, y = 37, w = 49, h = 9 }, - dst = { x = left_middle - (49 * e_scale / 2), y = resolution.h / 10.8, w = 49 * e_scale, h = 9 * e_scale }, - depth = 0, - }, - groups = { "thin" }, -}) - -for _, ck in ipairs(pie_colors) do - scene:register("prct_mirror_" .. ck.input, { - kind = "mirror", - options = { - src = piechart_src(thin_res), - dst = piechart_dst(thin_res), - depth = 1, - color_key = ck, - }, - groups = { "thin" }, - }) -end - -ModeManager:define("thin", { - width = thin_res.w, - height = thin_res.h, - on_enter = function() - smart_enable_group("thin", true) - end, - on_exit = function() - smart_enable_group("thin", false) - end, - toggle_guard = mode_guard, -}) --- }}} - --- wide {{{ -ModeManager:define("wide", { - width = wide_res.w, - height = wide_res.h, - on_enter = function() - smart_enable_group("wide", true) - end, - on_exit = function() - smart_enable_group("wide", false) - end, - toggle_guard = mode_guard, -}) --- }}} - --- tall {{{ -local measure_w = (resolution.w - tall_res.w) / 2 -local measure_h = (resolution.h * measure_w) / resolution.w -local measure_dst = { x = 0, y = (resolution.h - measure_h) / 2, w = measure_w, h = measure_h } - -scene:register("eye_measure", { - kind = "mirror", - options = { - src = { x = (tall_res.w - 60) / 2, y = (tall_res.h - 580) / 2, w = 60, h = 580 }, - dst = measure_dst, - depth = 0, - }, - groups = { "tall" }, -}) - -scene:register("eye_overlay", { - kind = "image", - path = files.eye_overlay, - options = { dst = measure_dst, depth = 1 }, - groups = { "tall" }, -}) - -ModeManager:define("tall", { - width = tall_res.w, - height = tall_res.h, - on_enter = function() - smart_enable_group("tall", true) - waywall.set_sensitivity(tall_sens) - end, - on_exit = function() - smart_enable_group("tall", false) - waywall.set_sensitivity(0) - end, - toggle_guard = function() - return not waywall.get_key("F3") and waywall.state().screen == "inworld" - end, -}) --- }}} - --- normal res mirrors {{{ -for _, ck in ipairs(pie_colors) do - scene:register("prct_mirror_normal_" .. ck.input, { - kind = "mirror", - options = { - src = piechart_src(resolution), - dst = piechart_dst(resolution), - depth = 1, - color_key = ck, - }, - groups = { "normal" }, - }) -end --- }}} - --- startup actions -waywall.listen("load", function() - -- wait for title screen - repeat - local error, state = pcall(waywall.state) - waywall.sleep(1000) - until error == true and state.screen == "title" - - -- actual actions - ensure_ninjabrain() - scene:enable_group("normal", true) -end) - -local config = { - input = { - layout = "us", - repeat_rate = 40, - repeat_delay = 300, - - sensitivity = normal_sens, - confine_pointer = false, - - remaps = { - ["MB5"] = "F3", - }, - }, - theme = { - background = "#303030ff", - -- https://github.com/Smithay/smithay/issues/1894 - ninb_anchor = "right", - }, - window = { - fullscreen_width = resolution.w, - fullscreen_height = resolution.h, - }, - actions = Keys.actions({ - ["Ctrl-Super-F"] = waywall.toggle_fullscreen, - ["*-N"] = function() - return ModeManager:toggle("thin") - end, - ["*-P"] = function() - return ModeManager:toggle("tall") - end, - ["*-G"] = function() - return ModeManager:toggle("wide") - end, - ["Ctrl-Shift-M"] = function() - ensure_ninjabrain() - helpers.toggle_floating() - end, - }), -} - -return config - diff --git a/packages/sddm-theme/sugar-dark.nix b/hosts/myputer/sddm-theme.nix similarity index 100% rename from packages/sddm-theme/sugar-dark.nix rename to hosts/myputer/sddm-theme.nix diff --git a/hosts/sddm-theme-corners.nix b/hosts/sddm-theme-corners.nix new file mode 100755 index 0000000..ccc93f0 --- /dev/null +++ b/hosts/sddm-theme-corners.nix @@ -0,0 +1,17 @@ +{pkgs}: { + sddm-theme-corners = pkgs.stdenv.mkDerivation rec { + name = "sddm-theme-corners"; + #version = "1.0"; + #dontBuild = true; + installPhase = '' + mkdir -p $out/share/sddm/themes + cp -ar $src/corners $out/share/sddm/themes/ + ''; + src = pkgs.fetchFromGitHub { + owner = "aczw"; + repo = "sddm-theme-corners"; + rev = "6ff0ff455261badcae36cd7d151a34479f157a3c"; + sha256 = "0iiasrbl7ciyhq3z02la636as915zk9ph063ac7vm5iwny8vgwh8"; + }; + }; +} diff --git a/modules/colmena.nix b/modules/colmena.nix new file mode 100644 index 0000000..5756901 --- /dev/null +++ b/modules/colmena.nix @@ -0,0 +1,20 @@ +{}: { + # Colmena's latest stable version is + # unusable so get latest unstable version. + colmena = let + src = pkgsBuild.fetchFromGitHub { + owner = "zhaofengli"; + repo = "colmena"; + rev = "47b6414d800c8471e98ca072bc0835345741a56a"; + sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc="; + }; + flake = + pkgsBuild.callPackage "${src}/flake.nix" { + }; + in + flake.packages."${system}".colmena; + + nixpkgs.config.packageOverrides = pkgs: { + colmena = pkgs.callPackage + }; +} diff --git a/modules/core/bluetooth.nix b/modules/core/bluetooth.nix new file mode 100755 index 0000000..400abfc --- /dev/null +++ b/modules/core/bluetooth.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + # Enable Bluetooth + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = false; + + # TODO: this should be managed by home-manager + environment.systemPackages = with pkgs; [ + overskride + ]; +} diff --git a/modules/core/bootloader/grub.nix b/modules/core/bootloader/grub.nix new file mode 100755 index 0000000..5d63dff --- /dev/null +++ b/modules/core/bootloader/grub.nix @@ -0,0 +1,15 @@ +{...}: + +{ + boot.loader = { + efi = { + canTouchEfiVariables = true; + efiSysMountPoint = "/boot/efi"; + }; + grub = { + efiSupport = true; + #efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on your system + device = "nodev"; + }; + }; +} diff --git a/modules/core/bootloader/systemd-boot.nix b/modules/core/bootloader/systemd-boot.nix new file mode 100755 index 0000000..8557dec --- /dev/null +++ b/modules/core/bootloader/systemd-boot.nix @@ -0,0 +1,8 @@ +{...}: + +{ + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; +} diff --git a/hosts/modules/core/garbage-collector.nix b/modules/core/garbage-collector.nix similarity index 100% rename from hosts/modules/core/garbage-collector.nix rename to modules/core/garbage-collector.nix diff --git a/modules/core/sound/default.nix b/modules/core/sound/default.nix new file mode 100755 index 0000000..e69de29 diff --git a/modules/core/sound/pipewire.nix b/modules/core/sound/pipewire.nix new file mode 100755 index 0000000..d3d1852 --- /dev/null +++ b/modules/core/sound/pipewire.nix @@ -0,0 +1,29 @@ +# Credit: https://github.com/XNM1/linux-nixos-hyprland-config-dotfiles/ +{ pkgs, ... }: + +{ + # Enable sound with pipewire. + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + + wireplumber.enable = true; + + # use the example session manager (no others are packaged yet so this is enabled by default, + # no need to redefine it in your config for now) + # media-session.enable = true; + }; + + # TODO: these should instead be manager but home-manager + environment.systemPackages = with pkgs; [ + helvum + easyeffects + ]; +} + diff --git a/modules/discord/nixcord.nix b/modules/discord/nixcord.nix new file mode 100755 index 0000000..a347405 --- /dev/null +++ b/modules/discord/nixcord.nix @@ -0,0 +1,29 @@ +{ + lib, + pkgs, + config, + inputs, + outputs, + ... +}: + +{ + imports = [ + config.nixcord.homeManagerModules.nixcord + ]; + + programs.nixcord = { + enable = true; + config = { + #themeLinks = [ + # "" + #]; + + # no surrounding window frame + frameless = true; + + plugins = { + }; + }; + }; +} diff --git a/modules/hyprland/default.nix b/modules/hyprland/default.nix new file mode 100755 index 0000000..71ee559 --- /dev/null +++ b/modules/hyprland/default.nix @@ -0,0 +1,30 @@ +{ + pkgs, + inputs, + config, + lib, + ... +}: + +{ + options.hyprland = { + enable = lib.mkEnableOption "Hyprland"; + }; + + config = lib.mkIf config.hyprland.enable { + programs.hyprland = { + enable = true; + #package = inputs.hyprland.packages.${pkgs.system}.hyprland; + xwayland.enable = true; + }; + + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; + }; + + # TODO: finish this (I didn't like the dotfiles I was getting inspo from and stopped) + }; +} diff --git a/modules/wishlist.nix b/modules/wishlist.nix new file mode 100644 index 0000000..62cc408 --- /dev/null +++ b/modules/wishlist.nix @@ -0,0 +1,72 @@ +{ + description = "Wishlist: Your SSH directory." + + inputs = { + + }; + + outputs = { + self + }: let + nixosModule = { + config, + lib, + pkgs, + ... + }: { + options.services.wishlist = { + enable = lib.mkEnableOption "Your SSH directory."; + + port = lib.mkOption { + type = lib.types.port; + default = 22; + description = "Port to listen on"; + }; + }; + + config = lib.mkIf config.services.wishlist.enable { + # configure the systemd service + systemd.services.wishlist = { + description = "Your SSH directory."; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + serviceConfig = { + ExecStart = "${self.packages.${pkgs.system}.default}/bin/wishlist"; + Restart = "always"; + Type = "simple"; + DynamicUser = "yes"; + }; + # environment variables + environment = { + + }; + }; + }; + }; + in + (flake-utils.lib.eachDefaultSystem (system: let + gopkg = go-nixpkgs.legacyPackages.${system}; + in { + packages.default = gopkg.buildGoModule ############################ + })) + buildGoModule rec { # is rec necessary? + pname = "wishlist"; + version = "0.15.1" + + src = fetchFromGithub { + owner = "charmbracelet"; + repo = "wishlist"; + rev = "v${version}"; + hash = "0c9g1s8j9znzd1mw61d0klc6sqri0wx6hljibxdwzi3cabfy3ld6"; + }; + + vendorSha256 = lib.fakeSha256; + + meta = with lib; { + homepage = "https://github.com/charmbracelet/wishlist"; + description = "Your SSH directory."; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ caarlos0 ]; + }; + }; +} diff --git a/modules/wishlist.nix.bak b/modules/wishlist.nix.bak new file mode 100644 index 0000000..3f190ad --- /dev/null +++ b/modules/wishlist.nix.bak @@ -0,0 +1,22 @@ +{lib}: { + buildGoModule rec { # is rec necessary? + pname = "wishlist"; + version = "0.15.1" + + src = fetchFromGithub { + owner = "charmbracelet"; + repo = "wishlist"; + rev = "v${version}"; + hash = "0c9g1s8j9znzd1mw61d0klc6sqri0wx6hljibxdwzi3cabfy3ld6"; + }; + + vendorSha256 = lib.fakeSha256; + + meta = with lib; { + homepage = "https://github.com/charmbracelet/wishlist"; + description = "Your SSH directory."; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ caarlos0 ]; + }; + }; +} diff --git a/nixpkgs.nix b/nixpkgs.nix deleted file mode 100644 index 34c474a..0000000 --- a/nixpkgs.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ - lib, - inputs, - ... -} @ args: { - nixpkgs.channels = rec { - # base - base = npkgs; - - # nixpkgs-stable - npkgs = { - source = inputs.nixpkgs; - overlays = [ - inputs.dobutterfliescry-net.overlays.default - # inputs.wa2k.overlays.default - (import ./overlays args) - ]; - config = { - allowBroken = false; - allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "discord" - "steam" - "steamcmd" - "steam-unwrapped" - "spotify" - - "obsidian" - "gitkraken" - "via" - ]; - }; - }; - - # nixpkgs-unstable - upkgs = { - source = inputs.nixpkgs-unstable; - overlays = [ - inputs.millennium.overlays.default - (import ./overlays args) - ]; - config = { - allowUnfree = false; - allowBroken = false; - }; - }; - - # nixpkgs-master - mpkgs = { - source = inputs.nixpkgs-master; - overlays = []; - config = { - allowUnfree = false; - allowBroken = false; - }; - }; - }; -} diff --git a/overlays/default.nix b/overlays/default.nix deleted file mode 100644 index b4d7680..0000000 --- a/overlays/default.nix +++ /dev/null @@ -1,106 +0,0 @@ -{ - inputs, - system, - ... -}: ( - self: super: let - pkgs = super; - inherit - (super) - lib - ; - in { - ns = pkgs.writeShellApplication { - name = "ns"; - runtimeInputs = with pkgs; [ - fzf - nix-search-tv - ]; - text = builtins.readFile "${pkgs.nix-search-tv.src}/nixpkgs.sh"; - - excludeShellChecks = [ - # SC2016 (info): Expressions don't expand in single quotes, use double quotes for that. - "SC2016" - ]; - }; - - angry-oxide = import ../packages/angryoxide { - inherit pkgs lib; - }; - - ekphos = import ../packages/ekphos { - inherit pkgs; - }; - - x86-manpages = import ../packages/x86-manpages { - inherit pkgs; - }; - - sddm-theme-corners = import ../packages/sddm-theme/corners.nix { - inherit pkgs; - }; - - sddm-theme-sugar-dark = import ../packages/sddm-theme/sugar-dark.nix { - inherit pkgs; - }; - # in wake of CVE-2022-3602/CVE-2022-3786 - nginxStable = pkgs.nginxStable.override {openssl = pkgs.libressl;}; - nginx = pkgs.nginx.override {openssl = pkgs.libressl;}; - - element-desktop = pkgs.element-desktop.overrideAttrs (final: prev: { - desktopItems = [ - ((builtins.elemAt prev.desktopItems 0).override { - exec = "element-desktop %u --password-store=\"gnome-libsecret\""; - }) - ]; - }); - - awww = inputs.awww.packages.${system}.awww; - - melonloader = import ../packages/melonloader/package.nix pkgs; - - xdg-desktop-portal-hyprland = - lib.mkIf (inputs?hyprland) - inputs.hyprland.packages.${system}.xdg-desktop-portal-hyprland; - hyprland-git = - lib.mkIf (inputs?hyprland) - (inputs.hyprland.packages.${system}.hyprland.overrideAttrs (final: prev: { - patches = let - glaze_version = inputs.hyprland.inputs.nixpkgs.legacyPackages.glaze.version; - in - prev.patches - ++ [ - '' - diff --git a/hyprpm/CMakeLists.txt b/hyprpm/CMakeLists.txt - index 9f1318f4..7d5b8eda 100644 - --- a/hyprpm/CMakeLists.txt - +++ b/hyprpm/CMakeLists.txt - @@ -11,9 +11,9 @@ set(CMAKE_CXX_STANDARD 23) - - pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.7.0) - - -find_package(glaze 7.0.0 QUIET) - +find_package(glaze ${glaze_version} QUIET) - if (NOT glaze_FOUND) - - set(GLAZE_VERSION v7.0.0) - + set(GLAZE_VERSION v${glaze_version}) - message(STATUS "glaze dependency not found, retrieving ''${GLAZE_VERSION} with FetchContent") - include(FetchContent) - FetchContent_Declare( - '' - ]; - })); - - prismlauncher = pkgs.prismlauncher.overrideAttrs (final: prev: { - buildInputs = - prev.buildInputs - ++ (with pkgs; [ - libxtst - ]); - }); - - bottles = pkgs.bottles.override { - removeWarningPopup = true; - }; - } -) diff --git a/overlays/patches/glaze.patch b/overlays/patches/glaze.patch deleted file mode 100644 index 48c68bf..0000000 --- a/overlays/patches/glaze.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/hyprpm/CMakeLists.txt b/hyprpm/CMakeLists.txt -index 9f1318f4..7d5b8eda 100644 ---- a/hyprpm/CMakeLists.txt -+++ b/hyprpm/CMakeLists.txt -@@ -11,9 +11,9 @@ set(CMAKE_CXX_STANDARD 23) - - pkg_check_modules(hyprpm_deps REQUIRED IMPORTED_TARGET tomlplusplus hyprutils>=0.7.0) - --find_package(glaze 7.0.0 QUIET) -+find_package(glaze 6.0.1 QUIET) - if (NOT glaze_FOUND) -- set(GLAZE_VERSION v7.0.0) -+ set(GLAZE_VERSION v6.0.1) - message(STATUS "glaze dependency not found, retrieving ${GLAZE_VERSION} with FetchContent") - include(FetchContent) - FetchContent_Declare( diff --git a/packages/README b/packages/README deleted file mode 100644 index e6e892c..0000000 --- a/packages/README +++ /dev/null @@ -1,5 +0,0 @@ -This directory (`hosts/packages`) contains custom package derivations, and differs -from `hosts/modules/` which contains importable modules for my nixdots. - -Often each package I write will have a corresponding module that simply -calls `pkgs.callPackage` to install the derivation to the system environment. diff --git a/packages/angryoxide/default.nix b/packages/angryoxide/default.nix deleted file mode 100644 index d9a7632..0000000 --- a/packages/angryoxide/default.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - pkgs, - lib, - ... -}: let - # shared/global properties - angryoxide-owner = "Ragnt"; - angryoxide-pname = "AngryOxide"; - angryoxide-version = "0.8.32"; - angryoxide-meta = { - homepage = "https://github.com/${angryoxide-owner}/${angryoxide-pname}"; - license = lib.licenses.gpl3; - }; - - # "Vendored LibWifi used in AngryOxide" - angryoxide-libwifi-src = pkgs.fetchFromGitHub { - owner = angryoxide-owner; - repo = "libwifi"; - # this specific revision is requested (by rev "e1352..." of AngryOxide) - rev = "71268e1898ad88b8b5d709e186836db417b33e81"; - sha256 = "0af9y7bvr3rban6bslsd9smrvibfp1b7d4nfw7wkdxfp49kx6zyr"; - }; - - # Using `mkDerivation` not `buildRustPackage` because - # AngryOxide uses Git submodules for a patched version of "LibWifi", - # and these aren't moved into `/build/source/libs/` for the `buildPhase`. - # Simply fix right? Well no I can't override `buildPhase`... - angryoxide-src = pkgs.stdenv.mkDerivation rec { - pname = "${angryoxide-pname}-source"; - version = angryoxide-version; - - src = pkgs.fetchFromGitHub { - owner = "Ragnt"; - repo = pname; - rev = "e1352c8aad370efa8db69d175686e4353c6002bd"; - sha256 = "07nhvy7kp7z4y0fdslv56pw7kz6idcpma42f4hyilrmazjbbjmja"; - # clone git submodules (needed for the rust workspace libs) - fetchSubmodules = true; - }; - - buildPhase = '' - # ensure $out and /libwifi paths exist - mkdir -p $out/libs/libwifi - # copy only the necessary source files - cp Cargo.toml Cargo.lock $out/ - cp -r $src/.cargo $src/assets $src/completions $src/libs $src/src $out/ - # ensure libwifi submodule is copied to the build environment - cp -r ${angryoxide-libwifi-src}/. $out/libs/libwifi/ - ''; - - installPhase = let - # SOURCE - completionScriptBash = "completions/bash_angry_oxide_completions"; - # DESTINATION - completionDirBash = "$out/share/bash-completion/completions"; - in '' - # mkdir -p $out/bin - #mkdir $out/bin - #cp target/release/angryoxide $out/bin - - # add bash completions - #mkdir -p ${completionDirBash} - #cp ${completionScriptBash} ${completionDirBash}/angryoxide - ''; - - meta = - { - description = "AngryOxide's source files isolated by @_cry64 into a separate Nix derivation."; - } - // angryoxide-meta; - }; -in - pkgs.rustPackages.rustPlatform.buildRustPackage { - pname = angryoxide-pname; - version = angryoxide-version; - src = angryoxide-src; - cargoHash = "sha256-mry4l0a7DZOWkrChU40OVRCBjKwI39cyZtvEBA5tro0="; - meta = - { - description = "802.11 Attack Tool"; - } - // angryoxide-meta; - } diff --git a/packages/chameleonultragui/TODO.md b/packages/chameleonultragui/TODO.md deleted file mode 100644 index 5b49da7..0000000 --- a/packages/chameleonultragui/TODO.md +++ /dev/null @@ -1 +0,0 @@ -- [ ] Try using `gitHashes` argument instead of patching? (on chameleonultragui package) diff --git a/packages/chameleonultragui/default.nix b/packages/chameleonultragui/default.nix deleted file mode 100644 index 13c78b4..0000000 --- a/packages/chameleonultragui/default.nix +++ /dev/null @@ -1,482 +0,0 @@ -{ - pkgs, - lib, - makeDesktopItem, - copyDesktopItems, - ... -}: -# ChameleonUltraGUI requires flutter sdk >3.0.0 -pkgs.flutter324.buildFlutterApplication -rec { - pname = "ChameleonUltraGUI"; - version = "1.1.2"; - - src = pkgs.fetchFromGitHub { - owner = "GameTec-live"; - repo = "ChameleonUltraGUI"; - sha256 = "1mb6wkqk6vaamrhflfhsgp5gvqiw2qkvmy7j65abcx7sn5990i27"; - rev = "11424abaccb4a010fcbeab9799ae8f675d8afe99"; - }; - - desktopItems = [ - (makeDesktopItem { - name = pname; - desktopName = pname; - genericName = pname; - - icon = "chameleonultragui"; - comment = meta.description; - - exec = "chameleonultragui %u"; - type = "Application"; - terminal = false; - - categories = ["Utility"]; - keywords = [ - "Flutter" - "share" - "files" - "chameleon" - "chameleonultra" - "chameleonlite" - ]; - }) - ]; - - # path to application within fetched sources - sourceRoot = "source/chameleonultragui"; - - buildInputs = [ - pkgs.imagemagick # creating mipmaps for share/icons - pkgs.yj # converting pubspec.lock yaml->json - ]; - - nativeBuildInputs = [ - copyDesktopItems - ]; - - buildArguments = ["--release"]; - - # source files compile with Flutter >3.29.0 but this - # derivation uses 3.24.0 (so we patch for compatability) - postPatch = let - argbPatch = '' - --- general.dart.old 2025-05-11 15:59:51.812132078 +1000 - +++ general.dart 2025-05-11 15:58:14.755856407 +1000 - @@ -211,7 +211,7 @@ - } - - String colorToHex(Color color) { - - return '#\''${color.toARGB32().toRadixString(16).padLeft(8, '0').substring(2)}'; - + return '#\''${color.value.toRadixString(16).padLeft(8, '0').substring(2)}'; - } - - Color hexToColor(String hex) { - ''; - in '' - # patch source files using Color.toARGB32 method (not defined in Flutter 3.24) - argbPatch="${argbPatch}" - patch lib/helpers/general.dart <(echo "$argbPatch") - ''; - - postInstall = '' - # create mipmaps of desktop logo - logoOriginal="assets/logo-color-desktop.png" - for i in 16 32 64 128 256 512; do - res="$i"x"$i" - d="$out"/share/icons/hicolor/"$res"/apps - mkdir -p $d - ${pkgs.imagemagick}/bin/magick $logoOriginal -resize $res $d/chameleonultragui.png - done - ''; - - # Nix doesn't natively have a fromYAML function (so I made this instead) - pubspecLock = let - appRoot = "${src}/chameleonultragui"; - - # when generating patch files use -u flag and then - # make sure to escape all " characters for Nix string - pubspecLockPatch = '' - --- pubspec.lock.bak2025-05-10 15:42:44.287730979 +1000 - +++ pubspec.lock2025-05-10 15:41:23.778480048 +1000 - @@ -5,18 +5,23 @@ - dependency: transitive - description: - name: _fe_analyzer_shared - - sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 - + sha256: f256b0c0ba6c7577c15e2e4e114755640a875e885099367bf6e012b19314c834 - url: \"https://pub.dev\" - source: hosted - - version: \"80.0.0\" - + version: \"72.0.0\" - + _macros: - + dependency: transitive - + description: dart - + source: sdk - + version: \"0.3.2\" - analyzer: - dependency: transitive - description: - name: analyzer - - sha256: \"192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e\" - + sha256: b652861553cd3990d8ed361f7979dc6d7053a9ac8843fa73820ab68ce5410139 - url: \"https://pub.dev\" - source: hosted - - version: \"7.3.0\" - + version: \"6.7.0\" - archive: - dependency: \"direct main\" - description: - @@ -37,26 +42,26 @@ - dependency: \"direct main\" - description: - name: async - - sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 - + sha256: \"947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c\" - url: \"https://pub.dev\" - source: hosted - - version: \"2.12.0\" - + version: \"2.11.0\" - boolean_selector: - dependency: transitive - description: - name: boolean_selector - - sha256: \"8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea\" - + sha256: \"6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66\" - url: \"https://pub.dev\" - source: hosted - - version: \"2.1.2\" - + version: \"2.1.1\" - characters: - dependency: transitive - description: - name: characters - - sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 - + sha256: \"04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.4.0\" - + version: \"1.3.0\" - checked_yaml: - dependency: transitive - description: - @@ -77,18 +82,18 @@ - dependency: transitive - description: - name: clock - - sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b - + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf - url: \"https://pub.dev\" - source: hosted - - version: \"1.1.2\" - + version: \"1.1.1\" - collection: - dependency: \"direct main\" - description: - name: collection - - sha256: \"2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76\" - + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a - url: \"https://pub.dev\" - source: hosted - - version: \"1.19.1\" - + version: \"1.18.0\" - convert: - dependency: \"direct main\" - description: - @@ -157,10 +162,10 @@ - dependency: transitive - description: - name: fake_async - - sha256: \"6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc\" - + sha256: \"511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.3.2\" - + version: \"1.3.1\" - ffi: - dependency: \"direct main\" - description: - @@ -196,11 +201,10 @@ - file_saver: - dependency: \"direct main\" - description: - - path: \".\" - - ref: fix-windows - - resolved-ref: \"3038d74d5560dcca528423fffd745abf31eb88ae\" - - url: \"https://github.com/Foxushka/file_saver.git\" - - source: git - + name: file_saver - + sha256: \"017a127de686af2d2fbbd64afea97052d95f2a0f87d19d25b87e097407bf9c1e\" - + url: \"https://pub.dev\" - + source: hosted - version: \"0.2.14\" - fixnum: - dependency: transitive - @@ -234,11 +238,10 @@ - flutter_libserialport: - dependency: \"direct main\" - description: - - path: \".\" - - ref: main - - resolved-ref: \"6740aae075505a220a98492910b090824efc7910\" - - url: \"https://github.com/NeariX67/flutter_libserialport.git\" - - source: git - + name: flutter_libserialport - + sha256: d193b5ac819db6540d20cc8d20d9f5ec9e3396edb4d2c4a23c97863fa9132336 - + url: \"https://pub.dev\" - + source: hosted - version: \"0.5.0\" - flutter_lints: - dependency: \"direct dev\" - @@ -347,18 +350,18 @@ - dependency: transitive - description: - name: leak_tracker - - sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec - + sha256: \"3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05\" - url: \"https://pub.dev\" - source: hosted - - version: \"10.0.8\" - + version: \"10.0.5\" - leak_tracker_flutter_testing: - dependency: transitive - description: - name: leak_tracker_flutter_testing - - sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 - + sha256: \"932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806\" - url: \"https://pub.dev\" - source: hosted - - version: \"3.0.9\" - + version: \"3.0.5\" - leak_tracker_testing: - dependency: transitive - description: - @@ -399,14 +402,22 @@ - url: \"https://pub.dev\" - source: hosted - version: \"1.3.0\" - + macros: - + dependency: transitive - + description: - + name: macros - + sha256: \"0acaed5d6b7eab89f63350bccd82119e6c602df0f391260d0e32b5e23db79536\" - + url: \"https://pub.dev\" - + source: hosted - + version: \"0.1.2-main.4\" - matcher: - dependency: transitive - description: - name: matcher - - sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 - + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb - url: \"https://pub.dev\" - source: hosted - - version: \"0.12.17\" - + version: \"0.12.16+1\" - material_color_utilities: - dependency: transitive - description: - @@ -419,10 +430,10 @@ - dependency: transitive - description: - name: meta - - sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c - + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 - url: \"https://pub.dev\" - source: hosted - - version: \"1.16.0\" - + version: \"1.15.0\" - mobile_scanner: - dependency: \"direct main\" - description: - @@ -467,10 +478,10 @@ - dependency: \"direct main\" - description: - name: path - - sha256: \"75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5\" - + sha256: \"087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.9.1\" - + version: \"1.9.0\" - path_provider: - dependency: transitive - description: - @@ -723,15 +734,15 @@ - dependency: transitive - description: flutter - source: sdk - - version: \"0.0.0\" - + version: \"0.0.99\" - source_span: - dependency: transitive - description: - name: source_span - - sha256: \"254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c\" - + sha256: \"53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.10.1\" - + version: \"1.10.0\" - sprintf: - dependency: transitive - description: - @@ -744,42 +755,42 @@ - dependency: transitive - description: - name: stack_trace - - sha256: \"8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1\" - + sha256: \"73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.12.1\" - + version: \"1.11.1\" - stream_channel: - dependency: transitive - description: - name: stream_channel - - sha256: \"969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d\" - + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 - url: \"https://pub.dev\" - source: hosted - - version: \"2.1.4\" - + version: \"2.1.2\" - string_scanner: - dependency: transitive - description: - name: string_scanner - - sha256: \"921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43\" - + sha256: \"556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde\" - url: \"https://pub.dev\" - source: hosted - - version: \"1.4.1\" - + version: \"1.2.0\" - term_glyph: - dependency: transitive - description: - name: term_glyph - - sha256: \"7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e\" - + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 - url: \"https://pub.dev\" - source: hosted - - version: \"1.2.2\" - + version: \"1.2.1\" - test_api: - dependency: transitive - description: - name: test_api - - sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd - + sha256: \"5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb\" - url: \"https://pub.dev\" - source: hosted - - version: \"0.7.4\" - + version: \"0.7.2\" - typed_data: - dependency: transitive - description: - @@ -855,12 +866,11 @@ - usb_serial: - dependency: \"direct main\" - description: - - path: \".\" - - ref: fix-usbserial - - resolved-ref: \"9fcbacc92bec19ea02d33a40d9f39e45d19cf637\" - - url: \"https://github.com/Foxushka/usbserial.git\" - - source: git - - version: \"0.5.1\" - + name: usb_serial - + sha256: a605a600e34e7f28d4e80851ca3999ef747e42e406138887b8a88b8c382a8b07 - + url: \"https://pub.dev\" - + source: hosted - + version: \"0.5.2\" - uuid: - dependency: \"direct main\" - description: - @@ -881,10 +891,10 @@ - dependency: transitive - description: - name: vm_service - - sha256: \"0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14\" - + sha256: \"5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d\" - url: \"https://pub.dev\" - source: hosted - - version: \"14.3.1\" - + version: \"14.2.5\" - wakelock_plus: - dependency: \"direct main\" - description: - @@ -958,5 +968,5 @@ - source: hosted - version: \"2.2.1\" - sdks: - - dart: \">=3.7.0-0 <4.0.0\" - + dart: \">=3.5.0 <4.0.0\" - flutter: \">=3.24.0\" - ''; - in - builtins.fromJSON - ( - builtins.readFile (pkgs.runCommand "${pname}-buildenv" { - inputs = [ - # DEBUG (both lines commented) - #pkgs.flutter324 # ChameleonUltraGUI requires sdk >3.0.0 - #pkgs.yj - ]; - } '' - # copy source files to a temporary path to rebuild the lockfile - buildPath=$(mktemp -d) - cp -r "${appRoot}/." "$buildPath/" - - outPubspecLock="$buildPath/pubspec.lock" - # MUST define variables to use multiline Nix string in bash scripting - pubspecLockPatch="${pubspecLockPatch}" - - # apply the pubspec.yaml patch and regenerate lock file - # (create a temporary home directory for flutter to play in) - #(cd $buildPath && chmod -R +w . \ - # && patch ./pubspec.yaml <(echo "$pubspecYamlPatch") \ - # && export HOME=$(mktemp -d) \ - # && flutter --disable-analytics \ - # && flutter config --no-cli-animations \ - # && ${pkgs.flutter}/bin/flutter pub get) - - # patch the lockfile - chmod +w $outPubspecLock - patch $outPubspecLock <(echo "$pubspecLockPatch") - - # convert new lockfile to json and return - ${pkgs.yj}/bin/yj < "$buildPath/pubspec.lock" > $out - '') - ); - - # TODO: try this instead of patching - # gitHashes = { - # dartssh2 = "sha256-2pypKwurziwGLZYuGaxlS2lzN3UvJp3bRTvvYYxEqRI="; - # hotkey_manager_linux = "sha256-aO0h94YZvgV/ggVupNw8GjyZsnXrq3qTHRDtuhNv3oI="; - # system_info2 = "sha256-fly7E2vG+bQ/+QGzXk+DYba73RZccltdW2LpZGDKX60="; - # tray_menu = "sha256-riiAiBEms+9ARog8i+MR1fto1Yqx+gwbBWyNbNq6VTM="; - # window_size = "sha256-71PqQzf+qY23hTJvcm0Oye8tng3Asr42E2vfF1nBmVA="; - # xterm = "sha256-h8vIonTPUVnNqZPk/A4ZV7EYCMyM0rrErL9ZOMe4ZBE="; - # }; - - meta = with lib; { - description = "A GUI for the Chameleon Ultra written in Flutter for crossplatform"; - homepage = "https://github.com/GameTec-live/ChameleonUltraGUI"; - license = licenses.gpl3; - platforms = platforms.linux; - }; -} -# find /nix/store -type f -print 2>/dev/null | rg "share/applications" -# NOTE: this command will show that there the desktop file was generated -# at some point. just not anymore?? -# NOTE2: read over ~/workshop/packaging/nixpkgs-24.11/pkgs/build-support/make-desktopitem/default.nix -# and see exactly how makeDesktopItem is defined! -# perhaps the item is added to the build environment but not the output? -# NOTE: see how it builds derivations for the desktop and makes the desktop items? -# (every time I build it does actually make the desktop items) -# HOWEVER I just dont think they're being copied over... -# /nix/store/4hqs6dkxqngi6wi95dmizbvmgm7l5cf0-ChameleonUltraGUI.desktop/share/applications/ChameleonUltraGUI.desktop -# /nix/store/869gy031lf243k0x9ir7gmrsfksipca1-ChameleonUltraGUI.desktop/share/applications/ChameleonUltraGUI.desktop -# /nix/store/adqq7slakkhpjc4hln19jd6p22cc9ci6-ChameleonUltraGUI.desktop/share/applications/ChameleonUltraGUI.desktop -# /nix/store/x9fa3na0is70h4ya4dbfsivk4m3mab57-ChameleonUltraGUI.desktop/share/applications/ChameleonUltraGUI.desktop - diff --git a/packages/ekphos/default.nix b/packages/ekphos/default.nix deleted file mode 100644 index 2dc837e..0000000 --- a/packages/ekphos/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{pkgs, ...}: let - inherit - (pkgs) - lib - ; -in - pkgs.rustPackages.rustPlatform.buildRustPackage { - pname = "ekphos"; - version = "v0.20.10"; - src = pkgs.fetchFromGitHub { - repo = "ekphos"; - owner = "hanebox"; - sha256 = "sha256-mZ6yQdPpJ9PglYyHwivVDO05vRPvwZG7DPEBJeOVlFE="; - rev = "1ac1ab68dd4ea867dadf54f60e32a9a3e0305695"; - }; - - cargoHash = "sha256-s6Elg0Fqxdlc2/428oV7POMqphx8vWaLOncO5kZyBfQ="; - - meta = { - description = "A lightweight, fast, terminal-based markdown research tool inspired by Obsidian"; - homepage = "https://github.com/hanebox/ekphos"; - license = lib.licenses.mit; - }; - } diff --git a/packages/huggingface_hub/flake.nix b/packages/huggingface_hub/flake.nix deleted file mode 100644 index 37814d9..0000000 --- a/packages/huggingface_hub/flake.nix +++ /dev/null @@ -1,35 +0,0 @@ -# Template: https://nixos-and-flakes.thiscute.world/development/intro -{ - description = "Humanity's Last Exam - Devshell"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05"; - }; - - outputs = {nixpkgs, ...}: let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - }; - python = pkgs.python312.override { - self = python; - packageOverrides = pyfinal: pyprev: { - huggingface-hub = pyfinal.callPackage ./huggingface_hub.nix {}; - hf-xet = pyfinal.callPackage ./hf-xet.nix {}; - }; - }; - in { - devShells."${system}".default = pkgs.mkShell { - packages = [ - (python.withPackages (pypkgs: [ - pypkgs.huggingface-hub - ])) - ]; - - shell = "${pkgs.bash}/bin/bash"; - shellHook = '' - alias hf=huggingface-cli - ''; - }; - }; -} diff --git a/packages/huggingface_hub/hf-xet.nix b/packages/huggingface_hub/hf-xet.nix deleted file mode 100644 index 0f4c631..0000000 --- a/packages/huggingface_hub/hf-xet.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ - lib, - buildPythonPackage, - fetchFromGitHub, - pkg-config, - rustPlatform, - openssl, -}: -buildPythonPackage rec { - pname = "hf-xet"; - version = "1.1.5"; - pyproject = true; - - src = fetchFromGitHub { - owner = "huggingface"; - repo = "xet-core"; - tag = "v${version}"; - hash = "sha256-udjZcXTH+Mc4Gvj6bSPv1xi4MyXrLeCYav+7CzKWyhY="; - }; - - sourceRoot = "${src.name}/hf_xet"; - - cargoDeps = rustPlatform.fetchCargoVendor { - inherit - pname - version - src - sourceRoot - ; - hash = "sha256-PTzYubJHFvhq6T3314R4aqBAJlwehOqF7SbpLu4Jo6E="; - }; - - nativeBuildInputs = [ - pkg-config - rustPlatform.cargoSetupHook - rustPlatform.maturinBuildHook - ]; - - buildInputs = [ - openssl - ]; - - env.OPENSSL_NO_VENDOR = 1; - - pythonImportsCheck = ["hf_xet"]; - - # No tests (yet?) - doCheck = false; - - meta = { - description = "Xet client tech, used in huggingface_hub"; - homepage = "https://github.com/huggingface/xet-core/tree/main/hf_xet"; - changelog = "https://github.com/huggingface/xet-core/releases/tag/v${version}"; - license = lib.licenses.asl20; - }; -} diff --git a/packages/huggingface_hub/huggingface_hub.nix b/packages/huggingface_hub/huggingface_hub.nix deleted file mode 100644 index 02b03b7..0000000 --- a/packages/huggingface_hub/huggingface_hub.nix +++ /dev/null @@ -1,62 +0,0 @@ -/* -* WARNING: Just use `pkgs.python312Packages.huggingface-hub` (or change python version) -* WARNING: I didn't realise it existed when I packaged this. -* -* Nix Resources: -* 1. https://wiki.nixos.org/wiki/Python -* 2. https://nixos.org/manual/nixpkgs/unstable/#developing-with-python -* -* Hugging Face Resources: -* 1. https://github.com/huggingface/huggingface_hub -* 2. https://huggingface.co/docs/huggingface_hub/main/en/guides/cli -*/ -{ - lib, - buildPythonPackage, - fetchPypi, - # build time dependencies - setuptools, - # runtime dependencies - filelock, - fsspec, - hf-xet, - pyyaml, - requests, - tqdm, - typing-extensions, -}: -buildPythonPackage rec { - pname = "huggingface_hub"; - version = "0.34.3"; - - src = fetchPypi { - inherit pname version; - hash = "sha256-1YEw/VqnQISAaBR1SRwKvX6DVEIIL7w+9NRbbDn4OFM="; - }; - - pyproject = true; - doCheck = false; # skip unit testing - pythonImportsCheck = ["huggingface_hub"]; - - # buildtime dependencies - build-system = [ - setuptools - ]; - # runtime dependencies - dependencies = [ - filelock - fsspec - hf-xet - pyyaml - requests - tqdm - typing-extensions - ]; - - meta = rec { - description = "The official Python client for the Huggingface Hub."; - homepage = "https://github.com/huggingface/huggingface_hub"; - changelog = "${homepage}/releases/tag/v${version}"; - license = lib.licenses.asl20; # Apache License 2.0 - }; -} diff --git a/packages/melonloader/README.md b/packages/melonloader/README.md deleted file mode 100644 index 445afc1..0000000 --- a/packages/melonloader/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## nixpkgs-melonloader -Files sourced from the [github:WillemToorenburgh/nixpkgs-melonloader](https://github.com/WillemToorenburgh/nixpkgs-melonloader), -exact location found [here](https://github.com/WillemToorenburgh/nixpkgs-melonloader/tree/d02dfd646f75d789bcec5be83a51666796544c12/pkgs/by-name/me/melonloader-installer). diff --git a/packages/melonloader/deps.json b/packages/melonloader/deps.json deleted file mode 100644 index 75987c5..0000000 --- a/packages/melonloader/deps.json +++ /dev/null @@ -1,747 +0,0 @@ -[ - { - "pname": "Avalonia", - "version": "11.3.8", - "hash": "sha256-0cM3VVudDUELNE/fWehuCplPKLITjw1hbg9IGtIm20g=" - }, - { - "pname": "Avalonia.Angle.Windows.Natives", - "version": "2.1.25547.20250602", - "hash": "sha256-LE/lENAHptmz6t3T/AoJwnhpda+xs7PqriNGzdcfg8M=" - }, - { - "pname": "Avalonia.BuildServices", - "version": "11.3.1", - "hash": "sha256-JYcA/DgTHRJ02/FcURqtJnXYhhdzki8DGECLkZ4zONg=" - }, - { - "pname": "Avalonia.Controls.ColorPicker", - "version": "11.3.8", - "hash": "sha256-cB3mYR1X8Gzu1FQfWCJpfWosnpojIQhRSxrjYz4zD6g=" - }, - { - "pname": "Avalonia.Desktop", - "version": "11.3.8", - "hash": "sha256-X/ggsRzsN7o3O4Iw4uvjgOdlW58Xbe8Jpv4llRuFcoA=" - }, - { - "pname": "Avalonia.Diagnostics", - "version": "11.3.8", - "hash": "sha256-eOLf2Id4Olbq/nMWERarked+vg5ZnVMCxMKOXBfqAqM=" - }, - { - "pname": "Avalonia.Fonts.Inter", - "version": "11.3.8", - "hash": "sha256-EaUjJZ+K+5HaSJ1hmLgwuH4HGp1N2s1TNJogZulpVT8=" - }, - { - "pname": "Avalonia.FreeDesktop", - "version": "11.3.8", - "hash": "sha256-XJogaWo4ZNg/PvckA6D5EEuyQneYUKDePnT9snNwaHs=" - }, - { - "pname": "Avalonia.Native", - "version": "11.3.8", - "hash": "sha256-Hm4uneEN3rQVmSp1Ai4cDSTJpixYDzYJzEkAesvwxPw=" - }, - { - "pname": "Avalonia.Remote.Protocol", - "version": "11.3.8", - "hash": "sha256-pCIcQuTTcpik4xg5x8Y/QuXaW/GmNny/5ZBVr0bhmNU=" - }, - { - "pname": "Avalonia.Skia", - "version": "11.3.8", - "hash": "sha256-FeJ6tdgeGKHkv0JKPOq2eHTxaDTT0t2yJ7wavBKnr68=" - }, - { - "pname": "Avalonia.Themes.Fluent", - "version": "11.3.8", - "hash": "sha256-fVXc8+WPRa3YkX4EIt/Wjz9hnI7y6pv3P1cCBhEPgOg=" - }, - { - "pname": "Avalonia.Themes.Simple", - "version": "11.3.8", - "hash": "sha256-GSD4yvyDKqBSGV/rwE/EO3CTp9dG4eR4B5H0Y/u9+hE=" - }, - { - "pname": "Avalonia.Win32", - "version": "11.3.8", - "hash": "sha256-YwzyF4YJtCzcLpGxDe6U3Tpxjcqft8mcYjUNnL2Ockg=" - }, - { - "pname": "Avalonia.X11", - "version": "11.3.8", - "hash": "sha256-SlAWkiaGYc+Ynq4QcO3/xorz2EIWWyrZcHXIk7F68i0=" - }, - { - "pname": "CommunityToolkit.Mvvm", - "version": "8.4.0", - "hash": "sha256-a0D550q+ffreU9Z+kQPdzJYPNaj1UjgyPofLzUg02ZI=" - }, - { - "pname": "Gameloop.Vdf", - "version": "0.6.2", - "hash": "sha256-z34mcUx7qcaFlVsenGKYuxFNCQNWwOeFZYGecbRT3ZA=" - }, - { - "pname": "HarfBuzzSharp", - "version": "8.3.1.1", - "hash": "sha256-614yv6bK9ynhdUnvW4wIkgpBe2sqTh28U9cDZzdhPc0=" - }, - { - "pname": "HarfBuzzSharp.NativeAssets.Linux", - "version": "8.3.1.1", - "hash": "sha256-sBbez6fc9axVcsBbIHbpQh/MM5NHlMJgSu6FyuZzVyU=" - }, - { - "pname": "HarfBuzzSharp.NativeAssets.macOS", - "version": "8.3.1.1", - "hash": "sha256-hK20KbX2OpewIO5qG5gWw5Ih6GoLcIDgFOqCJIjXR/Q=" - }, - { - "pname": "HarfBuzzSharp.NativeAssets.WebAssembly", - "version": "8.3.1.1", - "hash": "sha256-mLKoLqI47ZHXqTMLwP1UCm7faDptUfQukNvdq6w/xxw=" - }, - { - "pname": "HarfBuzzSharp.NativeAssets.Win32", - "version": "8.3.1.1", - "hash": "sha256-Um4iwLdz9XtaDSAsthNZdev6dMiy7OBoHOrorMrMYyo=" - }, - { - "pname": "MicroCom.Runtime", - "version": "0.11.0", - "hash": "sha256-VdwpP5fsclvNqJuppaOvwEwv2ofnAI5ZSz2V+UEdLF0=" - }, - { - "pname": "Microsoft.CSharp", - "version": "4.7.0", - "hash": "sha256-Enknv2RsFF68lEPdrf5M+BpV1kHoLTVRApKUwuk/pj0=" - }, - { - "pname": "Microsoft.Extensions.Primitives", - "version": "5.0.1", - "hash": "sha256-e4uoLnUSmON4If9qJh78+4z14IzW9qCu5YkqLdQqWQU=" - }, - { - "pname": "Microsoft.NET.ILLink.Tasks", - "version": "9.0.10", - "hash": "sha256-0fL4pa/a3aLZMqA7B5zNxrb1bHCu14v4HLBfcziUtiE=" - }, - { - "pname": "Microsoft.NETCore.Platforms", - "version": "1.1.0", - "hash": "sha256-FeM40ktcObQJk4nMYShB61H/E8B7tIKfl9ObJ0IOcCM=" - }, - { - "pname": "Microsoft.NETCore.Platforms", - "version": "1.1.1", - "hash": "sha256-8hLiUKvy/YirCWlFwzdejD2Db3DaXhHxT7GSZx/znJg=" - }, - { - "pname": "Microsoft.NETCore.Targets", - "version": "1.1.0", - "hash": "sha256-0AqQ2gMS8iNlYkrD+BxtIg7cXMnr9xZHtKAuN4bjfaQ=" - }, - { - "pname": "Microsoft.NETCore.Targets", - "version": "1.1.3", - "hash": "sha256-WLsf1NuUfRWyr7C7Rl9jiua9jximnVvzy6nk2D2bVRc=" - }, - { - "pname": "Microsoft.Win32.Primitives", - "version": "4.3.0", - "hash": "sha256-mBNDmPXNTW54XLnPAUwBRvkIORFM7/j0D0I2SyQPDEg=" - }, - { - "pname": "Microsoft.Win32.SystemEvents", - "version": "9.0.10", - "hash": "sha256-hqtadbUx58gBwBFfVk2vyRmgWgdRpbmT84pcuhKTXl0=" - }, - { - "pname": "NETStandard.Library", - "version": "1.6.1", - "hash": "sha256-iNan1ix7RtncGWC9AjAZ2sk70DoxOsmEOgQ10fXm4Pw=" - }, - { - "pname": "runtime.any.System.Collections", - "version": "4.3.0", - "hash": "sha256-4PGZqyWhZ6/HCTF2KddDsbmTTjxs2oW79YfkberDZS8=" - }, - { - "pname": "runtime.any.System.Diagnostics.Tools", - "version": "4.3.0", - "hash": "sha256-8yLKFt2wQxkEf7fNfzB+cPUCjYn2qbqNgQ1+EeY2h/I=" - }, - { - "pname": "runtime.any.System.Diagnostics.Tracing", - "version": "4.3.0", - "hash": "sha256-dsmTLGvt8HqRkDWP8iKVXJCS+akAzENGXKPV18W2RgI=" - }, - { - "pname": "runtime.any.System.Globalization", - "version": "4.3.0", - "hash": "sha256-PaiITTFI2FfPylTEk7DwzfKeiA/g/aooSU1pDcdwWLU=" - }, - { - "pname": "runtime.any.System.Globalization.Calendars", - "version": "4.3.0", - "hash": "sha256-AYh39tgXJVFu8aLi9Y/4rK8yWMaza4S4eaxjfcuEEL4=" - }, - { - "pname": "runtime.any.System.IO", - "version": "4.3.0", - "hash": "sha256-vej7ySRhyvM3pYh/ITMdC25ivSd0WLZAaIQbYj/6HVE=" - }, - { - "pname": "runtime.any.System.Reflection", - "version": "4.3.0", - "hash": "sha256-ns6f++lSA+bi1xXgmW1JkWFb2NaMD+w+YNTfMvyAiQk=" - }, - { - "pname": "runtime.any.System.Reflection.Extensions", - "version": "4.3.0", - "hash": "sha256-Y2AnhOcJwJVYv7Rp6Jz6ma0fpITFqJW+8rsw106K2X8=" - }, - { - "pname": "runtime.any.System.Reflection.Primitives", - "version": "4.3.0", - "hash": "sha256-LkPXtiDQM3BcdYkAm5uSNOiz3uF4J45qpxn5aBiqNXQ=" - }, - { - "pname": "runtime.any.System.Resources.ResourceManager", - "version": "4.3.0", - "hash": "sha256-9EvnmZslLgLLhJ00o5MWaPuJQlbUFcUF8itGQNVkcQ4=" - }, - { - "pname": "runtime.any.System.Runtime", - "version": "4.3.0", - "hash": "sha256-qwhNXBaJ1DtDkuRacgHwnZmOZ1u9q7N8j0cWOLYOELM=" - }, - { - "pname": "runtime.any.System.Runtime.Handles", - "version": "4.3.0", - "hash": "sha256-PQRACwnSUuxgVySO1840KvqCC9F8iI9iTzxNW0RcBS4=" - }, - { - "pname": "runtime.any.System.Runtime.InteropServices", - "version": "4.3.0", - "hash": "sha256-Kaw5PnLYIiqWbsoF3VKJhy7pkpoGsUwn4ZDCKscbbzA=" - }, - { - "pname": "runtime.any.System.Text.Encoding", - "version": "4.3.0", - "hash": "sha256-Q18B9q26MkWZx68exUfQT30+0PGmpFlDgaF0TnaIGCs=" - }, - { - "pname": "runtime.any.System.Text.Encoding.Extensions", - "version": "4.3.0", - "hash": "sha256-6MYj0RmLh4EVqMtO/MRqBi0HOn5iG4x9JimgCCJ+EFM=" - }, - { - "pname": "runtime.any.System.Threading.Tasks", - "version": "4.3.0", - "hash": "sha256-agdOM0NXupfHbKAQzQT8XgbI9B8hVEh+a/2vqeHctg4=" - }, - { - "pname": "runtime.any.System.Threading.Timer", - "version": "4.3.0", - "hash": "sha256-BgHxXCIbicVZtpgMimSXixhFC3V+p5ODqeljDjO8hCs=" - }, - { - "pname": "runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-EbnOqPOrAgI9eNheXLR++VnY4pHzMsEKw1dFPJ/Fl2c=" - }, - { - "pname": "runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-mVg02TNvJc1BuHU03q3fH3M6cMgkKaQPBxraSHl/Btg=" - }, - { - "pname": "runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-g9Uiikrl+M40hYe0JMlGHe/lrR0+nN05YF64wzLmBBA=" - }, - { - "pname": "runtime.native.System", - "version": "4.3.0", - "hash": "sha256-ZBZaodnjvLXATWpXXakFgcy6P+gjhshFXmglrL5xD5Y=" - }, - { - "pname": "runtime.native.System.IO.Compression", - "version": "4.3.0", - "hash": "sha256-DWnXs4vlKoU6WxxvCArTJupV6sX3iBbZh8SbqfHace8=" - }, - { - "pname": "runtime.native.System.Net.Http", - "version": "4.3.0", - "hash": "sha256-c556PyheRwpYhweBjSfIwEyZHnAUB8jWioyKEcp/2dg=" - }, - { - "pname": "runtime.native.System.Security.Cryptography.Apple", - "version": "4.3.0", - "hash": "sha256-2IhBv0i6pTcOyr8FFIyfPEaaCHUmJZ8DYwLUwJ+5waw=" - }, - { - "pname": "runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.0", - "hash": "sha256-Jy01KhtcCl2wjMpZWH+X3fhHcVn+SyllWFY8zWlz/6I=" - }, - { - "pname": "runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-xqF6LbbtpzNC9n1Ua16PnYgXHU0LvblEROTfK4vIxX8=" - }, - { - "pname": "runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-aJBu6Frcg6webvzVcKNoUP1b462OAqReF2giTSyBzCQ=" - }, - { - "pname": "runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-Mpt7KN2Kq51QYOEVesEjhWcCGTqWckuPf8HlQ110qLY=" - }, - { - "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple", - "version": "4.3.0", - "hash": "sha256-serkd4A7F6eciPiPJtUyJyxzdAtupEcWIZQ9nptEzIM=" - }, - { - "pname": "runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-JvMltmfVC53mCZtKDHE69G3RT6Id28hnskntP9MMP9U=" - }, - { - "pname": "runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-QfFxWTVRNBhN4Dm1XRbCf+soNQpy81PsZed3x6op/bI=" - }, - { - "pname": "runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-EaJHVc9aDZ6F7ltM2JwlIuiJvqM67CKRq682iVSo+pU=" - }, - { - "pname": "runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-PHR0+6rIjJswn89eoiWYY1DuU8u6xRJLrtjykAMuFmA=" - }, - { - "pname": "runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl", - "version": "4.3.2", - "hash": "sha256-LFkh7ua7R4rI5w2KGjcHlGXLecsncCy6kDXLuy4qD/Q=" - }, - { - "pname": "runtime.unix.Microsoft.Win32.Primitives", - "version": "4.3.0", - "hash": "sha256-LZb23lRXzr26tRS5aA0xyB08JxiblPDoA7HBvn6awXg=" - }, - { - "pname": "runtime.unix.System.Console", - "version": "4.3.1", - "hash": "sha256-dxyn/1Px4FKLZ2QMUrkFpW619Y1lhPeTiGLWYM6IbpY=" - }, - { - "pname": "runtime.unix.System.Diagnostics.Debug", - "version": "4.3.0", - "hash": "sha256-ReoazscfbGH+R6s6jkg5sIEHWNEvjEoHtIsMbpc7+tI=" - }, - { - "pname": "runtime.unix.System.IO.FileSystem", - "version": "4.3.0", - "hash": "sha256-Pf4mRl6YDK2x2KMh0WdyNgv0VUNdSKVDLlHqozecy5I=" - }, - { - "pname": "runtime.unix.System.Net.Primitives", - "version": "4.3.0", - "hash": "sha256-pHJ+I6i16MV6m77uhTC6GPY6jWGReE3SSP3fVB59ti0=" - }, - { - "pname": "runtime.unix.System.Net.Sockets", - "version": "4.3.0", - "hash": "sha256-IvgOeA2JuBjKl5yAVGjPYMPDzs9phb3KANs95H9v1w4=" - }, - { - "pname": "runtime.unix.System.Private.Uri", - "version": "4.3.0", - "hash": "sha256-c5tXWhE/fYbJVl9rXs0uHh3pTsg44YD1dJvyOA0WoMs=" - }, - { - "pname": "runtime.unix.System.Runtime.Extensions", - "version": "4.3.0", - "hash": "sha256-l8S9gt6dk3qYG6HYonHtdlYtBKyPb29uQ6NDjmrt3V4=" - }, - { - "pname": "Semver", - "version": "3.0.0", - "hash": "sha256-nX5ka27GY6pz9S73H6sLSQCrnAyyI9xDVdzrtlMp4BQ=" - }, - { - "pname": "SkiaSharp", - "version": "2.88.9", - "hash": "sha256-jZ/4nVXYJtrz9SBf6sYc/s0FxS7ReIYM4kMkrhZS+24=" - }, - { - "pname": "SkiaSharp.NativeAssets.Linux", - "version": "2.88.9", - "hash": "sha256-mQ/oBaqRR71WfS66mJCvcc3uKW7CNEHoPN2JilDbw/A=" - }, - { - "pname": "SkiaSharp.NativeAssets.macOS", - "version": "2.88.9", - "hash": "sha256-qvGuAmjXGjGKMzOPBvP9VWRVOICSGb7aNVejU0lLe/g=" - }, - { - "pname": "SkiaSharp.NativeAssets.WebAssembly", - "version": "2.88.9", - "hash": "sha256-vgFL4Pdy3O1RKBp+T9N3W4nkH9yurZ0suo8u3gPmmhY=" - }, - { - "pname": "SkiaSharp.NativeAssets.Win32", - "version": "2.88.9", - "hash": "sha256-kP5XM5GgwHGfNJfe4T2yO5NIZtiF71Ddp0pd1vG5V/4=" - }, - { - "pname": "System.AppContext", - "version": "4.3.0", - "hash": "sha256-yg95LNQOwFlA1tWxXdQkVyJqT4AnoDc+ACmrNvzGiZg=" - }, - { - "pname": "System.Buffers", - "version": "4.3.0", - "hash": "sha256-XqZWb4Kd04960h4U9seivjKseGA/YEIpdplfHYHQ9jk=" - }, - { - "pname": "System.Collections", - "version": "4.3.0", - "hash": "sha256-afY7VUtD6w/5mYqrce8kQrvDIfS2GXDINDh73IjxJKc=" - }, - { - "pname": "System.Collections.Concurrent", - "version": "4.3.0", - "hash": "sha256-KMY5DfJnDeIsa13DpqvyN8NkReZEMAFnlmNglVoFIXI=" - }, - { - "pname": "System.Collections.NonGeneric", - "version": "4.3.0", - "hash": "sha256-8/yZmD4jjvq7m68SPkJZLBQ79jOTOyT5lyzX4SCYAx8=" - }, - { - "pname": "System.Collections.Specialized", - "version": "4.3.0", - "hash": "sha256-QNg0JJNx+zXMQ26MJRPzH7THdtqjrNtGLUgaR1SdvOk=" - }, - { - "pname": "System.ComponentModel", - "version": "4.3.0", - "hash": "sha256-i00uujMO4JEDIEPKLmdLY3QJ6vdSpw6Gh9oOzkFYBiU=" - }, - { - "pname": "System.ComponentModel.Primitives", - "version": "4.3.0", - "hash": "sha256-IOMJleuIBppmP4ECB3uftbdcgL7CCd56+oAD/Sqrbus=" - }, - { - "pname": "System.ComponentModel.TypeConverter", - "version": "4.3.0", - "hash": "sha256-PSDiPYt8PgTdTUBz+GH6lHCaM1YgfObneHnZsc8Fz54=" - }, - { - "pname": "System.Console", - "version": "4.3.0", - "hash": "sha256-Xh3PPBZr0pDbDaK8AEHbdGz7ePK6Yi1ZyRWI1JM6mbo=" - }, - { - "pname": "System.Diagnostics.Debug", - "version": "4.3.0", - "hash": "sha256-fkA79SjPbSeiEcrbbUsb70u9B7wqbsdM9s1LnoKj0gM=" - }, - { - "pname": "System.Diagnostics.DiagnosticSource", - "version": "4.3.0", - "hash": "sha256-OFJRb0ygep0Z3yDBLwAgM/Tkfs4JCDtsNhwDH9cd1Xw=" - }, - { - "pname": "System.Diagnostics.Tools", - "version": "4.3.0", - "hash": "sha256-gVOv1SK6Ape0FQhCVlNOd9cvQKBvMxRX9K0JPVi8w0Y=" - }, - { - "pname": "System.Diagnostics.Tracing", - "version": "4.3.0", - "hash": "sha256-hCETZpHHGVhPYvb4C0fh4zs+8zv4GPoixagkLZjpa9Q=" - }, - { - "pname": "System.Drawing.Common", - "version": "9.0.10", - "hash": "sha256-D4E99H3HVNatH+MDKuCGxaJOP7pXTxibBLThNZBXwLc=" - }, - { - "pname": "System.Globalization", - "version": "4.3.0", - "hash": "sha256-caL0pRmFSEsaoeZeWN5BTQtGrAtaQPwFi8YOZPZG5rI=" - }, - { - "pname": "System.Globalization.Calendars", - "version": "4.3.0", - "hash": "sha256-uNOD0EOVFgnS2fMKvMiEtI9aOw00+Pfy/H+qucAQlPc=" - }, - { - "pname": "System.Globalization.Extensions", - "version": "4.3.0", - "hash": "sha256-mmJWA27T0GRVuFP9/sj+4TrR4GJWrzNIk2PDrbr7RQk=" - }, - { - "pname": "System.IO", - "version": "4.3.0", - "hash": "sha256-ruynQHekFP5wPrDiVyhNiRIXeZ/I9NpjK5pU+HPDiRY=" - }, - { - "pname": "System.IO.Compression", - "version": "4.3.0", - "hash": "sha256-f5PrQlQgj5Xj2ZnHxXW8XiOivaBvfqDao9Sb6AVinyA=" - }, - { - "pname": "System.IO.Compression.ZipFile", - "version": "4.3.0", - "hash": "sha256-WQl+JgWs+GaRMeiahTFUbrhlXIHapzcpTFXbRvAtvvs=" - }, - { - "pname": "System.IO.FileSystem", - "version": "4.3.0", - "hash": "sha256-vNIYnvlayuVj0WfRfYKpDrhDptlhp1pN8CYmlVd2TXw=" - }, - { - "pname": "System.IO.FileSystem.Primitives", - "version": "4.3.0", - "hash": "sha256-LMnfg8Vwavs9cMnq9nNH8IWtAtSfk0/Fy4s4Rt9r1kg=" - }, - { - "pname": "System.IO.Pipelines", - "version": "8.0.0", - "hash": "sha256-LdpB1s4vQzsOODaxiKstLks57X9DTD5D6cPx8DE1wwE=" - }, - { - "pname": "System.Linq", - "version": "4.3.0", - "hash": "sha256-R5uiSL3l6a3XrXSSL6jz+q/PcyVQzEAByiuXZNSqD/A=" - }, - { - "pname": "System.Linq.Expressions", - "version": "4.3.0", - "hash": "sha256-+3pvhZY7rip8HCbfdULzjlC9FPZFpYoQxhkcuFm2wk8=" - }, - { - "pname": "System.Net.Http", - "version": "4.3.4", - "hash": "sha256-FMoU0K7nlPLxoDju0NL21Wjlga9GpnAoQjsFhFYYt00=" - }, - { - "pname": "System.Net.NameResolution", - "version": "4.3.0", - "hash": "sha256-eGZwCBExWsnirWBHyp2sSSSXp6g7I6v53qNmwPgtJ5c=" - }, - { - "pname": "System.Net.Primitives", - "version": "4.3.0", - "hash": "sha256-MY7Z6vOtFMbEKaLW9nOSZeAjcWpwCtdO7/W1mkGZBzE=" - }, - { - "pname": "System.Net.Sockets", - "version": "4.3.0", - "hash": "sha256-il7dr5VT/QWDg/0cuh+4Es2u8LY//+qqiY9BZmYxSus=" - }, - { - "pname": "System.ObjectModel", - "version": "4.3.0", - "hash": "sha256-gtmRkWP2Kwr3nHtDh0yYtce38z1wrGzb6fjm4v8wN6Q=" - }, - { - "pname": "System.Private.Uri", - "version": "4.3.2", - "hash": "sha256-jB2+W3tTQ6D9XHy5sEFMAazIe1fu2jrENUO0cb48OgU=" - }, - { - "pname": "System.Reflection", - "version": "4.3.0", - "hash": "sha256-NQSZRpZLvtPWDlvmMIdGxcVuyUnw92ZURo0hXsEshXY=" - }, - { - "pname": "System.Reflection.Emit", - "version": "4.3.0", - "hash": "sha256-5LhkDmhy2FkSxulXR+bsTtMzdU3VyyuZzsxp7/DwyIU=" - }, - { - "pname": "System.Reflection.Emit.ILGeneration", - "version": "4.3.0", - "hash": "sha256-mKRknEHNls4gkRwrEgi39B+vSaAz/Gt3IALtS98xNnA=" - }, - { - "pname": "System.Reflection.Emit.Lightweight", - "version": "4.3.0", - "hash": "sha256-rKx4a9yZKcajloSZHr4CKTVJ6Vjh95ni+zszPxWjh2I=" - }, - { - "pname": "System.Reflection.Extensions", - "version": "4.3.0", - "hash": "sha256-mMOCYzUenjd4rWIfq7zIX9PFYk/daUyF0A8l1hbydAk=" - }, - { - "pname": "System.Reflection.Primitives", - "version": "4.3.0", - "hash": "sha256-5ogwWB4vlQTl3jjk1xjniG2ozbFIjZTL9ug0usZQuBM=" - }, - { - "pname": "System.Reflection.TypeExtensions", - "version": "4.3.0", - "hash": "sha256-4U4/XNQAnddgQIHIJq3P2T80hN0oPdU2uCeghsDTWng=" - }, - { - "pname": "System.Resources.ResourceManager", - "version": "4.3.0", - "hash": "sha256-idiOD93xbbrbwwSnD4mORA9RYi/D/U48eRUsn/WnWGo=" - }, - { - "pname": "System.Runtime", - "version": "4.3.0", - "hash": "sha256-51813WXpBIsuA6fUtE5XaRQjcWdQ2/lmEokJt97u0Rg=" - }, - { - "pname": "System.Runtime", - "version": "4.3.1", - "hash": "sha256-R9T68AzS1PJJ7v6ARz9vo88pKL1dWqLOANg4pkQjkA0=" - }, - { - "pname": "System.Runtime.Extensions", - "version": "4.3.0", - "hash": "sha256-wLDHmozr84v1W2zYCWYxxj0FR0JDYHSVRaRuDm0bd/o=" - }, - { - "pname": "System.Runtime.Handles", - "version": "4.3.0", - "hash": "sha256-KJ5aXoGpB56Y6+iepBkdpx/AfaJDAitx4vrkLqR7gms=" - }, - { - "pname": "System.Runtime.InteropServices", - "version": "4.3.0", - "hash": "sha256-8sDH+WUJfCR+7e4nfpftj/+lstEiZixWUBueR2zmHgI=" - }, - { - "pname": "System.Runtime.InteropServices.RuntimeInformation", - "version": "4.3.0", - "hash": "sha256-MYpl6/ZyC6hjmzWRIe+iDoldOMW1mfbwXsduAnXIKGA=" - }, - { - "pname": "System.Runtime.Numerics", - "version": "4.3.0", - "hash": "sha256-P5jHCgMbgFMYiONvzmaKFeOqcAIDPu/U8bOVrNPYKqc=" - }, - { - "pname": "System.Security.Claims", - "version": "4.3.0", - "hash": "sha256-Fua/rDwAqq4UByRVomAxMPmDBGd5eImRqHVQIeSxbks=" - }, - { - "pname": "System.Security.Cryptography.Algorithms", - "version": "4.3.0", - "hash": "sha256-tAJvNSlczYBJ3Ed24Ae27a55tq/n4D3fubNQdwcKWA8=" - }, - { - "pname": "System.Security.Cryptography.Cng", - "version": "4.3.0", - "hash": "sha256-u17vy6wNhqok91SrVLno2M1EzLHZm6VMca85xbVChsw=" - }, - { - "pname": "System.Security.Cryptography.Csp", - "version": "4.3.0", - "hash": "sha256-oefdTU/Z2PWU9nlat8uiRDGq/PGZoSPRgkML11pmvPQ=" - }, - { - "pname": "System.Security.Cryptography.Encoding", - "version": "4.3.0", - "hash": "sha256-Yuge89N6M+NcblcvXMeyHZ6kZDfwBv3LPMDiF8HhJss=" - }, - { - "pname": "System.Security.Cryptography.OpenSsl", - "version": "4.3.0", - "hash": "sha256-DL+D2sc2JrQiB4oAcUggTFyD8w3aLEjJfod5JPe+Oz4=" - }, - { - "pname": "System.Security.Cryptography.Primitives", - "version": "4.3.0", - "hash": "sha256-fnFi7B3SnVj5a+BbgXnbjnGNvWrCEU6Hp/wjsjWz318=" - }, - { - "pname": "System.Security.Cryptography.X509Certificates", - "version": "4.3.0", - "hash": "sha256-MG3V/owDh273GCUPsGGraNwaVpcydupl3EtPXj6TVG0=" - }, - { - "pname": "System.Security.Principal", - "version": "4.3.0", - "hash": "sha256-rjudVUHdo8pNJg2EVEn0XxxwNo5h2EaYo+QboPkXlYk=" - }, - { - "pname": "System.Security.Principal.Windows", - "version": "4.3.0", - "hash": "sha256-mbdLVUcEwe78p3ZnB6jYsizNEqxMaCAWI3tEQNhRQAE=" - }, - { - "pname": "System.Text.Encoding", - "version": "4.3.0", - "hash": "sha256-GctHVGLZAa/rqkBNhsBGnsiWdKyv6VDubYpGkuOkBLg=" - }, - { - "pname": "System.Text.Encoding.Extensions", - "version": "4.3.0", - "hash": "sha256-vufHXg8QAKxHlujPHHcrtGwAqFmsCD6HKjfDAiHyAYc=" - }, - { - "pname": "System.Text.RegularExpressions", - "version": "4.3.1", - "hash": "sha256-DxsEZ0nnPozyC1W164yrMUXwnAdHShS9En7ImD/GJMM=" - }, - { - "pname": "System.Threading", - "version": "4.3.0", - "hash": "sha256-ZDQ3dR4pzVwmaqBg4hacZaVenQ/3yAF/uV7BXZXjiWc=" - }, - { - "pname": "System.Threading.Tasks", - "version": "4.3.0", - "hash": "sha256-Z5rXfJ1EXp3G32IKZGiZ6koMjRu0n8C1NGrwpdIen4w=" - }, - { - "pname": "System.Threading.Tasks.Extensions", - "version": "4.3.0", - "hash": "sha256-X2hQ5j+fxcmnm88Le/kSavjiGOmkcumBGTZKBLvorPc=" - }, - { - "pname": "System.Threading.ThreadPool", - "version": "4.3.0", - "hash": "sha256-wW0QdvssRoaOfQLazTGSnwYTurE4R8FxDx70pYkL+gg=" - }, - { - "pname": "System.Threading.Timer", - "version": "4.3.0", - "hash": "sha256-pmhslmhQhP32TWbBzoITLZ4BoORBqYk25OWbru04p9s=" - }, - { - "pname": "System.Xml.ReaderWriter", - "version": "4.3.0", - "hash": "sha256-QQ8KgU0lu4F5Unh+TbechO//zaAGZ4MfgvW72Cn1hzA=" - }, - { - "pname": "System.Xml.XDocument", - "version": "4.3.0", - "hash": "sha256-rWtdcmcuElNOSzCehflyKwHkDRpiOhJJs8CeQ0l1CCI=" - }, - { - "pname": "Tmds.DBus.Protocol", - "version": "0.21.2", - "hash": "sha256-gaK/5aAummyin6ptnhaJbnA0ih4+2xADrtrLfFbHwYI=" - } -] diff --git a/packages/melonloader/disable-auto-updates.patch b/packages/melonloader/disable-auto-updates.patch deleted file mode 100644 index 5f5c81d..0000000 --- a/packages/melonloader/disable-auto-updates.patch +++ /dev/null @@ -1,19 +0,0 @@ -Subject: [PATCH] Disable auto-updates ---- -Index: MelonLoader.Installer/Updater.cs -IDEA additional info: -Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP -<+>UTF-8 -=================================================================== -diff --git a/MelonLoader.Installer/Updater.cs b/MelonLoader.Installer/Updater.cs ---- a/MelonLoader.Installer/Updater.cs (revision 201f0da25ae5e576884f65c350046d7bb267b513) -+++ b/MelonLoader.Installer/Updater.cs (date 1769995332111) -@@ -18,7 +18,7 @@ - return null; - - // Don't auto-update on CI builds -- if (Program.Version.Revision > 0) -+ if (true) - { - State = UpdateState.AlreadyChecked; - return null; diff --git a/packages/melonloader/package.nix b/packages/melonloader/package.nix deleted file mode 100644 index b085578..0000000 --- a/packages/melonloader/package.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ - fetchFromGitHub, - dotnetCorePackages, - buildDotnetModule, - makeDesktopItem, - copyDesktopItems, - lib, - ... -}: -buildDotnetModule rec { - pname = "melonloader-installer"; - version = "4.2.1"; - - src = fetchFromGitHub { - owner = "LavaGang"; - repo = "MelonLoader.Installer"; - tag = version; - hash = "sha256-0hUc4f1avPfNDGAQDokLpRLK4sSrUFD5GkJZeP/Gu34="; - }; - - patches = [ - ./disable-auto-updates.patch - ]; - - projectFile = "MelonLoader.Installer/MelonLoader.Installer.csproj"; - dotnet-sdk = dotnetCorePackages.sdk_9_0; - dotnet-runtime = dotnetCorePackages.runtime_9_0; - nugetDeps = ./deps.json; - selfContainedBuild = true; - - nativeBuildInputs = [copyDesktopItems]; - - postInstall = '' - install -Dm644 Resources/ML_Icon.png $out/share/icons/MelonLoader.Installer.Linux.png - ''; - - desktopItems = [ - (makeDesktopItem { - name = pname; - desktopName = "MelonLoader Installer"; - exec = meta.mainProgram; - comment = meta.description; - categories = [ - "Game" - "Utility" - ]; - icon = meta.mainProgram; - }) - ]; - - passthru.updateScript = ./update.sh; - - meta = { - homepage = "https://melonwiki.xyz"; - mainProgram = "MelonLoader.Installer.Linux"; - description = "Automated installer for MelonLoader, the universal mod-loader for games built in the Unity Engine"; - license = lib.licenses.asl20; - platforms = ["x86_64-linux"]; - maintainers = with lib.maintainers; [WillemToorenburgh]; - }; -} diff --git a/packages/melonloader/update.sh b/packages/melonloader/update.sh deleted file mode 100644 index 481a62f..0000000 --- a/packages/melonloader/update.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env nix-shell -#!nix-shell -I nixpkgs=./. -i bash -p curl jq common-updater-scripts -#shellcheck shell=bash - -# Implementation lovingly referenced and adapted from cavalier package's update.sh - -set -eu -o pipefail - -version=$(curl -s ${GITHUB_TOKEN:+-u ":$GITHUB_TOKEN"} \ - https://api.github.com/repos/LavaGang/MelonLoader.Installer/releases/latest | jq -e -r .tag_name) -old_version=$(nix-instantiate --eval -A melonloader-installer.version | jq -e -r) - -if [[ $version == "$old_version" ]]; then - echo "New version same as old version, nothing to do." >&2 - exit 0 -fi - -update-source-version melonloader-installer "$version" - -$(nix-build -A melonloader-installer.fetch-deps --no-out-link) "$(dirname -- "${BASH_SOURCE[0]}")/deps.json" diff --git a/packages/sddm-theme/corners.nix b/packages/sddm-theme/corners.nix deleted file mode 100755 index b0e3789..0000000 --- a/packages/sddm-theme/corners.nix +++ /dev/null @@ -1,24 +0,0 @@ -{pkgs}: -pkgs.stdenv.mkDerivation { - name = "sddm-theme-corners"; - version = "1.0.0"; - - installPhase = '' - mkdir -p $out/share/sddm/themes - cp -ar $src/corners $out/share/sddm/themes/ - ''; - src = pkgs.fetchFromGitHub { - owner = "aczw"; - repo = "sddm-theme-corners"; - rev = "6ff0ff455261badcae36cd7d151a34479f157a3c"; - sha256 = "0iiasrbl7ciyhq3z02la636as915zk9ph063ac7vm5iwny8vgwh8"; - }; - - buildInputs = with pkgs; [ - libsForQt5.qt5.qtgraphicaleffects - ]; - - nativeBuildInputs = with pkgs; [ - qt5.wrapQtAppsHook - ]; -} diff --git a/packages/x86-manpages/default.nix b/packages/x86-manpages/default.nix deleted file mode 100644 index b687422..0000000 --- a/packages/x86-manpages/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{pkgs, ...}: -pkgs.stdenv.mkDerivation { - pname = "x86-manpages"; - version = "0.0.1"; - - src = pkgs.fetchFromGitHub { - owner = "ttmo-O"; - repo = "x86-manpages"; - - ## Recommended - # rev = "0e199a8b4d90be7eb715291c21cf41de8527beac"; - # sha256 = "0im596j0pf90npg933gkq6wpw23c47fcwv0n64qfqn5mcy92qbcb"; - rev = "94902f9c45de0efe803c32b6c3e88d6623881866"; - sha256 = "0k6nsfabzqwnhjiyw2kyg0z49nzrsxn515f6dcjh1rn7bzih5562"; - }; - - installPhase = '' - mkdir -p $out/man/man7 - - shopt -u nullglob - for m in man7/*.7; do - install -m 644 "$m" "$out/man/man7" - done - ''; - - meta = with pkgs.lib; { - description = "Manpages for x86 instructions"; - homepage = "https://github.com/ttmo-O/x86-manpages"; - license = licenses.mit; - platforms = platforms.all; - }; -} diff --git a/result b/result new file mode 120000 index 0000000..fab173e --- /dev/null +++ b/result @@ -0,0 +1 @@ +/nix/store/clc95m2c889yns3n8c71vfgb1q2qd419-nixos-system-myputer-24.11.20250212.0ff09db \ No newline at end of file diff --git a/scripts/box b/scripts/box deleted file mode 100755 index 7f69cb0..0000000 --- a/scripts/box +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash -USAGE="Usage: box [--enter]" - -# ===== Configuration ===== # -DATA_DIR="$HOME/.data/box" -# ========================= # - -function setup { - mkdir -p "$DATA_DIR" &>/dev/null -} - -function box { - mktemp -d - # TODO: use a custom name instead -} - -set -euo pipefail - -ENTER=false -for arg in $@; do - case "$arg" in - -e|--enter) - ENTER=true - shift - ;; - -h|--help) - echo "$USAGE" - ;; - -*) - echo "[!] Unknown opt \"$arg\"" >&2 - ;; - *) - echo "[!] Unknown arg \"$arg\"" >&2 - ;; - esac -done - -setup - -BOX=$(box) - -if [[ "$ENTER" == true ]]; then - cd "$BOX" -fi diff --git a/scripts/fontgrep b/scripts/fontgrep deleted file mode 100755 index 6e06a64..0000000 --- a/scripts/fontgrep +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env bash - -function fontgrep { - fc-list \ - | grep $@ \ - | awk '{$1=""; print substr($0, 2, length($0)-1) }' \ - | grep -oE '^\s*[^,]+' \ - | sort \ - | uniq -} - -fontgrep $@ diff --git a/scripts/huhh b/scripts/huhh deleted file mode 100755 index 5dbcc81..0000000 --- a/scripts/huhh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -EXPR_MSG="evaluating derivation" -PROP_MSG="of derivation" - -LOC=$1 -if [ -z $1 ]; then - exec {1}<>"$LOC" -fi - -ERROR_LINE=$(<$LOC grep -nF "error:" \ - | tail -n1 \ - | awk '{print substr($1,1,length($1)-1)}' ) -<$LOC sed -n "$ERROR_LINE,\$p" - -echo "[*] Reason:" -<$LOC grep "evaluating attribute '.*' of derivation" \ - | awk '{ print substr($NF, 2, length($NF)-2), substr($5, 2, length($5)-2)}' diff --git a/scripts/lsyscalls b/scripts/lsyscalls deleted file mode 100755 index 5cbd744..0000000 --- a/scripts/lsyscalls +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -# USAGE: lsyscalls | sort [-nk2] - -echo -e '#include '\ - | cpp -dM \ - | grep "#define __NR_.*[0-9]$" \ - | cut -d_ -f 4- diff --git a/scripts/nix-list-installed b/scripts/nix-list-installed deleted file mode 100755 index 5a253b9..0000000 --- a/scripts/nix-list-installed +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env sh -nix-store -q --references /var/run/current-system/sw \ - | cut -d'-' -f2- diff --git a/scripts/openport b/scripts/openport deleted file mode 100755 index dd6222f..0000000 --- a/scripts/openport +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/env bash -# Credit: u/boxofrox https://discourse.nixos.org/u/boxofrox -# Ref: https://discourse.nixos.org/t/how-to-temporarily-open-a-tcp-port-in-nixos/12306/3 -USAGE="[Usage] sudo withport " - -set -ueo pipefail - -open-port() { - local port=$1 - iptables -A INPUT -p tcp --dport $port -j ACCEPT -} - -close-port() { - local port=${1:-0} - iptables -D INPUT -p tcp --dport $port -j ACCEPT -} - -PORT=$1 -if [[ -z "$PORT" ]]; then - echo -e "[!] Port not given\n$USAGE" >&2 - exit 1 -fi -shift; # Drop port argument - -if [[ 0 -eq $# ]]; then - echo -e "[!] Command not given\n$USAGE" >&2 - exit 1 -fi - -open-port $PORT -# Ensure port closes if error occurs. -trap "close-port $PORT" EXIT -# Run the command as user, not root. -runuser -u $SUDO_USER -- "$@" -# Trap will close port. diff --git a/scripts/set-wallpaper b/scripts/set-wallpaper deleted file mode 100755 index 2f6b928..0000000 --- a/scripts/set-wallpaper +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# THIS PROGRAM RELIES SOLELY ON `SWWW` - -transition=$1 -wallpaper_path=$2 - -if [[ "$transition" == "wipe" ]]; then - swww img --transition-type wipe --transition-angle 30 --transition-step 90 --transition-fps 60 $wallpaper_path -elif [[ "$transition" == "preview" ]]; then - swww img --transition-type wipe --transition-angle 45 --transition-step 90 --transition-bezier .27,.98,.78,0 --transition-fps 60 $wallpaper_path -elif [[ "$transition" == "circle" ]]; then - swww img --transition-type grow --transition-pos "$(hyprctl cursorpos)" --transition-duration 3 --transition-fps 60 --invert-y $wallpaper_path -else - echo "[!] Unknown transition type \"$transition\"" - exit 1 -fi diff --git a/scripts/testvps b/scripts/testvps deleted file mode 100755 index 4382b7d..0000000 --- a/scripts/testvps +++ /dev/null @@ -1,82 +0,0 @@ -#!/usr/bin/env bash -# Requires: systemctl - -set -u - -function match { - [[ "$1" =~ $2 ]] -} - -function padlen { - local MAX=0 - for KEY in "$@"; do - local LEN=${#KEY} - ((LEN > MAX)) && MAX=$LEN - done - echo $MAX -} - -function pad { - local PAD="$1" - if [ -z "$PAD" ]; then - exit 1 - fi - - for ((i=0; i/dev/null) - if [ -z "$STAT" ]; then - fmt_print "$SERVICE" "$LPAD" "NOTFOUND" - exit 1 - fi - - local STAT_LOADED=$(head -n2 <<< "$STAT" | tail -n1) - # NOTE: "active " intentionally contains right padding - local ENABLED=$(match "$STAT_LOADED" "^\s*Loaded: loaded \(.*; enabled; .*\)" && echo "enabled" || echo "disabled") - local ACTIVE=$(match "$STAT" "\s*Active: active \(running\)" && echo "active " || echo "inactive") - fmt_print "$SERVICE" "$LPAD" "$ACTIVE" "$ENABLED" -) - -function test_services { - local PAD_ALIGN=$(padlen $@) - # fmt_test_service - for SERVICE in "$@"; do - local LPAD=$((PAD_ALIGN - ${#SERVICE})) - fmt_test_service "$SERVICE" $LPAD - done -} - -test_services nginx forgejo vaultwarden diff --git a/scripts/webdev b/scripts/webdev deleted file mode 100755 index 9754cdc..0000000 --- a/scripts/webdev +++ /dev/null @@ -1,81 +0,0 @@ -#!/usr/bin/env bash -USAGE="Usage: webdev [-h|--help] [-q|--quiet] uri|file" - -# NOTE: These can either be set manually here or they -# NOTE: can be exported as environment variables (^-^) -# === Configuration === # -DEFAULT_BROWSER=${DEFAULT_BROWSER:-} -# ===================== # - -# WARNING: Internal use only (do not modify!) -# === Internal Environment === # -QUIET=false -BROWSER="" -LOC="" -LOC_TYPE="" # file or uri -# ============================ # - -# Quiet Echo - doesn't echo if QUIET is set -qecho() { - if [[ "$QUIET" == false ]]; then - echo "$@" - fi -} - -# Argument Parsing -for ARG in $@; do - case $ARG in - -h|--help) - echo "$USAGE" - exit 0 - ;; - -q|--quiet) - QUIET=true - ;; - -*) - echo -e "[!] Unknown option \"$ARG\"\n$USAGE" >&2 - exit 1 - ;; - *) - # first unknown (non-option) argument assumed $LOC - if [[ -n "$LOC" ]]; then - LOC="$OPT" - else - echo "[!] Unknown option \"$ARG\"\n$USAGE" >&2 - exit 1 - fi - ;; - esac -done -# ensure $LOC was set during argparse phase -if [[ -z "$LOC" ]]; then - echo -e "[!] URI or file not specified\n$USAGE" >&2 -fi - -# Use DEFAULT_BROWSER or check XDG default-web-browser or fail -if [[ -n "$DEFAULT_BROWSER" ]]; then - qecho "[+] Browser manually set to $DEFAULT_BROWSER" - qecho " > Skipped checking XDG default-web-browser" -else - qecho "[*] Lookup XDG default-web-browser" - BROWSER=$(xdg-settings get default-web-browser 2>/dev/null) - if [[ $? -eq 0 ]]; then - BROWSER=${BROWSER%%.desktop} - qecho "[+] Browser automatically set to $BROWSER" - else - echo "[!] Unknown browser girlypop :(" >&2 - echo " > Either:" >&2 - echo " > 1. export DEFAULT_BROWSER" >&2 - echo " > 2. run \`xdg-settings set default-web-browser\`" >&2 - exit 1 - fi -fi -echo # linebreak - -# Check if $LOC is a valid path -REALPATH=$(realpath "$LOC" 2>/dev/null) -if [ -f "$REALPATH"]; then - LOC="file://$LOC" # open file directly via "file" protocol -fi -# Substitutions left intentionally unquoted (allows for providing args) -command $BROWSER $LOC diff --git a/secrets/user.yaml b/secrets/user.yaml deleted file mode 100644 index e0e129a..0000000 --- a/secrets/user.yaml +++ /dev/null @@ -1,19 +0,0 @@ -hashedPassword: ENC[AES256_GCM,data:yUPHY0xg91BNSOkF5PcBkZyacJO7W6OvTE4o8X83i/386D1V/jnRfOpgNZ5FvAwdyA2SNPaeW1gIyLmYbbQGXVLvOPNeRL1Aog==,iv:fz177ve/GlW27NR1CzPGlhWGSM3yaIvN8daEF9xLsM0=,tag:Qv9lXYhj/I6jVzhi7WtuLg==,type:str] -ilovecryPassword: ENC[AES256_GCM,data:3c1ljqAdtiCz8csYW4GJjJUsFpxwh+mjBBWRS7RUg81SC0bdmuSYjKfBFuTu6ML0ZL1p8DXk2elUwV3fMa4RuBami5tIXh7bpw==,iv:eJokDF2GYazbHtlFUjjnK4wsdM1vbn629xkZNSaTdFA=,tag:5mWfg/HoSsnQ+9gX8p26rw==,type:str] -sops: - lastmodified: "2026-03-08T01:44:57Z" - mac: ENC[AES256_GCM,data:geIyLVMcLvGp0/9Yz23/ijZy3oVq1FXVJHobovomCj1oFxSqdsds/w+w/TBmXJ30fvfdXpLULnr6AwwNxSYuNTfm3tXR+EBq0tg1bagbpk6SABOq0TNFRkdfJVyyeVTl/mxBaeHVnPcrV3O50LGGVKdcHkeUFlhuaAqXmYxsq+U=,iv:SvR4yTi1UoSMJldS4NuhGbkNHjdKOo5dw9XhfSsItF8=,tag:AHWXHFVUQkqgJ+KhIuqZEg==,type:str] - pgp: - - created_at: "2026-03-08T01:32:54Z" - enc: |- - -----BEGIN PGP MESSAGE----- - - hF4DuHhvXXGIWHkSAQdAh2Khre0KhjaZPgN4PxO2zm31TkUguTW9OdmCDHyQvAww - dON+Q1s0jOh2hEMmEOF5MJcJnAXHXix8WiSsNTpqnZSS0or3QNH8fUUBCgR3t73r - 0l4BTv46Cj7+PrpUG4l8BbhYWfiu7N0vex4NbpCfyHKTMDLiFSEf9U4BOzkmNkGs - mB+Hw58WwIaru5JueFztwvflE5ysxb9Wk/1PZ6zTpmiq6Rm+WgYydb5vq699DEKC - =oQCe - -----END PGP MESSAGE----- - fp: 9D052B0EEB1CC3283E3E320FF68745A836CA0412 - unencrypted_suffix: _unencrypted - version: 3.11.0 diff --git a/snow.nix b/snow.nix deleted file mode 100644 index ca3d563..0000000 --- a/snow.nix +++ /dev/null @@ -1,83 +0,0 @@ -{inputs, ...} @ args: { - nodes = { - base = inputs.nixpkgs; - homeManager = inputs.home-manager; - - args = {inherit inputs;}; - modules = [ - inputs.sddm-silent.nixosModules.default - ]; - - groups = { - # wait.. that's too cold... - cryos = { - # oh frick i cried again - cryde = {}; - }; - # - server = {}; - }; - - nodes = { - # my laptop <3 :3 - lolcathost = { - system = "x86_64-linux"; - groups = groups: [groups.cryos.cryde]; - modules = with inputs; [ - grub2-themes.nixosModules.default - nix-flatpak.nixosModules.nix-flatpak - inputs.mango.nixosModules.mango - ]; - }; - - # i be on my puter frfr - myputer = { - system = "x86_64-linux"; - groups = groups: [groups.cryos.cryde]; - modules = with inputs; [ - grub2-themes.nixosModules.default - nix-flatpak.nixosModules.nix-flatpak - inputs.mango.nixosModules.mango - # inputs.wa2k.nixosModules.default - ]; - }; - - # courtesy of aurora <3 - butterfly = { - system = "x86_64-linux"; - groups = groups: [groups.server]; - deploy.ssh = { - host = "dobutterfliescry.net"; - port = 42069; - # XXX: WARNING: TEMP: this public key is temporary and used solely for debugging - publicKeys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKJqtXaBWEM6nte+Bci/PizXvv/n8abYKUCKaS/x1st1 me@myputer"]; - }; - }; - - # pls dont sue me im broke - hyrule = { - system = "x86_64-linux"; - groups = groups: [groups.server]; - deploy.ssh = { - host = "hyrule.dobutterfliescry.net"; - # XXX: WARNING: TEMP: this public key is temporary and used solely for debugging - publicKeys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKJqtXaBWEM6nte+Bci/PizXvv/n8abYKUCKaS/x1st1 me@myputer"]; - }; - }; - - # call me a statistician the way she spreads in my sheets - matcha = { - system = "x86_64-linux"; - groups = groups: [groups.server]; - deploy = { - remoteBuild = true; - ssh = { - host = "192.168.88.250"; # <- DEBUG: TEMP: TODO: switch to `matcha.dobutterfliescry.net` - # XXX: WARNING: TEMP: this public key is temporary and used solely for debugging - publicKeys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKJqtXaBWEM6nte+Bci/PizXvv/n8abYKUCKaS/x1st1 me@myputer"]; - }; - }; - }; - }; - }; -}