diff --git a/.scratch/scratch.org-mode b/.scratch/scratch.org-mode deleted file mode 100644 index 90fd3cd..0000000 --- a/.scratch/scratch.org-mode +++ /dev/null @@ -1 +0,0 @@ -# Scratchpad \ No newline at end of file diff --git a/README.org b/README.org index f4cdacc..efd52f6 100644 --- a/README.org +++ b/README.org @@ -13,10 +13,28 @@ These are my dotfiles (configuration files) for my NixOS setup(s). Here is my main setup: [[desktop.png]] -** Themes +** My Themes [[https://github.com/danth/stylix#readme][Stylix]] (and [[https://github.com/SenchoPens/base16.nix#readme][base16.nix]], of course) is amazing, allowing you to theme your entire system with base16-themes. -Using this I have [[./modules/themes][a lot of themes]] (I add more sometimes) I can switch between on-the-fly. Visit the [[./modules/themes][themes directory]] for more info and screenshots! +Using this I have [[./themes][55+ themes]] (I add more sometimes) I can switch between on-the-fly. Visit the [[./themes][themes directory]] for more info and screenshots! + +** Install +I wrote some reinstall notes for myself [[./install.org][here (install.org)]]. + +TLDR: You should™ be able to install my dotfiles to a fresh NixOS system with the following experimental script: +#+begin_src sh :noeval +nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config" +#+end_src + +Disclaimer: Ultimately, I can't gaurantee this will work for anyone other than myself, so /use this at your own discretion/. Also my dotfiles are /highly/ opinionated, which you will discover immediately if you try them out. + +Potential Errors: I've only tested it working on UEFI with the default EFI mount point of =/boot=. I've added experimental legacy (BIOS) boot support, but it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader. + +Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled. + +Security Disclaimer: If you install or copy my =homelab= or =worklab= profiles, /CHANGE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/: +- [[./profiles/homelab/configuration.nix][configuration.nix]] for homelab profile +- [[./profiles/worklab/configuration.nix][configuration.nix]] for worklab profile ** Modules Separate Nix files can be imported as modules using an import block: @@ -29,58 +47,58 @@ imports = [ ./import1.nix This conveniently allows configurations to be (*cough cough) /modular/ (ba dum, tssss). -I have my modules separated into three subdirectories: -- System-level - stored in the [[./modules/system][system directory]] -- User-level - stored in the [[./modules/user][user directory]] +I have my modules separated into two groups: +- System-level - stored in the [[./system][system directory]] + - System-level modules are imported into configuration.nix, which is what is sourced into [[./flake.nix][my flake (flake.nix)]] +- User-level - stored in the [[./user][user directory]] (managed by home-manager) + - User-level modules are imported into home.nix, which is also sourced into [[./flake.nix][my flake (flake.nix)]] More detailed information on these specific modules are in the [[./system][system directory]] and [[./user][user directory]] respectively. -** Install -I wrote some reinstall notes for myself [[./install.org][here (install.org)]]. - -Check them out if you'd like to try out my config in a VM or base your config on mine. - ** Patches In some cases, since I use =nixpgs-unstable=, I must patch nixpkgs. This can be done inside of a flake via: #+BEGIN_SRC nix -nixpkgs-patched = (import nixpkgs { inherit system; }).applyPatches { - name = "nixpkgs-patched"; - src = nixpkgs; - patches = [ - ./example-patch.nix - (builtins.fetchurl { - url = "https://asdf1234.patch"; - sha256 = "sha256:qwerty123456..."; - }) - ]; -}; + nixpkgs-patched = (import nixpkgs { inherit system; }).applyPatches { + name = "nixpkgs-patched"; + src = nixpkgs; + patches = [ ./example-patch.nix ]; + }; -# configure pkgs -pkgs = import nixpkgs-patched { inherit system; }; + # configure pkgs + pkgs = import nixpkgs-patched { inherit system; }; -# configure lib -lib = nixpkgs.lib; + # configure lib + lib = nixpkgs.lib; #+END_SRC Patches can either be local or remote, so you can even import unmerged pull requests by using =fetchpatch= and the raw patch url, i.e: https://github.com/NixOS/nixpkgs/pull/example.patch. I currently curate patches local to this repo in the [[./patches][patches]] directory. -** Hosts -Configurations for all my machines are in [[./hosts][hosts]]. +** Profiles +I separate my configurations into [[./profiles][profiles]] (essentially system templates), i.e: +- [[./profiles/personal][Personal]] - What I would run on a personal laptop/desktop +- [[./profiles/work][Work]] - What I would run on a work laptop/desktop (if they let me bring my own OS :P) +- [[./profiles/homelab][Homelab]] - What I would run on a server or homelab +- [[./profiles/wsl][WSL]] - What I would run underneath Windows Subystem for Linux + +My profile can be conveniently selected in [[./flake.nix][my flake.nix]] by setting the =profile= variable. + +More detailed information on these profiles is in the [[./profiles][profiles directory]]. ** Nix Wrapper Script -Some Nix commands are confusing, really long to type out, or require me to be in the directory with my dotfiles. To solve this, I wrote a [[./modules/system/phoenix][wrapper script called phoenix]], which calls various scripts in the root of this directory. +Some Nix commands are confusing, really long to type out, or require me to be in the directory with my dotfiles. To solve this, I wrote a [[./system/bin/phoenix.nix][wrapper script called phoenix]], which calls various scripts in the root of this directory. TLDR: -- =phoenix sync= - Synchronize system state with config -- =phoenix build= - Build all host configurations and push results to attic (requires attic config to be setup) +- =phoenix sync= - Synchronize system and home-manager state with config files (essentially =nixos-rebuild switch= + =home-manager switch=) + - =phoenix sync system= - Only synchronize system state (essentially =nixos-rebuild switch=) + - =phoenix sync user= - Only synchronize home-manager state (essentially =home-manager switch=) - =phoenix update= - Update all flake inputs without synchronizing system and home-manager states - - =phoenix update INPUT= - Update only the specified =INPUT= (see inputs in [[./flake.nix][flake.nix]]) +- =phoenix upgrade= - Update flake.lock and synchronize system and home-manager states (=phoenix update= + =phoenix sync=) - =phoenix refresh= - Call synchronization posthooks (mainly to refresh stylix and some dependent daemons) - =phoenix pull= - Pull changes from upstream git and attempt to merge local changes (I use this to update systems other than my main system) -- =phoenix lock= - Ensure that all "system-level" files cannot be edited by an unprivileged user -- =phoenix unlock= - Relax permissions so all dotfiles can be edited by a normal user (use temporarily for git or other operations) +- =phoenix harden= - Ensure that all "system-level" files cannot be edited by an unprivileged user +- =phoenix soften= - Relax permissions so all dotfiles can be edited by a normal user (use temporarily for git or other operations) - =phoenix gc= - Garbage collect the system and user nix stores - =phoenix gc full= - Delete everything not currently in use - =phoenix gc 15d= - Delete everything older than 15 days diff --git a/flake.lock b/flake.lock index a2ce90e..a80dabf 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1755946532, - "narHash": "sha256-POePremlUY5GyA1zfbtic6XLxDaQcqHN6l+bIxdT5gc=", + "lastModified": 1729527199, + "narHash": "sha256-D5/YksfRga8Akd04ZtIkuYSIOjXVrAzQIQBSeplokzU=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "81584dae2df6ac79f6b6dae0ecb7705e95129ada", + "rev": "8d732fa8aff8b12ef2b1e2f00fc8153e41312b72", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "fromYaml": "fromYaml" }, "locked": { - "lastModified": 1755819240, - "narHash": "sha256-qcMhnL7aGAuFuutH4rq9fvAhCpJWVHLcHVZLtPctPlo=", + "lastModified": 1708890466, + "narHash": "sha256-LlrC09LoPi8OPYOGPXegD72v+//VapgAqhbOFS3i8sc=", "owner": "SenchoPens", "repo": "base16.nix", - "rev": "75ed5e5e3fce37df22e49125181fa37899c3ccd6", + "rev": "665b3c6748534eb766c777298721cece9453fdae", "type": "github" }, "original": { @@ -70,11 +70,11 @@ "base16-helix": { "flake": false, "locked": { - "lastModified": 1752979451, - "narHash": "sha256-0CQM+FkYy0fOO/sMGhOoNL80ftsAzYCg9VhIrodqusM=", + "lastModified": 1725860795, + "narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=", "owner": "tinted-theming", "repo": "base16-helix", - "rev": "27cf1e66e50abc622fb76a3019012dc07c678fac", + "rev": "7f795bf75d38e0eea9fed287264067ca187b88a9", "type": "github" }, "original": { @@ -86,28 +86,27 @@ "base16-vim": { "flake": false, "locked": { - "lastModified": 1732806396, - "narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=", + "lastModified": 1716150083, + "narHash": "sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc=", "owner": "tinted-theming", "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", + "rev": "6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "base16-vim", - "rev": "577fe8125d74ff456cf942c733a85d769afe58b7", "type": "github" } }, "blocklist-hosts": { "flake": false, "locked": { - "lastModified": 1758853179, - "narHash": "sha256-z3VWoF5/evd0n97AmrWgSskaNqVaad0Ex2pn53JHkSk=", + "lastModified": 1729302358, + "narHash": "sha256-6bZhQRCGAeBzOXF8CRFDDG9fI0szycsR/6XDoFaYAjs=", "owner": "StevenBlack", "repo": "hosts", - "rev": "1dd1fc4a30bad4dbd7ed33962c3ac7a2f2506b77", + "rev": "48eb1cbb0b4a24984ab974268d32c185864b25f4", "type": "github" }, "original": { @@ -116,73 +115,207 @@ "type": "github" } }, - "chaotic": { - "inputs": { - "flake-schemas": "flake-schemas", - "home-manager": "home-manager", - "jovian": "jovian", - "nixpkgs": "nixpkgs", - "rust-overlay": "rust-overlay" - }, + "doom-emacs": { + "flake": false, "locked": { - "lastModified": 1758895312, - "narHash": "sha256-fkGae4lxUPP1KAfZ0Yz5f3KyWHyGRJbdyh4HWJVGTw4=", - "owner": "chaotic-cx", - "repo": "nyx", - "rev": "4e2ef2f45cd83d4e202a88fa29173dd40739e608", + "lastModified": 1662497747, + "narHash": "sha256-4n7E1fqda7cn5/F2jTkOnKw1juG6XMS/FI9gqODL3aU=", + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac", "type": "github" }, "original": { - "owner": "chaotic-cx", - "repo": "nyx", + "owner": "doomemacs", + "repo": "doomemacs", + "rev": "3853dff5e11655e858d0bfae64b70cb12ef685ac", + "type": "github" + } + }, + "doom-snippets": { + "flake": false, + "locked": { + "lastModified": 1694887483, + "narHash": "sha256-KlKhruPSLPSKqUnr5/U65arm16VrY9ORzm+XKNZhpTQ=", + "owner": "doomemacs", + "repo": "snippets", + "rev": "f022984ee1318a4015d5d081b3c3dab5a60dc6ff", + "type": "github" + }, + "original": { + "owner": "doomemacs", + "repo": "snippets", + "type": "github" + } + }, + "eaf": { + "flake": false, + "locked": { + "lastModified": 1728651925, + "narHash": "sha256-NQV4MXynuxjg4u9V7UGSCyavqx9DWxJCA7nm1GD0f3s=", + "owner": "emacs-eaf", + "repo": "emacs-application-framework", + "rev": "60466a72a8b0688ccded87bb25879348911f162b", + "type": "github" + }, + "original": { + "owner": "emacs-eaf", + "repo": "emacs-application-framework", + "type": "github" + } + }, + "eaf-browser": { + "flake": false, + "locked": { + "lastModified": 1715466525, + "narHash": "sha256-jcCn16lXqcq1UcekekJiTfRBjjgaY0Hkz69ycElSzuA=", + "owner": "emacs-eaf", + "repo": "eaf-browser", + "rev": "9761f7bd22aa69f144a0a032643b0834dde6cb60", + "type": "github" + }, + "original": { + "owner": "emacs-eaf", + "repo": "eaf-browser", "type": "github" } }, "emacs-overlay": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "nixpkgs-stable": "nixpkgs-stable" - }, + "flake": false, "locked": { - "lastModified": 1758964003, - "narHash": "sha256-snZ/nOHvA1BdGcO+jzaYTAh4vhzHOQ9hivsFdrnlUjc=", + "lastModified": 1676366521, + "narHash": "sha256-i4UAY8t9Au9SJtsgYppa3NHSVf1YkV6yqnNIQd+Km4g=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "fc94b22fd2b6110333e03180c0e36ffd10ae2029", + "rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501", "type": "github" }, "original": { "owner": "nix-community", "repo": "emacs-overlay", + "rev": "c16be6de78ea878aedd0292aa5d4a1ee0a5da501", "type": "github" } }, - "firefox-gnome-theme": { - "flake": false, + "emacs-pin-nixpkgs": { "locked": { - "lastModified": 1756083905, - "narHash": "sha256-UqYGTBgI5ypGh0Kf6zZjom/vABg7HQocB4gmxzl12uo=", - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", - "rev": "b655eaf16d4cbec9c3472f62eee285d4b419a808", + "lastModified": 1711731143, + "narHash": "sha256-P3rID/C2N9+emVlCr4ta0X591usRvFxqk1wON/2j+Dg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f72123158996b8d4449de481897d855bc47c7bf6", "type": "github" }, "original": { - "owner": "rafaelmardojai", - "repo": "firefox-gnome-theme", + "id": "nixpkgs", + "rev": "f72123158996b8d4449de481897d855bc47c7bf6", + "type": "indirect" + } + }, + "emacs-so-long": { + "flake": false, + "locked": { + "lastModified": 1575031854, + "narHash": "sha256-xIa5zO0ZaToDrec1OFjBK6l39AbA4l/CE4LInVu2hi0=", + "owner": "hlissner", + "repo": "emacs-so-long", + "rev": "ed666b0716f60e8988c455804de24b55919e71ca", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "emacs-so-long", + "type": "github" + } + }, + "evil-escape": { + "flake": false, + "locked": { + "lastModified": 1588439096, + "narHash": "sha256-aB2Ge5o/93B18tPf4fN1c+O46CNh/nOqwLJbox4c8Gw=", + "owner": "hlissner", + "repo": "evil-escape", + "rev": "819f1ee1cf3f69a1ae920e6004f2c0baeebbe077", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-escape", + "type": "github" + } + }, + "evil-markdown": { + "flake": false, + "locked": { + "lastModified": 1626852210, + "narHash": "sha256-HBBuZ1VWIn6kwK5CtGIvHM1+9eiNiKPH0GUsyvpUVN8=", + "owner": "Somelauw", + "repo": "evil-markdown", + "rev": "8e6cc68af83914b2fa9fd3a3b8472573dbcef477", + "type": "github" + }, + "original": { + "owner": "Somelauw", + "repo": "evil-markdown", + "type": "github" + } + }, + "evil-org-mode": { + "flake": false, + "locked": { + "lastModified": 1607203864, + "narHash": "sha256-JxwqVYDN6OIJEH15MVI6XOZAPtUWUhJQWHyzcrUvrFg=", + "owner": "hlissner", + "repo": "evil-org-mode", + "rev": "a9706da260c45b98601bcd72b1d2c0a24a017700", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "evil-org-mode", + "type": "github" + } + }, + "evil-quick-diff": { + "flake": false, + "locked": { + "lastModified": 1575189609, + "narHash": "sha256-oGzl1ayW9rIuq0haoiFS7RZsS8NFMdEA7K1BSozgnJU=", + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "rev": "69c883720b30a892c63bc89f49d4f0e8b8028908", + "type": "github" + }, + "original": { + "owner": "rgrinberg", + "repo": "evil-quick-diff", + "type": "github" + } + }, + "explain-pause-mode": { + "flake": false, + "locked": { + "lastModified": 1595842060, + "narHash": "sha256-++znrjiDSx+cy4okFBBXUBkRFdtnE2x+trkmqjB3Njs=", + "owner": "lastquestion", + "repo": "explain-pause-mode", + "rev": "2356c8c3639cbeeb9751744dbe737267849b4b51", + "type": "github" + }, + "original": { + "owner": "lastquestion", + "repo": "explain-pause-mode", "type": "github" } }, "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, - "narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=", + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "type": "github" }, "original": { @@ -191,49 +324,119 @@ "type": "github" } }, - "flake-parts": { + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { "inputs": { - "nixpkgs-lib": [ + "systems": "systems_3" + }, + "locked": { + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_4" + }, + "locked": { + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_3": { + "inputs": { + "systems": [ "stylix", - "nixpkgs" + "systems" ] }, "locked": { - "lastModified": 1756770412, - "narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "4524271976b625a4a605beefd893f270620fd751", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { - "owner": "hercules-ci", - "repo": "flake-parts", + "owner": "numtide", + "repo": "flake-utils", "type": "github" } }, - "flake-schemas": { + "flakey-profile": { "locked": { - "lastModified": 1721999734, - "narHash": "sha256-G5CxYeJVm4lcEtaO87LKzOsVnWeTcHGKbKxNamNWgOw=", - "rev": "0a5c42297d870156d9c57d8f99e476b738dcd982", - "revCount": 75, - "type": "tarball", - "url": "https://api.flakehub.com/f/pinned/DeterminateSystems/flake-schemas/0.1.5/0190ef2f-61e0-794b-ba14-e82f225e55e6/source.tar.gz" + "lastModified": 1712898590, + "narHash": "sha256-FhGIEU93VHAChKEXx905TSiPZKga69bWl1VB37FK//I=", + "owner": "lf-", + "repo": "flakey-profile", + "rev": "243c903fd8eadc0f63d205665a92d4df91d42d9d", + "type": "github" }, "original": { - "type": "tarball", - "url": "https://flakehub.com/f/DeterminateSystems/flake-schemas/%3D0.1.5.tar.gz" + "owner": "lf-", + "repo": "flakey-profile", + "type": "github" + } + }, + "format-all": { + "flake": false, + "locked": { + "lastModified": 1581716637, + "narHash": "sha256-ul7LCe60W8TIvUmUtZtZRo8489TK9iTPDsLHmzxY57M=", + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" + }, + "original": { + "owner": "lassik", + "repo": "emacs-format-all-the-code", + "rev": "47d862d40a088ca089c92cd393c6dca4628f87d3", + "type": "github" } }, "fromYaml": { "flake": false, "locked": { - "lastModified": 1731966426, - "narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=", + "lastModified": 1689549921, + "narHash": "sha256-iX0pk/uB019TdBGlaJEWvBCfydT6sRq+eDcGPifVsCM=", "owner": "SenchoPens", "repo": "fromYaml", - "rev": "106af9e2f715e2d828df706c386a685698f3223b", + "rev": "11fbbbfb32e3289d3c631e0134a23854e7865c84", "type": "github" }, "original": { @@ -242,41 +445,19 @@ "type": "github" } }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "hyprland", - "pre-commit-hooks", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1709087332, - "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, "gnome-shell": { "flake": false, "locked": { - "lastModified": 1748186689, - "narHash": "sha256-UaD7Y9f8iuLBMGHXeJlRu6U1Ggw5B9JnkFs3enZlap0=", + "lastModified": 1713702291, + "narHash": "sha256-zYP1ehjtcV8fo+c+JFfkAqktZ384Y+y779fzmR9lQAU=", "owner": "GNOME", "repo": "gnome-shell", - "rev": "8c88f917db0f1f0d80fa55206c863d3746fa18d0", + "rev": "0d0aadf013f78a7f7f1dc984d0d812971864b934", "type": "github" }, "original": { "owner": "GNOME", - "ref": "48.2", + "ref": "46.1", "repo": "gnome-shell", "type": "github" } @@ -284,16 +465,16 @@ "home-manager": { "inputs": { "nixpkgs": [ - "chaotic", + "stylix", "nixpkgs" ] }, "locked": { - "lastModified": 1758810399, - "narHash": "sha256-bpWoE1tiFX5T1tr5EudkpW9Kk02XR+6olkoSkf3nHZU=", + "lastModified": 1724435763, + "narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=", "owner": "nix-community", "repo": "home-manager", - "rev": "39d26c16866260eee6d0487fe9c102ba1c1bf7b2", + "rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be", "type": "github" }, "original": { @@ -302,18 +483,39 @@ "type": "github" } }, - "home-manager_2": { + "home-manager-stable": { + "inputs": { + "nixpkgs": [ + "nixpkgs-stable" + ] + }, + "locked": { + "lastModified": 1726989464, + "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.05", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager-unstable": { "inputs": { "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1758928860, - "narHash": "sha256-ZqaRdd+KoR54dNJPtd7UX4O0X+02YItnTpQVu28lSVI=", + "lastModified": 1729551526, + "narHash": "sha256-7LAGY32Xl14OVQp3y6M43/0AtHYYvV6pdyBcp3eoz0s=", "owner": "nix-community", "repo": "home-manager", - "rev": "bc2afee55bc5d3b825287829d6592b9cc1405aad", + "rev": "5ec753a1fc4454df9285d8b3ec0809234defb975", "type": "github" }, "original": { @@ -339,11 +541,11 @@ ] }, "locked": { - "lastModified": 1753964049, - "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "lastModified": 1728669738, + "narHash": "sha256-EDNAU9AYcx8OupUzbTbWE1d3HYdeG0wO6Msg3iL1muk=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "rev": "0264e698149fcb857a66a53018157b41f8d97bb0", "type": "github" }, "original": { @@ -352,61 +554,24 @@ "type": "github" } }, - "hyprgraphics": { + "hyprgrass": { "inputs": { - "hyprutils": [ - "hyprland", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" + "hyprland": [ + "hyprland" ] }, "locked": { - "lastModified": 1756891319, - "narHash": "sha256-/e6OXxzbAj/o97Z1dZgHre4bNaVjapDGscAujSCQSbI=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "621e2e00f1736aa18c68f7dfbf2b9cff94b8cc4d", + "lastModified": 1724620988, + "narHash": "sha256-3CN9ZioI5XBtp6WF61hH2EyASHUIPJQCTXiW1rt9n5w=", + "owner": "horriblename", + "repo": "hyprgrass", + "rev": "427690aec574fec75f5b7b800ac4a0b4c8e4b1d5", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", - "type": "github" - } - }, - "hyprgraphics_2": { - "inputs": { - "hyprutils": [ - "hyprlock", - "hyprutils" - ], - "nixpkgs": [ - "hyprlock", - "nixpkgs" - ], - "systems": [ - "hyprlock", - "systems" - ] - }, - "locked": { - "lastModified": 1750621377, - "narHash": "sha256-8u6b5oAdX0rCuoR8wFenajBRmI+mzbpNig6hSCuWUzE=", - "owner": "hyprwm", - "repo": "hyprgraphics", - "rev": "b3d628d01693fb9bb0a6690cd4e7b80abda04310", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprgraphics", + "owner": "horriblename", + "repo": "hyprgrass", + "rev": "427690aec574fec75f5b7b800ac4a0b4c8e4b1d5", "type": "github" } }, @@ -414,34 +579,62 @@ "inputs": { "aquamarine": "aquamarine", "hyprcursor": "hyprcursor", - "hyprgraphics": "hyprgraphics", "hyprland-protocols": "hyprland-protocols", - "hyprland-qtutils": "hyprland-qtutils", "hyprlang": "hyprlang", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "nixpkgs": [ "nixpkgs" ], - "pre-commit-hooks": "pre-commit-hooks", "systems": "systems", "xdph": "xdph" }, "locked": { - "lastModified": 1757508065, - "narHash": "sha256-JkUkn8p/sHqjmykejd9ZMUlYyaXA+Ve9IPA71ybqloY=", + "lastModified": 1728478479, + "narHash": "sha256-AbfdIlK92oWpI39xlIaUekPeL9u95sXzxVsSqhIMfIc=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "46174f78b374b6cea669c48880877a8bdcf7802f", + "rev": "4520b30d498daca8079365bdb909a8dea38e8d55", "type": "github" }, "original": { "owner": "hyprwm", - "ref": "v0.51.0", + "ref": "v0.44.1", "repo": "Hyprland", "type": "github" } }, + "hyprland-plugins": { + "inputs": { + "hyprland": [ + "hyprland" + ], + "nixpkgs": [ + "hyprland-plugins", + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland-plugins", + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1729596320, + "narHash": "sha256-sBPr6O2Ad916f+L7biAjmJVx4TLDITC4joKgeOT47V8=", + "ref": "refs/heads/main", + "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219", + "revCount": 198, + "type": "git", + "url": "https://code.hyprland.org/hyprwm/hyprland-plugins.git" + }, + "original": { + "rev": "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219", + "type": "git", + "url": "https://code.hyprland.org/hyprwm/hyprland-plugins.git" + } + }, "hyprland-protocols": { "inputs": { "nixpkgs": [ @@ -454,11 +647,11 @@ ] }, "locked": { - "lastModified": 1749046714, - "narHash": "sha256-kymV5FMnddYGI+UjwIw8ceDjdeg7ToDVjbHCvUlhn14=", + "lastModified": 1728345020, + "narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "613878cb6f459c5e323aaafe1e6f388ac8a36330", + "rev": "a7c183800e74f337753de186522b9017a07a8cee", "type": "github" }, "original": { @@ -467,71 +660,30 @@ "type": "github" } }, - "hyprland-qt-support": { + "hyprland-protocols_2": { "inputs": { - "hyprlang": [ - "hyprland", - "hyprland-qtutils", - "hyprlang" - ], "nixpkgs": [ "hyprland", - "hyprland-qtutils", + "xdph", "nixpkgs" ], "systems": [ "hyprland", - "hyprland-qtutils", + "xdph", "systems" ] }, "locked": { - "lastModified": 1749154592, - "narHash": "sha256-DO7z5CeT/ddSGDEnK9mAXm1qlGL47L3VAHLlLXoCjhE=", + "lastModified": 1721326555, + "narHash": "sha256-zCu4R0CSHEactW9JqYki26gy8h9f6rHmSwj4XJmlHgg=", "owner": "hyprwm", - "repo": "hyprland-qt-support", - "rev": "4c8053c3c888138a30c3a6c45c2e45f5484f2074", + "repo": "hyprland-protocols", + "rev": "5a11232266bf1a1f5952d5b179c3f4b2facaaa84", "type": "github" }, "original": { "owner": "hyprwm", - "repo": "hyprland-qt-support", - "type": "github" - } - }, - "hyprland-qtutils": { - "inputs": { - "hyprland-qt-support": "hyprland-qt-support", - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "hyprutils": [ - "hyprland", - "hyprland-qtutils", - "hyprlang", - "hyprutils" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1753819801, - "narHash": "sha256-tHe6XeNeVeKapkNM3tcjW4RuD+tB2iwwoogWJOtsqTI=", - "owner": "hyprwm", - "repo": "hyprland-qtutils", - "rev": "b308a818b9dcaa7ab8ccab891c1b84ebde2152bc", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-qtutils", + "repo": "hyprland-protocols", "type": "github" } }, @@ -551,11 +703,11 @@ ] }, "locked": { - "lastModified": 1756810301, - "narHash": "sha256-wgZ3VW4VVtjK5dr0EiK9zKdJ/SOqGIBXVG85C3LVxQA=", + "lastModified": 1728168612, + "narHash": "sha256-AnB1KfiXINmuiW7BALYrKqcjCnsLZPifhb/7BsfPbns=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "3d63fb4a42c819f198deabd18c0c2c1ded1de931", + "rev": "f054f2e44d6a0b74607a6bc0f52dba337a3db38e", "type": "github" }, "original": { @@ -580,11 +732,11 @@ ] }, "locked": { - "lastModified": 1750371198, - "narHash": "sha256-/iuJ1paQOBoSLqHflRNNGyroqfF/yvPNurxzcCT0cAE=", + "lastModified": 1721324361, + "narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "cee01452bca58d6cadb3224e21e370de8bc20f0b", + "rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086", "type": "github" }, "original": { @@ -595,25 +747,23 @@ }, "hyprlock": { "inputs": { - "hyprgraphics": "hyprgraphics_2", "hyprlang": "hyprlang_2", "hyprutils": "hyprutils_2", - "hyprwayland-scanner": "hyprwayland-scanner_2", "nixpkgs": [ "nixpkgs" ], "systems": "systems_2" }, "locked": { - "lastModified": 1758124489, - "narHash": "sha256-YiVF/8Me3vVKJBEgGpQhn0HF09EWfXZGaWLzAaJBrO4=", - "ref": "refs/heads/main", - "rev": "7f769fa993cb492982d7bf25676c68ddbcc0268e", - "revCount": 395, + "lastModified": 1725203994, + "narHash": "sha256-N7Kfq8tpOWjtRKBnH5RqcDtQFGZPZ5vXgmxbnZVPCuU=", + "rev": "73b0fc26c0e2f6f82f9d9f5b02e660a958902763", + "revCount": 248, "type": "git", "url": "https://code.hyprland.org/hyprwm/hyprlock.git" }, "original": { + "rev": "73b0fc26c0e2f6f82f9d9f5b02e660a958902763", "type": "git", "url": "https://code.hyprland.org/hyprwm/hyprlock.git" } @@ -630,11 +780,11 @@ ] }, "locked": { - "lastModified": 1756117388, - "narHash": "sha256-oRDel6pNl/T2tI+nc/USU9ZP9w08dxtl7hiZxa0C/Wc=", + "lastModified": 1728941256, + "narHash": "sha256-WRypmcZ2Bw94lLmcmxYokVOHPJSZ7T06V49QZ4tkZeQ=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "b2ae3204845f5f2f79b4703b441252d8ad2ecfd0", + "rev": "fd4be8b9ca932f7384e454bcd923c5451ef2aa85", "type": "github" }, "original": { @@ -655,11 +805,11 @@ ] }, "locked": { - "lastModified": 1751061882, - "narHash": "sha256-g9n8Vrbx+2JYM170P9BbvGHN39Wlkr4U+V2WLHQsXL8=", + "lastModified": 1721324102, + "narHash": "sha256-WAZ0X6yJW1hFG6otkHBfyJDKRpNP5stsRqdEuHrFRpk=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "4737241eaf8a1e51671a2a088518071f9a265cf4", + "rev": "962582a090bc233c4de9d9897f46794280288989", "type": "github" }, "original": { @@ -680,11 +830,11 @@ ] }, "locked": { - "lastModified": 1755184602, - "narHash": "sha256-RCBQN8xuADB0LEgaKbfRqwm6CdyopE1xIEhNc67FAbw=", + "lastModified": 1726874836, + "narHash": "sha256-VKR0sf0PSNCB0wPHVKSAn41mCNVCnegWmgkrneKDhHM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "b3b0f1f40ae09d4447c20608e5a4faf8bf3c492d", + "rev": "500c81a9e1a76760371049a8d99e008ea77aa59e", "type": "github" }, "original": { @@ -693,145 +843,275 @@ "type": "github" } }, - "hyprwayland-scanner_2": { + "kdenlive-pin-nixpkgs": { + "locked": { + "lastModified": 1709012981, + "narHash": "sha256-/D10ohogluwFIl5NXQxJx6ag6fuwA1KEAO8Ia5GDhhM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cfec6d9203a461d9d698d8a60ef003cac6d0da94", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "rev": "cfec6d9203a461d9d698d8a60ef003cac6d0da94", + "type": "indirect" + } + }, + "lix": { + "flake": false, + "locked": { + "lastModified": 1720626042, + "narHash": "sha256-f8k+BezKdJfmE+k7zgBJiohtS3VkkriycdXYsKOm3sc=", + "rev": "2a4376be20d70feaa2b0e640c5041fb66ddc67ed", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/lix/archive/2a4376be20d70feaa2b0e640c5041fb66ddc67ed.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/lix/archive/2.90.0.tar.gz" + } + }, + "lix-module": { + "inputs": { + "flake-utils": "flake-utils", + "flakey-profile": "flakey-profile", + "lix": "lix", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720641669, + "narHash": "sha256-yEO2cGNgzm9x/XxiDQI+WckSWnZX63R8aJLBRSXtYNE=", + "rev": "5c48c833c15bb80d127a398a8c2484d42fdd8257", + "type": "tarball", + "url": "https://git.lix.systems/api/v1/repos/lix-project/nixos-module/archive/5c48c833c15bb80d127a398a8c2484d42fdd8257.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz" + } + }, + "magit-file-icons": { + "flake": false, + "locked": { + "lastModified": 1719595750, + "narHash": "sha256-n/uXppejl6js/wrvEEIKmfmCh7ssbSBMMZWYrrvG1JQ=", + "owner": "librephoenix", + "repo": "magit-file-icons", + "rev": "6c90eb03eb8a382110d862ec792ae50556bffd6e", + "type": "github" + }, + "original": { + "owner": "librephoenix", + "ref": "abstract-icon-getters-compat", + "repo": "magit-file-icons", + "type": "github" + } + }, + "mini-frame": { + "flake": false, + "locked": { + "lastModified": 1685981796, + "narHash": "sha256-HsGEu37oq2uuQFfE2m++VH1SwyGC89ChnmrBVFC/WME=", + "owner": "muffinmad", + "repo": "emacs-mini-frame", + "rev": "f420020aa33a1b00407000addd995170a36e026e", + "type": "github" + }, + "original": { + "owner": "muffinmad", + "repo": "emacs-mini-frame", + "type": "github" + } + }, + "nix-doom-emacs": { + "inputs": { + "doom-emacs": "doom-emacs", + "doom-snippets": "doom-snippets", + "emacs-overlay": "emacs-overlay", + "emacs-so-long": "emacs-so-long", + "evil-escape": "evil-escape", + "evil-markdown": "evil-markdown", + "evil-org-mode": "evil-org-mode", + "evil-quick-diff": "evil-quick-diff", + "explain-pause-mode": "explain-pause-mode", + "flake-compat": "flake-compat", + "flake-utils": "flake-utils_2", + "format-all": "format-all", + "nix-straight": [ + "nix-straight" + ], + "nixpkgs": [ + "emacs-pin-nixpkgs" + ], + "nose": "nose", + "ob-racket": "ob-racket", + "org": "org", + "org-contrib": "org-contrib", + "org-yt": "org-yt", + "php-extras": "php-extras", + "revealjs": "revealjs", + "rotate-text": "rotate-text", + "sln-mode": "sln-mode", + "ts-fold": "ts-fold", + "ws-butler": "ws-butler" + }, + "locked": { + "lastModified": 1701264882, + "narHash": "sha256-MBXR7x7Ua8qystlGr+lenwjQd7dsFNFpEFmtHhh10zM=", + "owner": "nix-community", + "repo": "nix-doom-emacs", + "rev": "f7413022370f24bb53cb450bfb2803233510113e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-doom-emacs", + "type": "github" + } + }, + "nix-formatter-pack": { "inputs": { "nixpkgs": [ - "hyprlock", + "nix-on-droid", "nixpkgs" ], - "systems": [ - "hyprlock", - "systems" - ] + "nmd": [ + "nix-on-droid", + "nmd" + ], + "nmt": "nmt" }, "locked": { - "lastModified": 1750371869, - "narHash": "sha256-lGk4gLjgZQ/rndUkzmPYcgbHr8gKU5u71vyrjnwfpB4=", - "owner": "hyprwm", - "repo": "hyprwayland-scanner", - "rev": "aa38edd6e3e277ae6a97ea83a69261a5c3aab9fd", + "lastModified": 1705252799, + "narHash": "sha256-HgSTREh7VoXjGgNDwKQUYcYo13rPkltW7IitHrTPA5c=", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", + "rev": "2de39dedd79aab14c01b9e2934842051a160ffa5", "type": "github" }, "original": { - "owner": "hyprwm", - "repo": "hyprwayland-scanner", + "owner": "Gerschtli", + "repo": "nix-formatter-pack", "type": "github" } }, - "jovian": { + "nix-on-droid": { "inputs": { - "nix-github-actions": "nix-github-actions", + "home-manager": [ + "home-manager-unstable" + ], + "nix-formatter-pack": "nix-formatter-pack", "nixpkgs": [ - "chaotic", "nixpkgs" - ] + ], + "nixpkgs-docs": "nixpkgs-docs", + "nixpkgs-for-bootstrap": "nixpkgs-for-bootstrap", + "nmd": "nmd" }, "locked": { - "lastModified": 1757230583, - "narHash": "sha256-4uqu7sFPOaVTCogsxaGMgbzZ2vK40GVGMfUmrvK3/LY=", - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", - "rev": "fc3960e6c32c9d4f95fff2ef84444284d24d3bea", + "lastModified": 1725658585, + "narHash": "sha256-P29z4Gt89n5ps1U7+qmIrj0BuRXGZQSIaOe2+tsPgfw=", + "owner": "nix-community", + "repo": "nix-on-droid", + "rev": "5d88ff2519e4952f8d22472b52c531bb5f1635fc", "type": "github" }, "original": { - "owner": "Jovian-Experiments", - "repo": "Jovian-NixOS", + "owner": "nix-community", + "ref": "master", + "repo": "nix-on-droid", "type": "github" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "chaotic", - "jovian", - "nixpkgs" - ] - }, + "nix-straight": { + "flake": false, "locked": { - "lastModified": 1729697500, - "narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=", - "owner": "zhaofengli", - "repo": "nix-github-actions", - "rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf", + "lastModified": 1692033740, + "narHash": "sha256-oCd0yJiMArPr20nYVz/HGU1bmZnmiS30n9Z4MKZUHj0=", + "owner": "librephoenix", + "repo": "nix-straight.el", + "rev": "1e4a1375b04acb8a88d123a91585734410192d42", "type": "github" }, "original": { - "owner": "zhaofengli", - "ref": "matrix-name", - "repo": "nix-github-actions", + "owner": "librephoenix", + "ref": "pgtk-patch", + "repo": "nix-straight.el", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1758815401, - "narHash": "sha256-Nj4iA2Msx0qfHPFDc0biubSsaChuZQlJrS3aNIaQ/T8=", - "owner": "PedroHLC", + "lastModified": 1729413321, + "narHash": "sha256-I4tuhRpZFa6Fu6dcH9Dlo5LlH17peT79vx1y1SpeKt0=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "0cc09391d851ec12e1dcbb8d105a75ab6344432b", + "rev": "1997e4aa514312c1af7e2bda7fad1644e778ff26", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" + } + }, + "nixpkgs-docs": { + "locked": { + "lastModified": 1705957679, + "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "release-23.05", "repo": "nixpkgs", "type": "github" } }, + "nixpkgs-for-bootstrap": { + "locked": { + "lastModified": 1720244366, + "narHash": "sha256-WrDV0FPMVd2Sq9hkR5LNHudS3OSMmUrs90JUTN+MXpA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "49ee0e94463abada1de470c9c07bfc12b36dcf40", + "type": "github" + } + }, "nixpkgs-stable": { "locked": { - "lastModified": 1758791193, - "narHash": "sha256-F8WmEwFoHsnix7rt290R0rFXNJiMbClMZyIC/e+HYf0=", + "lastModified": 1729449015, + "narHash": "sha256-Gf04dXB0n4q0A9G5nTGH3zuMGr6jtJppqdeljxua1fo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "25e53aa156d47bad5082ff7618f5feb1f5e02d01", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-25.05", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { - "locked": { - "lastModified": 1751274312, - "narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674", + "rev": "89172919243df199fe237ba0f776c3e3e3d72367", "type": "github" }, "original": { "id": "nixpkgs", - "ref": "nixos-24.11", + "ref": "nixos-24.05", "type": "indirect" } }, "nixpkgs_2": { "locked": { - "lastModified": 1758690382, - "narHash": "sha256-NY3kSorgqE5LMm1LqNwGne3ZLMF2/ILgLpFr1fS4X3o=", + "lastModified": 1728538411, + "narHash": "sha256-f0SBJz1eZ2yOuKUr5CA9BHULGXVSn6miBuUWdTyhUhU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e643668fd71b949c53f8626614b21ff71a07379d", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1744536153, - "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "rev": "b69de56fac8c2b6f8fd27f2eca01dcda8e0a4221", "type": "github" }, "original": { @@ -841,122 +1121,392 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_3": { "locked": { - "lastModified": 1756819007, - "narHash": "sha256-12V64nKG/O/guxSYnr5/nq1EfqwJCdD2+cIGmhz3nrE=", + "lastModified": 1725194671, + "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "aaff8c16d7fc04991cac6245bee1baa31f72b1e1", + "rev": "b833ff01a0d694b910daca6e2ff4a3f26dee478c", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } }, - "nur": { + "nmd": { "inputs": { - "flake-parts": [ - "stylix", - "flake-parts" - ], "nixpkgs": [ - "stylix", - "nixpkgs" - ] + "nix-on-droid", + "nixpkgs-docs" + ], + "scss-reset": "scss-reset" }, "locked": { - "lastModified": 1756961635, - "narHash": "sha256-hETvQcILTg5kChjYNns1fD5ELdsYB/VVgVmBtqKQj9A=", - "owner": "nix-community", - "repo": "NUR", - "rev": "6ca27b2654ac55e3f6e0ca434c1b4589ae22b370", + "lastModified": 1705050560, + "narHash": "sha256-x3zzcdvhJpodsmdjqB4t5mkVW22V3wqHLOun0KRBzUI=", + "owner": "~rycee", + "repo": "nmd", + "rev": "66d9334933119c36f91a78d565c152a4fdc8d3d3", + "type": "sourcehut" + }, + "original": { + "owner": "~rycee", + "repo": "nmd", + "type": "sourcehut" + } + }, + "nmt": { + "flake": false, + "locked": { + "lastModified": 1648075362, + "narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=", + "owner": "rycee", + "repo": "nmt", + "rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae", + "type": "gitlab" + }, + "original": { + "owner": "rycee", + "repo": "nmt", + "type": "gitlab" + } + }, + "nose": { + "flake": false, + "locked": { + "lastModified": 1400604510, + "narHash": "sha256-daEi8Kta1oGaDEmUUDDQMahTTPOpvNpDKk22rlr7cB0=", + "owner": "emacsattic", + "repo": "nose", + "rev": "f8528297519eba911696c4e68fa88892de9a7b72", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "NUR", + "owner": "emacsattic", + "repo": "nose", "type": "github" } }, - "plasma-manager": { - "inputs": { - "home-manager": [ - "home-manager" - ], - "nixpkgs": [ - "nixpkgs" - ] - }, + "nvchad": { + "flake": false, "locked": { - "lastModified": 1758185783, - "narHash": "sha256-6fX2CG8PzdBNwJGBISnf/nVHUVMZdCsekT1mP672Uh8=", - "owner": "nix-community", - "repo": "plasma-manager", - "rev": "6a7d78cebd9a0f84a508bec9bc47ac504c5f51f4", + "lastModified": 1728129783, + "narHash": "sha256-SVpep7lVX0isYsUtscvgA7Ga3YXt/2jwQQCYkYadjiM=", + "owner": "NvChad", + "repo": "starter", + "rev": "d0c602f5f155d4d1261609219e9b8a61e936d681", "type": "github" }, "original": { - "owner": "nix-community", - "repo": "plasma-manager", + "owner": "NvChad", + "repo": "starter", "type": "github" } }, - "pre-commit-hooks": { - "inputs": { - "flake-compat": "flake-compat", - "gitignore": "gitignore", - "nixpkgs": [ - "hyprland", - "nixpkgs" - ] - }, + "nwg-dock-hyprland-pin-nixpkgs": { "locked": { - "lastModified": 1757239681, - "narHash": "sha256-E9spYi9lxm2f1zWQLQ7xQt8Xs2nWgr1T4QM7ZjLFphM=", - "owner": "cachix", - "repo": "git-hooks.nix", - "rev": "ab82ab08d6bf74085bd328de2a8722c12d97bd9d", + "lastModified": 1716385560, + "narHash": "sha256-xuFXyvvrDXx5A56uo8D+YmHqsmPscsjBh279P44Z5bE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2098d845d76f8a21ae4fe12ed7c7df49098d3f15", "type": "github" }, "original": { - "owner": "cachix", - "repo": "git-hooks.nix", + "id": "nixpkgs", + "rev": "2098d845d76f8a21ae4fe12ed7c7df49098d3f15", + "type": "indirect" + } + }, + "ob-racket": { + "flake": false, + "locked": { + "lastModified": 1584656173, + "narHash": "sha256-rBUYDDCXb+3D4xTPQo9UocbTPZ32kWV1Uya/1DmZknU=", + "owner": "xchrishawk", + "repo": "ob-racket", + "rev": "83457ec9e1e96a29fd2086ed19432b9d75787673", + "type": "github" + }, + "original": { + "owner": "xchrishawk", + "repo": "ob-racket", + "type": "github" + } + }, + "org": { + "flake": false, + "locked": { + "lastModified": 1695726851, + "narHash": "sha256-qgbjspklSoI8M3cbCJOcUdjuijRgsL/+PSyEOW9VX4I=", + "owner": "emacs-straight", + "repo": "org-mode", + "rev": "aa9177e1a8b039c357d369c1c9aaab710bb247a9", + "type": "github" + }, + "original": { + "owner": "emacs-straight", + "repo": "org-mode", + "type": "github" + } + }, + "org-contrib": { + "flake": false, + "locked": { + "lastModified": 1694946041, + "narHash": "sha256-X/HFG6NZe5BY00KvGbcsIuf9R6Lg8x7Uhd0Y5+Q3qZU=", + "owner": "emacsmirror", + "repo": "org-contrib", + "rev": "5eabbf22bdd4523c922a30787e98ee66c24221aa", + "type": "github" + }, + "original": { + "owner": "emacsmirror", + "repo": "org-contrib", + "type": "github" + } + }, + "org-krita": { + "flake": false, + "locked": { + "lastModified": 1713038273, + "narHash": "sha256-ZoigcRMetn2ZY9uvcR3iLnPsf9ys2rHuUD9yv3+u7KM=", + "owner": "librephoenix", + "repo": "org-krita", + "rev": "9a1d917d2ee0fb7d2403186a0e6a15e23089c9fb", + "type": "github" + }, + "original": { + "owner": "librephoenix", + "repo": "org-krita", + "type": "github" + } + }, + "org-nursery": { + "flake": false, + "locked": { + "lastModified": 1714726259, + "narHash": "sha256-x+/TTSdHzQ+GKHV6jgvoQrwZCH4cZQfQGKDIBzFbJRw=", + "owner": "chrisbarrett", + "repo": "nursery", + "rev": "00a169c75b934a2eb42ea8620e8eebf34577d4ca", + "type": "github" + }, + "original": { + "owner": "chrisbarrett", + "repo": "nursery", + "type": "github" + } + }, + "org-side-tree": { + "flake": false, + "locked": { + "lastModified": 1717236106, + "narHash": "sha256-b30Yl378DaRQl8DAsAaeyf+WYz0y7L5h0EsbBQGvdjE=", + "owner": "localauthor", + "repo": "org-side-tree", + "rev": "e8da5217ce23440a62f4a46ef60e2082b6284b28", + "type": "github" + }, + "original": { + "owner": "localauthor", + "repo": "org-side-tree", + "type": "github" + } + }, + "org-sliced-images": { + "flake": false, + "locked": { + "lastModified": 1719203338, + "narHash": "sha256-wi8G6AHWWbAFBPGsZSSOVIOBqrzfdOhzgTfUNe4fAEc=", + "owner": "jcfk", + "repo": "org-sliced-images", + "rev": "b98b88a55eff07e998e7789e0bf7307dd71db050", + "type": "github" + }, + "original": { + "owner": "jcfk", + "repo": "org-sliced-images", + "type": "github" + } + }, + "org-timeblock": { + "flake": false, + "locked": { + "lastModified": 1723239268, + "narHash": "sha256-D6GWpmF2fMZGvZ3Jonf4B+yyFTxBv4m5mxmfOVFNm60=", + "owner": "ichernyshovvv", + "repo": "org-timeblock", + "rev": "e5b3614633f45d059239c6c6e9379803064936ce", + "type": "github" + }, + "original": { + "owner": "ichernyshovvv", + "repo": "org-timeblock", + "type": "github" + } + }, + "org-xournalpp": { + "flake": false, + "locked": { + "lastModified": 1625233179, + "narHash": "sha256-c0AYWMkBb7wdl7SWTffjWSXwXbq1PGov2vT8A1pdqpQ=", + "owner": "vherrmann", + "repo": "org-xournalpp", + "rev": "c09bd8b99d36c355d632b85ecbffb3b275802381", + "type": "gitlab" + }, + "original": { + "owner": "vherrmann", + "repo": "org-xournalpp", + "type": "gitlab" + } + }, + "org-yaap": { + "flake": false, + "locked": { + "lastModified": 1711640914, + "narHash": "sha256-eWoRaE10QPOPeE0TnHBn3o+Hz6fX0yDZnfrqVlj1De8=", + "owner": "tygrdev", + "repo": "org-yaap", + "rev": "fcf675382d914f369591052ddb8440cfc714ce74", + "type": "gitlab" + }, + "original": { + "owner": "tygrdev", + "repo": "org-yaap", + "type": "gitlab" + } + }, + "org-yt": { + "flake": false, + "locked": { + "lastModified": 1527381913, + "narHash": "sha256-dzQ6B7ryzatHCTLyEnRSbWO0VUiX/FHYnpHTs74aVUs=", + "owner": "TobiasZawada", + "repo": "org-yt", + "rev": "40cc1ac76d741055cbefa13860d9f070a7ade001", + "type": "github" + }, + "original": { + "owner": "TobiasZawada", + "repo": "org-yt", + "type": "github" + } + }, + "php-extras": { + "flake": false, + "locked": { + "lastModified": 1573312690, + "narHash": "sha256-r4WyVbzvT0ra4Z6JywNBOw5RxOEYd6Qe2IpebHXkj1U=", + "owner": "arnested", + "repo": "php-extras", + "rev": "d410c5af663c30c01d461ac476d1cbfbacb49367", + "type": "github" + }, + "original": { + "owner": "arnested", + "repo": "php-extras", + "type": "github" + } + }, + "phscroll": { + "flake": false, + "locked": { + "lastModified": 1697087101, + "narHash": "sha256-LklBCgDYnC1SF2MD5LDI/CoQVSWlmrG83JGa155z4DI=", + "owner": "misohena", + "repo": "phscroll", + "rev": "582abedb4cf6aba216cdb5fe7217d612a1d68d5a", + "type": "github" + }, + "original": { + "owner": "misohena", + "repo": "phscroll", + "type": "github" + } + }, + "revealjs": { + "flake": false, + "locked": { + "lastModified": 1695738029, + "narHash": "sha256-Z9c9Q41jMkj/DyXOiZYyIa7Gmn8VB8yauTyWrSsT+ps=", + "owner": "hakimel", + "repo": "reveal.js", + "rev": "88fbfc5751ad01e3f6adee5819eabeb9e73c3757", + "type": "github" + }, + "original": { + "owner": "hakimel", + "repo": "reveal.js", "type": "github" } }, "root": { "inputs": { "blocklist-hosts": "blocklist-hosts", - "chaotic": "chaotic", - "emacs-overlay": "emacs-overlay", - "home-manager": "home-manager_2", + "eaf": "eaf", + "eaf-browser": "eaf-browser", + "emacs-pin-nixpkgs": "emacs-pin-nixpkgs", + "home-manager-stable": "home-manager-stable", + "home-manager-unstable": "home-manager-unstable", + "hyprgrass": "hyprgrass", "hyprland": "hyprland", + "hyprland-plugins": "hyprland-plugins", "hyprlock": "hyprlock", - "nixpkgs": "nixpkgs_2", - "nixpkgs-stable": "nixpkgs-stable_2", - "plasma-manager": "plasma-manager", - "rust-overlay": "rust-overlay_2", - "secrets": "secrets", + "kdenlive-pin-nixpkgs": "kdenlive-pin-nixpkgs", + "lix-module": "lix-module", + "magit-file-icons": "magit-file-icons", + "mini-frame": "mini-frame", + "nix-doom-emacs": "nix-doom-emacs", + "nix-on-droid": "nix-on-droid", + "nix-straight": "nix-straight", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "nvchad": "nvchad", + "nwg-dock-hyprland-pin-nixpkgs": "nwg-dock-hyprland-pin-nixpkgs", + "org-krita": "org-krita", + "org-nursery": "org-nursery", + "org-side-tree": "org-side-tree", + "org-sliced-images": "org-sliced-images", + "org-timeblock": "org-timeblock", + "org-xournalpp": "org-xournalpp", + "org-yaap": "org-yaap", + "phscroll": "phscroll", + "rust-overlay": "rust-overlay", "stylix": "stylix" } }, + "rotate-text": { + "flake": false, + "locked": { + "lastModified": 1322962747, + "narHash": "sha256-SOeOgSlcEIsKhUiYDJv0p+mLUb420s9E2BmvZQvZ0wk=", + "owner": "debug-ito", + "repo": "rotate-text.el", + "rev": "48f193697db996855aee1ad2bc99b38c6646fe76", + "type": "github" + }, + "original": { + "owner": "debug-ito", + "repo": "rotate-text.el", + "type": "github" + } + }, "rust-overlay": { "inputs": { - "nixpkgs": [ - "chaotic", - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1758767687, - "narHash": "sha256-znUulOqcL/Kkdr7CkyIi8Z1pTGXpi54Xg2FmlyJmv4A=", + "lastModified": 1729650555, + "narHash": "sha256-j8Sohst1TbQM6LqQKa/HRMfzsUwMhosuNMj2uOn9JOA=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "b8bcc09d4f627f4e325408f6e7a85c3ac31f0eeb", + "rev": "10c5eb61aaa32caddb9ecf0362a6eb9daeb08eab", "type": "github" }, "original": { @@ -965,42 +1515,36 @@ "type": "github" } }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": "nixpkgs_3" - }, + "scss-reset": { + "flake": false, "locked": { - "lastModified": 1758940228, - "narHash": "sha256-sTS04L9LKqzP1oiVXYDwcMzfFSF0DnSJQFzZBpEgLFE=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "5bfedf3fbbf5caf8e39f7fcd62238f54d82aa1e2", + "lastModified": 1631450058, + "narHash": "sha256-muDlZJPtXDIGevSEWkicPP0HQ6VtucbkMNygpGlBEUM=", + "owner": "andreymatin", + "repo": "scss-reset", + "rev": "0cf50e27a4e95e9bb5b1715eedf9c54dee1a5a91", "type": "github" }, "original": { - "owner": "oxalica", - "repo": "rust-overlay", + "owner": "andreymatin", + "repo": "scss-reset", "type": "github" } }, - "secrets": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, + "sln-mode": { + "flake": false, "locked": { - "lastModified": 1758406446, - "narHash": "sha256-LO6ab6NcJmRm0xz21YbOAY43qTcos4fTOibw1XGnKYI=", - "ref": "refs/heads/main", - "rev": "5406586a69cd2a66d674e962a4544647bf02aaa2", - "revCount": 38, - "type": "git", - "url": "file://path:/etc/nixos.secrets" + "lastModified": 1423727528, + "narHash": "sha256-XqkqPyEJuTtFslOz1fpTf/Klbd/zA7IGpzpmum/MGao=", + "owner": "sensorflo", + "repo": "sln-mode", + "rev": "0f91d1b957c7d2a7bab9278ec57b54d57f1dbd9c", + "type": "github" }, "original": { - "type": "git", - "url": "file://path:/etc/nixos.secrets" + "owner": "sensorflo", + "repo": "sln-mode", + "type": "github" } }, "stylix": { @@ -1009,28 +1553,26 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "firefox-gnome-theme": "firefox-gnome-theme", - "flake-parts": "flake-parts", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_3", "gnome-shell": "gnome-shell", - "nixpkgs": "nixpkgs_4", - "nur": "nur", - "systems": "systems_3", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs_3", + "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", - "tinted-schemes": "tinted-schemes", - "tinted-tmux": "tinted-tmux", - "tinted-zed": "tinted-zed" + "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1758905463, - "narHash": "sha256-8ANQ3MxULwolfkJEdUYlL5usISAxtysWctqqeSiJ/OE=", - "owner": "nix-community", + "lastModified": 1729380793, + "narHash": "sha256-TV6NYBUqTHI9t5fqNu4Qyr4BZUD2yGxAn3E+d5/mqaI=", + "owner": "danth", "repo": "stylix", - "rev": "4aae0ebc2b0d37d4f90ace2c8bbadffadb2e2a97", + "rev": "fb9399b7e2c855f42dae76a363bab28d4f24aa8d", "type": "github" }, "original": { - "owner": "nix-community", + "owner": "danth", "repo": "stylix", "type": "github" } @@ -1080,63 +1622,77 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "tinted-foot": { "flake": false, "locked": { - "lastModified": 1726913040, - "narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=", + "lastModified": 1696725948, + "narHash": "sha256-65bz2bUL/yzZ1c8/GQASnoiGwaF8DczlxJtzik1c0AU=", "owner": "tinted-theming", "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", + "rev": "eedbcfa30de0a4baa03e99f5e3ceb5535c2755ce", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-foot", - "rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4", "type": "github" } }, "tinted-kitty": { "flake": false, "locked": { - "lastModified": 1735730497, - "narHash": "sha256-4KtB+FiUzIeK/4aHCKce3V9HwRvYaxX+F1edUrfgzb8=", + "lastModified": 1716423189, + "narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=", "owner": "tinted-theming", "repo": "tinted-kitty", - "rev": "de6f888497f2c6b2279361bfc790f164bfd0f3fa", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" }, "original": { "owner": "tinted-theming", "repo": "tinted-kitty", - "type": "github" - } - }, - "tinted-schemes": { - "flake": false, - "locked": { - "lastModified": 1754779259, - "narHash": "sha256-8KG2lXGaXLUE0F/JVwLQe7kOVm21IDfNEo0gfga5P4M=", - "owner": "tinted-theming", - "repo": "schemes", - "rev": "097d751b9e3c8b97ce158e7d141e5a292545b502", - "type": "github" - }, - "original": { - "owner": "tinted-theming", - "repo": "schemes", + "rev": "eb39e141db14baef052893285df9f266df041ff8", "type": "github" } }, "tinted-tmux": { "flake": false, "locked": { - "lastModified": 1754788770, - "narHash": "sha256-LAu5nBr7pM/jD9jwFc6/kyFY4h7Us4bZz7dvVvehuwo=", + "lastModified": 1696725902, + "narHash": "sha256-wDPg5elZPcQpu7Df0lI5O8Jv4A3T6jUQIVg63KDU+3Q=", "owner": "tinted-theming", "repo": "tinted-tmux", - "rev": "fb2175accef8935f6955503ec9dd3c973eec385c", + "rev": "c02050bebb60dbb20cb433cd4d8ce668ecc11ba7", "type": "github" }, "original": { @@ -1145,28 +1701,41 @@ "type": "github" } }, - "tinted-zed": { + "ts-fold": { "flake": false, "locked": { - "lastModified": 1755613540, - "narHash": "sha256-zBFrrTxHLDMDX/OYxkCwGGbAhPXLi8FrnLhYLsSOKeY=", - "owner": "tinted-theming", - "repo": "base16-zed", - "rev": "937bada16cd3200bdbd3a2f5776fc3b686d5cba0", + "lastModified": 1695278494, + "narHash": "sha256-O4NcUC1u08W8ZslqoA/i+iTaLotKwheURXQWBxLLMFc=", + "owner": "jcs-elpa", + "repo": "ts-fold", + "rev": "70b2c79ff4daa7351d4e2917b0343b9a18d4d4f2", "type": "github" }, "original": { - "owner": "tinted-theming", - "repo": "base16-zed", + "owner": "jcs-elpa", + "repo": "ts-fold", + "type": "github" + } + }, + "ws-butler": { + "flake": false, + "locked": { + "lastModified": 1634511126, + "narHash": "sha256-c0y0ZPtxxICPk+eaNbbQf6t+FRCliNY54CCz9QHQ8ZI=", + "owner": "hlissner", + "repo": "ws-butler", + "rev": "572a10c11b6cb88293de48acbb59a059d36f9ba5", + "type": "github" + }, + "original": { + "owner": "hlissner", + "repo": "ws-butler", "type": "github" } }, "xdph": { "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], + "hyprland-protocols": "hyprland-protocols_2", "hyprlang": [ "hyprland", "hyprlang" @@ -1189,11 +1758,11 @@ ] }, "locked": { - "lastModified": 1755354946, - "narHash": "sha256-zdov5f/GcoLQc9qYIS1dUTqtJMeDqmBmo59PAxze6e4=", + "lastModified": 1729674499, + "narHash": "sha256-XoOT0OsjH91t3JLSV0ka8iu58zC+Q1Sd+BA7M/vt5hw=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "a10726d6a8d0ef1a0c645378f983b6278c42eaa0", + "rev": "8f8619fe032b6250b061c75fc194658fc3bcf04f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 16e49a4..cd4b3bc 100644 --- a/flake.nix +++ b/flake.nix @@ -3,116 +3,313 @@ outputs = inputs@{ self, ... }: let - system = "x86_64-linux"; + # ---- SYSTEM SETTINGS ---- # + systemSettings = { + system = "x86_64-linux"; # system arch + hostname = "snowfire"; # hostname + profile = "personal"; # select a profile defined from my profiles directory + timezone = "America/Chicago"; # select timezone + locale = "en_US.UTF-8"; # select locale + bootMode = "uefi"; # uefi or bios + bootMountPath = "/boot"; # mount path for efi boot partition; only used for uefi boot mode + grubDevice = ""; # device identifier for grub; only used for legacy (bios) boot mode + gpuType = "amd"; # amd, intel or nvidia; only makes some slight mods for amd at the moment + }; + + # ----- USER SETTINGS ----- # + userSettings = rec { + username = "emmet"; # username + name = "Emmet"; # name/identifier + email = "emmet@librephoenix.com"; # email (used for certain configurations) + dotfilesDir = "~/.dotfiles"; # absolute path of the local repo + theme = "io"; # selcted theme from my themes directory (./themes/) + wm = "hyprland"; # Selected window manager or desktop environment; must select one in both ./user/wm/ and ./system/wm/ + # window manager type (hyprland or x11) translator + wmType = if ((wm == "hyprland") || (wm == "plasma")) then "wayland" else "x11"; + browser = "qutebrowser"; # Default browser; must select one from ./user/app/browser/ + spawnBrowser = if ((browser == "qutebrowser") && (wm == "hyprland")) then "qutebrowser-hyprprofile" else (if (browser == "qutebrowser") then "qutebrowser --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag num-raster-threads=4" else browser); # Browser spawn command must be specail for qb, since it doesn't gpu accelerate by default (why?) + defaultRoamDir = "Personal.p"; # Default org roam directory relative to ~/Org + term = "alacritty"; # Default terminal command; + font = "Intel One Mono"; # Selected font + fontPkg = pkgs.intel-one-mono; # Font package + editor = "neovide"; # Default editor; + # editor spawning translator + # generates a command that can be used to spawn editor inside a gui + # EDITOR and TERM session variables must be set in home.nix or other module + # I set the session variable SPAWNEDITOR to this in my home.nix for convenience + spawnEditor = if (editor == "emacsclient") then + "emacsclient -c -a 'emacs'" + else + (if ((editor == "vim") || + (editor == "nvim") || + (editor == "nano")) then + "exec " + term + " -e " + editor + else + (if (editor == "neovide") then + "neovide -- --listen /tmp/nvimsocket" + else + editor)); + }; # create patched nixpkgs nixpkgs-patched = - (import inputs.nixpkgs { inherit system; }).applyPatches { + (import inputs.nixpkgs { system = systemSettings.system; rocmSupport = (if systemSettings.gpu == "amd" then true else false); }).applyPatches { name = "nixpkgs-patched"; src = inputs.nixpkgs; - patches = [ - #(builtins.fetchurl { - # url = "https://asdf1234.patch"; - # sha256 = "sha256:qwerty123456..."; - #}) - ]; + patches = [ #./patches/emacs-no-version-check.patch + #./patches/nixpkgs-348697.patch + ]; }; # configure pkgs # use nixpkgs if running a server (homelab or worklab profile) # otherwise use patched nixos-unstable nixpkgs - pkgs = import nixpkgs-patched { - inherit system; - config = { - allowUnfree = true; - allowUnfreePredicate = (_: true); - }; - overlays = [ inputs.rust-overlay.overlays.default inputs.emacs-overlay.overlays.default inputs.chaotic.overlays.default ]; - }; + pkgs = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab")) + then + pkgs-stable + else + (import nixpkgs-patched { + system = systemSettings.system; + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + overlays = [ inputs.rust-overlay.overlays.default ]; + })); pkgs-stable = import inputs.nixpkgs-stable { - inherit system; + system = systemSettings.system; config = { allowUnfree = true; allowUnfreePredicate = (_: true); }; }; + pkgs-unstable = import inputs.nixpkgs-patched { + system = systemSettings.system; + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + overlays = [ inputs.rust-overlay.overlays.default ]; + }; + + pkgs-emacs = import inputs.emacs-pin-nixpkgs { + system = systemSettings.system; + }; + + pkgs-kdenlive = import inputs.kdenlive-pin-nixpkgs { + system = systemSettings.system; + }; + + pkgs-nwg-dock-hyprland = import inputs.nwg-dock-hyprland-pin-nixpkgs { + system = systemSettings.system; + }; + # configure lib - lib = inputs.nixpkgs.lib; + # use nixpkgs if running a server (homelab or worklab profile) + # otherwise use patched nixos-unstable nixpkgs + lib = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab")) + then + inputs.nixpkgs-stable.lib + else + inputs.nixpkgs.lib); - # create a list of all directories inside of ./hosts - # every directory in ./hosts has config for that machine - hosts = builtins.filter (x: x != null) (lib.mapAttrsToList (name: value: if (value == "directory") then name else null) (builtins.readDir ./hosts)); + # use home-manager-stable if running a server (homelab or worklab profile) + # otherwise use home-manager-unstable + home-manager = (if ((systemSettings.profile == "homelab") || (systemSettings.profile == "worklab")) + then + inputs.home-manager-stable + else + inputs.home-manager-unstable); + + # Systems that can run tests: + supportedSystems = [ "aarch64-linux" "i686-linux" "x86_64-linux" ]; + + # Function to generate a set based on supported systems: + forAllSystems = inputs.nixpkgs.lib.genAttrs supportedSystems; + + # Attribute set of nixpkgs for each system: + nixpkgsFor = + forAllSystems (system: import inputs.nixpkgs { inherit system; }); in { - # generate a nixos configuration for every host in ./hosts - nixosConfigurations = builtins.listToAttrs - (map (host: { - name = host; - value = lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - # host specific config - { config.networking.hostName = host; } - (./hosts + "/${host}") - (inputs.secrets.hostSecrets.${host}) - - # my modules - ./modules/system - - # home manager - inputs.home-manager.nixosModules.home-manager - { - home-manager.extraSpecialArgs = { - inherit pkgs; - inherit pkgs-stable; - inherit inputs; - }; - } - - # chaos... control! - inputs.chaotic.nixosModules.default - ]; - specialArgs = { - inherit pkgs-stable; - inherit inputs; - }; + homeConfigurations = { + user = home-manager.lib.homeManagerConfiguration { + inherit pkgs; + modules = [ + (./. + "/profiles" + ("/" + systemSettings.profile) + "/home.nix") # load home.nix from selected PROFILE + ]; + extraSpecialArgs = { + # pass config variables from above + inherit pkgs-stable; + inherit pkgs-emacs; + inherit pkgs-kdenlive; + inherit pkgs-nwg-dock-hyprland; + inherit systemSettings; + inherit userSettings; + inherit inputs; }; - }) hosts); + }; + }; + nixosConfigurations = { + system = lib.nixosSystem { + system = systemSettings.system; + modules = [ + (./. + "/profiles" + ("/" + systemSettings.profile) + "/configuration.nix") + inputs.lix-module.nixosModules.default + ./system/bin/phoenix.nix + ]; # load configuration.nix from selected PROFILE + specialArgs = { + # pass config variables from above + inherit pkgs-stable; + inherit systemSettings; + inherit userSettings; + inherit inputs; + }; + }; + }; + nixOnDroidConfigurations = { + inherit pkgs; + default = inputs.nix-on-droid.lib.nixOnDroidConfiguration { + modules = [ ./profiles/nix-on-droid/configuration.nix ]; + }; + extraSpecialArgs = { + # pass config variables from above + inherit pkgs-stable; + inherit pkgs-emacs; + inherit systemSettings; + inherit userSettings; + inherit inputs; + }; + }; + + packages = forAllSystems (system: + let pkgs = nixpkgsFor.${system}; + in { + default = self.packages.${system}.install; + + install = pkgs.writeShellApplication { + name = "install"; + runtimeInputs = with pkgs; [ git ]; # I could make this fancier by adding other deps + text = ''${./install.sh} "$@"''; + }; + }); + + apps = forAllSystems (system: { + default = self.apps.${system}.install; + + install = { + type = "app"; + program = "${self.packages.${system}.install}/bin/install"; + }; + }); }; inputs = { - nixpkgs.url = "nixpkgs/nixos-unstable"; - nixpkgs-stable.url = "nixpkgs/nixos-24.11"; - chaotic.url = "github:chaotic-cx/nyx"; - - home-manager.url = "github:nix-community/home-manager/master"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - - hyprland = { - url = "github:hyprwm/Hyprland/v0.51.0?submodules=true"; + lix-module = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs.url = "nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "nixpkgs/nixos-24.05"; + emacs-pin-nixpkgs.url = "nixpkgs/f72123158996b8d4449de481897d855bc47c7bf6"; + kdenlive-pin-nixpkgs.url = "nixpkgs/cfec6d9203a461d9d698d8a60ef003cac6d0da94"; + nwg-dock-hyprland-pin-nixpkgs.url = "nixpkgs/2098d845d76f8a21ae4fe12ed7c7df49098d3f15"; + home-manager-unstable.url = "github:nix-community/home-manager/master"; + home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs"; + + home-manager-stable.url = "github:nix-community/home-manager/release-24.05"; + home-manager-stable.inputs.nixpkgs.follows = "nixpkgs-stable"; + + nix-on-droid = { + url = "github:nix-community/nix-on-droid/master"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.home-manager.follows = "home-manager-unstable"; + }; + + hyprland = { + url = "github:hyprwm/Hyprland/v0.44.1?submodules=true"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + hyprland-plugins = { + type = "git"; + url = "https://code.hyprland.org/hyprwm/hyprland-plugins.git"; + rev = "4d7f0b5d8b952f31f7d2e29af22ab0a55ca5c219"; #v0.44.1 + inputs.hyprland.follows = "hyprland"; + }; hyprlock = { type = "git"; url = "https://code.hyprland.org/hyprwm/hyprlock.git"; + rev = "73b0fc26c0e2f6f82f9d9f5b02e660a958902763"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprgrass.url = "github:horriblename/hyprgrass/427690aec574fec75f5b7b800ac4a0b4c8e4b1d5"; + hyprgrass.inputs.hyprland.follows = "hyprland"; - plasma-manager = { - url = "github:nix-community/plasma-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - inputs.home-manager.follows = "home-manager"; + nix-doom-emacs.url = "github:nix-community/nix-doom-emacs"; + nix-doom-emacs.inputs.nixpkgs.follows = "emacs-pin-nixpkgs"; + + nix-straight.url = "github:librephoenix/nix-straight.el/pgtk-patch"; + nix-straight.flake = false; + nix-doom-emacs.inputs.nix-straight.follows = "nix-straight"; + + nvchad = { + url = "github:NvChad/starter"; + flake = false; }; - stylix.url = "github:nix-community/stylix"; - - emacs-overlay = { - url = "github:nix-community/emacs-overlay"; - inputs.nixpkgs.follows = "nixpkgs"; + eaf = { + url = "github:emacs-eaf/emacs-application-framework"; + flake = false; }; + eaf-browser = { + url = "github:emacs-eaf/eaf-browser"; + flake = false; + }; + org-nursery = { + url = "github:chrisbarrett/nursery"; + flake = false; + }; + org-yaap = { + url = "gitlab:tygrdev/org-yaap"; + flake = false; + }; + org-side-tree = { + url = "github:localauthor/org-side-tree"; + flake = false; + }; + org-timeblock = { + url = "github:ichernyshovvv/org-timeblock"; + flake = false; + }; + org-krita = { + url = "github:librephoenix/org-krita"; + flake = false; + }; + org-xournalpp = { + url = "gitlab:vherrmann/org-xournalpp"; + flake = false; + }; + org-sliced-images = { + url = "github:jcfk/org-sliced-images"; + flake = false; + }; + magit-file-icons = { + url = "github:librephoenix/magit-file-icons/abstract-icon-getters-compat"; + flake = false; + }; + phscroll = { + url = "github:misohena/phscroll"; + flake = false; + }; + mini-frame = { + url = "github:muffinmad/emacs-mini-frame"; + flake = false; + }; + + stylix.url = "github:danth/stylix"; rust-overlay.url = "github:oxalica/rust-overlay"; @@ -120,11 +317,5 @@ url = "github:StevenBlack/hosts"; flake = false; }; - - secrets = { - url = "path:/etc/nixos.secrets"; - type = "git"; - inputs.nixpkgs.follows = "nixpkgs"; - }; }; } diff --git a/harden.sh b/harden.sh new file mode 100755 index 0000000..05477d6 --- /dev/null +++ b/harden.sh @@ -0,0 +1,36 @@ +#!/bin/sh + +# This will harden the security of these dotfiles, preventing +# unpriveleged users from editing system-level (root configuration) +# files maliciously + +# Run this inside of ~/.dotfiles (or whatever directory you installed +# the dotfiles to) + +# Run this as root! + +# BTW, this assumes your user account has a PID/GID of 1000 + +# After running this, the command `nix flake update` will require root + +if [ "$#" = 1 ]; then + SCRIPT_DIR=$1; +else + SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +fi +pushd $SCRIPT_DIR &> /dev/null; +sudo chown 0:0 .; +sudo chown 0:0 profiles/*; +sudo chown -R 0:0 system; +sudo chown -R 0:0 patches; +sudo chown 0:0 flake.lock; +sudo chown 0:0 flake.nix +sudo chown 0:0 profiles +sudo chown 0:0 profiles/*/configuration.nix; +sudo chown 0:0 profiles/homelab/base.nix; +sudo chown 0:0 harden.sh; +sudo chown 0:0 soften.sh; +sudo chown 0:0 install.sh; +sudo chown 0:0 update.sh; +sudo chown 1000:users **/README.org; +popd &> /dev/null; diff --git a/hosts/README.org b/hosts/README.org deleted file mode 100644 index b4a276c..0000000 --- a/hosts/README.org +++ /dev/null @@ -1,11 +0,0 @@ -#+title: Machines - -This directory contains config for each of my machines. - -In this directory you'll find: -- [[./snowfire][snowfire]] - My main machine (gaming laptop) -- [[./duskfall][duskfall]] - An old thinkpad I use occasionally -- [[./stardust][stardust]] - My wife's laptop -- [[./zenith][zenith]] - My work laptop -- [[./ori][ori]] - My homelab server host -- [[./TEMPLATE][TEMPLATE]] - Template files to use for a new host diff --git a/hosts/TEMPLATE/configuration.nix b/hosts/TEMPLATE/configuration.nix deleted file mode 100644 index 6656a60..0000000 --- a/hosts/TEMPLATE/configuration.nix +++ /dev/null @@ -1,61 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "USERNAME" ]; - adminUsers = [ "USERNAME" ]; - - # hardware - cachy.enable = true; - bluetooth.enable = true; - powerprofiles.enable = true; - tlp.enable = false; - printing.enable = true; - - # software - flatpak.enable = false; - gaming.enable = false; - virtualization = { - docker.enable = false; - virtualMachines.enable = false; - }; - brave.enable = true; - - # wm - hyprland.enable = true; - - # dotfiles - dotfilesDir = "/etc/nixos"; - - # security - security = { - automount.enable = true; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - openvpn.enable = true; - sshd.enable = false; - }; - - # style - stylix = { - enable = true; - theme = "orichalcum"; - }; - }; - - users.users.USERNAME.description = "NAME"; - home-manager.users.USERNAME.userSettings = { - name = "NAME"; - email = "EMAIL"; - }; - - ## EXTRA CONFIG GOES HERE - - }; - -} diff --git a/hosts/TEMPLATE/default.nix b/hosts/TEMPLATE/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/TEMPLATE/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/TEMPLATE/hardware-configuration.nix b/hosts/TEMPLATE/hardware-configuration.nix deleted file mode 100644 index f878f7c..0000000 --- a/hosts/TEMPLATE/hardware-configuration.nix +++ /dev/null @@ -1,8 +0,0 @@ -## THIS FILE MUST BE GENERATED ON A PER MACHINE BASIS -## RUN - -{ config, lib, pkgs, modulesPath, inputs, ... }: - -{ - -} diff --git a/hosts/TEMPLATE/home.nix b/hosts/TEMPLATE/home.nix deleted file mode 100644 index 02c76b1..0000000 --- a/hosts/TEMPLATE/home.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - extraApps.enable = true; - }; - xdg.enable = true; - - # programs - browser = "brave"; - editor = "emacs"; - vscodium.enable = true; - yazi.enable = true; - git.enable = true; - engineering.enable = false; - art.enable = false; - flatpak.enable = false; - godot.enable = false; - keepass.enable = false; - media.enable = true; - music.enable = false; - office.enable = true; - recording.enable = false; - virtualization = { - virtualMachines.enable = false; - }; - ai.enable = false; - - # wm - hyprland.enable = true; - - # style - stylix.enable = true; - - # hardware - bluetooth.enable = true; - }; - - ## EXTRA CONFIG GOES HERE - - }; -} diff --git a/hosts/duskfall/README.org b/hosts/duskfall/README.org deleted file mode 100644 index 9ca6c6b..0000000 --- a/hosts/duskfall/README.org +++ /dev/null @@ -1,3 +0,0 @@ -#+title: Thinkpad go brrr... - -This is my config for an old Thinkpad. It's /really/ slow, but it's nice since it has a touch screen and pen with palm rejection! I don't use it that often, and I'm considering connecting it to the TV and trying Kodi out on it. diff --git a/hosts/duskfall/configuration.nix b/hosts/duskfall/configuration.nix deleted file mode 100644 index cd97bfb..0000000 --- a/hosts/duskfall/configuration.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "emmet" "ignatius" ]; - adminUsers = [ "emmet" ]; - - # hardware - cachy.enable = true; - bluetooth.enable = true; - powerprofiles.enable = true; - tlp.enable = false; - printing.enable = true; - - # software - flatpak.enable = false; - virtualization = { - docker.enable = true; - virtualMachines.enable = false; - }; - brave.enable = true; - - # wm - hyprland.enable = true; - - # dotfiles - dotfilesDir = "/etc/nixos"; - - # security - security = { - automount.enable = true; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - openvpn.enable = true; - sshd.enable = false; - }; - - # style - stylix = { - enable = true; - theme = "io"; - }; - }; - - users.users.emmet.description = "Emmet"; - home-manager.users.emmet.userSettings = { - name = "Emmet"; - email = "emmet@librephoenix.com"; - }; - users.users.ignatius.description = "Ignatius"; - home-manager.users.ignatius.userSettings = { - stylix.theme = "woodland"; - }; - - environment.systemPackages = with pkgs; [ - libwacom - ]; - services.xserver.wacom.enable = true; - services.xserver.videoDrivers = [ "i915" ]; - - }; - -} diff --git a/hosts/duskfall/default.nix b/hosts/duskfall/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/duskfall/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/duskfall/hardware-configuration.nix b/hosts/duskfall/hardware-configuration.nix deleted file mode 100644 index fb0ddf8..0000000 --- a/hosts/duskfall/hardware-configuration.nix +++ /dev/null @@ -1,100 +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") - ]; - - services.fstrim.enable = true; - - services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; - - services.undervolt = { - enable = true; - coreOffset = -100; - uncoreOffset = -100; - analogioOffset = -100; - gpuOffset = -100; - }; - - hardware.graphics = { - enable = lib.mkDefault true; - enable32Bit = lib.mkDefault true; - extraPackages = with pkgs; [ - vpl-gpu-rt - intel-media-driver - intel-vaapi-driver - vaapiIntel - vaapiVdpau - libvdpau-va-gl - ]; - extraPackages32 = with pkgs.driversi686Linux; [ - intel-media-driver - intel-vaapi-driver - libvdpau-va-gl - ]; - }; - - environment.sessionVariables = { - LIBVA_DRIVER_NAME = "iHD"; - }; - - powerManagement.cpuFreqGovernor = "performance"; - services.thermald.enable = true; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ "i915" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.kernelParams = [ "psmouse.synaptics_intertouch=0" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/9982bd44-cfaa-4959-8e30-3341f728c29a"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-3165c377-6b98-498c-bd86-20a8fc530e9d".device = "/dev/disk/by-uuid/3165c377-6b98-498c-bd86-20a8fc530e9d"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4DA8-3F95"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = [ ]; - - services.pipewire.enable = lib.mkForce false; - hardware.pulseaudio.enable = true; - hardware.pulseaudio.daemon.config = { - default-sample-format = "float32ne"; - default-sample-rate = 48000; - alternate-sample-rate = 44100; - default-sample-channels = 2; - default-channel-map = "front-left,front-right"; - default-fragments = 2; - default-fragment-size-msec = 125; - resample-method = "speex-float-5"; - enable-lfe-remixing = "no"; - high-priority = "yes"; - nice-level = -11; - realtime-scheduling = "yes"; - realtime-priority = 9; - rlimit-rtprio = 9; - rlimit-rttime = -1; - daemonize = "no"; - }; - - # 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.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/duskfall/home.nix b/hosts/duskfall/home.nix deleted file mode 100644 index 06af00a..0000000 --- a/hosts/duskfall/home.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - extraApps.enable = true; - }; - xdg.enable = true; - - # programs - browser = "brave"; - editor = "emacs"; - yazi.enable = true; - git.enable = true; - engineering.enable = true; - art.enable = true; - flatpak.enable = false; - godot.enable = true; - keepass.enable = true; - media.enable = true; - music.enable = true; - office.enable = true; - - # wm - hyprland.enable = true; - hyprland.performanceOptimizations = true; - - # style - stylix.enable = true; - - # hardware - bluetooth.enable = true; - }; - - home.packages = with pkgs; [ - cage - gcompris - tuxpaint - ]; - - home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable { - AQ_DRM_DEVICES = lib.mkForce "/dev/dri/card0"; - }; - - wayland.windowManager.hyprland = lib.mkIf config.userSettings.hyprland.enable { - settings = { - misc = { - vfr = true; - }; - - animations = { - enabled = lib.mkForce "no"; - }; - - decoration = { - shadow.enabled = lib.mkForce false; - blur = { - size = lib.mkForce 10; - passes = lib.mkForce 1; - }; - }; - - #input = { - # repeat_delay = lib.mkForce 850; - # repeat_rate = lib.mkForce 80; - #}; - - monitor = [ - "eDP-1,1920x1080@48,0x0,1" - ]; - - }; - }; - - }; -} diff --git a/hosts/ori/README.org b/hosts/ori/README.org deleted file mode 100644 index e508bb7..0000000 --- a/hosts/ori/README.org +++ /dev/null @@ -1,7 +0,0 @@ -#+title: Just chillin' - -This is for my personal gaming laptop. Necessary and extra batteries included: office, engineering, development, media, recording, and gaming apps. Highly bloated system. - -Specs: -- Asus ROG Strix G15 Advantage -- Upgraded to 64GB of RAM + 1TB SSD diff --git a/hosts/ori/configuration.nix b/hosts/ori/configuration.nix deleted file mode 100644 index 7d430d7..0000000 --- a/hosts/ori/configuration.nix +++ /dev/null @@ -1,56 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "emmet" ]; - adminUsers = [ "emmet" ]; - - # hardware - cachy.enable = true; - cachy.variant = "server"; - - virtualization = { - docker.enable = true; - }; - - # dotfiles - dotfilesDir = "/etc/nixos"; - systemBuilder.enable = false; - - # security - security = { - automount.enable = false; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - sshd.enable = true; - }; - - stylix = { - enable = true; - theme = "tomorrow-night"; - }; - - }; - - users.users.emmet.openssh.authorizedKeys.keys = [ - "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDaeejVJwUVrIZSo1isbu+gkQ7+8ftCgCsczy3OclkEVWHyRTqlG6yp74hr3j8ZNsOhov7c2Q6RqC8oy669hlxi/y9BsvtlI7sBr94oAKFOmkCS4RiK72ngJjBvI0vbk89wQQjmAd3r8B7ZcedpNOC8CkHu8SebKdYPRIUvAbPc3fTEt7DsJkazAepZCB8LEhUp57FAqQ/Ezlt3X/1uwNq5S0EbE9Zm+nUpEfSqR9apY2neKWLyGiCxpK3dzyNOuulCxvtVz+ie2sTk/6SxM+qWEoVVxhdwyxPihEjgC0EvtG0S5mVh5JmcjRkJOzzBHJuw+6r8yWn/AxGdIsoJ4rKNxH1XH1iLHgCraOLOUjUNlmejTcQPu6o92a79fdz2gCHT/BuIjfCW7MErAC3YSmF45TSur/kiWCBaTqYo06pgbQ3w1vKg7fievQlQzsutmg47RvJp6fb74yxuOdVg39cShQu/l8r6zqm21JAeUaaIp4P/0MrAIMOOVUhbK0QgsNElO4yn0ZKH8wGIF8xORh7ikxUIAyq8C41gjJiO2sAFJc3M8DhduQU3X0lHB7U0Qyu+8ZXn05+zdFPXJ73LKc7DCcLkppRXJsdHLSDEFdWqFnV7o08B4qZkPMT4pmvhwhY0Pf1fwavOqxuTstzw18gUGyQzl0foQi0Qrmdazsp2Qw== emmet@snowfire" - ]; - - environment.systemPackages = with pkgs; [ - rclone - rdiff-backup - rsnapshot - cryptsetup - gocryptfs - attic-client - ]; - - programs.fuse.userAllowOther = true; - }; - -} diff --git a/hosts/ori/default.nix b/hosts/ori/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/ori/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/ori/hardware-configuration.nix b/hosts/ori/hardware-configuration.nix deleted file mode 100644 index c84667b..0000000 --- a/hosts/ori/hardware-configuration.nix +++ /dev/null @@ -1,69 +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, inputs, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - services.fstrim.enable = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "ums_realtek" "sd_mod" "sr_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/ea03d496-2769-485d-b5cb-de0b58cb698c"; - fsType = "btrfs"; - options = [ "subvol=@" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4F5E-11FB"; - fsType = "vfat"; - }; - - swapDevices = [ ]; - - services.btrfs.autoScrub = { - enable = true; - interval = "weekly"; - }; - - # 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.br-df7898ffaebc.useDHCP = lib.mkDefault true; - # networking.interfaces.br-e6c4f9058f19.useDHCP = lib.mkDefault true; - # networking.interfaces.docker0.useDHCP = lib.mkDefault true; - # networking.interfaces.eno1.useDHCP = lib.mkDefault true; - # networking.interfaces.veth00e4385.useDHCP = lib.mkDefault true; - # networking.interfaces.veth0814d46.useDHCP = lib.mkDefault true; - # networking.interfaces.veth329e18d.useDHCP = lib.mkDefault true; - # networking.interfaces.veth54f044d.useDHCP = lib.mkDefault true; - # networking.interfaces.veth71ad87e.useDHCP = lib.mkDefault true; - # networking.interfaces.veth8a14ed4.useDHCP = lib.mkDefault true; - # networking.interfaces.veth906e2ca.useDHCP = lib.mkDefault true; - # networking.interfaces.veth95a2121.useDHCP = lib.mkDefault true; - # networking.interfaces.veth96c8b25.useDHCP = lib.mkDefault true; - # networking.interfaces.veth97cb8cc.useDHCP = lib.mkDefault true; - # networking.interfaces.veth9f4b444.useDHCP = lib.mkDefault true; - # networking.interfaces.vethb88cfbb.useDHCP = lib.mkDefault true; - # networking.interfaces.vethc1707ca.useDHCP = lib.mkDefault true; - # networking.interfaces.vethec441e8.useDHCP = lib.mkDefault true; - # networking.interfaces.vethed69a4e.useDHCP = lib.mkDefault true; - # networking.interfaces.vethf0728b9.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Enable OpenGL - hardware.opengl = { - enable = true; - }; - -} diff --git a/hosts/ori/home.nix b/hosts/ori/home.nix deleted file mode 100644 index b4a01ac..0000000 --- a/hosts/ori/home.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - }; - xdg.enable = true; - - # programs - ranger.enable = true; - yazi.enable = true; - git.enable = true; - }; - - }; -} diff --git a/hosts/snowfire/README.org b/hosts/snowfire/README.org deleted file mode 100644 index 556e203..0000000 --- a/hosts/snowfire/README.org +++ /dev/null @@ -1,3 +0,0 @@ -#+title: Just chillin' - -This is my profile for a personal computer. It is functionally identical to my [[../work]] profile, but includes extra things like games and social apps! diff --git a/hosts/snowfire/configuration.nix b/hosts/snowfire/configuration.nix deleted file mode 100644 index 17c9e0a..0000000 --- a/hosts/snowfire/configuration.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "emmet" ]; - adminUsers = [ "emmet" ]; - - # hardware - cachy.enable = true; - bluetooth.enable = true; - powerprofiles.enable = true; - tlp.enable = false; - printing.enable = true; - - # software - flatpak.enable = true; - gaming.enable = true; - virtualization = { - docker.enable = true; - virtualMachines.enable = true; - }; - brave.enable = true; - - # wm - hyprland.enable = true; - - # dotfiles - dotfilesDir = "/etc/nixos"; - - # security - security = { - automount.enable = true; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - openvpn.enable = true; - sshd.enable = false; - }; - - # style - stylix = { - enable = true; - theme = "orichalcum"; - }; - }; - - services.thermald.enable = true; - services.asusd.enable = true; - services.supergfxd.enable = true; - environment.systemPackages = with pkgs; [ - asusctl - supergfxctl - ]; - - users.users.emmet.description = "Emmet"; - home-manager.users.emmet.userSettings = { - name = "Emmet"; - email = "emmet@librephoenix.com"; - }; - - services.displayManager.defaultSession = "hyprland"; - - }; - -} diff --git a/hosts/snowfire/default.nix b/hosts/snowfire/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/snowfire/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/snowfire/home.nix b/hosts/snowfire/home.nix deleted file mode 100644 index 19efe2a..0000000 --- a/hosts/snowfire/home.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - extraApps.enable = true; - }; - xdg.enable = true; - - # programs - browser = "brave"; - editor = "emacs"; - vscodium.enable = true; - yazi.enable = true; - git.enable = true; - engineering.enable = true; - art.enable = true; - flatpak.enable = false; - godot.enable = true; - keepass.enable = true; - media.enable = true; - music.enable = true; - office.enable = true; - recording.enable = true; - virtualization = { - virtualMachines.enable = true; - }; - ai.enable = true; - - # wm - hyprland.enable = true; - - # style - stylix.enable = true; - - # hardware - bluetooth.enable = true; - }; - - home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable { - AQ_DRM_DEVICES = lib.mkForce "/dev/dri/card1:/dev/dri/card2"; - }; - - wayland.windowManager.hyprland = lib.mkIf config.userSettings.hyprland.enable { - settings = { - monitor = [ - "eDP-1,1920x1080@60.00,720x864,1.25,vrr,0" - "HDMI-A-1,preferred,1536x0,1.25,vrr,0" - "DP-1,preferred,0x0,1.25,vrr,0" - ]; - }; - }; - }; -} diff --git a/hosts/stardust/README.org b/hosts/stardust/README.org deleted file mode 100644 index 97cbad0..0000000 --- a/hosts/stardust/README.org +++ /dev/null @@ -1,3 +0,0 @@ -#+title: For my wife - -This is a config for my wife's computer. She likes Plasma and she mainly uses it for her art work and some light gaming. diff --git a/hosts/stardust/configuration.nix b/hosts/stardust/configuration.nix deleted file mode 100644 index 97b84ee..0000000 --- a/hosts/stardust/configuration.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "corrina" ]; - adminUsers = [ "corrina" ]; - - # hardware - cachy.enable = true; - bluetooth.enable = true; - tlp.enable = true; - printing.enable = true; - - # software - flatpak.enable = true; - gaming.enable = true; - virtualization = { - docker.enable = true; - }; - brave.enable = true; - - # wm - plasma.enable = true; - - # security - security = { - automount.enable = true; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - openvpn.enable = true; - sshd.enable = false; - }; - - # style - stylix = { - enable = true; - theme = "spaceduck"; - }; - }; - - users.users.corrina.description = "Corrina"; - home-manager.users.corrina.userSettings = { - name = "Corrina"; - }; - - }; - -} diff --git a/hosts/stardust/default.nix b/hosts/stardust/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/stardust/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/stardust/hardware-configuration.nix b/hosts/stardust/hardware-configuration.nix deleted file mode 100644 index 4293d5b..0000000 --- a/hosts/stardust/hardware-configuration.nix +++ /dev/null @@ -1,41 +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" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/3d07095a-0dc5-4a51-99be-592352b5755c"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-cc9ec6bd-3b81-47ad-b289-4c56da1fc791".device = "/dev/disk/by-uuid/cc9ec6bd-3b81-47ad-b289-4c56da1fc791"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5179-698C"; - fsType = "vfat"; - }; - - 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.wlp0s20f3.useDHCP = lib.mkDefault true; - # networking.interfaces.wwan0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/stardust/home.nix b/hosts/stardust/home.nix deleted file mode 100644 index 4c55d07..0000000 --- a/hosts/stardust/home.nix +++ /dev/null @@ -1,39 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - extraApps.enable = true; - }; - xdg.enable = true; - - # programs - browser = "brave"; - editor = "vscodium"; - ranger.enable = true; - yazi.enable = true; - git.enable = true; - art.enable = true; - flatpak.enable = false; - godot.enable = true; - keepass.enable = true; - media.enable = true; - office.enable = true; - - # wm - plasma.enable = true; - - # style - stylix.enable = true; - - # hardware - bluetooth.enable = true; - }; - - }; -} diff --git a/hosts/zenith/README.org b/hosts/zenith/README.org deleted file mode 100644 index 7be7eef..0000000 --- a/hosts/zenith/README.org +++ /dev/null @@ -1,3 +0,0 @@ -#+title: Time to focus - -This is config for my work computer. Essentially the same as [[../snowfire][snowfire]], just minus the gaming (and a few other things). diff --git a/hosts/zenith/configuration.nix b/hosts/zenith/configuration.nix deleted file mode 100644 index 1293f29..0000000 --- a/hosts/zenith/configuration.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - systemSettings = { - # users - users = [ "emmet" ]; - adminUsers = [ "emmet" ]; - - # hardware - cachy.enable = true; - bluetooth.enable = true; - tlp.enable = false; # intel doesn't work with tlp - printing.enable = true; - - # software - flatpak.enable = false; - virtualization = { - docker.enable = true; - virtualMachines.enable = true; - }; - brave.enable = true; - - # wm - hyprland.enable = true; - - # dotfiles - dotfilesDir = "/etc/nixos"; - - # security - security = { - automount.enable = true; - blocklist.enable = true; - doas.enable = true; - firejail.enable = false; # TODO setup firejail profiles - firewall.enable = true; - gpg.enable = true; - openvpn.enable = true; - sshd.enable = false; - }; - - # style - stylix = { - enable = true; - theme = "alph"; - }; - }; - - programs.localsend.enable = true; - programs.localsend.openFirewall = true; - - home-manager.users.emmet.userSettings = { - name = "Emmet"; - }; - - environment.systemPackages = with pkgs; [ - libwacom - ]; - services.xserver.wacom.enable = true; - services.xserver.videoDrivers = [ "i915" ]; - - services.displayManager.defaultSession = "hyprland"; - - }; - -} diff --git a/hosts/zenith/default.nix b/hosts/zenith/default.nix deleted file mode 100644 index b29cc69..0000000 --- a/hosts/zenith/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - imports = [ - ./configuration.nix - ./hardware-configuration.nix - ]; - - config = { - home-manager.users = builtins.listToAttrs - (map (user: { name = user; value = - ({ imports = [ ./home.nix ../../modules/user ]; });}) config.systemSettings.users); - }; -} diff --git a/hosts/zenith/hardware-configuration.nix b/hosts/zenith/hardware-configuration.nix deleted file mode 100644 index 5b2342a..0000000 --- a/hosts/zenith/hardware-configuration.nix +++ /dev/null @@ -1,48 +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 = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; - - services.fstrim.enable = true; - - services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; - - powerManagement.cpuFreqGovernor = "performance"; - services.thermald.enable = true; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/41b254d6-96aa-4498-91d3-939f1722fff1"; - fsType = "ext4"; - }; - - boot.initrd.luks.devices."luks-759bd464-2cda-4c25-b7c0-800d4265314b".device = "/dev/disk/by-uuid/759bd464-2cda-4c25-b7c0-800d4265314b"; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/3212-E58F"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - 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.enp1s0.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/hosts/zenith/home.nix b/hosts/zenith/home.nix deleted file mode 100644 index fdff4a3..0000000 --- a/hosts/zenith/home.nix +++ /dev/null @@ -1,104 +0,0 @@ -{ config, lib, pkgs, pkgs-stable, ... }: - -{ - config = { - - userSettings = { - # setup - shell = { - enable = true; - apps.enable = true; - }; - xdg.enable = true; - - # programs - browser = "brave"; - editor = "emacs"; - vscodium.enable = true; - yazi.enable = true; - git.enable = true; - engineering.enable = true; - art.enable = true; - flatpak.enable = false; - godot.enable = true; - keepass.enable = true; - media.enable = true; - music.enable = true; - office.enable = true; - recording.enable = true; - remote.enable = true; - virtualization = { - virtualMachines.enable = true; - }; - - # wm - hyprland.enable = true; - - # style - stylix.enable = true; - - # hardware - bluetooth.enable = true; - }; - - home.packages = with pkgs; [ - openldap ldapvi rclone teams-for-linux rpi-imager freerdp pkgs-stable.tigervnc unixtools.xxd - ]; - - home.sessionVariables = lib.mkIf config.userSettings.hyprland.enable { - AQ_DRM_DEVICES = lib.mkForce "/dev/dri/card1"; - }; - - wayland.windowManager.hyprland = lib.mkIf config.userSettings.hyprland.enable { - settings = { - animations = { - enabled = lib.mkForce "no"; - }; - - decoration = { - shadow.enabled = lib.mkForce false; - blur = { - size = lib.mkForce 10; - passes = lib.mkForce 1; - }; - }; - - monitor = [ - "eDP-1,1920x1200,1536x0,1.25" - "HDMI-A-1,1920x1080,0x0,1.25" - ]; - - }; - }; - - services.fnott.settings = { - main = { - output = "eDP-1"; # notifications only on main display - }; - }; - - services.nextcloud-client = { - enable = lib.mkForce false; - startInBackground = lib.mkForce false; - }; - - home.file.".config/hypr/hypridle.conf".text = lib.mkForce '' - general { - lock_cmd = pgrep hyprlock || hyprlock - before_sleep_cmd = loginctl lock-session - ignore_dbus_inhibit = false - } - - listener { - timeout = 3000 # in seconds - on-timeout = loginctl lock-session - } - listener { - timeout = 3015 # in seconds - on-timeout = systemctl suspend - on-resume = hyprctl dispatch dpms on - } - ''; - - }; -} diff --git a/install.org b/install.org index 890cc7b..771fff8 100644 --- a/install.org +++ b/install.org @@ -3,14 +3,102 @@ These are just some simple install notes for myself (in-case I have to reinstall unexpectedly). You could also use these to try out my config in a VM. +** Automated Install Script (Experimental) +*** Install Directly From Git +I wrote a quick automated install script at [[./install.sh][install.sh]]. It essentially just runs [[Manual Install Procedure][the manual install steps]] and additionally hardens the security of the system-level (root configuration) files using [[./harden.sh][harden.sh]]. + +I'll eventually™ add the ability to supply arguments to this script as well. + +The quickest way to install is running the install script directly from the remote git repo using =nix run=, which is essentially just one of the following: +#+BEGIN_SRC sh :noeval +# Install from gitlab +nix run gitlab:librephoenix/nixos-config + +# Or install from github +nix run github:librephoenix/nixos-config + +# Or install from codeberg +nix run git+https://codeberg.org/librephoenix/nixos-config +#+END_SRC + +This will install the dotfiles to =~/.dotfiles=, but if you'd like to install to a custom directory, just supply it as a positional argument, i.e: +#+BEGIN_SRC sh :noeval +# Install from gitlab +nix run gitlab:librephoenix/nixos-config -- /your/custom/directory +#+END_SRC + +The script will ask for sudo permissions at certain points, /but you should not run the script as root/. + +If the above =nix run= command gives you an error, odds are you either don't have =git= installed, or you haven't enabled the experimental features in your Nix config (=nix-command= and =flakes=). To get the command to install properly, you can first enter a shell with =git= available using: +#+begin_src sh :noeval +nix-shell -p git +#+end_src +and then running: +#+BEGIN_SRC sh :noeval +nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config +#+END_SRC + +And if you want a single copy-paste solution: +#+begin_src sh :noeval +nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config" +#+end_src + +This /should/ still work with a custom dotfiles directory too, i.e: +#+begin_src sh :noeval +nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' gitlab:librephoenix/nixos-config -- /your/custom/directory" +#+end_src + +At a certain point in the install script it will open =nano= (or whatever your $EDITOR is set to) and ask you to edit the =flake.nix=. You can edit as much or as little of the config variables as you like, and it will continue the install after you exit the editor. + +Potential Errors: I've only tested it working on UEFI with the default EFI mount point of =/boot=. I've added experimental legacy (BIOS) boot support, but it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader. + +Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled. + +Disclaimer: If you install my =homelab= or =worklab= profiles /CHANGE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/: +- [[./profiles/homelab/configuration.nix][configuration.nix]] for homelab profile +- [[./profiles/worklab/configuration.nix][configuration.nix]] for worklab profile + +*** Install From Local Git Clone +The dotfiles can be installed after cloning the repo into =~/.dotfiles= using: +#+BEGIN_SRC sh :noeval +git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles +~/.dotfiles/install.sh +#+END_SRC +or with a custom directory: +#+BEGIN_SRC sh :noeval +git clone https://gitlab.com/librephoenix/nixos-config.git /your/custom/directory +/your/custom/directory/install.sh +#+END_SRC + +If you install to a custom directory, make sure to edit the =userSettings.dotfilesDir= in the [[./flake.nix][flake.nix]], or else my [[./system/bin/phoenix.nix][phoenix wrapper script]] won't work. + +At a certain point in the install script it will open =nano= (or whatever your =$EDITOR= is set to) and ask you to edit the =flake.nix=. You can edit as much or as little of the config variables as you like, and it will continue the install after you exit the editor. + +Potential Errors: I mainly only test this on UEFI, but I've added experimental legacy (BIOS) boot support. Keep in mind, it does rely on a quick and dirty script to find the grub device. If you are testing it using some weird boot configuration for whatever reason, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before install, or else it will complain about not being able to install the bootloader. + +Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled. + +Disclaimer: If you install my =homelab= or =worklab= profiles /CHANGE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/: +- [[./profiles/homelab/configuration.nix][configuration.nix]] for homelab profile +- [[./profiles/worklab/configuration.nix][configuration.nix]] for worklab profile + +*** Automatic Install Script Limitations +At this time, this only works on an existing NixOS install. It also only works if the dotfiles are cloned into =~/.dotfiles=. It also only works on UEFI, not on BIOS :( + +Future upgrade plans: +- [ ] Be able to install directly from NixOS iso +- [ ] Be able to install just home-manager config to a non-NixOS Linux distro +- [ ] Be able to detect EFI mount point for systemd-boot? +- [X] +Be able to detect UEFI or BIOS and switch config as needed+ +- [ ] ??? (open up an issue if you think there is anything else I should try to figure out) + ** Manual Install Procedure -Currently, the only supported install method is installing manually. This way yuo can see all the steps (kind of like an Arch install before the archinstall script existed), you can follow this following procedure: +If you instead want to install this manually to see all the steps (kind of like an Arch install before the archinstall script existed), you can follow this following procedure: *** Clone Repo and Modify Configuration -Start by cloning the repo to =/etc/nixos=: +Start by cloning the repo: #+BEGIN_SRC sh :noeval -sudo mv /etc/nixos /etc/nixos.bkp -git clone https://gitlab.com/librephoenix/nixos-config.git /etc/nixos +git clone https://gitlab.com/librephoenix/nixos-config.git ~/.dotfiles #+END_SRC Any custom directory should also work: @@ -18,32 +106,50 @@ Any custom directory should also work: git clone https://gitlab.com/librephoenix/nixos-config.git /your/custom/directory #+END_SRC -If you install to a custom directory, make sure to edit =systemSettings.dotfilesDir= in the system configuration, or else the [[./system/bin/phoenix.nix][phoenix wrapper script]] won't work. +If you install to a custom directory, make sure to edit the =userSettings.dotfilesDir= in the beginning [[./flake.nix][flake.nix]], or else my [[./system/bin/phoenix.nix][phoenix wrapper script]] won't work. #+BEGIN_SRC nix :noeval -# somewhere in system-level config: -{ config, lib, pkgs, ...}: -{ - systemSettings.dotfilesDir = "/your/custom/directory"; -} +... +let + ... + # ----- USER SETTINGS ----- # + dotfilesDir = "/your/custom/directory"; # username + ... #+END_SRC -To configure a new system, navigate to the [[./hosts][hosts]] directory and copy the [[./hosts/TEMPLATE][TEMPLATE]] directory. Name the copy whatever you want the new hostname to be (needs to match the hostname exactly). - -Next, configure the resulting =configuration.nix= and =home.nix= with the available options. Make sure to change all references to =USERNAME=, =NAME= and =EMAIL= for your desired user(s). - -Next, you must copy or generate the new system's hardware-config into your specific host's =hardware-configuration.nix=. To get the hardware configuration on a new system, either copy from =/etc/nixos.bkp/hardware-configuration.nix= or run: +To get the hardware configuration on a new system, either copy from =/etc/nixos/hardware-configuration.nix= or run: #+BEGIN_SRC sh :noeval -sudo nixos-generate-config --show-hardware-config > /etc/nixos/hosts/YOURHOSTNAMEHERE/hardware-configuration.nix +sudo nixos-generate-config --show-hardware-config > ~/.dotfiles/system/hardware-configuration.nix #+END_SRC +Also, if you have a differently named user account than my default (=emmet=), you /must/ update the following lines in the let binding near the top of the [[./flake.nix][flake.nix]]: +#+BEGIN_SRC nix :noeval +... +let + ... + # ----- USER SETTINGS ----- # + username = "YOURUSERNAME"; # username + name = "YOURNAME"; # name/identifier + ... +#+END_SRC + +There are many more config options there that you may also want to change as well. + +The build will fail if you are booting from BIOS instead of UEFI, unless change some of the system settings of the flake. Change =bootMode= to "bios" and set the =grubDevice= appropriately for your system (i.e. =/dev/vda= or =/dev/sda=). +#+begin_src nix :noeval +... +let + # ---- SYSTEM SETTINGS ---- # + ... + bootMode = "bios"; # uefi or bios + grubDevice = "/dev/vda"; # device identifier for grub; find this by running lsblk + ... +#+end_src + Note: If you're installing this to a VM, Hyprland won't work unless 3D acceleration is enabled. -Disclaimer: If you copy my =ori= host config to setup a sever with NixOS, /MAKE SURE YOU CHANGE OR REMOVE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/ (see [[./hosts/ori/configuration.nix][configuration.nix]]). - -*** Clone and Setup Secrets Config Repo -Clone and setup the =/etc/nixos.secrets= directory using my template [[https://gitlab.com/librephoenix/nixos-secrets-template][repo]]. Intructions on how to set it up can be found in that repository. This will allow you to track your main config to a public repo, without exposing /all/ of your configuration options publically. - -If you'd rather not set that up, you can just delete all references to the =secrets= input in the =flake.nix= and it will stop complaining about the input not being found! +Disclaimer: If you install my =homelab= or =worklab= profiles /CHANGE THE PUBLIC SSH KEYS UNLESS YOU WANT ME TO BE ABLE TO SSH INTO YOUR SERVER. YOU CAN CHANGE OR REMOVE THE SSH KEY IN THE RELEVANT CONFIGURATION.NIX/: +- [[./profiles/homelab/configuration.nix][configuration.nix]] for homelab profile +- [[./profiles/worklab/configuration.nix][configuration.nix]] for worklab profile *** Rebuild and Switch System Config Once the variables are set, then switch into the system configuration by running: @@ -55,17 +161,42 @@ or for your own custom directory: sudo nixos-rebuild switch --flake /your/custom/directory#system #+END_SRC -Subsequent rebuilds can now use my =phoenix= wrapper script to rebuild: +*** Intall and Switch Home Manager Config +Home manager can be installed and the configuration activated with: #+BEGIN_SRC sh :noeval -phoenix sync +nix run home-manager/master -- switch --flake ~/.dotfiles#user +#+END_SRC +or for your own custom directory: +#+BEGIN_SRC sh :noeval +nix run home-manager/master -- switch --flake /your/custom/directory#user #+END_SRC ** FAQ +*** =home-manager switch --flake .#user= Command Fails +If it fails with something to the effect of "could not download {some image file}" then that just means that one of my themes is having trouble downloading the background image. To conserve on space in the repo, my themes download the relevant wallpapers directly from their source, but that also means that if the link is broken, =home-manager switch= fails. + +I have included a script in the [[./themes][themes directory]] named [[./themes/background-test.sh][background-test.sh]] which performs a rough test on every theme background url, reporting which are broken. + +If you're having this error, navigate to the [[./flake.nix][flake.nix]] and select any theme with a good background wallpaper link. As long as it is able to download the new wallpaper, it should be able to build. + +*** Do I have to put the configuration files in =~/.dotfiles=? +No. You can put them in literally any directory you want. I just prefer to use =~/.dotfiles= as a convention. If you change the directory, do keep in mind that the above scripts must be modified, replacing =~/.dotfiles= with whatever directory you want to install them to. Also, you may want to modify the =dotfilesDir= variable in =flake.nix=. + +*** So I cloned these dotfiles into ~/.dotfiles, and now there are system-level files owned by my user account.. HOW IS THIS SECURE?! +If you're worried about someone modifying your system-level (root configuration) files as your unpriveleged user, see [[./harden.sh][harden.sh]]. + *** I installed this to a VM and when I log in, it crashes and sends me back to the login manager (SDDM)? Enable 3D acceleration for your virtual machine. Hyprland doesn't work without it. -*** It's complaining about not finding an input called secrets? -Either setup the =/etc/nixos.secrets= directory using my template [[https://gitlab.com/librephoenix/nixos-secrets-template][repo]] or delete all references to the =secrets= input in the =flake.nix=! +*** It fails installing with some weird errors about grub or a bootloader? +It will 100% fail if you test it with a non-default boot configuration. It might even give this error otherwise! If this is the case, try modifying =bootMountPath= (UEFI) or =grubDevice= (legacy BIOS) in =flake.nix= before installing again. -*** You used to have an auto-install script! Where did it go? -My old [[https://www.youtube.com/watch?v=Dm11dcJ0vWY][auto-install script]] was kind of cool, but I found it wasn't really stable (even for me). I'll probably revisit this at some point (looking at you [[https://github.com/nix-community/nixos-anywhere][nixos-everywhere]] and [[https://github.com/nix-community/disko][disko]]). +*** The install seems to work, but when I login, I'm missing a lot of stuff (partial install) +This can happen if you run the autoinstall script on a system that already has a desktop environment, or if any other (non-Nix-store-symlink) config files are in the way of the config files generated by home-manager. In these cases, home-manager refuses to build anything, even if there's just one file in the way. If you try running =nix run home-manager/master -- switch --flake ~/.dotfiles#user=, it should throw an error at the end with something like: +#+begin_example +Existing file '/home/user/.gtkrc-2.0' is in the way of '/nix/store/6p3hzdbzhad8ra5j1qf4b2b3hs6as6sf-home-manager-files/.gtkrc-2.0' +Existing file '/home/user/.config/Trolltech.conf' is in the way of '/nix/store/6p3hzdbzhad8ra5j1qf4b2b3hs6as6sf-home-manager-files/.config/Trolltech.conf' +Existing file '/home/user/.config/user-dirs.conf' is in the way of '/nix/store/6p3hzdbzhad8ra5j1qf4b2b3hs6as6sf-home-manager-files/.config/user-dirs.conf' +... +#+end_example +The current solution to this is to delete or move the files mentioned so that home-manager can evaluate. Once the files are out of the way, just run =nix run home-manager/master -- switch --flake ~/.dotfiles#user= again and it should work! diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..c167cf4 --- /dev/null +++ b/install.sh @@ -0,0 +1,45 @@ +#!/bin/sh + +# Automated script to install my dotfiles + +# Clone dotfiles +if [ $# -gt 0 ] + then + SCRIPT_DIR=$1 + else + SCRIPT_DIR=~/.dotfiles +fi +nix-shell -p git --command "git clone https://gitlab.com/librephoenix/nixos-config $SCRIPT_DIR" + +# Generate hardware config for new system +sudo nixos-generate-config --show-hardware-config > $SCRIPT_DIR/system/hardware-configuration.nix + +# Check if uefi or bios +if [ -d /sys/firmware/efi/efivars ]; then + sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"uefi\";/" $SCRIPT_DIR/flake.nix +else + sed -i "0,/bootMode.*=.*\".*\";/s//bootMode = \"bios\";/" $SCRIPT_DIR/flake.nix + grubDevice=$(findmnt / | awk -F' ' '{ print $2 }' | sed 's/\[.*\]//g' | tail -n 1 | lsblk -no pkname | tail -n 1 ) + sed -i "0,/grubDevice.*=.*\".*\";/s//grubDevice = \"\/dev\/$grubDevice\";/" $SCRIPT_DIR/flake.nix +fi + +# Patch flake.nix with different username/name and remove email by default +sed -i "0,/emmet/s//$(whoami)/" $SCRIPT_DIR/flake.nix +sed -i "0,/Emmet/s//$(getent passwd $(whoami) | cut -d ':' -f 5 | cut -d ',' -f 1)/" $SCRIPT_DIR/flake.nix +sed -i "s/emmet@librephoenix.com//" $SCRIPT_DIR/flake.nix +sed -i "s+~/.dotfiles+$SCRIPT_DIR+g" $SCRIPT_DIR/flake.nix + +# Open up editor to manually edit flake.nix before install +if [ -z "$EDITOR" ]; then + EDITOR=nano; +fi +$EDITOR $SCRIPT_DIR/flake.nix; + +# Permissions for files that should be owned by root +sudo $SCRIPT_DIR/harden.sh $SCRIPT_DIR; + +# Rebuild system +sudo nixos-rebuild switch --flake $SCRIPT_DIR#system; + +# Install and build home-manager configuration +nix run home-manager/master --extra-experimental-features nix-command --extra-experimental-features flakes -- switch --flake $SCRIPT_DIR#user; diff --git a/modules/system/README.org b/modules/system/README.org deleted file mode 100644 index 82e5109..0000000 --- a/modules/system/README.org +++ /dev/null @@ -1,14 +0,0 @@ -#+title: System-level Nix Modules -#+author: Emmet - -Separate Nix files can be imported as modules using an import block: -#+BEGIN_SRC nix -imports = [ import1.nix - import2.nix - ... - ]; -#+END_SRC - -Modules in this directory are used are system-level (root) configurations. - -# TODO add list of all options diff --git a/modules/system/bluetooth/default.nix b/modules/system/bluetooth/default.nix deleted file mode 100644 index e3fe184..0000000 --- a/modules/system/bluetooth/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, config, ... }: - -let - cfg = config.systemSettings.bluetooth; -in { - options = { - systemSettings.bluetooth = { - enable = lib.mkEnableOption "Enable bluetooth"; - }; - }; - - config = lib.mkIf cfg.enable { - hardware.bluetooth = { - enable = true; - }; - services.blueman.enable = true; - }; -} diff --git a/modules/system/brave-policy/default.nix b/modules/system/brave-policy/default.nix deleted file mode 100644 index 0bf371f..0000000 --- a/modules/system/brave-policy/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ config, lib, pkgs, ...}: - -let - cfg = config.systemSettings.brave; -in -{ - options = { - systemSettings.brave = { - enable = lib.mkEnableOption "Enable brave group policies"; - }; - }; - - config = lib.mkIf cfg.enable { - environment.etc."/brave/policies/managed/GroupPolicy.json".text = '' - { - "BrowserSignin": 0, - "PasswordManagerEnabled": false, - "SpellcheckEnabled": true, - "SpellcheckLanguage": [ - "en-US" - ], - "TorDisabled": true, - "BraveRewardsDisabled": true, - "BraveWalletDisabled": true, - "BraveVPNDisabled": true, - "BraveAIChatEnabled": false, - "BraveNewsDisabled": true, - "BraveTalkDisabled": true, - "BraveSpeedreaderEnabled": false, - "BraveP3AEnabled": false, - "BraveStatsPingEnabled": false, - "BraveWebDiscoveryEnabled": false, - "BraveSyncUrl": "https://sync-v2.brave.com/v2", - "DefaultSearchProviderAlternateURLS": [ - "https://search.nixos.org/packages?channel=unstable&query={searchTerms}" - ] - } - ''; - }; -} diff --git a/modules/system/configuration.nix b/modules/system/configuration.nix deleted file mode 100644 index ec45f49..0000000 --- a/modules/system/configuration.nix +++ /dev/null @@ -1,92 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - # Packages - environment.systemPackages = with pkgs; [ git ]; - - # Journal - services.journald.extraConfig = "SystemMaxUse=50M\nSystemMaxFiles=5"; - services.journald.rateLimitBurst = 500; - services.journald.rateLimitInterval = "30s"; - - # Locale and TZ - time.timeZone = "America/Chicago"; - services.timesyncd.enable = true; - i18n.defaultLocale = "en_US.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = config.i18n.defaultLocale; - LC_IDENTIFICATION = config.i18n.defaultLocale; - LC_MEASUREMENT = config.i18n.defaultLocale; - LC_MONETARY = config.i18n.defaultLocale; - LC_NAME = config.i18n.defaultLocale; - LC_NUMERIC = config.i18n.defaultLocale; - LC_PAPER = config.i18n.defaultLocale; - LC_TELEPHONE = config.i18n.defaultLocale; - LC_TIME = config.i18n.defaultLocale; - }; - - # Use zsh - programs.zsh.enable = true; - environment.shells = with pkgs; [ zsh ]; - users.defaultUserShell = pkgs.zsh; - - # Fix nix path - nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" - "nixos-config=$HOME/dotfiles/system/configuration.nix" - "/nix/var/nix/profiles/per-user/root/channels" - ]; - - # Ensure nix flakes are enabled - nix.extraOptions = '' - experimental-features = nix-command flakes - ''; - - # Substituters - nix.settings = { - substituters = [ - "https://cache.nixos.org" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - }; - - # wheel group gets trusted access to nix daemon - nix.settings.trusted-users = [ "@wheel" ]; - - # Bootloader - # Use systemd-boot if uefi, default to grub otherwise - boot.loader.systemd-boot.enable = true; - boot.loader.systemd-boot.editor = false; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.efi.efiSysMountPoint = "/boot"; - - # Silent Boot - # https://wiki.archlinux.org/title/Silent_boot - boot.kernelParams = [ - "quiet" - "splash" - "vga=current" - "rd.systemd.show_status=false" - "rd.udev.log_level=3" - "udev.log_priority=3" - ]; - boot.initrd.systemd.enable = true; - boot.initrd.verbose = false; - boot.plymouth.enable = true; - - # Networking - networking.networkmanager.enable = true; # Use networkmanager - - # Remove bloat - programs.nano.enable = lib.mkForce false; - - # Localsend is helpful for setting up new systems or quickly transferring files - programs.localsend.enable = true; - programs.localsend.openFirewall = true; - }; - -} diff --git a/modules/system/default.nix b/modules/system/default.nix deleted file mode 100644 index 0567ef8..0000000 --- a/modules/system/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, ... }: - -with lib; -let - # Recursively constructs an attrset of a given folder, recursing on directories, value of attrs is the filetype - getDir = dir: mapAttrs - (file: type: - if type == "directory" then getDir "${dir}/${file}" else type - ) - (builtins.readDir dir); - - # Collects all files of a directory as a list of strings of paths - files = dir: collect isString (mapAttrsRecursive (path: type: concatStringsSep "/" path) (getDir dir)); - - # Filters out directories that don't end with .nix or are this file, also makes the strings absolute - importAll = dir: map - (file: ./. + "/${file}") - (filter - (file: hasSuffix ".nix" file && file != "default.nix" && - ! lib.hasPrefix "x/taffybar/" file && - ! lib.hasSuffix "-hm.nix" file) - (files dir)); - -in -{ - - imports = importAll ./.; - -} diff --git a/modules/system/flatpak/default.nix b/modules/system/flatpak/default.nix deleted file mode 100644 index 17f1e1f..0000000 --- a/modules/system/flatpak/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, config, ... }: - -let - cfg = config.systemSettings.flatpak; -in { - options = { - systemSettings.flatpak = { - enable = lib.mkEnableOption "Enable flatpaks"; - }; - }; - - config = lib.mkIf cfg.enable { - services.flatpak.enable = true; - xdg.portal.enable = true; - }; -} diff --git a/modules/system/gaming/default.nix b/modules/system/gaming/default.nix deleted file mode 100644 index 1c4336a..0000000 --- a/modules/system/gaming/default.nix +++ /dev/null @@ -1,146 +0,0 @@ -{ lib, config, pkgs, inputs, ... }: - -let - cfg = config.systemSettings.gaming; -in { - - options = { - systemSettings.gaming = { - enable = lib.mkEnableOption "Enable Steam and games"; - }; - }; - - config = lib.mkIf cfg.enable { - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "steam" "steam-unwrapped" "steam-jupiter-unwrapped" "steamdeck-hw-theme" "xow_dongle-firmware" ]; - nixpkgs.config.packageOverrides = pkgs: { - steam = pkgs.steam.override { - extraPkgs = pkgs: with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - gamemode - ]; - }; - }; - hardware.opengl.driSupport32Bit = true; - programs.steam = { - enable = true; - extest.enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - extraPackages = with pkgs; [ - xorg.libXcursor - xorg.libXi - xorg.libXinerama - xorg.libXScrnSaver - libpng - libpulseaudio - libvorbis - stdenv.cc.cc.lib - libkrb5 - keyutils - ]; - }; - environment.systemPackages = with pkgs; - [ steam - gamemode - prismlauncher - inotify-tools - protonup-qt - (pkgs.writeScriptBin "steamgrab" ''chown -R $(pgrep -nf steam | xargs -r ps -o uname= -p):steam /opt/Steam;'') - (pkgs.writeScriptBin "steamos-session-select" '' - #!/bin/sh - steam -shutdown - '') - ]; - programs.gamemode.enable = true; - programs.gamescope.enable = true; - programs.gamescope.capSysNice = false; - programs.steam.gamescopeSession = { - enable = true; - env = { - WLR_RENDERER = "vulkan"; - DXVK_HDR = "1"; - ENABLE_GAMESCOPE_WSI = "1"; - ENABLE_HDR_WSI = "1"; - WINE_FULLSCREEN_FSR = "1"; - # Games allegedly prefer X11 - #SDL_VIDEODRIVER = "x11"; - }; - args = [ - "--xwayland-count 1" - #"--expose-wayland" - - "-e" # Enable steam integration - - "--adaptive-sync" - "--hdr-enabled" - "--hdr-itm-enable" - - # External monitor - "--fullscreen" - "--prefer-output eDP-1" - "--output-width 1920" - "--output-height 1080" - "--nested-width 1920" - "--nested-height 1080" - "--prefer-vk-device 1002:1638" # lspci -nn | grep VGA - ]; - }; - chaotic.hdr.enable = true; - systemSettings.bluetooth.enable = true; - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - settings.General = { - experimental = true; - Privacy = "device"; - JustWorksRepairing = "always"; - Class = "0x000100"; - FastConnectable = true; - }; - }; - # FIXME https://github.com/NixOS/nixpkgs/issues/378447 - hardware.xone.enable = true; - #hardware.xpadneo.enable = true; - boot = { - # FIXME https://github.com/NixOS/nixpkgs/issues/378447 - extraModulePackages = with config.boot.kernelPackages; [ xone ]; - #extraModulePackages = with config.boot.kernelPackages; [ xpadneo ]; - extraModprobeConfig = '' - options bluetooth disable_ertm=Y - ''; - }; - users.groups = { - steam = { - members = config.systemSettings.users; - }; - }; - systemd.services.steamshare = { - enable = true; - unitConfig = { - Type = "exec"; - }; - serviceConfig = { - ExecStart = [ ''/run/current-system/sw/bin/chmod -R 777 /opt/Steam;'' ''/run/current-system/sw/bin/inotifywait -mr -e close_write,create,moved_to,modify /opt/Steam | while /run/current-system/sw/bin/read path file; do /run/current-system/sw/bin/chmod 777 $path/$file; done;'' ]; - }; - wantedBy = [ "graphical.target" ]; - }; - services.cron = { - enable = true; - systemCronJobs = [ - "*/1 * * * * steamgrab" - ]; - }; - networking.firewall.allowedTCPPorts = [ 24872 ]; - networking.firewall.allowedUDPPorts = [ 24872 ]; - }; -} diff --git a/modules/system/gnome/default.nix b/modules/system/gnome/default.nix deleted file mode 100644 index 7b42e48..0000000 --- a/modules/system/gnome/default.nix +++ /dev/null @@ -1,68 +0,0 @@ -{ inputs, pkgs, config, lib, ... }: - -let - cfg = config.systemSettings.gnome; -in -{ - options = { - systemSettings.gnome = { - enable = lib.mkEnableOption "Enable gnome"; - }; - }; - - config = lib.mkIf cfg.enable { - services.xserver.enable = true; - services.xserver.desktopManager.gnome.enable = true; - environment.gnome.excludePackages = with pkgs; [ - orca - evince - # file-roller - geary - gnome-disk-utility - # seahorse - # sushi - # sysprof - # - # gnome-shell-extensions - # - # adwaita-icon-theme - # nixos-background-info - gnome-backgrounds - # gnome-bluetooth - # gnome-color-manager - # gnome-control-center - # gnome-shell-extensions - gnome-tour # GNOME Shell detects the .desktop file on first log-in. - gnome-user-docs - # glib # for gsettings program - # gnome-menus - # gtk3.out # for gtk-launch program - # xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ - # xdg-user-dirs-gtk # Used to create the default bookmarks - # - baobab - epiphany - gnome-text-editor - gnome-calculator - gnome-calendar - gnome-characters - # gnome-clocks - gnome-console - gnome-contacts - gnome-font-viewer - gnome-logs - gnome-maps - gnome-music - # gnome-system-monitor - gnome-weather - # loupe - # nautilus - gnome-connections - simple-scan - snapshot - totem - yelp - gnome-software - ]; - }; -} diff --git a/modules/system/hyprland/default.nix b/modules/system/hyprland/default.nix deleted file mode 100644 index 86b7def..0000000 --- a/modules/system/hyprland/default.nix +++ /dev/null @@ -1,143 +0,0 @@ -{ inputs, pkgs, pkgs-stable, config, lib, ... }: - -let - cfg = config.systemSettings.hyprland; -in -{ - options = { - systemSettings.hyprland = { - enable = lib.mkEnableOption "Enable hyprland"; - }; - }; - - config = lib.mkIf cfg.enable { - # Power key should not shut off computer by defaultPower key shuts of - services.logind.powerKey = "suspend"; - - # Hyprland - programs = { - hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - xwayland = { - enable = true; - }; - portalPackage = pkgs.xdg-desktop-portal-hyprland; - }; - }; - - # Necessary packages - environment.systemPackages = with pkgs; [ - jq - (sddm-astronaut.override { - themeConfig = { - # TODO Update Theme Config - # https://github.com/Keyitdev/sddm-astronaut-theme/blob/master/Themes/astronaut.conf - background = config.stylix.image; - ScreenWidth = 1920; - ScreenHeight = 1080; - blur = false; - }; - }) - ]; - - # Display manager - services.xserver.displayManager.sddm = { - enable = true; - wayland.enable = true; - enableHidpi = true; - theme = "sddm-astronaut-theme"; - package = pkgs.kdePackages.sddm; - extraPackages = with pkgs; [ - (sddm-astronaut.override { - themeConfig = { - background = config.stylix.image; - ScreenWidth = 1920; - ScreenHeight = 1080; - blur = false; - };})]; - }; - - services.upower.enable = true; - - # Define systemd service to run on boot to load avatars for sddm - systemd.services."sddm-avatar" = { - description = "Service to copy or update users Avatars at startup."; - wantedBy = [ "multi-user.target" ]; - before = [ "sddm.service" ]; - script = '' - set -eu - mkdir -p /var/lib/AccountsService/icons - for user in /home/*; do - username=$(basename "$user") - if [ -f "$user/.face.icon" ]; then - if [ ! -f "/var/lib/AccountsService/icons/$username" ]; then - cp "$user/.face.icon" "/var/lib/AccountsService/icons/$username" - else - if [ "$user/.face.icon" -nt "/var/lib/AccountsService/icons/$username" ]; then - cp "$user/.face.icon" "/var/lib/AccountsService/icons/$username" - fi - fi - fi - done - ''; - serviceConfig = { - Type = "simple"; - User = "root"; - StandardOutput = "journal+console"; - StandardError = "journal+console"; - }; - }; - - # # Ensures SDDM starts after the service. - systemd.services.sddm = { after = [ "sddm-avatar.service" ]; }; - - # xwayland - services.xserver = { - enable = true; - xkb = { - layout = "us"; - variant = ""; - options = "caps:escape"; - }; - excludePackages = [ pkgs.xterm ]; - }; - - # Keyring - security.pam.services.login.enableGnomeKeyring = true; - services.gnome.gnome-keyring.enable = true; - - # Dbus - services.dbus = { - enable = true; - packages = [ pkgs.dconf ]; - }; - - programs.dconf.enable = true; - - # Pipewire - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - - # Some fancy fonts - fonts.packages = with pkgs-stable; [ - # Fonts - nerdfonts - powerline - ]; - - # Auto rotate screen - programs.iio-hyprland = { - enable = true; - package = pkgs.iio-hyprland.overrideAttrs { - patches = [ ./iio-hyprland-hyprpaper.patch ]; - }; - }; - }; -} diff --git a/modules/system/hyprland/iio-hyprland-hyprpaper.patch b/modules/system/hyprland/iio-hyprland-hyprpaper.patch deleted file mode 100644 index 31dc2d5..0000000 --- a/modules/system/hyprland/iio-hyprland-hyprpaper.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/main.c b/main.c -index 2e858dd..2cd43e8 100644 ---- a/main.c -+++ b/main.c -@@ -123,6 +123,7 @@ void handle_orientation(enum Orientation orientation, const char* monitor_id) { - system_fmt("hyprctl --batch \"keyword monitor %s,transform,%d ; keyword input:touchdevice:transform %d ; keyword input:tablet:transform %d\"", output, orientation, orientation, orientation); - - } -+ system_fmt("pkill hyprpaper; hyprpaper & disown;"); - } - - DBusMessage* request_orientation(DBusConnection* conn) { diff --git a/modules/system/kernel/default.nix b/modules/system/kernel/default.nix deleted file mode 100644 index f34e1e5..0000000 --- a/modules/system/kernel/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.systemSettings.cachy; -in -{ - options = { - systemSettings.cachy = { - enable = lib.mkEnableOption "Enable cachyos kernel"; - variant = lib.mkOption { - default = null; - type = lib.types.nullOr (lib.types.enum ["lto" "server" "hardened"]); - description = '' - This option determines the CachyOS kernel variant to use. - ''; - }; - }; - }; - - config = lib.mkIf cfg.enable { - boot.kernelPackages = lib.mkMerge [ - (lib.mkIf (cfg.variant == null) pkgs.linuxPackages_cachyos) - (lib.mkIf (cfg.variant == "lto") pkgs.linuxPackages_cachyos-lto) - (lib.mkIf (cfg.variant == "server") pkgs.linuxPackages_cachyos-server) - (lib.mkIf (cfg.variant == "hardened") pkgs.linuxPackages_cachyos-hardened) - ]; - services.scx.enable = true; - services.scx.package = pkgs.scx.rustscheds; - services.scx.scheduler = "scx_lavd"; - boot.consoleLogLevel = 0; - }; -} diff --git a/modules/system/nix/default.nix b/modules/system/nix/default.nix deleted file mode 100644 index 543e1c0..0000000 --- a/modules/system/nix/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -{ - config = { - nix = { - package = pkgs.nix; - settings = { - substituters = [ - "https://cache.nixos.org" - "https://hyprland.cachix.org" - "https://nix-community.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - ]; - trusted-users = config.systemSettings.adminUsers ++ [ "@wheel" ]; - auto-optimise-store = true; - download-buffer-size = 500000000; - }; - }; - programs.nix-ld = { - enable = true; - #Include libstdc++ in the nix-ld profile - libraries = [ - pkgs.stdenv.cc.cc - pkgs.zlib - pkgs.fuse3 - pkgs.icu - pkgs.nss - pkgs.openssl - pkgs.curl - pkgs.expat - pkgs.xorg.libX11 - pkgs.vulkan-headers - pkgs.vulkan-loader - pkgs.vulkan-tools - ]; - }; - system.stateVersion = "22.11"; - }; -} diff --git a/modules/system/overlays/ranger.nix b/modules/system/overlays/ranger.nix deleted file mode 100644 index 57a8f84..0000000 --- a/modules/system/overlays/ranger.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - config = { - nixpkgs.overlays = [ - (self: super: - { - ranger = super.ranger.overrideAttrs (oldAttrs: rec { - preConfigure = '' - substituteInPlace ranger/__init__.py \ - --replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.bat}/bin/bat'" - - # give image previews out of the box when building with w3m - substituteInPlace ranger/config/rc.conf \ - --replace "set preview_images false" "set preview_images true" - - # adds this patch: https://github.com/ranger/ranger/pull/1758 - # fixes a bug for kitty users that use image previews - substituteInPlace ranger/ext/img_display.py \ - --replace "self.image_id -= 1" "self.image_id = max(0, self.image_id - 1)" - - # fixes the .desktop file - substituteInPlace doc/ranger.desktop \ - --replace "Icon=utilities-terminal" "Icon=user-desktop" - substituteInPlace doc/ranger.desktop \ - --replace "Terminal=true" "Terminal=false" - substituteInPlace doc/ranger.desktop \ - --replace "Exec=ranger" "Exec=kitty -e ranger %U" - ''; - }); - } - ) - ]; - }; -} diff --git a/modules/system/phoenix/default.nix b/modules/system/phoenix/default.nix deleted file mode 100644 index e825482..0000000 --- a/modules/system/phoenix/default.nix +++ /dev/null @@ -1,178 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options = { - systemSettings = { - dotfilesDir = lib.mkOption { - default = "/etc/nixos"; - description = "Absolute path to the dotfiles directory"; - type = lib.types.path; - }; - secretsFlakeDir = lib.mkOption { - default = "/etc/nixos.secrets"; - description = "Absolute path to my secrets flake"; - type = lib.types.path; - }; - systemBuilder.enable = lib.mkEnableOption "Enable automatic config updater and builder"; - systemBuilder.buildCronExpression = lib.mkOption { - default = "Sat *-*-* 02:00:00"; # Sat morning at 2am - description = "Cron expression for when the system should auto build config"; - type = lib.types.str; - }; - }; - }; - config = { - environment.systemPackages = with pkgs; [ - attic-client - git - nix-output-monitor - (pkgs.writeScriptBin "phoenix" '' - if [[ $EUID -ne 0 ]]; then - echo "Error: This script must be run as root" 1>&2 - exit 1 - fi - if [ "$1" = "sync" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'sync' command has no subcommands (no $2 subcommand)"; - fi - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - pushd ${config.systemSettings.dotfilesDir} &> /dev/null; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild switch; - popd &> /dev/null; - exit 0; - elif [ "$1" = "update" ]; then - pushd ${config.systemSettings.dotfilesDir} &> /dev/null; - nix flake update "''${@:2}"; - popd &> /dev/null; - #if [ "$#" -eq 1 ]; then - # pushd ${config.systemSettings.secretsFlakeDir} &> /dev/null; - # nix flake update; - # popd &> /dev/null; - #fi - exit 0; - elif [ "$1" = "pull" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'pull' command has no subcommands (no $2 subcommand)"; - fi - chown -R $DOAS_USER:users ${config.systemSettings.dotfilesDir}; - chown -R $DOAS_USER:users ${config.systemSettings.secretsFlakeDir}; - pushd ${config.systemSettings.dotfilesDir} &> /dev/null; - sudo -u $DOAS_USER git stash; - sudo -u $DOAS_USER git pull; - sudo -u $DOAS_USER git stash apply; - popd &> /dev/null; - pushd ${config.systemSettings.secretsFlakeDir} &> /dev/null; - sudo -u $DOAS_USER git stash; - sudo -u $DOAS_USER git pull; - sudo -u $DOAS_USER git stash apply; - popd &> /dev/null; - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - exit 0; - # TODO allow specifying host with $2 in build subcommand - elif [ "$1" = "build" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'build' command has no subcommands (no $2 subcommand)"; - fi - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - pushd ${config.systemSettings.dotfilesDir} &> /dev/null; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#snowfire; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#duskfall; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#zenith; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#stardust; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch nixos-rebuild build --flake .#ori; - systemd-inhibit --what sleep:idle:handle-lid-switch attic push emmet ./result; - systemd-inhibit --what sleep:idle:handle-lid-switch rm ./result; - exit 0; - elif [ "$1" = "lock" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'lock' command has no subcommands (no $2 subcommand)"; - fi - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - exit 0; - elif [ "$1" = "unlock" ]; then - if [ "$#" -gt 1 ]; then - echo "Warning: The 'unlock' command has no subcommands (no $2 subcommand)"; - fi - chown -R $DOAS_USER:users ${config.systemSettings.dotfilesDir}; - chown -R $DOAS_USER:users ${config.systemSettings.secretsFlakeDir}; - exit 0; - elif [ "$1" = "gc" ]; then - if [ "$#" -gt 2 ]; then - echo "Warning: The 'gc' command only accepts one argument (collect_older_than)"; - fi - if [ "$2" = "full" ]; then - systemd-inhibit --what sleep:idle:handle-lid-switch nix-collect-garbage --delete-old; - elif [ "$2" ]; then - systemd-inhibit --what sleep:idle:handle-lid-switch nix-collect-garbage --delete-older-than $2; - else - systemd-inhibit --what sleep:idle:handle-lid-switch nix-collect-garbage --delete-older-than 30d; - fi - exit 0; - fi - '') - ]; - - # FIXME this thing doesn't work at all - systemd.services."phoenix-system-builder" = lib.mkIf config.systemSettings.systemBuilder.enable { - path = with pkgs; [ - openssh git nix nixos-rebuild - ]; - script = '' - set -euo pipefail - export NIX_PATH="nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix" - echo "navigating to /etc/nixos"; - cd ${config.systemSettings.dotfilesDir}; - echo "running git pull"; - ${pkgs.git}/bin/git pull; - echo "running nix flake update"; - nix flake update; - ${pkgs.git}/bin/git stage *; - ${pkgs.git}/bin/git commit -m "Updated system" || true; - ${pkgs.git}/bin/git push || true; - cd ${config.systemSettings.secretsFlakeDir}; - ${pkgs.git}/bin/git pull; - chown -R 0:0 ${config.systemSettings.dotfilesDir}; - chown -R 0:0 ${config.systemSettings.secretsFlakeDir}; - cd ${config.systemSettings.dotfilesDir}; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#snowfire; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#duskfall; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#zenith; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#stardust; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ${config.system.build.nixos-rebuild}/bin/nixos-rebuild build --flake .#ori; - ${pkgs.attic-client}/bin/attic push emmet ./result; - rm ./result; - ''; - serviceConfig = { - Type = "simple"; - User = "root"; - }; - }; - systemd.timers."phoenix-system-builder-auto" = lib.mkIf config.systemSettings.systemBuilder.enable { - wantedBy = [ "timers.target" ]; - timerConfig = { - OnCalendar = config.systemSettings.systemBuilder.buildCronExpression; - Unit = "phoenix-system-builder.service"; - }; - }; - }; -} diff --git a/modules/system/plasma/default.nix b/modules/system/plasma/default.nix deleted file mode 100644 index ea1f90a..0000000 --- a/modules/system/plasma/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, pkgs, ...}: - -let - cfg = config.systemSettings.plasma; -in { - options = { - systemSettings.plasma = { - enable = lib.mkEnableOption "Enable plasma"; - }; - }; - - config = lib.mkIf cfg.enable { - systemSettings.tlp.enable = lib.mkForce false; - services.xserver.enable = true; - services.xserver = { - layout = "us"; - xkbVariant = ""; - xkbOptions = "caps:escape"; - }; - services.xserver.displayManager.sddm.enable = true; - services.xserver.displayManager.sddm.wayland.enable = true; - services.xserver.desktopManager.plasma6.enable = true; - - services.printing.enable = true; - - hardware.pulseaudio.enable = false; - security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - }; - - environment.systemPackages = with pkgs; [ - kdePackages.kate - kdePackages.dolphin - ]; - - virtualisation.waydroid.enable = true; - services.avahi.nssmdns4 = true; - }; -} diff --git a/modules/system/powerprofiles/default.nix b/modules/system/powerprofiles/default.nix deleted file mode 100644 index 5e8194d..0000000 --- a/modules/system/powerprofiles/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.systemSettings.powerprofiles; -in { - options = { - systemSettings.powerprofiles = { - enable = lib.mkEnableOption "Enable power profiles daemon"; - }; - }; - - config = lib.mkIf cfg.enable { - services.power-profiles-daemon = { - enable = true; - }; - }; -} diff --git a/modules/system/printing/default.nix b/modules/system/printing/default.nix deleted file mode 100644 index d8ca9d7..0000000 --- a/modules/system/printing/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ pkgs, lib, config, ... }: - -let - cfg = config.systemSettings.printing; -in { - options = { - systemSettings.printing = { - enable = lib.mkEnableOption "Enable printing"; - }; - }; - - config = lib.mkIf cfg.enable { - # Enable printing - services.printing.enable = true; - services.avahi.enable = true; - services.avahi.nssmdns4 = true; - services.avahi.openFirewall = true; - environment.systemPackages = [ pkgs.cups-filters ]; - }; -} diff --git a/modules/system/security/automount/default.nix b/modules/system/security/automount/default.nix deleted file mode 100644 index 1707bdb..0000000 --- a/modules/system/security/automount/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.systemSettings.security.automount; -in { - options = { - systemSettings.security.automount = { - enable = lib.mkEnableOption "Enable automount"; - }; - }; - - config = lib.mkIf cfg.enable { - services.devmon.enable = true; - services.gvfs.enable = true; - services.udisks2.enable = true; - }; -} diff --git a/modules/system/security/blocklist/default.nix b/modules/system/security/blocklist/default.nix deleted file mode 100644 index c2035ad..0000000 --- a/modules/system/security/blocklist/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, inputs, ... }: - -let - allowedHosts = config.systemSettings.security.blocklist.allowedHosts; - hostsFileDeletions = builtins.genList (x: "0.0.0.0 " + (builtins.elemAt allowedHosts x)) (builtins.length allowedHosts); - blocklist = builtins.replaceStrings hostsFileDeletions (builtins.genList (x: "") (builtins.length hostsFileDeletions)) (builtins.readFile "${inputs.blocklist-hosts}/alternates/gambling-porn/hosts"); - cfg = config.systemSettings.security.blocklist; -in { - options = { - systemSettings.security.blocklist = { - enable = lib.mkEnableOption "Enable basic host blocking for bad websites"; - allowedHosts = lib.mkOption { - default = [ ]; - description = "List of hosts to allow (remove from blocklist)"; - type = lib.types.listOf lib.types.str; - }; - }; - }; - - config = lib.mkIf cfg.enable { - networking.extraHosts = '' - "${blocklist}" - ''; - }; -} diff --git a/modules/system/security/doas/default.nix b/modules/system/security/doas/default.nix deleted file mode 100644 index 477b73f..0000000 --- a/modules/system/security/doas/default.nix +++ /dev/null @@ -1,53 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.systemSettings.security.doas; - adminUsers = config.systemSettings.adminUsers; -in { - options = { - systemSettings.security.doas = { - enable = lib.mkEnableOption "Replace sudo with doas"; - }; - }; - - config = lib.mkIf cfg.enable { - # Doas instead of sudo - security.doas.enable = true; - security.sudo.enable = false; - security.doas.extraRules = [ - { - users = adminUsers; - keepEnv = true; - persist = true; - } - { - users = adminUsers; - cmd = "phoenix"; - noPass = true; - keepEnv = true; - } - { - users = adminUsers; - cmd = "nix"; - noPass = true; - keepEnv = true; - } - { - users = adminUsers; - cmd = "nixos-rebuild"; - noPass = true; - keepEnv = true; - } - { - users = adminUsers; - cmd = "nix-collect-garbage"; - noPass = true; - keepEnv = true; - } - ]; - - environment.systemPackages = [ - pkgs.doas-sudo-shim - ]; - }; -} diff --git a/modules/system/security/firejail/default.nix b/modules/system/security/firejail/default.nix deleted file mode 100644 index 35e3fb0..0000000 --- a/modules/system/security/firejail/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ lib, config, pkgs, ... }: - -let - cfg = config.systemSettings.security.firejail; -in { - options = { - systemSettings.security.firejail = { - enable = lib.mkEnableOption "Use firejail on some apps for extra security"; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ firejail ]; - programs.firejail.enable = true; - programs.firejail.wrappedBinaries = { - #prismlauncher = { - # executable = "${pkgs.prismlauncher}/bin/prismlauncher"; - # profile = ./firejail-profiles/prismlauncher.profile; - #}; - #steam = { - # executable = "${pkgs.steam}/bin/steam"; - # profile = "${pkgs.firejail}/etc/firejail/steam.profile"; - #}; - #steam-run = { - # executable = "${pkgs.steam}/bin/steam-run"; - # profile = "${pkgs.firejail}/etc/firejail/steam.profile"; - #}; - }; - }; -} diff --git a/modules/system/security/firewall/default.nix b/modules/system/security/firewall/default.nix deleted file mode 100644 index ed6cc3a..0000000 --- a/modules/system/security/firewall/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.systemSettings.security.firewall; -in { - options = { - systemSettings.security.firewall = { - # TODO make this more granular and better :| - enable = lib.mkEnableOption "Actvate firewall with ports open only for syncthing"; - }; - }; - - config = lib.mkIf cfg.enable { - # Firewall - networking.firewall.enable = true; - # Open ports in the firewall. - networking.firewall.allowedTCPPorts = [ 22000 21027 ]; # syncthing - networking.firewall.allowedUDPPorts = [ 22000 21027 ]; # syncthing - # Or disable the firewall altogether. - # networking.firewall.enable = false; - }; -} diff --git a/modules/system/security/gpg/default.nix b/modules/system/security/gpg/default.nix deleted file mode 100644 index 0c036d1..0000000 --- a/modules/system/security/gpg/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, config, ... }: - -let - cfg = config.systemSettings.security.gpg; -in { - options = { - systemSettings.security.gpg = { - enable = lib.mkEnableOption "Enable gpg"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - }; - }; -} diff --git a/modules/system/security/openvpn/default.nix b/modules/system/security/openvpn/default.nix deleted file mode 100644 index a777447..0000000 --- a/modules/system/security/openvpn/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.systemSettings.security.openvpn; -in { - options = { - systemSettings.security.openvpn = { - enable = lib.mkEnableOption "Enable openvpn"; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = [ pkgs.openvpn ]; - environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn"; - }; -} diff --git a/modules/system/security/sshd/default.nix b/modules/system/security/sshd/default.nix deleted file mode 100644 index 2c1cd9d..0000000 --- a/modules/system/security/sshd/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.systemSettings.security.sshd; -in { - options = { - systemSettings.security.sshd = { - enable = lib.mkEnableOption "Enable incoming ssh connections"; - }; - }; - - config = lib.mkIf cfg.enable { - # Enable incoming ssh - services.openssh = { - enable = true; - openFirewall = true; - settings = { - PasswordAuthentication = false; - PermitRootLogin = "no"; - }; - }; - # Don't forget to set: - # users.users.${username}.openssh.authorizedKeys.keys = "myAuthorizedKey"; - }; -} diff --git a/modules/system/stylix/default.nix b/modules/system/stylix/default.nix deleted file mode 100644 index 5fcab3d..0000000 --- a/modules/system/stylix/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ lib, config, pkgs, inputs, ... }: - -let - cfg = config.systemSettings.stylix; - theme = import (./. + "../../../themes"+("/"+config.systemSettings.stylix.theme)); -in -{ - options = { - systemSettings.stylix = { - enable = lib.mkEnableOption "Enable stylix theming"; - }; - systemSettings.stylix.theme = lib.mkOption { - default = "orichalcum"; - type = lib.types.enum (builtins.attrNames (lib.filterAttrs (name: type: type == "directory") (builtins.readDir ../../themes))); - description = "Theme for stylix to use system wide. A list of themes can be found in the `themes` directory."; - }; - }; - - imports = [ inputs.stylix.nixosModules.stylix ]; - - config = lib.mkIf cfg.enable { - stylix.enable = true; - stylix.autoEnable = false; - stylix.polarity = theme.polarity; - stylix.image = pkgs.fetchurl { - url = theme.backgroundUrl; - sha256 = theme.backgroundSha256; - }; - stylix.base16Scheme = theme; - stylix.fonts = { - # TODO abstract fonts into an option - monospace = { - name = "FiraCode Nerd Font"; - package = pkgs.nerd-fonts.fira-code; - }; - serif = { - name = "FiraCode Nerd Font"; - package = pkgs.nerd-fonts.fira-code; - }; - sansSerif = { - name = "FiraCode Nerd Font"; - package = pkgs.nerd-fonts.fira-code; - }; - emoji = { - name = "Noto Color Emoji"; - package = pkgs.noto-fonts-emoji-blob-bin; - }; - }; - - stylix.targets.console.enable = true; - - stylix.targets.chromium.enable = true; - - environment.sessionVariables = { - #QT_QPA_PLATFORMTHEME = "qt5ct"; - }; - }; -} diff --git a/modules/system/tlp/default.nix b/modules/system/tlp/default.nix deleted file mode 100644 index 5eb7fd0..0000000 --- a/modules/system/tlp/default.nix +++ /dev/null @@ -1,58 +0,0 @@ -{ config, lib, ... }: - -let - cfg = config.systemSettings.tlp; -in { - options = { - systemSettings.tlp = { - enable = lib.mkEnableOption "Enable tlp power management"; - }; - }; - - config = lib.mkIf cfg.enable { - services.tlp = { - enable = true; - settings = { - CPU_SCALING_GOVERNOR_ON_AC = "interactive"; - CPU_SCALING_GOVERNOR_ON_BAT = "ondemand"; - CPU_ENERGY_PERF_POLICY_ON_BAT = "balance"; - CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; - CPU_DRIVER_OPMODE_ON_AC = "active"; - CPU_DRIVER_OPMODE_ON_BAT = "active"; - - WIFI_PWR_ON_AC = "on"; - WIFI_PWR_ON_BAT = "on"; - RUNTIME_PM_ON_AC = "auto"; - RUNTIME_PM_ON_BAT = "auto"; - - CPU_MIN_PERF_ON_AC = 0; - CPU_MAX_PERF_ON_AC = 100; - CPU_MIN_PERF_ON_BAT = 0; - CPU_MAX_PERF_ON_BAT = 70; - - CPU_BOOST_ON_AC = 1; - CPU_BOOST_ON_BAT = 0; - CPU_HWP_DYN_BOOST_ON_AC = 1; - CPU_HWP_DYN_BOOST_ON_BAT = 0; - - START_CHARGE_THRESH_BAT0 = 75; - STOP_CHARGE_THRESH_BAT0 = 80; - - MEM_SLEEP_ON_AC = "deep"; - MEM_SLEEP_ON_BAT = "deep"; - - PLATFORM_PROFILE_ON_AC = "quiet"; - PLATFORM_PROFILE_ON_BAT = "quiet"; - - RADEON_DPM_STATE_ON_AC = "performance"; - RADEON_DPM_STATE_ON_BAT = "battery"; - RADEON_POWER_PROFILE_ON_AC = "high"; - RADEON_POWER_PROFILE_ON_BAT = "low"; - - INTEL_GPU_MIN_FREQ_ON_AC = 600; - INTEL_GPU_MIN_FREQ_ON_BAT = 600; - }; - }; - }; - -} diff --git a/modules/system/users/default.nix b/modules/system/users/default.nix deleted file mode 100644 index 6cfdd6c..0000000 --- a/modules/system/users/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ config, lib, inputs, ... }: - -{ - options = { - systemSettings = { - users = lib.mkOption { - description = "List of desktop users to create on the system"; - type = lib.types.listOf lib.types.str; - }; - adminUsers = lib.mkOption { - description = "List of desktop users to grant admin (sudo) access on the system"; - type = lib.types.listOf lib.types.str; - }; - }; - }; - config = { - - users.users = builtins.listToAttrs - (map (user: { - name = user; - value = { - isNormalUser = true; - extraGroups = [ "networkmanager" "input" "dialout" "video" "render" ] ++ (lib.optionals (lib.any (x: x == user) config.systemSettings.adminUsers) [ "wheel" ]); - createHome = true; - }; - }) config.systemSettings.users); - - home-manager.users = builtins.listToAttrs - (map (user: { - name = user; - value = { - home.username = user; - home.homeDirectory = "/home/"+user; - }; - }) config.systemSettings.users); - }; -} diff --git a/modules/system/virtualization/docker/default.nix b/modules/system/virtualization/docker/default.nix deleted file mode 100644 index b153f1a..0000000 --- a/modules/system/virtualization/docker/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.systemSettings.virtualization.docker; - adminUsers = config.systemSettings.adminUsers; -in { - options = { - systemSettings.virtualization.docker = { - enable = lib.mkEnableOption "Enable docker"; - }; - }; - - config = { - virtualisation.docker = { - enable = true; - enableOnBoot = true; - autoPrune.enable = true; - }; - users.users = builtins.listToAttrs (map (user: { name = user; value = { extraGroups = [ "docker" ];};}) adminUsers); - environment.systemPackages = with pkgs; [ - docker - docker-compose - lazydocker - ]; - }; -} diff --git a/modules/system/virtualization/virtual-machines/default.nix b/modules/system/virtualization/virtual-machines/default.nix deleted file mode 100644 index 150988c..0000000 --- a/modules/system/virtualization/virtual-machines/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ lib, config, pkgs, ... }: - -let cfg = config.systemSettings.virtualization.virtualMachines; -in { - options = { - systemSettings.virtualization.virtualMachines = { - enable = lib.mkEnableOption "Enable qemu virtual machines, distrobox, and waydroid"; - }; - }; - - config = lib.mkIf cfg.enable { - environment.systemPackages = with pkgs; [ virt-manager distrobox ]; - virtualisation.libvirtd = { - allowedBridges = [ - "nm-bridge" - "virbr0" - ]; - enable = true; - qemu.runAsRoot = false; - }; - virtualisation.waydroid.enable = true; - }; -} diff --git a/modules/themes/README.org b/modules/themes/README.org deleted file mode 100644 index c78334b..0000000 --- a/modules/themes/README.org +++ /dev/null @@ -1,8 +0,0 @@ -#+title: My Themes -#+author: Emmet - -Inside this directory are all of my themes! - -Each theme directory stores =default.nix= which is an attribute set containing all the necessary information including both colors and a background image link (which is automatically downloaded by my config). - -Look at any of the directories here for more info! diff --git a/modules/themes/alph/default.nix b/modules/themes/alph/default.nix deleted file mode 100644 index ab61d90..0000000 --- a/modules/themes/alph/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Alph"; - slug = "alph"; - author = "LibrePhoenix (https://github.com/librephoenix)"; - description = "Flagship light theme of the LibrePhoenix Channel"; - polarity = "light"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/132/401/75/painting-clouds-sky-landscape-wallpaper-57bfb2f40fd59f8acf4284a1e191c785.jpg"; - backgroundSha256 = "sha256-ZM0X0IXsUwAgxdZileDOol8kBANxjW8oGrgha3OFjYE="; - base00 = "fbfbff"; - base01 = "D8E4F4"; - base02 = "BCCDE1"; - base03 = "9FB4D1"; - base04 = "667D9F"; - base05 = "444452"; - base06 = "333349"; - base07 = "141229"; - base08 = "AD0617"; - base09 = "872626"; - base0A = "AD6A06"; - base0B = "06AD72"; - base0C = "06A3AD"; - base0D = "0A5D97"; - base0E = "5B037A"; - base0F = "87267C"; -} diff --git a/modules/themes/ashes/default.nix b/modules/themes/ashes/default.nix deleted file mode 100644 index 79d6e3c..0000000 --- a/modules/themes/ashes/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Ashes"; - slug = "ashes"; - author = "Jannik Siebert (https://github.com/janniks)"; - description = "Desaturated dark color scheme"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/anime-road-to-city-everlasting-summer-4k-ep.jpg"; - backgroundSha256 = "sha256-ul7ecqPw9bSr+JRSd+3OlKwVfB+5378L7ObYydJDsgQ="; - base00 = "1C2023"; - base01 = "393F45"; - base02 = "565E65"; - base03 = "747C84"; - base04 = "ADB3BA"; - base05 = "C7CCD1"; - base06 = "DFE2E5"; - base07 = "F3F4F5"; - base08 = "C7AE95"; - base09 = "C7C795"; - base0A = "AEC795"; - base0B = "95C7AE"; - base0C = "95AEC7"; - base0D = "AE95C7"; - base0E = "C795AE"; - base0F = "C79595"; -} diff --git a/modules/themes/atelier-cave/default.nix b/modules/themes/atelier-cave/default.nix deleted file mode 100644 index 0b83f39..0000000 --- a/modules/themes/atelier-cave/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Cave"; - slug = "atelier-cave"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = ''A “cool-warm” palette; not for the claustrophobic''; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/anime-girl-angel-ring-5k-7c.jpg"; - backgroundUrlSha256 = "sha256-AVPJYFLEQr9x1V2yQLkMc1g7GqcBPJiKRFuj8MaKe5c="; - base00 = "19171c"; - base01 = "26232a"; - base02 = "585260"; - base03 = "655f6d"; - base04 = "7e7887"; - base05 = "8b8792"; - base06 = "e2dfe7"; - base07 = "efecf4"; - base08 = "be4678"; - base09 = "aa573c"; - base0A = "a06e3b"; - base0B = "2a9292"; - base0C = "398bc6"; - base0D = "576ddb"; - base0E = "955ae7"; - base0F = "bf40bf"; -} diff --git a/modules/themes/atelier-dune/default.nix b/modules/themes/atelier-dune/default.nix deleted file mode 100644 index d8b9b91..0000000 --- a/modules/themes/atelier-dune/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Dune"; - slug = "atelier-dune"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "A welcoming, soothing friendly but also bright, colorscheme"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/tengen-toppa-gurren-lagann-4k-1m.jpg"; - backgroundSha256 = "sha256-wplFIlIIYHTofJMuBLtpSWwrFyzz8ao1Gq4wGqgz7qY="; - base00 = "20201d"; - base01 = "292824"; - base02 = "6e6b5e"; - base03 = "7d7a68"; - base04 = "999580"; - base05 = "a6a28c"; - base06 = "e8e4cf"; - base07 = "fefbec"; - base08 = "d73737"; - base09 = "b65611"; - base0A = "ae9513"; - base0B = "60ac39"; - base0C = "1fad83"; - base0D = "6684e1"; - base0E = "b854d4"; - base0F = "d43552"; -} diff --git a/modules/themes/atelier-estuary/default.nix b/modules/themes/atelier-estuary/default.nix deleted file mode 100644 index f96a928..0000000 --- a/modules/themes/atelier-estuary/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Estuary"; - slug = "atelier-estuary"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "A bit of a poisonous colorscheme, be aware of the crocodiles …, they’re hiding in there"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/352/194/322/digital-art-artwork-dragon-skeleton-wallpaper-15f339ed090d16293ff528ba738d87f9.jpg"; - backgroundUrlSha256 = "sha256-f97njdnllbsnnIjZnz/j0l2qIFWbEsGF2QtV1JTF2Yg="; - base00 = "22221b"; - base01 = "302f27"; - base02 = "5f5e4e"; - base03 = "6c6b5a"; - base04 = "878573"; - base05 = "929181"; - base06 = "e7e6df"; - base07 = "f4f3ec"; - base08 = "ba6236"; - base09 = "ae7313"; - base0A = "a5980d"; - base0B = "7d9726"; - base0C = "5b9d48"; - base0D = "36a166"; - base0E = "5f9182"; - base0F = "9d6c7c"; -} diff --git a/modules/themes/atelier-forest/default.nix b/modules/themes/atelier-forest/default.nix deleted file mode 100644 index 5cc735f..0000000 --- a/modules/themes/atelier-forest/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Forest"; - slug = "atelier-forest"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = ''A colorscheme like “Birds of Paradise”, but a bit muddier on the browns, less red and more greyed out, like clay''; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/72/wallhaven-72p97v.jpg"; - backgroundSha256 = "sha256-+ayGF3G14PfZwZnIeqCpnV/awnwdpue3OBmJYTirb2U="; - base00 = "1b1918"; - base01 = "2c2421"; - base02 = "68615e"; - base03 = "766e6b"; - base04 = "9c9491"; - base05 = "a8a19f"; - base06 = "e6e2e0"; - base07 = "f1efee"; - base08 = "f22c40"; - base09 = "df5320"; - base0A = "c38418"; - base0B = "7b9726"; - base0C = "3d97b8"; - base0D = "407ee7"; - base0E = "6666ea"; - base0F = "c33ff3"; -} diff --git a/modules/themes/atelier-heath/default.nix b/modules/themes/atelier-heath/default.nix deleted file mode 100644 index 3861568..0000000 --- a/modules/themes/atelier-heath/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Heath"; - slug = "atelier-heath"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "Here the background-colors have these cool-red colors for the background, but then obviously toned down quite a bit…"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/861/102/512/moonlight-fantasy-landscape-moon-full-moon-wallpaper-0960b8dd31ca4d2b96b7684fd021067d.jpg"; - backgroundSha256 = "sha256-KuPdCD5IT0/LJghqQKuAFiFtztp+FyRJRdsjdrAzPI8="; - base00 = "1b181b"; - base01 = "292329"; - base02 = "695d69"; - base03 = "776977"; - base04 = "9e8f9e"; - base05 = "ab9bab"; - base06 = "d8cad8"; - base07 = "f7f3f7"; - base08 = "ca402b"; - base09 = "a65926"; - base0A = "bb8a35"; - base0B = "918b3b"; - base0C = "159393"; - base0D = "516aec"; - base0E = "7b59c0"; - base0F = "cc33cc"; -} diff --git a/modules/themes/atelier-lakeside/default.nix b/modules/themes/atelier-lakeside/default.nix deleted file mode 100644 index 490a235..0000000 --- a/modules/themes/atelier-lakeside/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Lakeside"; - slug = "atelier-lakeside"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "Coolest colorscheme of the (Atelier) bunch"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/410/867/750/vector-forest-sunset-forest-sunset-forest-wallpaper-b3abc35d0d699b056fa6b247589b18a8.jpg"; - backgroundSha256 = "sha256-8ytn00rZUiJxgtjXqTxtR7qusokxjY68u+UiWuwD8Bs="; - base00 = "161b1d"; - base01 = "1f292e"; - base02 = "516d7b"; - base03 = "5a7b8c"; - base04 = "7195a8"; - base05 = "7ea2b4"; - base06 = "c1e4f6"; - base07 = "ebf8ff"; - base08 = "d22d72"; - base09 = "935c25"; - base0A = "8a8a0f"; - base0B = "568c3b"; - base0C = "2d8f6f"; - base0D = "257fad"; - base0E = "6b6bb8"; - base0F = "b72dd2"; -} diff --git a/modules/themes/atelier-plateau/default.nix b/modules/themes/atelier-plateau/default.nix deleted file mode 100644 index b48189b..0000000 --- a/modules/themes/atelier-plateau/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Plateau"; - slug = "atelier-plateau"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "A warm palette; no real green in here"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/428/434/322/art-computer-digital-art-concept-art-wallpaper-b9a0c85d016a9d0b66a7b84f509116ad.jpg"; - backgroundSha256 = "sha256-GL4QjCZFLAgsMM05cLqAx9Sd293NfU79azFhuzBGhW0="; - base00 = "1b1818"; - base01 = "292424"; - base02 = "585050"; - base03 = "655d5d"; - base04 = "7e7777"; - base05 = "8a8585"; - base06 = "e7dfdf"; - base07 = "f4ecec"; - base08 = "ca4949"; - base09 = "b45a3c"; - base0A = "a06e3b"; - base0B = "4b8b8b"; - base0C = "5485b6"; - base0D = "7272ca"; - base0E = "8464c4"; - base0F = "bd5187"; -} diff --git a/modules/themes/atelier-savanna/default.nix b/modules/themes/atelier-savanna/default.nix deleted file mode 100644 index 6e69e63..0000000 --- a/modules/themes/atelier-savanna/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Savanna"; - slug = "atelier-savanna"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = ''“Color-wheel colors” are desaturated considerably, giving this colorscheme a rather understated appeal and, dear I say it, a ‘natural’ look and feel''; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/760/955/638/artwork-landscape-sky-mountains-wallpaper-78664db880d01c78404c214e28e2847a.jpg"; - backgroundSha256 = "sha256-0ubzlyIj3Uz9vQa+qvz/+q/1trgbNUEpQysqtEFs54g="; - base00 = "171c19"; - base01 = "232a25"; - base02 = "526057"; - base03 = "5f6d64"; - base04 = "78877d"; - base05 = "87928a"; - base06 = "dfe7e2"; - base07 = "ecf4ee"; - base08 = "b16139"; - base09 = "9f713c"; - base0A = "a07e3b"; - base0B = "489963"; - base0C = "1c9aa0"; - base0D = "478c90"; - base0E = "55859b"; - base0F = "867469"; -} diff --git a/modules/themes/atelier-seaside/default.nix b/modules/themes/atelier-seaside/default.nix deleted file mode 100644 index 2af8f1c..0000000 --- a/modules/themes/atelier-seaside/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Seaside"; - slug = "atelier-seaside"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "Very saturated color-palette; comes popping at you"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/714/495/609/landscape-artwork-digital-art-fantasy-art-wallpaper-9960e89d112afd2ba6e738ff70b1e63d.jpg"; - backgroundSha256 = "sha256-GcHU4qYRGFubobNENwp8prpd/da4tzHwRyN+rsH2dYA="; - base00 = "131513"; - base01 = "242924"; - base02 = "5e6e5e"; - base03 = "687d68"; - base04 = "809980"; - base05 = "8ca68c"; - base06 = "cfe8cf"; - base07 = "f4fbf4"; - base08 = "e6193c"; - base09 = "87711d"; - base0A = "98981b"; - base0B = "29a329"; - base0C = "1999b3"; - base0D = "3d62f5"; - base0E = "ad2bee"; - base0F = "e619c3"; -} diff --git a/modules/themes/atelier-sulphurpool/default.nix b/modules/themes/atelier-sulphurpool/default.nix deleted file mode 100644 index bb058e5..0000000 --- a/modules/themes/atelier-sulphurpool/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Atelier Sulphurpool"; - slug = "atelier-sulphurpool"; - author = "Bram de Haan (http://atelierbramdehaan.nl)"; - description = "Purple base color; easy on the eye"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/13/960/9/digital-art-fantasy-art-colorful-space-art-wallpaper-99330d2ae61a6c661d5ea4793fc17511.jpg"; - backgroundSha256 = "sha256-mnh2uKy3PO0otUdTw4Bv4JDnMYj/m7Gt7P7XDJb2+c0="; - base00 = "202746"; - base01 = "293256"; - base02 = "5e6687"; - base03 = "6b7394"; - base04 = "898ea4"; - base05 = "979db4"; - base06 = "dfe2f1"; - base07 = "f5f7ff"; - base08 = "c94922"; - base09 = "c76b29"; - base0A = "c08b30"; - base0B = "ac9739"; - base0C = "22a2c9"; - base0D = "3d8fd1"; - base0E = "6679cc"; - base0F = "9c637a"; -} diff --git a/modules/themes/ayu-dark/default.nix b/modules/themes/ayu-dark/default.nix deleted file mode 100644 index 1d938d1..0000000 --- a/modules/themes/ayu-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Ayu Dark"; - slug = "ayu-dark"; - author = "Khue Nguyen "; - description = "Simple, bright and elegant theme"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/zy/wallhaven-zy8wwo.jpg"; - backgroundSha256 = "sha256-0BiSjEZnwh6KnWuNau+9lf1PVBYRnq228l4OA/nm5YI="; - base00 = "0F1419"; - base01 = "131721"; - base02 = "272D38"; - base03 = "3E4B59"; - base04 = "BFBDB6"; - base05 = "E6E1CF"; - base06 = "E6E1CF"; - base07 = "F3F4F5"; - base08 = "F07178"; - base09 = "FF8F40"; - base0A = "FFB454"; - base0B = "B8CC52"; - base0C = "95E6CB"; - base0D = "59C2FF"; - base0E = "D2A6FF"; - base0F = "E6B673"; -} diff --git a/modules/themes/bespin/default.nix b/modules/themes/bespin/default.nix deleted file mode 100644 index 4e775cd..0000000 --- a/modules/themes/bespin/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Bespin"; - slug = "bespin"; - author = "Jan T. Sott (https://github.com/idleberg)"; - description = "Port of the Bespin theme from Sublime Text 2/3"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/597/635/621/sword-fantasy-forest-twilight-river-hd-wallpaper-f98078cd21caad7b46d7b83fb021566d.jpg"; - backgroundSha256 = "sha256-uVPfyCXyyBVSfgbiQy5rhngNjuAmxk89btary3Iiwq0="; - base00 = "28211c"; - base01 = "36312e"; - base02 = "5e5d5c"; - base03 = "666666"; - base04 = "797977"; - base05 = "8a8986"; - base06 = "9d9b97"; - base07 = "baae9e"; - base08 = "cf6a4c"; - base09 = "cf7d34"; - base0A = "f9ee98"; - base0B = "54be0d"; - base0C = "afc4db"; - base0D = "5ea6ea"; - base0E = "9b859d"; - base0F = "937121"; -} diff --git a/modules/themes/caret/default.nix b/modules/themes/caret/default.nix deleted file mode 100644 index fdbabb5..0000000 --- a/modules/themes/caret/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Caret Dark"; - slug = "caret-dark"; - author = "projekt0n (https://github.com/projekt0n)"; - description = "The timeless colorscheme (originally for the neovim text editor)"; - polarity = "dark"; - backgroundUrl = "https://raw.githubusercontent.com/D3Ext/aesthetic-wallpapers/main/images/gruvbox_retrocity.png"; - backgroundSha256 = "sha256-sHr/BFWhRvzr0gVD73E7fSlGG8/9G2D3/M46UNf+qvU="; - base00 = "2a2d25"; - base01 = "3f4536"; - base02 = "586048"; - base03 = "6d7859"; - base04 = "9db573"; - base05 = "b0c48d"; - base06 = "c5d4ab"; - base07 = "fdfffa"; - base08 = "f18e91"; - base09 = "e2a66f"; - base0A = "e0c98a"; - base0B = "a1ea9e"; - base0C = "a1ea93"; - base0D = "67cfa3"; - base0E = "80b7cb"; - base0F = "baacd7"; -} diff --git a/modules/themes/catppuccin-frappe/default.nix b/modules/themes/catppuccin-frappe/default.nix deleted file mode 100644 index 4d1a9df..0000000 --- a/modules/themes/catppuccin-frappe/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Catppuccin Frappe"; - slug = "catppuccin-frappe"; - author = "https://catppuccin.com/"; - description = "Soothing pastel theme for the high-spirited!"; - polarity = "dark"; - backgroundUrl = "https://images3.alphacoders.com/126/1266078.jpg"; - backgroundSha256 = "sha256-krJtLOP+9mV87l0/XCkqtk558VeHP3ZjThLEh97ESek="; - base00 = "303446"; - base01 = "292c3c"; - base02 = "414559"; - base03 = "51576d"; - base04 = "626880"; - base05 = "c6d0f5"; - base06 = "f2d5cf"; - base07 = "babbf1"; - base08 = "e78284"; - base09 = "ef9f76"; - base0A = "e5c890"; - base0B = "a6d189"; - base0C = "81c8be"; - base0D = "8caaee"; - base0E = "ca9ee6"; - base0F = "eebebe"; -} diff --git a/modules/themes/catppuccin-mocha/default.nix b/modules/themes/catppuccin-mocha/default.nix deleted file mode 100644 index 47290d6..0000000 --- a/modules/themes/catppuccin-mocha/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Catppuccin Mocha"; - slug = "catppuccin-mocha"; - author = "https://catppuccin.com/"; - description = "Soothing pastel theme for the high-spirited!"; - polarity = "dark"; - backgroundUrl = "https://images7.alphacoders.com/126/1266081.jpg"; - backgroundSha256 = "sha256-wCXKHemZYxVYnWVwh6Ng/nGlUroRotXgvcOdSfqRPeo="; - base00 = "1e1e2e"; - base01 = "181825"; - base02 = "313244"; - base03 = "45475a"; - base04 = "585b70"; - base05 = "cdd6f4"; - base06 = "f5e0dc"; - base07 = "b4befe"; - base08 = "f38ba8"; - base09 = "fab387"; - base0A = "f9e2af"; - base0B = "a6e3a1"; - base0C = "94e2d5"; - base0D = "89b4fa"; - base0E = "cba6f7"; - base0F = "f2cdcd"; -} diff --git a/modules/themes/darkmoss/default.nix b/modules/themes/darkmoss/default.nix deleted file mode 100644 index 21d5cad..0000000 --- a/modules/themes/darkmoss/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "darkmoss"; - slug = "darkmoss"; - author = "Gabriel Avanzi (https://github.com/avanzzzi)"; - description = "A dark color scheme for Base16"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/0w/wallhaven-0wrp3p.jpg"; - backgroundSha256 = "sha256-JGEY8mhpXNLCXPoWCXvGWbLkfkpeZRl+hxiLPGwVmSQ="; - base00 = "171e1f"; - base01 = "252c2d"; - base02 = "373c3d"; - base03 = "555e5f"; - base04 = "818f80"; - base05 = "c7c7a5"; - base06 = "e3e3c8"; - base07 = "e1eaef"; - base08 = "ff4658"; - base09 = "e6db74"; - base0A = "fdb11f"; - base0B = "499180"; - base0C = "66d9ef"; - base0D = "498091"; - base0E = "9bc0c8"; - base0F = "d27b53"; -} diff --git a/modules/themes/doom-one/default.nix b/modules/themes/doom-one/default.nix deleted file mode 100644 index 953cbe4..0000000 --- a/modules/themes/doom-one/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Doom One"; - slug = "doom-one"; - author = "hlissner (https://github.com/doomemacs/themes)"; - description = "Flagship theme of Doom Emacs"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/834/299/692/city-lights-girl-moon-wallpaper-e178a9faa68bf35ee7e3f2afc50e43fc.jpg"; - backgroundSha256 = "sha256-gYGwWAgRjpZQGUMZsw5GJ11dKKrU6/bX3xcKXQZVOac="; - base00 = "1b2229"; - base01 = "3f444a"; - base02 = "5B6268"; - base03 = "202328"; - base04 = "73797e"; - base05 = "9ca0a4"; - base06 = "b1b1b1"; - base07 = "e6e6e6"; - base08 = "ff6c6b"; - base09 = "ECBE7B"; - base0A = "98be65"; - base0B = "4db5bd"; - base0C = "51afef"; - base0D = "a9a1e1"; - base0E = "46D9FF"; - base0F = "5699AF"; -} diff --git a/modules/themes/dracula/default.nix b/modules/themes/dracula/default.nix deleted file mode 100644 index 0a51c17..0000000 --- a/modules/themes/dracula/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Dracula"; - slug = "dracula"; - author = "Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (https://github.com/dracula)"; - description = "Dark theme inspired by a certain vampire"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/heights-are-not-scary-5k-7s.jpg"; - backgroundSha256 = "sha256-rgJkrd7S/uWugPyBVTicbn6HtC8ru5HtEHP426CRSCE="; - base00 = "282936"; - base01 = "333547"; - base02 = "4d4f68"; - base03 = "626483"; - base04 = "62d6e8"; - base05 = "e9e9f4"; - base06 = "f1f2f8"; - base07 = "f7f7fb"; - base08 = "ea51b2"; - base09 = "b45bcf"; - base0A = "00f769"; - base0B = "ebff87"; - base0C = "a1efe4"; - base0D = "62d6e8"; - base0E = "b45bcf"; - base0F = "00f769"; -} diff --git a/modules/themes/ember/default.nix b/modules/themes/ember/default.nix deleted file mode 100644 index c2c17ef..0000000 --- a/modules/themes/ember/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Ember"; - slug = "ember"; - author = "Emmet K (https://gitlab.com/librephoenix)"; - description = "Warm and fiery colorscheme"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/x8/wallhaven-x82ldl.jpg"; - backgroundSha256 = "sha256-3HX1ADHBXR50YGmS0Y7i6n19AUX74sy8tJnOLZzMjEw="; - base00 = "330a0a"; - base01 = "4d0a0a"; - base02 = "662a0a"; - base03 = "992f0a"; - base04 = "c05a0a"; - base05 = "f89852"; - base06 = "ffb441"; - base07 = "ffc8b5"; - base08 = "f92622"; - base09 = "fd751f"; - base0A = "fdc51f"; - base0B = "8682fe"; - base0C = "f1bf84"; - base0D = "b6b98f"; - base0E = "a275a0"; - base0F = "bb86cc"; -} diff --git a/modules/themes/emil/default.nix b/modules/themes/emil/default.nix deleted file mode 100644 index cbe721e..0000000 --- a/modules/themes/emil/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Emil"; - slug = "emil"; - author = "limelier (https://github.com/limelier)"; - description = "Ethereal pastel color scheme"; - polarity = "light"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/535/845/69/digital-art-artwork-fantasy-art-planet-sun-hd-wallpaper-d866fd38b0b06cd800cc016ed8d284fa.jpg"; - backgroundSha256 = "sha256-qD/yPZHqDgpMwhqPNtyO4r3dtAnR9oMx6DLizZvDHpk="; - base00 = "efefef"; - base01 = "bebed2"; - base02 = "9e9eaf"; - base03 = "7c7c98"; - base04 = "505063"; - base05 = "313145"; - base06 = "22223a"; - base07 = "1a1a2f"; - base08 = "f43979"; - base09 = "d22a8b"; - base0A = "ff669b"; - base0B = "0073a8"; - base0C = "2155d6"; - base0D = "471397"; - base0E = "6916b6"; - base0F = "8d17a5"; -} diff --git a/modules/themes/eris/default.nix b/modules/themes/eris/default.nix deleted file mode 100644 index 08fed47..0000000 --- a/modules/themes/eris/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Eris"; - slug = "eris"; - author = "ed (https://codeberg.org/ed)"; - description = "Vibrant purple and orange theme"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/531/951/621/digital-digital-art-artwork-illustration-minimalism-hd-wallpaper-08869d3810a06c28a09cf1be487204ea.jpg"; - backgroundSha256 = "sha256-w8BF0TvHX0LBZqPvgKJi0Zg6aWIKLgS/jyoRRu6M54A="; - base00 = "0a0920"; - base01 = "13133a"; - base02 = "23255a"; - base03 = "333773"; - base04 = "4a5293"; - base05 = "606bac"; - base06 = "7986c5"; - base07 = "9aaae5"; - base08 = "f768a3"; - base09 = "f768a3"; - base0A = "faaea2"; - base0B = "faaea2"; - base0C = "258fc4"; - base0D = "258fc4"; - base0E = "f768a3"; - base0F = "f768a3"; -} diff --git a/modules/themes/eva/default.nix b/modules/themes/eva/default.nix deleted file mode 100644 index d2bd573..0000000 --- a/modules/themes/eva/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Eva"; - slug = "eva"; - author = "kjakapat (https://github.com/kjakapat)"; - description = "Wintery cyan color scheme"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/13/wallhaven-13m9z9.jpg"; - backgroundSha256 = "sha256-eWXpVrveYCG8cq3Pu/734DbO8tdofjUUIlrSNfOUTlM="; - base00 = "2a3b4d"; - base01 = "3d566f"; - base02 = "4b6988"; - base03 = "55799c"; - base04 = "7e90a3"; - base05 = "9fa2a6"; - base06 = "d6d7d9"; - base07 = "ffffff"; - base08 = "c4676c"; - base09 = "ff9966"; - base0A = "ffff66"; - base0B = "66ff66"; - base0C = "4b8f77"; - base0D = "15f4ee"; - base0E = "9c6cd3"; - base0F = "bb64a9"; -} diff --git a/modules/themes/everforest/default.nix b/modules/themes/everforest/default.nix deleted file mode 100644 index 7509bc3..0000000 --- a/modules/themes/everforest/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Everforest"; - slug = "everforest"; - author = "Sainnhe Park (https://github.com/sainnhe)"; - description = "Comfortable & pleasant color scheme (originally for Vim)"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/83/wallhaven-839ppy.png"; - backgroundSha256 = "sha256-xtnvDoIs+kKvRXo/L+ifq/q+yWNeqh1EUsaRkmDTtz4="; - base00 = "2f383e"; - base01 = "374247"; - base02 = "4a555b"; - base03 = "859289"; - base04 = "9da9a0"; - base05 = "d3c6aa"; - base06 = "e4e1cd"; - base07 = "fdf6e3"; - base08 = "7fbbb3"; - base09 = "d699b6"; - base0A = "dbbc7f"; - base0B = "83c092"; - base0C = "e69875"; - base0D = "a7c080"; - base0E = "e67e80"; - base0F = "eaedc8"; -} diff --git a/modules/themes/fairy-floss/default.nix b/modules/themes/fairy-floss/default.nix deleted file mode 100644 index 3013c06..0000000 --- a/modules/themes/fairy-floss/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Fairy Floss"; - slug = "fairy-floss"; - author = "sailorhg (https://github.com/sailorhg)"; - description = "A pastel/candy/daydream theme"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/rr/wallhaven-rrgydw.jpg"; - backgroundSha256 = "sha256-bv9c0RWYGT3EX8tfqzanQ8ZwVNcxbpmRYv5ymk7hido="; - base00 = "343145"; - base01 = "464258"; - base02 = "6A6483"; - base03 = "422013"; - base04 = "9673D3"; - base05 = "A0A0C0"; - base06 = "B5B2Bd"; - base07 = "F8F8F0"; - base08 = "CC6666"; - base09 = "FFEA00"; - base0A = "C2FFDF"; - base0B = "55b3cc"; - base0C = "8295D6"; - base0D = "FFB8D1"; - base0E = "C5A3FF"; - base0F = "96CBFE"; -} diff --git a/modules/themes/gigavolt/default.nix b/modules/themes/gigavolt/default.nix deleted file mode 100644 index bdd8768..0000000 --- a/modules/themes/gigavolt/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Gigavolt"; - slug = "gigavolt"; - author = "Aidan Swope (https://github.com/Whillikers)"; - description = "An electrifying color scheme. For use with mad science only"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/240/608/936/anime-original-bird-building-city-hd-wallpaper-d3ead31ac8d55c6d18129e0391683261.jpg"; - backgroundSha256 = "sha256-5H/VP5qzdJQgpzndacXt12wbFcfxaWDqAoZxFSetekg="; - base00 = "202126"; - base01 = "2d303d"; - base02 = "5a576e"; - base03 = "a1d2e6"; - base04 = "cad3ff"; - base05 = "e9e7e1"; - base06 = "eff0f9"; - base07 = "f2fbff"; - base08 = "ff661a"; - base09 = "19f988"; - base0A = "ffdc2d"; - base0B = "f2e6a9"; - base0C = "fb6acb"; - base0D = "40bfff"; - base0E = "ae94f9"; - base0F = "6187ff"; -} diff --git a/modules/themes/gruvbox-dark-hard/default.nix b/modules/themes/gruvbox-dark-hard/default.nix deleted file mode 100644 index 05321fa..0000000 --- a/modules/themes/gruvbox-dark-hard/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Gruvbox Dark, Hard"; - slug = "gruvbox-dark-hard"; - author = "Dawid Kurek (dawikur@gmail.com) and morhetz (https://github.com/morhetz/gruvbox)"; - description = "Retro groove color scheme (originally for Vim)"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/39/wallhaven-3911w9.jpg"; - backgroundSha256 = "sha256-dBmKkLR8yI1W7d9IRTOaErHf0KApSq0UsY5LWxAaSuA="; - base00 = "1d2021"; - base01 = "3c3836"; - base02 = "504945"; - base03 = "665c54"; - base04 = "bdae93"; - base05 = "d5c4a1"; - base06 = "ebdbb2"; - base07 = "fbf1c7"; - base08 = "fb4934"; - base09 = "fe8019"; - base0A = "fabd2f"; - base0B = "b8bb26"; - base0C = "8ec07c"; - base0D = "83a598"; - base0E = "d3869b"; - base0F = "d65d0e"; -} diff --git a/modules/themes/gruvbox-dark-medium/default.nix b/modules/themes/gruvbox-dark-medium/default.nix deleted file mode 100644 index fcc1c8e..0000000 --- a/modules/themes/gruvbox-dark-medium/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Gruvbox Dark, Medium"; - slug = "gruvbox-dark-medium"; - author = "Dawid Kurek (dawikur@gmail.com) and morhetz (https://github.com/morhetz/gruvbox)"; - description = "Retro groove color scheme (originally for Vim)"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/39/wallhaven-3911w9.jpg"; - backgroundSha256 = "sha256-dBmKkLR8yI1W7d9IRTOaErHf0KApSq0UsY5LWxAaSuA="; - base00 = "282828"; - base01 = "3c3836"; - base02 = "504945"; - base03 = "665c54"; - base04 = "bdae93"; - base05 = "d5c4a1"; - base06 = "ebdbb2"; - base07 = "fbf1c7"; - base08 = "fb4934"; - base09 = "fe8019"; - base0A = "fabd2f"; - base0B = "b8bb26"; - base0C = "8ec07c"; - base0D = "83a598"; - base0E = "d3869b"; - base0F = "d65d0e"; -} diff --git a/modules/themes/gruvbox-light-hard/default.nix b/modules/themes/gruvbox-light-hard/default.nix deleted file mode 100644 index 4ed115e..0000000 --- a/modules/themes/gruvbox-light-hard/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Gruvbox Light, Hard"; - slug = "gruvbox-light-hard"; - author = "Dawid Kurek (dawikur@gmail.com) and morhetz (https://github.com/morhetz/gruvbox)"; - description = "Retro groove color scheme (originally for Vim)"; - polarity = "light"; - backgroundUrl = "https://w.wallhaven.cc/full/dp/wallhaven-dppjk3.jpg"; - backgroundSha256 = "sha256-12U/Z4HGv31MihexuwCnTX6mcfOvkdUsMghahKzoPBE="; - base00 = "f9f5d7"; - base01 = "ebdbb2"; - base02 = "d5c4a1"; - base03 = "bdae93"; - base04 = "665c54"; - base05 = "504945"; - base06 = "3c3836"; - base07 = "282828"; - base08 = "9d0006"; - base09 = "af3a03"; - base0A = "b57614"; - base0B = "79740e"; - base0C = "427b58"; - base0D = "076678"; - base0E = "8f3f71"; - base0F = "d65d0e"; -} diff --git a/modules/themes/gruvbox-light-medium/default.nix b/modules/themes/gruvbox-light-medium/default.nix deleted file mode 100644 index e0bc5f2..0000000 --- a/modules/themes/gruvbox-light-medium/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Gruvbox Light, Medium"; - slug = "gruvbox-light-medium"; - author = "Dawid Kurek (dawikur@gmail.com) and morhetz (https://github.com/morhetz/gruvbox)"; - description = "Retro groove color scheme (originally for Vim)"; - polarity = "light"; - backgroundUrl = "https://w.wallhaven.cc/full/dp/wallhaven-dppjk3.jpg"; - backgroundSha256 = "sha256-12U/Z4HGv31MihexuwCnTX6mcfOvkdUsMghahKzoPBE="; - base00 = "fbf1c7"; - base01 = "ebdbb2"; - base02 = "d5c4a1"; - base03 = "bdae93"; - base04 = "665c54"; - base05 = "504945"; - base06 = "3c3836"; - base07 = "282828"; - base08 = "9d0006"; - base09 = "af3a03"; - base0A = "b57614"; - base0B = "79740e"; - base0C = "427b58"; - base0D = "076678"; - base0E = "8f3f71"; - base0F = "d65d0e"; -} diff --git a/modules/themes/helios/default.nix b/modules/themes/helios/default.nix deleted file mode 100644 index 01134d7..0000000 --- a/modules/themes/helios/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Helios"; - slug = "helios"; - author = "Alex Meyer (https://github.com/reyemxela)"; - description = "Somewhat inspired by gruvbox; a dark, saturated base16 scheme with nice clean colors"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/one-last-time-8h.jpg"; - backgroundSha256 = "sha256-KDp90rltTtMEiQtsA8VPq2Msi/D51mPPEdo1tiRIo7E="; - base00 = "1d2021"; - base01 = "383c3e"; - base02 = "53585b"; - base03 = "6f7579"; - base04 = "cdcdcd"; - base05 = "d5d5d5"; - base06 = "dddddd"; - base07 = "e5e5e5"; - base08 = "d72638"; - base09 = "eb8413"; - base0A = "f19d1a"; - base0B = "88b92d"; - base0C = "1ba595"; - base0D = "1e8bac"; - base0E = "be4264"; - base0F = "c85e0d"; -} diff --git a/modules/themes/henna/default.nix b/modules/themes/henna/default.nix deleted file mode 100644 index 0248c03..0000000 --- a/modules/themes/henna/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Henna"; - slug = "henna"; - author = "httpsterio (https://github.com/httpsterio/vscode-henna)"; - description = "Henna is a colour theme inspired by a certain green-eyed redhead girl"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/71/196/981/digital-art-minimalism-nature-hills-wallpaper-88f64d4860b08ca8d02c41def8f2349a.jpg"; - backgroundSha256 = "sha256-0skcwkVzZ3VdLImlMUT9sab3631vTttKk8LupTqM71Q="; - base00 = "10151a"; - base01 = "1B1F23"; - base02 = "2c313a"; - base03 = "3B4048"; - base04 = "495162"; - base05 = "606F73"; - base06 = "6B717D"; - base07 = "f8f8f0"; - base08 = "e74c3c"; - base09 = "fd7c56"; - base0A = "9cd230"; - base0B = "53df83"; - base0C = "1abc9c"; - base0D = "56b5c2"; - base0E = "FFB8D1"; - base0F = "ECBE7B"; -} diff --git a/modules/themes/horizon-dark/default.nix b/modules/themes/horizon-dark/default.nix deleted file mode 100644 index ac1adda..0000000 --- a/modules/themes/horizon-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Horizon Dark"; - slug = "horizon-dark"; - author = "Michaël Ball (http://github.com/michael-ball/)"; - description = "A beautifully warm theme (originally for Visual Studio Code)"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/966/951/802/digital-digital-art-artwork-illustration-fantasy-art-hd-wallpaper-4856fd282030fc78505c71cea802646a.jpg"; - backgroundSha256 = "sha256-a09gjqeVRB6JlDvis+QRDquNuefDAj/NHw9FHAj8yys="; - base00 = "1C1E26"; - base01 = "232530"; - base02 = "2E303E"; - base03 = "6F6F70"; - base04 = "9DA0A2"; - base05 = "CBCED0"; - base06 = "DCDFE4"; - base07 = "E3E6EE"; - base08 = "E93C58"; - base09 = "E58D7D"; - base0A = "EFB993"; - base0B = "EFAF8E"; - base0C = "24A8B4"; - base0D = "DF5273"; - base0E = "B072D1"; - base0F = "E4A382"; -} diff --git a/modules/themes/io/default.nix b/modules/themes/io/default.nix deleted file mode 100644 index 4cecd67..0000000 --- a/modules/themes/io/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - scheme = "Io"; - slug = "io"; - author = "LibrePhoenix (https://github.com/librephoenix)"; - credits = "Forked from Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77))"; - description = "Former flagship theme of the LibrePhoenix Channel, named after one of Jupiter's moons"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/aurora-s-embrace-a-borealis-beauty-in-anime-ub.jpg"; - backgroundSha256 = "sha256-GjM/Bu0zispdtPCFPzAk+zGlKYYg5XwTTxZ0TXOW9Fg="; - base00 = "1a181a"; - base01 = "262326"; - base02 = "302c30"; - base03 = "463f47"; - base04 = "bfaab7"; - base05 = "dbd7da"; - base06 = "dbd7da"; - base07 = "faf7f9"; - base08 = "de5b44"; - base09 = "e39755"; - base0A = "a84a73"; - base0B = "c965bf"; - base0C = "9c5fce"; - base0D = "0e85b9"; - base0E = "6ac38f"; - base0F = "a3ab5a"; -} diff --git a/modules/themes/isotope/default.nix b/modules/themes/isotope/default.nix deleted file mode 100644 index e120151..0000000 --- a/modules/themes/isotope/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Isotope"; - slug = "isotope"; - author = "Jan T. Sott (https://github.com/idleberg)"; - description = "Vibrant atomic color scheme"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/108/140/869/digital-digital-art-artwork-fantasy-art-drawing-hd-wallpaper-d8b62d28c0f06c48d03c114ec8f2b4aa.jpg"; - backgroundSha256 = "sha256-zYzUBaCvYVgmfw1/irgleRpTIrm4dsP8F3RmR8m/DBk="; - base00 = "000000"; - base01 = "404040"; - base02 = "606060"; - base03 = "808080"; - base04 = "c0c0c0"; - base05 = "d0d0d0"; - base06 = "e0e0e0"; - base07 = "ffffff"; - base08 = "ff0000"; - base09 = "ff9900"; - base0A = "ff0099"; - base0B = "33ff00"; - base0C = "00ffff"; - base0D = "0066ff"; - base0E = "cc00ff"; - base0F = "3300ff"; -} diff --git a/modules/themes/manegarm/default.nix b/modules/themes/manegarm/default.nix deleted file mode 100644 index 50fb06f..0000000 --- a/modules/themes/manegarm/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Manegarm"; - slug = "manegarm"; - author = "kenranunderscore (https://github.com/kenranunderscore)"; - description = "A dark theme with autumn-inspired colors"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/86/440/1017/digital-digital-art-artwork-illustration-drawing-hd-wallpaper-60cb37b6dd08e0d36729f856e7bcb083.jpg"; - backgroundSha256 = "sha256-JdL2TfIJCQdzmoex/uqJzJJ1V8nVmTWRBC296O8ynnw="; - base00 = "1c1408"; - base01 = "241c0a"; - base02 = "351a0f"; - base03 = "422013"; - base04 = "5b8512"; - base05 = "73797e"; - base06 = "9ca0a4"; - base07 = "dfdfdf"; - base08 = "ff4e00"; - base09 = "ff7000"; - base0A = "7cb518"; - base0B = "ffbf00"; - base0C = "0075c4"; - base0D = "d72638"; - base0E = "76597b"; - base0F = "dbc077"; -} diff --git a/modules/themes/material-vivid/default.nix b/modules/themes/material-vivid/default.nix deleted file mode 100644 index a5f762d..0000000 --- a/modules/themes/material-vivid/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Material Vivid"; - slug = "material-vivid"; - author = "joshyrobot (https://github.com/joshyrobot)"; - description = "A more vivid base16 material theme"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/e7/wallhaven-e7z71l.jpg"; - backgroundSha256 = "sha256-LBgsEyiFJUv1FT26dq2ACIFtQZXTIeKtEk92cLoNv4g="; - base00 = "202124"; - base01 = "27292c"; - base02 = "323639"; - base03 = "44464d"; - base04 = "676c71"; - base05 = "80868b"; - base06 = "9e9e9e"; - base07 = "ffffff"; - base08 = "f44336"; - base09 = "ff9800"; - base0A = "ffeb3b"; - base0B = "00e676"; - base0C = "00bcd4"; - base0D = "2196f3"; - base0E = "673ab7"; - base0F = "8d6e63"; -} diff --git a/modules/themes/miramare/default.nix b/modules/themes/miramare/default.nix deleted file mode 100644 index 8205e8d..0000000 --- a/modules/themes/miramare/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Miramare"; - slug = "miramare"; - author = "franbach (https://github.com/franbach/miramare)"; - description = "Comfortable & pleasant color scheme (originally for Vim)"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/v9/wallhaven-v9qy9l.jpg"; - backgroundSha256 = "sha256-3Yo3qdzMRQGh/C3Qo5gpS2V1D4u1MptmqsXb+QO9EsE="; - base00 = "0d1001"; - base01 = "241c0a"; - base02 = "3c3836"; - base03 = "5b5b5b"; - base04 = "7c6f64"; - base05 = "928374"; - base06 = "d8caac"; - base07 = "e6d6ac"; - base08 = "e68183"; - base09 = "e39b7b"; - base0A = "d9bb80"; - base0B = "87af87"; - base0C = "0075c4"; - base0D = "89beba"; - base0E = "87af87"; - base0F = "87c095"; -} diff --git a/modules/themes/monokai/default.nix b/modules/themes/monokai/default.nix deleted file mode 100644 index 0150924..0000000 --- a/modules/themes/monokai/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Monokai"; - slug = "monokai"; - author = "Wimer Hazenberg (https://monokai.pro/)"; - description = "Port of monokai for base16"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/xl/wallhaven-xl225z.png"; - backgroundSha256 = "sha256-zQXOIdWGxvwh6KFeiWwfRFNqIHtWzCsVHK8ondcYi2w="; - base00 = "272822"; - base01 = "383830"; - base02 = "49483e"; - base03 = "75715e"; - base04 = "a59f85"; - base05 = "f8f8f2"; - base06 = "f5f4f1"; - base07 = "f9f8f5"; - base08 = "f92672"; - base09 = "fd971f"; - base0A = "f4bf75"; - base0B = "a6e22e"; - base0C = "a1efe4"; - base0D = "66d9ef"; - base0E = "ae81ff"; - base0F = "cc6633"; -} diff --git a/modules/themes/nord/default.nix b/modules/themes/nord/default.nix deleted file mode 100644 index 7d875e0..0000000 --- a/modules/themes/nord/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Nord"; - slug = "nord"; - author = "Sven Greb (https://github.com/nordtheme)"; - description = "An arctic, north-bluish color palette"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/976/74/465/multiple-display-mountains-snow-nature-wallpaper-c1b4ba2a902ec5b27032d3c4aefe604d.jpg"; - backgroundSha256 = "sha256-+zlCkbmA6GwJStrL1+BP08GezbhDB07TTYBgu86xWOw="; - base00 = "2E3440"; - base01 = "3B4252"; - base02 = "434C5E"; - base03 = "4C566A"; - base04 = "D8DEE9"; - base05 = "E5E9F0"; - base06 = "ECEFF4"; - base07 = "8FBCBB"; - base08 = "BF616A"; - base09 = "D08770"; - base0A = "EBCB8B"; - base0B = "A3BE8C"; - base0C = "88C0D0"; - base0D = "81A1C1"; - base0E = "B48EAD"; - base0F = "5E81AC"; -} diff --git a/modules/themes/oceanic-next/default.nix b/modules/themes/oceanic-next/default.nix deleted file mode 100644 index 2b3c887..0000000 --- a/modules/themes/oceanic-next/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Oceanic Next"; - slug = "oceanic-next"; - author = "Dmytro Voronianski (https://github.com/voronianski/oceanic-next-color-scheme)"; - description = "Colorful blue color scheme (originally for Sublime Text 2/3)"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/1024/162/573/nature-beach-ocean-sea-wallpaper-c8660d98d0b02c48b02cb11e3882646a.jpg"; - backgroundSha256 = "sha256-F67ItsyBFzcU3KNvqwL8DEeXHZlLpmg8xRT8Fr0dolI="; - base00 = "1B2B34"; - base01 = "343D46"; - base02 = "4F5B66"; - base03 = "65737E"; - base04 = "A7ADBA"; - base05 = "C0C5CE"; - base06 = "CDD3DE"; - base07 = "D8DEE9"; - base08 = "EC5f67"; - base09 = "F99157"; - base0A = "FAC863"; - base0B = "99C794"; - base0C = "5FB3B3"; - base0D = "6699CC"; - base0E = "C594C5"; - base0F = "AB7967"; -} diff --git a/modules/themes/old-hope/default.nix b/modules/themes/old-hope/default.nix deleted file mode 100644 index 21a4886..0000000 --- a/modules/themes/old-hope/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Old Hope"; - slug = "old-hope"; - author = "mohkale (https://github.com/mohkale/an-old-hope-theme)"; - description = "A theme inspired by a galaxy far far away..."; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/218/1018/501/star-wars-star-wars-the-rise-of-skywalker-jedi-kylo-ren-lightsaber-hd-wallpaper-534b63fd3d29abf5efe66267283ba8c8.jpg"; - backgroundSha256 = "sha256-3Z8kpA+JBs3nQhe+zUZF0zoXFGbJCfePp3/RzpcuN6Q="; - base00 = "1c1d20"; - base01 = "202328"; - base02 = "23272e"; - base03 = "3f444a"; - base04 = "5B6268"; - base05 = "686b78"; - base06 = "9ca0a4"; - base07 = "cbccd1"; - base08 = "ea3d54"; - base09 = "ee7b29"; - base0A = "fedd38"; - base0B = "78bd65"; - base0C = "78bd65"; - base0D = "4fb3d8"; - base0E = "b978ab"; - base0F = "4fb3d8"; -} diff --git a/modules/themes/orichalcum/README.org b/modules/themes/orichalcum/README.org deleted file mode 100644 index 7ad2484..0000000 --- a/modules/themes/orichalcum/README.org +++ /dev/null @@ -1,8 +0,0 @@ -#+title: Orichalcum -#+author: Emmet - -"Orichalcum" theme, which is a fork of Uwunicorn originally by Fernando Marques ([[https://github.com/RakkiUwU]]) and Gabriel Fontes ([[https://github.com/Misterio77]]). - -[[https://raw.githubusercontent.com/librephoenix/nixos-config-screenshots/main/hyprland/uwunicorn.png]] - -[[https://wallpapers.com/images/hd/alluring-sunset-anime-scenery-r2gmgtcp8h9iwo9u.webp][Background Link]] diff --git a/modules/themes/orichalcum/default.nix b/modules/themes/orichalcum/default.nix deleted file mode 100644 index f438ce9..0000000 --- a/modules/themes/orichalcum/default.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - scheme = "Orichalcum"; - slug = "orichalcum"; - author = "LibrePhoenix (https://github.com/librephoenix)"; - credits = "Forked from Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77))"; - description = "Flagship theme of the LibrePhoenix Channel, named after a mythical metal"; - polarity = "dark"; - backgroundUrl = "https://wallpapers.com/images/hd/alluring-sunset-anime-scenery-r2gmgtcp8h9iwo9u.webp"; - backgroundSha256 = "sha256-jOd9SznQTa8AoO6cZGy0LhN8lBadrRf60FvyCEs2tLo="; - base00 = "#1a181a"; - base01 = "#262326"; - base02 = "#302c30"; - base03 = "#463f47"; - base04 = "#bfaab7"; - base05 = "#dbd7da"; - base06 = "#dbd7da"; - base07 = "#faf7f9"; - base08 = "#da4747"; - base09 = "#fd6d35"; - base0A = "#ffa846"; - base0B = "#fbc024"; - base0C = "#8049d5"; - base0D = "#b368ec"; - base0E = "#e27fc6"; - base0F = "#e64464"; -} diff --git a/modules/themes/outrun-dark/default.nix b/modules/themes/outrun-dark/default.nix deleted file mode 100644 index dd853ea..0000000 --- a/modules/themes/outrun-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Outrun Dark"; - slug = "outrun-dark"; - author = "Hugo Delahousse (https://github.com/hugodelahousse/)"; - description = "Color scheme inspired by the synthwave music scene"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/586/965/67/night-sky-illustration-futuristic-art-night-wallpaper-88366d08c0d00c08207cf12ef892b49a.jpg"; - backgroundSha256 = "sha256-wySC8BjvJKZAnbGOeyyp1xwt/EMAwsTON0os6n1/fp8="; - base00 = "00002A"; - base01 = "20204A"; - base02 = "30305A"; - base03 = "50507A"; - base04 = "B0B0DA"; - base05 = "D0D0FA"; - base06 = "E0E0FF"; - base07 = "F5F5FF"; - base08 = "FF4242"; - base09 = "FC8D28"; - base0A = "F3E877"; - base0B = "59F176"; - base0C = "0EF0F0"; - base0D = "66B0FF"; - base0E = "F10596"; - base0F = "F003EF"; -} diff --git a/modules/themes/selenized-dark/default.nix b/modules/themes/selenized-dark/default.nix deleted file mode 100644 index 170d8a0..0000000 --- a/modules/themes/selenized-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Selenized Dark"; - slug = "selenized-dark"; - author = "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali (https://github.com/ali-githb)"; - description = "Solarized redesigned: fine-tuned color palette for programmers with focus on readability"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/474/140/1011/stars-sea-clouds-night-wallpaper-7bede9caa0ccfc6d8a1eb0759c9972b0.jpg"; - backgroundSha256 = "sha256-ugnjfKCIpyH0enWB5l52j+1pWG1FwX8X5BeRh68NRuE="; - base00 = "103c48"; - base01 = "184956"; - base02 = "2d5b69"; - base03 = "72898f"; - base04 = "72898f"; - base05 = "adbcbc"; - base06 = "cad8d9"; - base07 = "cad8d9"; - base08 = "fa5750"; - base09 = "ed8649"; - base0A = "dbb32d"; - base0B = "75b938"; - base0C = "41c7b9"; - base0D = "4695f7"; - base0E = "af88eb"; - base0F = "f275be"; -} diff --git a/modules/themes/selenized-light/default.nix b/modules/themes/selenized-light/default.nix deleted file mode 100644 index 7f8aa2f..0000000 --- a/modules/themes/selenized-light/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Selenized Light"; - slug = "selenized-light"; - author = "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali (https://github.com/ali-githb)"; - description = "Solarized redesigned: fine-tuned color palette for programmers with focus on readability"; - polarity = "light"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/790/734/537/landscape-digital-art-coast-sky-wallpaper-2fbce811ee788644e4f742a5f338be69.jpg"; - backgroundSha256 = "sha256-QFWU0b/dKHA1duzpDFZ4PfTt1ku4ZnekUnUZKX1drxQ="; - base00 = "fbf3db"; - base01 = "ece3cc"; - base02 = "d5cdb6"; - base03 = "909995"; - base04 = "909995"; - base05 = "53676d"; - base06 = "3a4d53"; - base07 = "3a4d53"; - base08 = "cc1729"; - base09 = "bc5819"; - base0A = "a78300"; - base0B = "428b00"; - base0C = "00978a"; - base0D = "006dce"; - base0E = "825dc0"; - base0F = "c44392"; -} diff --git a/modules/themes/solarized-dark/default.nix b/modules/themes/solarized-dark/default.nix deleted file mode 100644 index b8770b6..0000000 --- a/modules/themes/solarized-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Solarized Dark"; - slug = "solarized-dark"; - author = "Ethan Schoonover (https://ethanschoonover.com/), modified by aramisgithub)"; - description = "Precision colors for machines and people"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/474/140/1011/stars-sea-clouds-night-wallpaper-7bede9caa0ccfc6d8a1eb0759c9972b0.jpg"; - backgroundSha256 = "sha256-ugnjfKCIpyH0enWB5l52j+1pWG1FwX8X5BeRh68NRuE="; - base00 = "002b36"; - base01 = "073642"; - base02 = "586e75"; - base03 = "657b83"; - base04 = "839496"; - base05 = "93a1a1"; - base06 = "eee8d5"; - base07 = "fdf6e3"; - base08 = "dc322f"; - base09 = "cb4b16"; - base0A = "b58900"; - base0B = "859900"; - base0C = "2aa198"; - base0D = "268bd2"; - base0E = "6c71c4"; - base0F = "d33682"; -} diff --git a/modules/themes/solarized-light/default.nix b/modules/themes/solarized-light/default.nix deleted file mode 100644 index f2d2989..0000000 --- a/modules/themes/solarized-light/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Solarized Light"; - slug = "solarized-light"; - author = "Ethan Schoonover (https://ethanschoonover.com/), modified by aramisgithub)"; - description = "Precision colors for machines and people"; - polarity = "light"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/790/734/537/landscape-digital-art-coast-sky-wallpaper-2fbce811ee788644e4f742a5f338be69.jpg"; - backgroundSha256 = "sha256-QFWU0b/dKHA1duzpDFZ4PfTt1ku4ZnekUnUZKX1drxQ="; - base00 = "fdf6e3"; - base01 = "eee8d5"; - base02 = "93a1a1"; - base03 = "839496"; - base04 = "657b83"; - base05 = "586e75"; - base06 = "073642"; - base07 = "002b36"; - base08 = "dc322f"; - base09 = "cb4b16"; - base0A = "b58900"; - base0B = "859900"; - base0C = "2aa198"; - base0D = "268bd2"; - base0E = "6c71c4"; - base0F = "d33682"; -} diff --git a/modules/themes/spaceduck/default.nix b/modules/themes/spaceduck/default.nix deleted file mode 100644 index 36d25b2..0000000 --- a/modules/themes/spaceduck/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Spaceduck"; - slug = "spaceduck"; - author = "Guillermo Rodriguez (https://github.com/pineapplegiant), packaged by Gabriel Fontes (https://github.com/Misterio77)"; - description = "An intergalactic space theme for Vim, Terminal, and more!"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/6d/wallhaven-6d5k6x.jpg"; - backgroundSha256 = "sha256-+xl4H3UiVmMRNvMhIlaLdVTYYqnSyCTSX2UOTGsDQ8c="; - base00 = "16172d"; - base01 = "1b1c36"; - base02 = "30365F"; - base03 = "686f9a"; - base04 = "818596"; - base05 = "ecf0c1"; - base06 = "c1c3cc"; - base07 = "ffffff"; - base08 = "e33400"; - base09 = "e39400"; - base0A = "f2ce00"; - base0B = "5ccc96"; - base0C = "00a3cc"; - base0D = "7a5ccc"; - base0E = "b3a1e6"; - base0F = "ce6f8f"; -} diff --git a/modules/themes/stella/default.nix b/modules/themes/stella/default.nix deleted file mode 100644 index 524bd2c..0000000 --- a/modules/themes/stella/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Stella"; - slug = "stella"; - author = "Shrimpram (https://github.com/Shrimpram)"; - description = "A regal purple color scheme based on a dog named Stella"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/662/963/756/artwork-night-stars-sailing-ship-wallpaper-f8e6cdf800802ca8b0acb18ea86274ca.jpg"; - backgroundSha256 = "sha256-ZdzYsYawW2pINFG8bHLBd62iyD4p/9Iw09H3pB0SUyw="; - base00 = "2B213C"; - base01 = "362B48"; - base02 = "4D4160"; - base03 = "655978"; - base04 = "7F7192"; - base05 = "998BAD"; - base06 = "B4A5C8"; - base07 = "EBDCFF"; - base08 = "C79987"; - base09 = "8865C6"; - base0A = "C7C691"; - base0B = "ACC79B"; - base0C = "9BC7BF"; - base0D = "A5AAD4"; - base0E = "C594FF"; - base0F = "C7AB87"; -} diff --git a/modules/themes/summerfruit-dark/default.nix b/modules/themes/summerfruit-dark/default.nix deleted file mode 100644 index 489c91b..0000000 --- a/modules/themes/summerfruit-dark/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Summerfruit Dark"; - slug = "summerfruit-dark"; - author = "Christopher Corley (https://christop.club/)"; - description = "Fruity vibrant color scheme with neon colors"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/rr/wallhaven-rrow61.png"; - backgroundSha256 = "sha256-/3k+6paAH2Z36f5g4eeK62+dXF+8szDj4EO8vXYRg8o="; - base00 = "151515"; - base01 = "202020"; - base02 = "303030"; - base03 = "505050"; - base04 = "B0B0B0"; - base05 = "D0D0D0"; - base06 = "E0E0E0"; - base07 = "FFFFFF"; - base08 = "FF0086"; - base09 = "FD8900"; - base0A = "ABA800"; - base0B = "00C918"; - base0C = "1FAAAA"; - base0D = "3777E6"; - base0E = "AD00A1"; - base0F = "CC6633"; -} diff --git a/modules/themes/tomorrow-night/default.nix b/modules/themes/tomorrow-night/default.nix deleted file mode 100644 index 3061523..0000000 --- a/modules/themes/tomorrow-night/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Tomorrow Night"; - slug = "tomorrow-night"; - author = "Chris Kempson (https://chriskempson.com)"; - description = "A colourful theme with muted colours and sensible syntax highlighting"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/28/wallhaven-28867y.png"; - backgroundSha256 = "sha256-G8wLZitUlaquirgCtHCFu6dQHJophD8/c7INNMhh49M="; - base00 = "1d1f21"; - base01 = "282a2e"; - base02 = "373b41"; - base03 = "969896"; - base04 = "b4b7b4"; - base05 = "c5c8c6"; - base06 = "e0e0e0"; - base07 = "ffffff"; - base08 = "cc6666"; - base09 = "de935f"; - base0A = "f0c674"; - base0B = "b5bd68"; - base0C = "8abeb7"; - base0D = "81a2be"; - base0E = "b294bb"; - base0F = "a3685a"; -} diff --git a/modules/themes/twilight/default.nix b/modules/themes/twilight/default.nix deleted file mode 100644 index 1c34afb..0000000 --- a/modules/themes/twilight/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Twilight"; - slug = "twilight"; - author = "David Hart (https://github.com/hartbit)"; - description = "A dark desaturated color scheme (ported from TextMate)"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/q6/wallhaven-q6m557.png"; - backgroundSha256 = "sha256-5s6cyM2rv/uFW1upqruYiqcofEakdHylAEy65OfArZ4="; - base00 = "1e1e1e"; - base01 = "323537"; - base02 = "464b50"; - base03 = "5f5a60"; - base04 = "838184"; - base05 = "a7a7a7"; - base06 = "c3c3c3"; - base07 = "ffffff"; - base08 = "cf6a4c"; - base09 = "cda869"; - base0A = "f9ee98"; - base0B = "8f9d6a"; - base0C = "afc4db"; - base0D = "7587a6"; - base0E = "9b859d"; - base0F = "9b703f"; -} diff --git a/modules/themes/ubuntu/default.nix b/modules/themes/ubuntu/default.nix deleted file mode 100644 index 190f701..0000000 --- a/modules/themes/ubuntu/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Ubuntu"; - slug = "ubuntu"; - author = "Based on https://design.ubuntu.com/brand/colour-palette, adapted to base16 by librephoenix (https://github.com/librephoenix)";; - description = "Orange and purple color scheme based on the Ubuntu brand colors"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/download/sea-of-dreamscape-r4-1920x1080.jpg"; - backgroundSha256 = "sha256-5TPwZAQekK1Aq2YdomcJ0irGmIXVPUpgxRwuEetthYw="; - base00 = "2C001E"; - base01 = "411934"; - base02 = "56334B"; - base03 = "6B4C61"; - base04 = "806678"; - base05 = "957F8E"; - base06 = "DFE2E5"; - base07 = "A08C99"; - base08 = "E95420"; - base09 = "F7C3B1"; - base0A = "AEC795"; - base0B = "95C7A4"; - base0C = "95AEA1"; - base0D = "772953"; - base0E = "7E4770"; - base0F = "C79595"; -} diff --git a/modules/themes/uwunicorn/default.nix b/modules/themes/uwunicorn/default.nix deleted file mode 100644 index 6cec64e..0000000 --- a/modules/themes/uwunicorn/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "UwUnicorn"; - slug = "uwunicorn"; - author = "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77), modified by librephoenix (https://librephoenix.com)"; - description = "Purple unicorn-inspired theme"; - polarity = "dark"; - backgroundUrl = "https://r4.wallpaperflare.com/wallpaper/30/586/460/artwork-fantasy-art-digital-art-forest-wallpaper-3cdadbae5dd4b0ca4dd008fd72d13bf3.jpg"; - backgroundSha256 = "sha256-vNBappcgqa8O2aj+Zz4aBrSsD97v0dDXQDeyC4o0gpc="; - base00 = "241b26"; - base01 = "2f2a3f"; - base02 = "46354a"; - base03 = "6c3c62"; - base04 = "7e5f83"; - base05 = "eed5d9"; - base06 = "d9c2c6"; - base07 = "e4ccd0"; - base08 = "de5b44"; - base09 = "e39755"; - base0A = "a84a73"; - base0B = "c965bf"; - base0C = "9c5fce"; - base0D = "6a9eb5"; - base0E = "6ac38f"; - base0F = "a3ab5a"; -} diff --git a/modules/themes/windows-95/default.nix b/modules/themes/windows-95/default.nix deleted file mode 100644 index 96239b3..0000000 --- a/modules/themes/windows-95/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Windows 95"; - slug = "windows-95"; - author = "Fergus Collins (https://github.com/C-Fergus)"; - description = "Color scheme reminiscent of a certain operating system from 1995..."; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/01/wallhaven-01e6xw.jpg"; - backgroundSha256 = "sha256-xgMi6fH3yMGk0txu0p5x01OY9qC4x597vEgSy/G9TBY="; - base00 = "000000"; - base01 = "1C1C1C"; - base02 = "383838"; - base03 = "545454"; - base04 = "7e7e7e"; - base05 = "a8a8a8"; - base06 = "d2d2d2"; - base07 = "fcfcfc"; - base08 = "fc5454"; - base09 = "a85400"; - base0A = "fcfc54"; - base0B = "54fc54"; - base0C = "54fcfc"; - base0D = "5454fc"; - base0E = "fc54fc"; - base0F = "00a800"; -} diff --git a/modules/themes/woodland/default.nix b/modules/themes/woodland/default.nix deleted file mode 100644 index d59b2e7..0000000 --- a/modules/themes/woodland/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "Woodland"; - slug = "woodland"; - author = "Jay Cornwall (https://jcornwall.com)"; - description = "Forest inspired theme"; - polarity = "dark"; - backgroundUrl = "https://images.hdqwalls.com/wallpapers/beyond-the-railroad-crossing-5k-5b.jpg"; - backgroundSha256 = "sha256-lbmtPDD0+PP7UXy6MO0UdFtQIwsnvNUczolqTZW7k88="; - base00 = "231e18"; - base01 = "302b25"; - base02 = "48413a"; - base03 = "9d8b70"; - base04 = "b4a490"; - base05 = "cabcb1"; - base06 = "d7c8bc"; - base07 = "e4d4c8"; - base08 = "d35c5c"; - base09 = "ca7f32"; - base0A = "e0ac16"; - base0B = "b7ba53"; - base0C = "6eb958"; - base0D = "88a4d3"; - base0E = "bb90e2"; - base0F = "b49368"; -} diff --git a/modules/themes/xcode-dusk/default.nix b/modules/themes/xcode-dusk/default.nix deleted file mode 100644 index 496239f..0000000 --- a/modules/themes/xcode-dusk/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - scheme = "XCode Dusk"; - slug = "xcode-dusk"; - author = "Elsa Gonsiorowski (https://github.com/gonsie)"; - description = "Port of the Dusk theme from XCode"; - polarity = "dark"; - backgroundUrl = "https://w.wallhaven.cc/full/yx/wallhaven-yxe85x.jpg"; - backgroundSha256 = "sha256-z/attvjcG1nReBjCVBY/JS2Eu2U44+Pd2OtIF1dPb1M="; - base00 = "282B35"; - base01 = "3D4048"; - base02 = "53555D"; - base03 = "686A71"; - base04 = "7E8086"; - base05 = "939599"; - base06 = "A9AAAE"; - base07 = "BEBFC2"; - base08 = "B21889"; - base09 = "786DC5"; - base0A = "438288"; - base0B = "DF0002"; - base0C = "00A0BE"; - base0D = "790EAD"; - base0E = "B21889"; - base0F = "C77C48"; -} diff --git a/modules/user/README.org b/modules/user/README.org deleted file mode 100644 index 3f0347e..0000000 --- a/modules/user/README.org +++ /dev/null @@ -1,14 +0,0 @@ -#+title: User-level Nix Modules -#+author: Emmet - -Separate Nix files can be imported as modules using an import block: -#+BEGIN_SRC nix -imports = [ import1.nix - import2.nix - ... - ]; -#+END_SRC - -Modules in this directory are used are user-level configurations. - -# TODO add list of all options diff --git a/modules/user/art/default.nix b/modules/user/art/default.nix deleted file mode 100644 index a667e6d..0000000 --- a/modules/user/art/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.art; -in { - options = { - userSettings.art = { - enable = lib.mkEnableOption "Enable art apps"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - krita - pinta - inkscape - libresprite - upscayl - material-maker - google-fonts - fontforge-gtk - ]; - userSettings.blender.enable = true; - xdg.mimeApps.defaultApplications = lib.mkForce { - "image/svg+xml" = ["org.inkscape.Inkscape.desktop"]; - }; - }; -} diff --git a/modules/user/blender/applyprefs.py b/modules/user/blender/applyprefs.py deleted file mode 100644 index f7405d0..0000000 --- a/modules/user/blender/applyprefs.py +++ /dev/null @@ -1,28 +0,0 @@ -import os -import bpy - -# load prefs -prefs = bpy.context.preferences - -# ui -prefs.view.ui_scale = 1.2 -prefs.view.show_tooltips_python = True -prefs.view.render_display_type = 'SCREEN' -prefs.view.filebrowser_display_type = 'SCREEN' -prefs.view.gizmo_size_navigate_v3d = 50 - -# status bar -prefs.view.show_statusbar_stats = True -prefs.view.show_statusbar_scene_duration = True -prefs.view.show_statusbar_memory = True -prefs.view.show_statusbar_vram = True -prefs.view.color_picker_type = 'SQUARE_SV' - -# performance -prefs.system.viewport_aa = 'FXAA' - -# addons -bpy.ops.preferences.addon_enable(module="node_wrangler") -bpy.ops.preferences.addon_enable(module="rigify") -bpy.ops.preferences.addon_install(filepath=os.path.expanduser("~/.config/blender/extensions/node_pie.zip"),enable_on_install=True) -bpy.ops.extensions.package_install_files(filepath=os.path.expanduser("~/.config/blender/extensions/bool_tool.zip"),repo="user_default",enable_on_install=True) diff --git a/modules/user/blender/default.nix b/modules/user/blender/default.nix deleted file mode 100644 index c6a6c89..0000000 --- a/modules/user/blender/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.blender; -in { - options = { - userSettings.blender = { - enable = lib.mkEnableOption "Enable blender"; - }; - }; - - config = { - home.packages = [ pkgs.blender-hip ]; - home.file.".config/blender/extensions/node_pie.zip".source = builtins.fetchurl { - url = "https://github.com/strike-digital/node_pie/releases/download/1.2.38/node_pie_1_2_38.zip"; - sha256 = "sha256:00kscj7dkl80kc482jg3kcw9vhr1n64n44ld2xncr6gxil679fk2"; - }; - home.file.".config/blender/extensions/bool_tool.zip".source = builtins.fetchurl { - name = "bool_tool"; - url = "https://extensions.blender.org/download/sha256:74ecd752ec3eda67153c74ea5a6b22709da2669a6da43264bfa291fc784306b3/add-on-bool-tool-v1.1.2.zip?repository=%2Fapi%2Fv1%2Fextensions%2F&blender_version_min=4.2.0"; - sha256 = "sha256:1cq68dwgr4d2pxj3593dk9ka57bh49mmmskl7hangniyxi9dgv3l"; - }; - }; -} diff --git a/modules/user/bluetooth/default.nix b/modules/user/bluetooth/default.nix deleted file mode 100644 index b2d88fb..0000000 --- a/modules/user/bluetooth/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.bluetooth; -in { - options = { - userSettings.bluetooth = { - enable = lib.mkEnableOption "Enable bluetooth"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - blueman - ]; - }; -} diff --git a/modules/user/browser/brave.nix b/modules/user/browser/brave.nix deleted file mode 100644 index 695c982..0000000 --- a/modules/user/browser/brave.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.brave; -in { - options = { - userSettings.brave = { - enable = lib.mkEnableOption "Enable brave browser"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.brave.enable = true; - programs.brave.package = pkgs.brave; - programs.brave.extensions = [ - { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } - { id = "oboonakemofpalcgghocfoadofidjkkk"; } - ]; - programs.brave.commandLineArgs = [ - "--password-store=gnome-libsecret" - "--enable-accelerated-video-decode" - ]; - xdg.mimeApps.defaultApplications = lib.mkIf (config.userSettings.browser == "brave" ) { - "text/html" = "brave-browser.desktop"; - "x-scheme-handler/http" = "brave-browser.desktop"; - "x-scheme-handler/https" = "brave-browser.desktop"; - "x-scheme-handler/about" = "brave-browser.desktop"; - "x-scheme-handler/unknown" = "brave-browser.desktop"; - }; - - home.sessionVariables = lib.mkIf (config.userSettings.browser == "brave") { - DEFAULT_BROWSER = "${pkgs.brave}/bin/brave"; - }; - }; -} diff --git a/modules/user/browser/default.nix b/modules/user/browser/default.nix deleted file mode 100644 index d394ba5..0000000 --- a/modules/user/browser/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - browser = config.userSettings.browser; -in { - options = { - userSettings.browser = lib.mkOption { - default = null; - description = "Default browser"; - type = lib.types.enum [ "brave" "qutebrowser" "librewolf" null ]; - }; - userSettings.spawnBrowser = lib.mkOption { - default = ""; - description = "Default browser spawn command"; - type = lib.types.str; - }; - }; - - config = { - userSettings.brave.enable = lib.mkIf (browser == "brave") true; - userSettings.librewolf.enable = lib.mkIf (browser == "librewolf") true; - userSettings.qutebrowser.enable = lib.mkIf (browser == "qutebrowser") true; - - userSettings.spawnBrowser = lib.mkMerge [ - (lib.mkIf (browser == "brave") "sh -c 'brave --new-window'") - (lib.mkIf (browser == "librewolf") browser) - (lib.mkIf (!(config.userSettings.hyprland.hyprprofiles.enable) && (browser == "qutebrowser")) "qutebrowser --qt-flag ignore-gpu-blacklist --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag enable-accelerated-2d-canvas --qt-flag num-raster-threads=4") - (lib.mkIf (config.userSettings.hyprland.hyprprofiles.enable && (browser == "qutebrowser")) "qutebrowser-hyprprofile") - (lib.mkIf (browser == null) "") - ]; - }; -} diff --git a/modules/user/browser/librewolf.nix b/modules/user/browser/librewolf.nix deleted file mode 100644 index 1c5804a..0000000 --- a/modules/user/browser/librewolf.nix +++ /dev/null @@ -1,51 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.librewolf; -in { - options = { - userSettings.librewolf = { - enable = lib.mkEnableOption "Enable librewolf browser"; - }; - }; - - config = lib.mkIf cfg.enable { - # Module installing librewolf as default browser - home.packages = [ pkgs.librewolf ]; - - home.file.".librewolf/librewolf.overrides.cfg".text = '' - defaultPref("font.size.variable.x-western",20); - defaultPref("browser.toolbars.bookmarks.visibility","always"); - defaultPref("privacy.resisttFingerprinting.letterboxing", true); - defaultPref("network.http.referer.XOriginPolicy",2); - defaultPref("privacy.clearOnShutdown.history",true); - defaultPref("privacy.clearOnShutdown.downloads",true); - defaultPref("privacy.clearOnShutdown.cookies",true); - defaultPref("gfx.webrender.software.opengl",false); - defaultPref("webgl.disabled",true); - - pref("font.size.variable.x-western",20); - pref("browser.toolbars.bookmarks.visibility","always"); - pref("privacy.resisttFingerprinting.letterboxing", true); - pref("network.http.referer.XOriginPolicy",2); - pref("privacy.clearOnShutdown.history",true); - pref("privacy.clearOnShutdown.downloads",true); - pref("privacy.clearOnShutdown.cookies",true); - pref("gfx.webrender.software.opengl",false); - pref("webgl.disabled",true); - ''; - - xdg.mimeApps.defaultApplications = lib.mkIf (config.userSettings.browser == "librewolf") { - "text/html" = "librewolf.desktop"; - "x-scheme-handler/http" = "librewolf.desktop"; - "x-scheme-handler/https" = "librewolf.desktop"; - "x-scheme-handler/about" = "librewolf.desktop"; - "x-scheme-handler/unknown" = "librewolf.desktop"; - }; - - home.sessionVariables = lib.mkIf (config.userSettings.browser == "librewolf") { - DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf"; - }; - }; - -} diff --git a/modules/user/default.nix b/modules/user/default.nix deleted file mode 100644 index 0567ef8..0000000 --- a/modules/user/default.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ lib, ... }: - -with lib; -let - # Recursively constructs an attrset of a given folder, recursing on directories, value of attrs is the filetype - getDir = dir: mapAttrs - (file: type: - if type == "directory" then getDir "${dir}/${file}" else type - ) - (builtins.readDir dir); - - # Collects all files of a directory as a list of strings of paths - files = dir: collect isString (mapAttrsRecursive (path: type: concatStringsSep "/" path) (getDir dir)); - - # Filters out directories that don't end with .nix or are this file, also makes the strings absolute - importAll = dir: map - (file: ./. + "/${file}") - (filter - (file: hasSuffix ".nix" file && file != "default.nix" && - ! lib.hasPrefix "x/taffybar/" file && - ! lib.hasSuffix "-hm.nix" file) - (files dir)); - -in -{ - - imports = importAll ./.; - -} diff --git a/modules/user/dmenu-scripts/default.nix b/modules/user/dmenu-scripts/default.nix deleted file mode 100644 index f7de2bb..0000000 --- a/modules/user/dmenu-scripts/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, ...}: - -{ - options = { - userSettings.dmenuScripts = { - enable = lib.mkEnableOption "Enable collection of dmenu scripts"; - dmenuCmd = lib.mkOption { - default = "rofi -show dmenu"; - description = "dmenu command"; - type = lib.types.str; - }; - }; - }; -} diff --git a/modules/user/dmenu-scripts/networkmanager-dmenu.nix b/modules/user/dmenu-scripts/networkmanager-dmenu.nix deleted file mode 100644 index 0207d4e..0000000 --- a/modules/user/dmenu-scripts/networkmanager-dmenu.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.dmenuScripts; - dmenuCmd = cfg.dmenuCmd; -in { - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ networkmanager_dmenu ]; - - home.file.".config/networkmanager-dmenu/config.ini".text = '' - [dmenu] - dmenu_command = ''+dmenuCmd+'' - - compact = True - wifi_chars = ▂▄▆█ - list_saved = True - - [editor] - terminal = alacritty - # gui_if_available = (Default: True) - ''; - }; -} diff --git a/modules/user/editor/default.nix b/modules/user/editor/default.nix deleted file mode 100644 index c6ac1c5..0000000 --- a/modules/user/editor/default.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - editor = config.userSettings.editor; - term = config.userSettings.terminal; -in { - options = { - userSettings.editor = lib.mkOption { - default = "vscodium"; - description = "Default editor"; - type = lib.types.enum [ "emacs" "kate" "vscodium" ]; - # TODO add more editors - #type = lib.types.enum [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium" "kate" "pulsar" ]; - }; - userSettings.spawnEditor = lib.mkOption { - default = ""; - description = "Command to spawn editor"; - }; - }; - - config = { - userSettings.emacs.enable = lib.mkIf (config.userSettings.editor == "emacs") true; - userSettings.vscodium.enable = lib.mkIf (config.userSettings.editor == "vscodium") true; - home.packages = with pkgs; - lib.optionals (editor == "kate") [ kdePackages.kate]; - userSettings.spawnEditor = lib.mkMerge [ - (lib.mkIf (editor == "emacs") "emacsclient -c -n -a 'emacs'") - (lib.mkIf (editor == "neovide") "neovide -- --listen /tmp/nvimsocket") - (lib.mkIf (editor == "vscodium") "codium -n") - (lib.mkIf (builtins.elem editor [ "vim" "nvim" "nano" "micro" ]) ("exec " + term + " -e " + editor)) - (lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium"])) editor) - ]; - home.sessionVariables = { - EDITOR = - lib.mkMerge [ - (lib.mkIf (editor == "emacs") "emacsclient -c") - (lib.mkIf (editor == "neovide") "neovide -- --listen /tmp/nvimsocket") - (lib.mkIf (editor == "vscodium") "codium -n") - (lib.mkIf (builtins.elem editor [ "vim" "nvim" "nano" "micro" ]) ("exec " + term + " -e " + editor)) - (lib.mkIf (!(builtins.elem editor [ "emacs" "vim" "nvim" "neovide" "nano" "micro" "vscodium" ])) editor) - ]; - }; - }; -} diff --git a/modules/user/emacs/default.nix b/modules/user/emacs/default.nix deleted file mode 100644 index 0844cb3..0000000 --- a/modules/user/emacs/default.nix +++ /dev/null @@ -1,169 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.emacs; -in { - options = { - userSettings.emacs = { - enable = lib.mkEnableOption "Enable emacs"; - opacity = lib.mkOption { - default = 85; - type = lib.types.number; - description = "Emacs' percentage opacity as a whole number"; - }; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - (pkgs.emacsWithPackagesFromUsePackage { - config = ./init.el; - package = pkgs.emacs-git-pgtk; - alwaysEnsure = false; - extraEmacsPackages = epkgs: with epkgs; [ - org-modern olivetti - command-log-mode - vertico corfu hotfuzz orderless - evil evil-collection evil-snipe evil-owl evil-vimish-fold - dashboard doom-themes doom-modeline - nerd-icons nerd-icons-dired nerd-icons-corfu - nerd-icons-ibuffer nerd-icons-completion - yasnippet shackle - projectile treemacs treemacs-projectile - treemacs-evil treemacs-nerd-icons - treesit-grammars.with-all-grammars - git-timemachine wgrep - magit magit-todos - undo-fu undo-fu-session - org-roam org-node org-node-fakeroam - vterm vterm-toggle sudo-edit - direnv - svelte-mode - typescript-mode - sass-mode - rainbow-mode - (epkgs.callPackage ( - { lib, fetchurl, trivialBuild }: - - trivialBuild { - pname = "web-mode"; - version = "17.3.20"; - - src = builtins.fetchGit { - url = "https://github.com/fxbois/web-mode.git"; - rev = "0c83581d1e93d1d802c730a1d5e90cd1c740e1b2"; - ref = "main"; - }; - - meta = with lib; { - description = "web template editing mode for emacs"; - homepage = "https://web-mode.org/"; - license = licenses.gpl3; - platforms = platforms.all; - }; - } - ) {}) - gdscript-mode - nix-mode - python python-mode - lsp-mode flycheck lsp-ui lsp-treemacs - # fix ultra-scroll - (epkgs.callPackage ( - { lib, fetchurl, trivialBuild }: - - trivialBuild { - pname = "ultra-scroll"; - version = "0.2.0"; - - src = builtins.fetchGit { - url = "https://github.com/jdtsmith/ultra-scroll.git"; - rev = "64ad7be02e11317576498dabb15c92cf31e2c04c"; - ref = "main"; - }; - - meta = with lib; { - description = "scroll Emacs like lightning"; - homepage = "https://github.com/jdtsmith/ultra-scroll"; - license = licenses.gpl3; - platforms = platforms.all; - }; - } - ) {}) - (epkgs.callPackage ( - { lib, fetchurl, trivialBuild }: - - trivialBuild { - pname = "lsp-treemacs-nerd-icons"; - version = "2efa09a-unstable"; - - src = builtins.fetchGit { - url = "https://github.com/Velnbur/lsp-treemacs-nerd-icons.git"; - rev = "2efa09a701b8b455bfb66529454f27c30f7462dc"; - ref = "master"; - }; - - buildInputs = with pkgs.emacsPackages; [ - lsp-treemacs - treemacs - nerd-icons - ]; - - meta = with lib; { - description = "Use nerd icons for lsp-mode and lsp-treemacs"; - homepage = "https://github.com/Velnbur/lsp-treemacs-nerd-icons"; - license = licenses.gpl3; - platforms = platforms.all; - }; - } - ) {}) - (epkgs.callPackage ( - { lib, fetchurl, trivialBuild }: - - trivialBuild { - pname = "scratch-plus"; - version = "2efa09a-unstable"; - - src = builtins.fetchGit { - url = "https://git.sr.ht/~swflint/scratch-plus"; - rev = "b794901f968000f6e338808307385b683b79ec8b"; - ref = "main"; - }; - - meta = with lib; { - description = "Better scratch buffers"; - homepage = "https://git.sr.ht/~swflint/scratch-plus"; - license = licenses.gpl3; - platforms = platforms.all; - }; - } - ) {}) - ]; - }) - fira-code - nerd-fonts.fira-code - nil - ]; - home.file.".config/emacs/init.el".source = ./init.el; - home.file.".config/emacs/lib".source = ./lib; - home.file.".config/emacs/themes/doom-stylix-theme.el".source = config.lib.stylix.colors { - template = builtins.readFile ./lib/doom-stylix-theme.el.mustache; - extension = ".el"; - }; - home.file.".config/emacs/sysvars.el".text = '' - ;;; sysvars.el --- imported variables from nixos config -*- lexical-binding: t; no-byte-compile: t; -*- - ;; - ;; Author: Emmet K - ;; Maintainer: Emmet K - ;; - ;;; Commentary: - ;; - ;; Emacs variables imported from my NixOS config. - ;; - ;;; Code: - (setq systemOpacity ${builtins.toString config.userSettings.emacs.opacity}) - - ;;; sysvars.el ends here - ''; - wayland.windowManager.hyprland.settings.exec-once = lib.optionals config.wayland.windowManager.hyprland.enable [ "emacs --daemon" ]; - }; -} diff --git a/modules/user/emacs/init.el b/modules/user/emacs/init.el deleted file mode 100644 index 2bea792..0000000 --- a/modules/user/emacs/init.el +++ /dev/null @@ -1,1090 +0,0 @@ -;;; init.el --- librephoenix's emacs config -*- lexical-binding: t; no-byte-compile: t; -*- -;; -;; Author: Emmet K -;; Maintainer: Emmet K -;; Source: https://github.com/librephoenix/nixos-config -;; Source: https://gitlab.com/librephoenix/nixos-config -;; Source: https://codeberg.org/librephoenix/nixos-config -;; -;;; Commentary: -;; -;; LibrePhoenix's Emacs config. -;; -;;; Code: - -;; organize everything with use-package -(require 'use-package) -(load (expand-file-name "~/.config/emacs/sysvars.el")) - -;; use-package-ception -(use-package use-package - :custom - (use-package-always-ensure nil) - (usepackage-always-defer nil)) - -(use-package emacs - :defer t - :config - ;; Org mode scratch buffers - (setq initial-major-mode 'org-mode) - - ;; No startup screen - (setq inhibit-startup-message t) - - ;; Truncate lines is annoying - (setq truncate-lines nil) - (setq truncate-partial-width-windows nil) - - ;; Transparent background - (set-frame-parameter nil 'alpha-background systemOpacity) - (add-to-list 'default-frame-alist `(alpha-background . ,systemOpacity)) - ;;(add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) - - ;; I want declarative config, no custom - (setq custom-file "/dev/null") - - ;; Auto save errors are annoying - (setq auto-save-default nil) - - ;; Disable the menu bar - (menu-bar-mode -1) - - ;; Disable visible scrollbar - (scroll-bar-mode -1) - - ;; Disable the toolbar - (tool-bar-mode -1) - - ;; Disable tooltips - (tooltip-mode -1) - - ;; Breathing room - (set-fringe-mode 10) - - ;; No blinking - (blink-cursor-mode 0) - - ;; Highlight current line - (global-hl-line-mode) - - ;; Bigger text - (set-face-attribute 'default nil :height 150) - - ;; Add frame borders and window dividers - (modify-all-frames-parameters - '((right-divider-width . 20) - (left-divider-width . 20) - (internal-border-width . 20))) - (set-face-background 'fringe (face-attribute 'default :background)) - - ;; Fira and glyphs - (when (window-system) - (set-frame-font "FiraCode Nerd Font")) - (let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)") - (35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)") - (36 . ".\\(?:>\\)") - (37 . ".\\(?:\\(?:%%\\)\\|%\\)") - (38 . ".\\(?:\\(?:&&\\)\\|&\\)") - ;;(42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)") - (43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)") - (45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)") - (46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)") - (47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)") - (48 . ".\\(?:x[a-zA-Z]\\)") - (58 . ".\\(?:::\\|[:=]\\)") - (59 . ".\\(?:;;\\|;\\)") - (60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)") - (61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)") - (62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)") - (63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)") - (91 . ".\\(?:]\\)") - (92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)") - (94 . ".\\(?:=\\)") - (119 . ".\\(?:ww\\)") - (123 . ".\\(?:-\\)") - (124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)") - (126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)") - ))) - (dolist (char-regexp alist) - (set-char-table-range composition-function-table (car char-regexp) - `([,(cdr char-regexp) 0 font-shape-gstring])))) - - (dashboard-setup-startup-hook) - - ;; Garbage collection threshold - (setq gc-cons-threshold 120000) - (add-hook 'focus-out-hook 'garbage-collect) - - ;; Auto revert - (global-auto-revert-mode 1) - (setq auto-revert-use-notify t - revert-without-query t) - - ;; camelCase and PascalCase - (global-subword-mode 1) - - ;; ripgrep as grep - (setq grep-command "rg -nS --no-heading " - grep-use-null-device nil) - - ;; "y" or "n" instead of "yes" or "no" - (setq use-short-answers t) - - ;; Enable indentation+completion using TAB - (setq tab-always-indent 'complete) - - ;; Make ESC quit prompts - (global-set-key (kbd "") 'keyboard-escape-quit) - - ;; Line numbers - (setq display-line-numbers-type t - line-move-visual t) - (add-hook 'prog-mode-hook 'display-line-numbers-mode) - - ;; Fix stupid backup confirmations - (setq backup-directory-alist '("." "~/.emacs.d/cache/backups")) - (setq tramp-auto-save-directory "/dev/null")) - -;; Packages - -(use-package line-wrapping-and-numbers - :load-path "lib/" - :after (org git-timemachine nix-mode treemacs)) - -(use-package ultra-scroll - :init - (setq scroll-step 1 - scroll-margin 0 - scroll-conservatively 101 - scroll-preserve-screen-position nil - redisplay-skip-fontification-on-input t) - (pixel-scroll-precision-mode 1) - :config - (ultra-scroll-mode 1)) - -(use-package web-mode - :mode - (("\\.phtml\\'" . web-mode) - ("\\.php\\'" . web-mode) - ("\\.tpl\\'" . web-mode) - ("\\.[agj]sp\\'" . web-mode) - ("\\.as[cp]x\\'" . web-mode) - ("\\.erb\\'" . web-mode) - ("\\.mustache\\'" . web-mode) - ("\\.djhtml\\'" . web-mode))) - -(use-package svelte-mode) -(use-package typescript-mode) -(use-package sass-mode) - -;; Magit -(use-package magit - :commands (magit magit-status) - :config - (setq magit-display-buffer-function 'magit-display-buffer-fullframe-status-v1) - (setq magit-bury-buffer-function 'magit-restore-window-configuration) - (define-key magit-mode-map (kbd "SPC") nil) - (add-hook 'git-commit-mode-hook 'evil-insert-state) - :custom (magit-format-file-function #'magit-format-file-nerd-icons)) - -(use-package git-timemachine) - -(use-package magit-todos - :after (magit) - :config - (setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG")) - (setq magit-todos-keyword-suffix "\\(?:[([][^])]+[])]\\)?.") - (magit-todos-mode 1)) - -;; Projectile -(use-package projectile - :custom - (projectile-switch-project-action 'magit-status) - :init - (projectile-mode +1) - ;; Project keybinds - (defun projectile-switch-project-commander () - (interactive) - (projectile-switch-project t)) - (def-projectile-commander-method ?g "Open magit status" (magit-status)) - (def-projectile-commander-method ?/ "Grep through project" (projectile-grep))) - -;; Being able to undo is nice... -(use-package undo-fu) - -(use-package undo-fu-session - :after undo-fu - :config - (global-undo-fu-session-mode)) - -(use-package dired - :custom - (dired-listing-switches "-aBhl --group-directories-first") - (dired-kill-when-opening-new-dired-buffer t)) - -(use-package dired-x - :after (dired) - :config - (setq dired-omit-files (rx (seq bol "."))) - (setq dired-show-dotfiles nil) - (defun apply-dired-omit () - (if (not dired-show-dotfiles) - (dired-omit-mode 1))) - (add-hook 'dired-mode-hook 'apply-dired-omit)) - -;; Muahahahahaha.. -(use-package evil - :custom - (evil-want-keybinding nil) - (evil-respect-visual-line-mode t) - (evil-undo-system 'undo-fu) - :config - (evil-set-leader nil (kbd "C-SPC")) - (evil-set-leader 'normal (kbd "SPC")) - (evil-set-leader 'motion (kbd "SPC")) - (setq evil-respect-visual-line-mode t) - (setq evil-undo-system 'undo-fu) - (setq evil-redo-function 'undo-fu-only-redo) - (define-key evil-motion-state-map (kbd "RET") nil) - (evil-mode 1)) - -(use-package evil-collection - :after (evil) - :custom - (evil-want-keybinding t) - :config - (evil-collection-init) - - ;; Visual mode keybinds - (evil-define-key 'motion 'global (kbd "j") 'evil-next-visual-line) - (evil-define-key 'motion 'global (kbd "k") 'evil-previous-visual-line) - - (defun scratch-plus-toggle () - (interactive) - (if (projectile-project-p) - (progn - (select-window (scratch-plus-switch-project nil))) - (progn - (select-window (scratch-plus-switch nil))))) - - (defun scratch-plus-only () - (interactive) - (if (projectile-project-p) - (progn - (select-window (scratch-plus-switch-project nil))) - (progn - (select-window (scratch-plus-switch nil)))) - (delete-other-windows)) - - (defun scratch-plus-main-toggle () - (interactive) - (select-window (scratch-plus-switch nil))) - - - (defun scratch-plus-main-only () - (interactive) - (select-window (scratch-plus-switch nil)) - (delete-other-windows)) - - ;; File and buffer keybinds - (evil-define-key 'motion 'global (kbd "x") 'scratch-plus-toggle) - (evil-define-key 'motion 'global (kbd "X") 'scratch-plus-main-toggle) - (evil-define-key 'motion 'global (kbd "z") 'scratch-plus-only) - (evil-define-key 'motion 'global (kbd "Z") 'scratch-plus-main-only) - (evil-define-key 'motion 'global (kbd ".") 'find-file) - (evil-define-key 'motion 'global (kbd "bi") 'ibuffer) - (evil-define-key 'motion 'global (kbd "bd") 'evil-delete-buffer) - (evil-define-key 'motion 'global (kbd "bn") 'next-buffer) - (evil-define-key 'motion 'global (kbd "bp") 'previous-buffer) - - ;; based on http://emacsredux.com/blog/2013/04/03/delete-file-and-buffer/ - (defun delete-file-and-buffer () - "Kill the current buffer and deletes the file it is visiting." - (interactive) - (let ((filename (buffer-file-name))) - (if filename - (if (y-or-n-p (concat "Do you really want to delete file " filename " ?")) - (progn - (delete-file filename) - (message "Deleted file %s." filename) - (kill-buffer))) - (message "Not a file visiting buffer!")))) - (evil-define-key 'motion 'global (kbd "fd") 'delete-file-and-buffer) - (evil-define-key 'motion 'global (kbd "fr") 'rename-visited-file) - (evil-define-key 'motion 'global (kbd "od") 'dired-jump) - (defun toggle-dired-omit-mode () - "Toggle dired-omit-mode." - (interactive) - (if dired-omit-mode - (progn (dired-omit-mode 0) (setq dired-show-dotfiles t)) - (progn (dired-omit-mode 1) (setq dired-show-dotfiles nil)))) - (evil-define-key 'normal dired-mode-map (kbd "H") 'toggle-dired-omit-mode) - - (evil-define-key 'motion 'global (kbd "pp") 'projectile-switch-project-commander) - (evil-define-key 'motion 'global (kbd "pg") 'projectile-switch-project) - (evil-define-key 'motion 'global (kbd "pf") 'projectile-find-file) - (evil-define-key 'motion 'global (kbd "pa") 'projectile-add-known-project) - (evil-define-key 'motion 'global (kbd "/") 'projectile-grep) - (evil-define-key 'motion 'global (kbd "gg") 'magit-status) - (evil-define-key 'motion 'global (kbd "gt") 'git-timemachine-toggle) - - ;; Describe keybinds - (evil-define-key 'motion 'global (kbd "hv") 'describe-variable) - (evil-define-key 'motion 'global (kbd "hf") 'describe-function) - (evil-define-key 'motion 'global (kbd "hk") 'describe-key) - (evil-define-key 'motion 'global (kbd "hF") 'describe-face) - - ;; Window keybinds - (evil-define-key 'motion 'global (kbd "ws") 'evil-window-split) - (evil-define-key 'motion 'global (kbd "wv") 'evil-window-vsplit) - (defun evil-window-split-follow () - (interactive) - (let ((evil-split-window-below t)) - (evil-window-split))) - (defun evil-window-vsplit-follow () - (interactive) - (let ((evil-vsplit-window-right t)) - (evil-window-vsplit))) - (evil-define-key 'motion 'global (kbd "wS") 'evil-window-split-follow) - (evil-define-key 'motion 'global (kbd "wV") 'evil-window-vsplit-follow) - - (evil-define-key 'motion 'global (kbd "wd") 'evil-window-delete) - (evil-define-key 'motion 'global (kbd "wj") 'evil-window-down) - (evil-define-key 'motion 'global (kbd "wk") 'evil-window-up) - (evil-define-key 'motion 'global (kbd "wh") 'evil-window-left) - (evil-define-key 'motion 'global (kbd "wl") 'evil-window-right) - - (evil-define-key 'motion scratch-plus-minor-mode-map (kbd "q") 'quit-window) - (evil-define-key 'normal scratch-plus-minor-mode-map (kbd "q") 'quit-window) - - (evil-define-key 'insert org-mode-map (kbd "") '+org/insert-item-below) - (evil-define-key 'insert org-mode-map (kbd "") '+org/insert-item-above) - (evil-define-key 'motion org-mode-map (kbd "") '+org/insert-item-below) - (evil-define-key 'motion org-mode-map (kbd "") '+org/insert-item-above) - (evil-define-key 'insert org-mode-map (kbd "") '+org-indent-maybe-h) - (evil-define-key 'insert org-mode-map (kbd "") '+org-reverse-indent-maybe-h) - (evil-define-key 'motion org-mode-map (kbd "mll") 'org-insert-link) - (evil-define-key 'motion org-mode-map (kbd "mt") 'org-todo) - - (global-set-key (kbd "C-j") 'evil-window-down) - (global-set-key (kbd "C-k") 'evil-window-up) - (global-set-key (kbd "C-h") 'evil-window-left) - (global-set-key (kbd "C-l") 'evil-window-right)) - -(use-package sudo-edit - :after (evil) - :custom - (sudo-edit-local-method "doas") - (auth-sources '("~/.authinfo.gpg")) - (auth-source-save-behavior "ask") - :config - (sudo-edit-indicator-mode) - (evil-define-key 'normal 'global (kbd "fU") 'sudo-edit) - (evil-define-key 'normal 'global (kbd "fu") 'sudo-edit-find-file)) - -(use-package flycheck - :init - (global-flycheck-mode)) - -(use-package treemacs - :after (evil) - :config - (defun treemacs-display-current-project-exclusively-silently () - (interactive) - "Display current project exclusively in treemacs without switching to treemacs buffer." - (let ((buffer (current-buffer))) - (treemacs-add-and-display-current-project-exclusively) - (switch-to-buffer buffer))) - (evil-define-key 'normal 'global (kbd "ot") 'treemacs-add-and-display-current-project-exclusively)) - -(use-package treemacs-evil - :after (treemacs)) - -(use-package nix-mode) -(use-package gdscript-mode) - -(use-package lsp-mode - :config - (setq lsp-completion-enable t) - (setq lsp-keymap-prefix "SPC l") - (evil-define-key 'normal lsp-mode-map (kbd "SPC l") lsp-command-map) - (setq lsp-completion-provider :none) - (setq major-mode-remap-alist - '((gdscript-mode . gdscript-ts-mode))) - :hook - (lsp-mode . evil-normalize-keymaps) - (nix-mode . lsp-deferred) - (gdscript-mode . lsp-deferred) - (gdscript-ts-mode . lsp-deferred)) - -(use-package lsp-nix - :after (lsp-mode)) - -(use-package lsp-ui :commands lsp-ui-mode) - -(use-package lsp-treemacs - :after (evil) - :custom - (lsp-treemacs-theme "nerd-icons-ext") - :config - (evil-define-key 'normal 'global (kbd "os") 'lsp-treemacs-symbols)) - -(use-package treesit - :config - (treesit-major-mode-setup)) - -;; direnv -(use-package direnv - :init - (direnv-mode)) - -;; command-log-mode -(use-package command-log-mode) - -;; Enable corfu -(use-package corfu - :custom - (corfu-cycle t) ;; Enable cycling for `corfu-next/previous' - ;; (corfu-preview-current nil) ;; Disable current candidate preview - (corfu-preselect 'prompt) ;; Preselect the prompt - (corfu-on-exact-match 'insert) ;; Configure handling of exact matches - (corfu-auto nil) ;; auto complete - (corfu-auto-delay 1.2) ;; wait half a second though - (corfu-auto-prefix 5) ;; also only for words 3 or more - (defun corfu-lsp-setup () - (setq-local completion-styles '(orderless flex hotfuzz) - completion-category-defaults nil)) - (add-hook 'lsp-mode-hook #'corfu-lsp-setup) - - :init - (global-corfu-mode 1)) - -;; Enable vertico -(use-package vertico - :custom - (vertico-scroll-margin 0) ;; Different scroll margin - (vertico-count 20) ;; Show more candidates - (vertico-resize nil) ;; Grow and shrink the Vertico minibuffer - (vertico-cycle t) ;; Enable cycling for `vertico-next/previous' - :init - (vertico-mode)) - -;; I am a nerd -(use-package nerd-icons) - -(use-package treemacs-nerd-icons - :after (nerd-icons treemacs) - :config - (treemacs-load-theme "nerd-icons")) - -(use-package lsp-treemacs-nerd-icons - :after (lsp-treemacs) - :init (with-eval-after-load 'lsp-treemacs - (require 'lsp-treemacs-nerd-icons))) - -(use-package nerd-icons-dired - :after (nerd-icons dired) - :config - (add-hook 'dired-mode-hook #'nerd-icons-dired-mode)) - -(use-package nerd-icons-completion - :after (nerd-icons) - :config - (nerd-icons-completion-mode)) - -(use-package nerd-icons-corfu - :after (nerd-icons corfu) - :config - (add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)) - -;; Theme and modeline -(use-package doom-themes - :config - (setq doom-themes-enable-bold t - doom-themes-enable-italic t - custom-theme-directory "~/.config/emacs/themes") - (load-theme 'doom-stylix t)) - -(use-package doom-modeline - :init (doom-modeline-mode 1) - :custom ((doom-modeline-height 15))) - -;; Dashboard -(use-package dashboard - :after (nerd-icons) - :config - (setq dashboard-banner-logo-title "Welcome to Nix Emacs") - (setq dashboard-startup-banner 2) - (setq dashboard-set-heading-icons t) - (setq dashboard-set-file-icons t) - (setq dashboard-set-navigator t) - (setq dashboard-items '()) - (setq dashboard-center-content t) - (setq dashboard-icon-type 'nerd-icons) ;; use `nerd-icons' package - (setq dashboard-footer-messages '("Here to do customizing, or actual work?" - "M-x insert-inspiring-message" - "My software never has bugs. It just develops random features." - "Dad, what are clouds made of? Linux servers, mostly." - "There is no place like ~" - "~ sweet ~" - "sudo chown -R us ./allyourbase" - "I’ll tell you a DNS joke but it could take 24 hours for everyone to get it." - "I'd tell you a UDP joke, but you might not get it." - "I'll tell you a TCP joke. Do you want to hear it?")) - (setq dashboard-footer-icon - (nerd-icons-codicon "nf-cod-vm" - :height 1.0 - :v-adjust 0 - :face 'font-lock-keyword-face)) - (setq initial-buffer-choice (lambda () (get-buffer-create dashboard-buffer-name)))) - -;; Window management with shackle -;; https://github.com/wasamasa/shackle -(use-package shackle - :config - (progn - (setq shackle-lighter "") - (setq shackle-select-reused-windows nil) ; default nil - (setq shackle-default-alignment 'below) ; default below - (setq shackle-default-size 0.4) ; default 0.5 - - (setq shackle-rules - ;; CONDITION(:regexp) :select :inhibit-window-quit :size+:align|:other :same|:popup - '((compilation-mode :select nil ) - ("*undo-tree*" :size 0.25 :align right) - ("*eshell*" :select t :other t ) - ("*Shell Command Output*" :select nil ) - ("\\*Async Shell.*\\*" :regexp t :ignore t ) - (occur-mode :select nil :align t ) - ("*Help*" :select t :inhibit-window-quit nil :size 0.3 :align below ) - ("*Completions*" :size 0.3 :align t ) - ("*Messages*" :select nil :inhibit-window-quit t :other t ) - ("\\*[Wo]*Man.*\\*" :regexp t :select t :inhibit-window-quit t :other t ) - ("\\*poporg.*\\*" :regexp t :select t :other t ) - ("\\`\\*helm.*?\\*\\'" :regexp t :size 0.3 :align t ) - ("*Calendar*" :select t :size 0.3 :align below) - ("*info*" :select t :inhibit-window-quit t :popup t) - ("*Org todo*" :select t :inhibit-window-quit t :same t :popup t) - (magit-status-mode :select t :inhibit-window-quit t :same t) - (magit-log-mode :select t :inhibit-window-quit t :same t) - )) - (shackle-mode 1)) - (add-to-list 'display-buffer-alist '("\\*Org todo\\*" - (display-buffer-at-bottom) - (side . bottom) - (slot . 4) - (window-height . shrink-window-if-larger-than-buffer) - (dedicated . t)))) - -;; Completion -(use-package hotfuzz) -(use-package orderless) -(setq completion-styles '(orderless flex hotfuzz)) - -(use-package org - :config - ;; Better cycling - ;; https://github.com/doomemacs/doomemacs/blob/master/modules/lang/org/autoload/org.el - (defun +org-cycle-only-current-subtree-h (&optional arg) - "Toggle the local fold at the point, and no deeper. - `org-cycle's standard behavior is to cycle between three levels: collapsed, - subtree and whole document. This is slow, especially in larger org buffer. Most - of the time I just want to peek into the current subtree -- at most, expand - *only* the current subtree. - - All my (performant) foldings needs are met between this and `org-show-subtree' - (on zO for evil users), and `org-cycle' on shift-TAB if I need it." - (interactive "P") - (unless (or (eq this-command 'org-shifttab) - (and (bound-and-true-p org-cdlatex-mode) - (or (org-inside-LaTeX-fragment-p) - (org-inside-latex-macro-p)))) - (save-excursion - (org-beginning-of-line) - (let (invisible-p) - (when (and (org-at-heading-p) - (or org-cycle-open-archived-trees - (not (member org-archive-tag (org-get-tags)))) - (or (not arg) - (setq invisible-p - (memq (get-char-property (line-end-position) - 'invisible) - '(outline org-fold-outline))))) - (unless invisible-p - (setq org-cycle-subtree-status 'subtree)) - (org-cycle-internal-local) - t))))) - (defalias #'+org/toggle-fold #'+org-cycle-only-current-subtree-h) - (add-hook 'org-mode-hook 'org-indent-mode) - (add-hook 'org-tab-first-hook - ;; Only fold the current tree, rather than recursively - #'+org-cycle-only-current-subtree-h) - - (setq org-return-follows-link t) - (setf (cdr (assoc 'file org-link-frame-setup)) 'find-file) -(setq org-todo-keywords '((sequence "TODO(t)" "WAITING(w)" "|" "DONE(d)" "CANCELED(c)" "NO(n)"))) - (setq org-use-fast-todo-selection 'prefix) - (setq org-M-RET-may-split-line nil - ;; insert new headings after current subtree rather than inside it - org-insert-heading-respect-content t) - - (defun +org--insert-item (direction) - (let ((context (org-element-lineage - (org-element-context) - '(table table-row headline inlinetask item plain-list) - t))) - (pcase (org-element-type context) - ;; Add a new list item (carrying over checkboxes if necessary) - ((or `item `plain-list) - (let ((orig-point (point))) - ;; Position determines where org-insert-todo-heading and `org-insert-item' - ;; insert the new list item. - (if (eq direction 'above) - (org-beginning-of-item) - (end-of-line)) - (let* ((ctx-item? (eq 'item (org-element-type context))) - (ctx-cb (org-element-property :contents-begin context)) - ;; Hack to handle edge case where the point is at the - ;; beginning of the first item - (beginning-of-list? (and (not ctx-item?) - (= ctx-cb orig-point))) - (item-context (if beginning-of-list? - (org-element-context) - context)) - ;; Horrible hack to handle edge case where the - ;; line of the bullet is empty - (ictx-cb (org-element-property :contents-begin item-context)) - (empty? (and (eq direction 'below) - ;; in case contents-begin is nil, or contents-begin - ;; equals the position end of the line, the item is - ;; empty - (or (not ictx-cb) - (= ictx-cb - (1+ (point)))))) - (pre-insert-point (point))) - ;; Insert dummy content, so that `org-insert-item' - ;; inserts content below this item - (when empty? - (insert "�")) - (org-insert-item (org-element-property :checkbox context)) - ;; Remove dummy content - (when empty? - (delete-region pre-insert-point (1+ pre-insert-point)))))) - ;; Add a new table row - ((or `table `table-row) - (pcase direction - ('below (save-excursion (org-table-insert-row t)) - (org-table-next-row)) - ('above (save-excursion (org-shiftmetadown)) - (+org/table-previous-row)))) - - ;; Otherwise, add a new heading, carrying over any todo state, if - ;; necessary. - (_ - (let ((level (or (org-current-level) 1))) - ;; I intentionally avoid `org-insert-heading' and the like because they - ;; impose unpredictable whitespace rules depending on the cursor - ;; position. It's simpler to express this command's responsibility at a - ;; lower level than work around all the quirks in org's API. - (pcase direction - (`below - (let (org-insert-heading-respect-content) - (goto-char (line-end-position)) - (org-end-of-subtree) - (insert "\n" (make-string level ?*) " "))) - (`above - (org-back-to-heading) - (insert (make-string level ?*) " ") - (save-excursion (insert "\n")))) - (run-hooks 'org-insert-heading-hook) - (when-let* ((todo-keyword (org-element-property :todo-keyword context)) - (todo-type (org-element-property :todo-type context))) - (org-todo - (cond ((eq todo-type 'done) - ;; Doesn't make sense to create more "DONE" headings - (car (+org-get-todo-keywords-for todo-keyword))) - (todo-keyword) - ('todo))))))) - - (when (org-invisible-p) - (org-show-hidden-entry)) - (when (and (bound-and-true-p evil-local-mode) - (not (evil-emacs-state-p))) - (evil-insert 1)))) - - ;;; Commands - - ;;;###autoload - (defun +org/return () - "Call `org-return' then indent (if `electric-indent-mode' is on)." - (interactive) - (org-return electric-indent-mode)) - - ;;;###autoload - (defun +org/dwim-at-point (&optional arg) - "Do-what-I-mean at point. - - If on a: - - checkbox list item or todo heading: toggle it. - - citation: follow it - - headline: cycle ARCHIVE subtrees, toggle latex fragments and inline images in - subtree; update statistics cookies/checkboxes and ToCs. - - clock: update its time. - - footnote reference: jump to the footnote's definition - - footnote definition: jump to the first reference of this footnote - - timestamp: open an agenda view for the time-stamp date/range at point. - - table-row or a TBLFM: recalculate the table's formulas - - table-cell: clear it and go into insert mode. If this is a formula cell, - recaluclate it instead. - - babel-call: execute the source block - - statistics-cookie: update it. - - src block: execute it - - latex fragment: toggle it. - - link: follow it - - otherwise, refresh all inline images in current tree." - (interactive "P") - (if (button-at (point)) - (call-interactively #'push-button) - (let* ((context (org-element-context)) - (type (org-element-type context))) - ;; skip over unimportant contexts - (while (and context (memq type '(verbatim code bold italic underline strike-through subscript superscript))) - (setq context (org-element-property :parent context) - type (org-element-type context))) - (pcase type - ((or `citation `citation-reference) - (org-cite-follow context arg)) - - (`headline - (cond ((memq (bound-and-true-p org-goto-map) - (current-active-maps)) - (org-goto-ret)) - ((and (fboundp 'toc-org-insert-toc) - (member "TOC" (org-get-tags))) - (toc-org-insert-toc) - (message "Updating table of contents")) - ((string= "ARCHIVE" (car-safe (org-get-tags))) - (org-force-cycle-archived)) - ((or (org-element-property :todo-type context) - (org-element-property :scheduled context)) - (org-todo - (if (eq (org-element-property :todo-type context) 'done) - (or (car (+org-get-todo-keywords-for (org-element-property :todo-keyword context))) - 'todo) - 'done)))) - ;; Update any metadata or inline previews in this subtree - (org-update-checkbox-count) - (org-update-parent-todo-statistics) - (when (and (fboundp 'toc-org-insert-toc) - (member "TOC" (org-get-tags))) - (toc-org-insert-toc) - (message "Updating table of contents")) - (let* ((beg (if (org-before-first-heading-p) - (line-beginning-position) - (save-excursion (org-back-to-heading) (point)))) - (end (if (org-before-first-heading-p) - (line-end-position) - (save-excursion (org-end-of-subtree) (point)))) - (overlays (ignore-errors (overlays-in beg end))) - (latex-overlays - (cl-find-if (lambda (o) (eq (overlay-get o 'org-overlay-type) 'org-latex-overlay)) - overlays)) - (image-overlays - (cl-find-if (lambda (o) (overlay-get o 'org-image-overlay)) - overlays))) - (+org--toggle-inline-images-in-subtree beg end) - (if (or image-overlays latex-overlays) - (org-clear-latex-preview beg end) - (org--latex-preview-region beg end)))) - - (`clock (org-clock-update-time-maybe)) - - (`footnote-reference - (org-footnote-goto-definition (org-element-property :label context))) - - (`footnote-definition - (org-footnote-goto-previous-reference (org-element-property :label context))) - - ((or `planning `timestamp) - (org-follow-timestamp-link)) - - ((or `table `table-row) - (if (org-at-TBLFM-p) - (org-table-calc-current-TBLFM) - (ignore-errors - (save-excursion - (goto-char (org-element-property :contents-begin context)) - (org-call-with-arg 'org-table-recalculate (or arg t)))))) - - (`table-cell - (org-table-blank-field) - (org-table-recalculate arg) - (when (and (string-empty-p (string-trim (org-table-get-field))) - (bound-and-true-p evil-local-mode)) - (evil-change-state 'insert))) - - (`babel-call - (org-babel-lob-execute-maybe)) - - (`statistics-cookie - (save-excursion (org-update-statistics-cookies arg))) - - ((or `src-block `inline-src-block) - (org-babel-execute-src-block arg)) - - ((or `latex-fragment `latex-environment) - (org-latex-preview arg)) - - (`link - (let* ((lineage (org-element-lineage context '(link) t)) - (path (org-element-property :path lineage))) - (if (or (equal (org-element-property :type lineage) "img") - (and path (image-type-from-file-name path))) - (+org--toggle-inline-images-in-subtree - (org-element-property :begin lineage) - (org-element-property :end lineage)) - (org-open-at-point arg)))) - - ((guard (org-element-property :checkbox (org-element-lineage context '(item) t))) - (org-toggle-checkbox)) - - (`paragraph - (+org--toggle-inline-images-in-subtree)) - - (_ - (if (or (org-in-regexp org-ts-regexp-both nil t) - (org-in-regexp org-tsr-regexp-both nil t) - (org-in-regexp org-link-any-re nil t)) - (call-interactively #'org-open-at-point) - (+org--toggle-inline-images-in-subtree - (org-element-property :begin context) - (org-element-property :end context)))))))) - - ;;;###autoload - (defun +org/shift-return (&optional arg) - "Insert a literal newline, or dwim in tables. - Executes `org-table-copy-down' if in table." - (interactive "p") - (if (org-at-table-p) - (org-table-copy-down arg) - (org-return nil arg))) - - ;;;###autoload - (defun +org/insert-item-below (count) - "Inserts a new heading, table cell or item below the current one." - (interactive "p") - (dotimes (_ count) (+org--insert-item 'below))) - - ;;;###autoload - (defun +org/insert-item-above (count) - "Inserts a new heading, table cell or item above the current one." - (interactive "p") - (dotimes (_ count) (+org--insert-item 'above))) - -(defun +org-indent-maybe-h () - "Indent the current item (header or item), if possible. -Made for `org-tab-first-hook' in evil-mode." - (interactive) - (cond ((not (and (bound-and-true-p evil-local-mode) - (evil-insert-state-p))) - nil) - ((and (bound-and-true-p org-cdlatex-mode) - (or (org-inside-LaTeX-fragment-p) - (org-inside-latex-macro-p))) - nil) - ((org-at-item-p) - (if (eq this-command 'org-shifttab) - (org-outdent-item-tree) - (org-indent-item-tree)) - t) - ((org-at-heading-p) - (ignore-errors - (if (eq this-command 'org-shifttab) - (org-promote) - (org-demote))) - t) - ((org-in-src-block-p t) - (save-window-excursion - (org-babel-do-in-edit-buffer - (call-interactively #'indent-for-tab-command))) - t) - ((and (save-excursion - (skip-chars-backward " \t") - (bolp)) - (org-in-subtree-not-table-p)) - (call-interactively #'tab-to-tab-stop) - t))) - -(defun +org-reverse-indent-maybe-h () - "Indent the current item (header or item), if possible. -Made for `org-tab-first-hook' in evil-mode." - (interactive) - (cond ((not (and (bound-and-true-p evil-local-mode) - (evil-insert-state-p))) - nil) - ((and (bound-and-true-p org-cdlatex-mode) - (or (org-inside-LaTeX-fragment-p) - (org-inside-latex-macro-p))) - nil) - ((org-at-item-p) - (if (eq this-command 'org-shifttab) - (org-outdent-item-tree) - (org-outdent-item-tree)) - t) - ((org-at-heading-p) - (ignore-errors - (if (eq this-command 'org-shifttab) - (org-promote) - (org-promote))) - t) - ((org-in-src-block-p t) - (save-window-excursion - (org-babel-do-in-edit-buffer - (call-interactively #'indent-for-tab-command))) - t) - ((and (save-excursion - (skip-chars-forward " \t") - (bolp)) - (org-in-subtree-not-table-p)) - (call-interactively #'tab-to-tab-stop) - t)))) - -(use-package org-roam - :after (org) - :config - (setq org-roam-directory (file-truename "~/Notes")) - (setq org-roam-node-display-template (concat "${title:*} " (propertize "${tags:10}" 'face 'org-tag))) - (org-roam-db-autosync-mode -1) - (setq org-roam-capture-templates '(("d" "default" plain "%?" :unnarrowed t :target (file+head - "${slug}-%<%Y%m%d%H%M%S>.org" "#+title: ${title}")))) - (evil-define-key 'motion 'global (kbd "N.") 'org-node-find) - (evil-define-key 'motion 'global (kbd "Nr") 'org-node-refile) - (evil-define-key 'motion 'global (kbd "Nb") 'org-roam-buffer-toggle) - (evil-define-key 'motion 'global (kbd "nrdd") 'org-roam-dailies-goto-date) - (evil-define-key 'motion 'global (kbd "nrdt") 'org-roam-dailies-goto-today) - (evil-define-key 'motion 'global (kbd "nrdn") 'org-roam-dailies-goto-next-note) - (evil-define-key 'motion 'global (kbd "nrdp") 'org-roam-dailies-goto-previous-note)) - -(use-package org-node - :after (org org-roam) - :config - (setq org-mem-do-sync-with-org-id t) - (org-mem-updater-mode) - (setq org-node-extra-id-dirs '("~/Notes/")) - (setq org-id-locations-file "~/Notes/.org-id-locations") - (setq org-node-extra-id-dirs-exclude '("~/Notes/daily/")) - (org-node-cache-mode) - (org-node-complete-at-point-mode) - (setq org-node-datestamp-format "") - (setq org-node-slug-fn 'org-node-slugify-for-web) - (setq org-roam-completion-everywhere nil) - (setq org-node-filter-fn - (lambda (node) - (not (string-search "/daily/" (org-node-get-file node))))) - (setq org-node-renames-allowed-dirs '("~/Notes")) - (add-hook 'after-save-hook 'org-node-rename-file-by-title) - (evil-define-key 'motion 'global (kbd "Ni") 'org-node-insert-link) - (evil-define-key 'motion 'global (kbd "Nt") 'org-node-add-tags) - (evil-define-key 'motion 'global (kbd "NR") 'org-node-rewrite-links-ask)) - -(use-package org-node-fakeroam - :after (org org-node org-roam) - :defer t - :config - (setq org-node-creation-fn #'org-node-fakeroam-new-via-roam-capture) - (setq org-node-slug-fn #'org-node-fakeroam-slugify-via-roam) - (setq org-node-datestamp-format "%Y%m%d%H%M%S-") - (setq org-roam-db-update-on-save nil) - (setq org-roam-link-auto-replace nil) - (org-node-fakeroam-fast-render-mode) - (setq org-node-fakeroam-fast-render-persist t) - (org-node-fakeroam-redisplay-mode) - (org-node-fakeroam-jit-backlinks-mode) - (org-node-fakeroam-db-feed-mode)) - -(use-package wgrep - :after (org-node)) - -(use-package org-modern - :mode ("\\.org\\'" . org-mode) - :custom - (org-auto-align-tags nil) - (org-tags-column 0) - (org-catch-invisible-edits 'show-and-error) - (org-special-ctrl-a/e t) - (org-insert-heading-respect-content t) - (org-hide-emphasis-markers t) - (org-pretty-entities t) - (org-ellipsis "...") - (org-modern-star 'replace) - :config - (set-face-attribute 'org-ellipsis nil :inherit 'default :box nil) - :init - (global-org-modern-mode)) - -;; Markdown setup for quartz -(use-package markdown-mode - :custom - (markdown-enable-wiki-links t) - (markdown-wiki-link-alias-first nil)) - -;; Olivetti -(use-package olivetti - :custom - (olivetti-style 'fancy) - (olivetti-margin-width 100) - :config - (setq-default olivetti-body-width 100) - (add-hook 'org-mode-hook 'olivetti-mode) - (add-hook 'markdown-mode-hook 'olivetti-mode)) - -(evil-collection-define-key 'normal 'dired-mode-map - "h" 'dired-up-directory - "l" 'dired-find-file - " " 'nil) - -(use-package vterm) - -(use-package vterm-toggle - :config - (setq vterm-toggle-fullscreen-p nil) - (setq vterm-toggle-cd-auto-create-buffer nil) - (add-to-list 'display-buffer-alist - '((lambda (buffer-or-name _) - (let ((buffer (get-buffer buffer-or-name))) - (with-current-buffer buffer - (or (equal major-mode 'vterm-mode) - (string-prefix-p vterm-buffer-name (buffer-name buffer)))))) - (display-buffer-reuse-window display-buffer-at-bottom) - ;;(display-buffer-reuse-window display-buffer-in-direction) - ;;display-buffer-in-direction/direction/dedicated is added in emacs27 - ;;(direction . bottom) - ;;(dedicated . t) ;dedicated is supported in emacs27 - (reusable-frames . visible) - (window-height . 0.4))) - (defun vterm-toggle-cd-force () - (interactive) - (vterm-toggle-cd-show) - (vterm-toggle-insert-cd) - ) - (evil-define-key 'motion 'global (kbd "M-z") 'vterm-toggle-cd-force) - (evil-define-key 'insert 'global (kbd "M-z") 'vterm-toggle-cd-force) - (evil-define-key 'motion vterm-mode-map (kbd "M-z") 'vterm-toggle-hide) - (evil-define-key 'insert vterm-mode-map (kbd "M-z") 'vterm-toggle-hide) - ) - -(use-package scratch-plus - :custom - (initial-major-mode 'org-mode) - (scratch-plus-save-directory (file-truename "~/.config/emacs/scratch")) - (scratch-plus-project-subdir ".scratch") - (scratch-plus-restore-type 'demand) - (scratch-plus-force-restore t) - (scratch-plus-initial-message "Scratchpad") - :init - (add-hook 'after-init-hook #'scratch-plus-mode)) - -(use-package rainbow-mode) - -(provide 'init) -;;; init.el ends here diff --git a/modules/user/emacs/lib/line-wrapping-and-numbers.el b/modules/user/emacs/lib/line-wrapping-and-numbers.el deleted file mode 100644 index c4597bf..0000000 --- a/modules/user/emacs/lib/line-wrapping-and-numbers.el +++ /dev/null @@ -1,56 +0,0 @@ -;;; line-wrapping-and-numbers.el --- basic line wrapping management library -*- lexical-binding: t; no-byte-compile: t; -*- -;; -;; Author: Emmet K -;; Maintainer: Emmet K -;; Source: https://github.com/librephoenix/nixos-config -;; Source: https://gitlab.com/librephoenix/nixos-config -;; Source: https://codeberg.org/librephoenix/nixos-config -;; -;;; Commentary: -;; -;; A basic line wrapping management library. -;; Turns on line wrapping for programming modes, -;; and turns it off for thinks like markdown and org. -;; -;;; Code: - -;; Line wrapping management -(defun activate-writing-lines () - "Stop truncating lines in current buffer." - (interactive) - (setq-local truncate-lines nil) - (setq visual-line-mode t) - (display-line-numbers-mode 0)) -(defun activate-coding-lines () - "Truncate lines in current buffer." - (interactive) - (setq-local truncate-lines t) - (setq visual-line-mode nil) - (display-line-numbers-mode 1)) -(defun activate-coding-lines-without-numbers () - "Truncate lines in current buffer." - (interactive) - (setq-local truncate-lines t) - (setq visual-line-mode nil) - (display-line-numbers-mode 0)) -(add-hook 'org-mode-hook 'activate-writing-lines) -(add-hook 'markdown-mode-hook 'activate-writing-lines) -(add-hook 'prog-mode-hook 'activate-coding-lines) -(add-hook 'treemacs-mode-hook 'activate-coding-lines-without-numbers) -(defun apply-proper-line-wrapping () - "Apply proper line wrapping and visual line mode - settings according to whether or not the current - mode derives from `prog-mode`." - (if (derived-mode-p 'prog-mode) - (progn - (truncate-lines-on) - ) - (progn - (truncate-lines-off) - (display-line-numbers-mode 0)))) -(if (featurep 'git-timemachine) - (add-hook 'git-timemachine-mode-hook 'apply-proper-line-wrapping)) - -(provide 'line-wrapping-and-numbers) - -;;; line-wrapping.el ends here diff --git a/modules/user/engineering/default.nix b/modules/user/engineering/default.nix deleted file mode 100644 index 9b692bb..0000000 --- a/modules/user/engineering/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.engineering; -in { - options = { - userSettings.engineering = { - enable = lib.mkEnableOption "Enable engineering programs"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - freecad - openscad - kicad - cura-appimage - arduino-ide - graphviz - ]; - userSettings.vscodium.enable = true; - xdg.desktopEntries.cura = lib.mkForce { - name = "Ultimaker Cura"; - genericName = "3D Printing Software"; - icon = "cura-icon"; - exec = "cura -platformtheme gtk3 %u"; - mimeType = [ "model/stl" "application/vnd.ms-3mfdocument" "application/prs.wavefront-obj" "image/bmp" "image/gif" "image/jpeg" "image/png" "text/x-gcode" "application/x-amf" "application/x-ply" "application/x-ctm" "model/vnd.collada+xml" "model/gltf-binary" "model/gltf+json" "model/vnd.collada+xml+zip" ]; - terminal = false; - type = "Application"; - prefersNonDefaultGPU = true; - }; - }; -} diff --git a/modules/user/flatpak/default.nix b/modules/user/flatpak/default.nix deleted file mode 100644 index 66a8e2d..0000000 --- a/modules/user/flatpak/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.flatpak; -in { - options = { - userSettings.flatpak = { - enable = lib.mkEnableOption "Enable flatpak support"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.flatpak ]; - home.sessionVariables = { - XDG_DATA_DIRS = "$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; # lets flatpak work - }; - - #services.flatpak.enable = true; - #services.flatpak.packages = [ { appId = "com.kde.kdenlive"; origin = "flathub"; } ]; - #services.flatpak.update.onActivation = true; - }; -} diff --git a/modules/user/git/git.nix b/modules/user/git/git.nix deleted file mode 100644 index 890b0c8..0000000 --- a/modules/user/git/git.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, pkgs, osConfig, ... }: - -let - cfg = config.userSettings.git; -in { - options = { - userSettings.git = { - enable = lib.mkEnableOption "Enable git"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.git pkgs.openssh ]; - programs.git.enable = true; - programs.git.userName = config.userSettings.name; - programs.git.userEmail = config.userSettings.email; - programs.git.extraConfig = { - init.defaultBranch = "main"; - safe.directory = [ osConfig.systemSettings.dotfilesDir - osConfig.systemSettings.secretsFlakeDir - (config.home.homeDirectory + "/.cache/nix/tarball-cache") ]; - }; - programs.git.lfs.enable = true; - services.ssh-agent.enable = true; - }; -} diff --git a/modules/user/gnome/default.nix b/modules/user/gnome/default.nix deleted file mode 100644 index a6f9634..0000000 --- a/modules/user/gnome/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ inputs, pkgs, config, lib, ... }: - -let - cfg = config.userSettings.gnome; -in -{ - options = { - userSettings.gnome = { - enable = lib.mkEnableOption "Enable gnome config"; - }; - }; - - config = lib.mkIf cfg.enable { - stylix.targets.gnome.enable = true; - stylix.targets.gtk.enable = true; - dconf.settings = { - "org/gnome/settings-daemon/plugins/power" = { - ambient-enabled = false; - }; - }; - userSettings.alacritty.enable = true; - userSettings.kitty.enable = true; - }; -} diff --git a/modules/user/godot/default.nix b/modules/user/godot/default.nix deleted file mode 100644 index d8a4307..0000000 --- a/modules/user/godot/default.nix +++ /dev/null @@ -1,195 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.godot; -in { - options = { - userSettings.godot = { - enable = lib.mkEnableOption "Enable godot"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - godot_4 - ]; - - # TODO fix other colors - # TODO write script that applies these settings not as a symlink - #home.file.".config/godot/editor_settings-4.3.tres".text = '' - # [gd_resource type="EditorSettings" format=3] - # - # [resource] - # interface/editor/separate_distraction_mode = true - # interface/theme/preset = "Custom" - # interface/theme/spacing_preset = "Custom" - # interface/theme/base_color = Color(''+config.lib.stylix.colors.base00-dec-r+'',''+config.lib.stylix.colors.base00-dec-g+'', ''+config.lib.stylix.colors.base00-dec-b+'', 0.8) - - # interface/theme/accent_color = Color(''+config.lib.stylix.colors.base08-dec-r+'',''+config.lib.stylix.colors.base08-dec-g+'', ''+config.lib.stylix.colors.base08-dec-b+'', 1) - - # interface/theme/contrast = 0.3 - # interface/theme/icon_saturation = 1.55 - # interface/theme/relationship_line_opacity = 0.35 - # interface/theme/border_size = 1 - # interface/theme/corner_radius = 6 - # interface/theme/additional_spacing = 1 - # interface/touchscreen/enable_pan_and_scale_gestures = true - # interface/touchscreen/scale_gizmo_handles = 2.0 - # interface/multi_window/enable = false - # interface/multi_window/restore_windows_on_load = false - # filesystem/external_programs/raster_image_editor = "krita" - # filesystem/external_programs/vector_image_editor = "inkscape" - # filesystem/external_programs/3d_model_editor = "blender" - # filesystem/external_programs/terminal_emulator = "''+config.userSettings.terminal+''" - - # filesystem/directories/default_project_path = "/home/''+config.home.username+''/Projects" - - # text_editor/theme/highlighting/symbol_color = Color(0.67, 0.79, 1, 1) - # text_editor/theme/highlighting/keyword_color = Color(1, 0.44, 0.52, 1) - # text_editor/theme/highlighting/control_flow_keyword_color = Color(1, 0.55, 0.8, 1) - # text_editor/theme/highlighting/base_type_color = Color(0.26, 1, 0.76, 1) - # text_editor/theme/highlighting/engine_type_color = Color(0.56, 1, 0.86, 1) - # text_editor/theme/highlighting/user_type_color = Color(0.78, 1, 0.93, 1) - # text_editor/theme/highlighting/comment_color = Color(0.764706, 0.769608, 0.77451, 0.5) - # text_editor/theme/highlighting/doc_comment_color = Color(0.6, 0.7, 0.8, 0.8) - # text_editor/theme/highlighting/string_color = Color(1, 0.93, 0.63, 1) - # text_editor/theme/highlighting/background_color = Color(0.0323529, 0.0431373, 0.0539216, 1) - # text_editor/theme/highlighting/completion_background_color = Color(0.0588235, 0.0784314, 0.0980392, 1) - # text_editor/theme/highlighting/completion_selected_color = Color(1, 1, 1, 0.07) - # text_editor/theme/highlighting/completion_existing_color = Color(1, 1, 1, 0.14) - # text_editor/theme/highlighting/completion_font_color = Color(0.764706, 0.769608, 0.77451, 1) - # text_editor/theme/highlighting/text_color = Color(0.764706, 0.769608, 0.77451, 1) - # text_editor/theme/highlighting/line_number_color = Color(0.764706, 0.769608, 0.77451, 0.5) - # text_editor/theme/highlighting/safe_line_number_color = Color(0.764706, 0.923529, 0.77451, 0.75) - # text_editor/theme/highlighting/caret_color = Color(1, 1, 1, 1) - # text_editor/theme/highlighting/selection_color = Color(0.941176, 0.443137, 0.470588, 0.4) - # text_editor/theme/highlighting/brace_mismatch_color = Color(1, 0.47, 0.42, 1) - # text_editor/theme/highlighting/current_line_color = Color(1, 1, 1, 0.07) - # text_editor/theme/highlighting/line_length_guideline_color = Color(0.0588235, 0.0784314, 0.0980392, 1) - # text_editor/theme/highlighting/word_highlighted_color = Color(1, 1, 1, 0.07) - # text_editor/theme/highlighting/number_color = Color(0.63, 1, 0.88, 1) - # text_editor/theme/highlighting/function_color = Color(0.34, 0.7, 1, 1) - # text_editor/theme/highlighting/member_variable_color = Color(0.736, 0.88, 1, 1) - # text_editor/theme/highlighting/mark_color = Color(1, 0.47, 0.42, 0.3) - # text_editor/theme/highlighting/breakpoint_color = Color(1, 0.47, 0.42, 1) - # text_editor/theme/highlighting/code_folding_color = Color(1, 1, 1, 0.27) - # text_editor/theme/highlighting/search_result_color = Color(1, 1, 1, 0.07) - # text_editor/appearance/whitespace/draw_tabs = false - # text_editor/behavior/indent/type = 1 - # text_editor/behavior/indent/size = 2 - # text_editor/behavior/files/trim_trailing_whitespace_on_save = true - # editors/panning/2d_editor_panning_scheme = 1 - # editors/panning/sub_editors_panning_scheme = 1 - # editors/panning/simple_panning = true - # project_manager/directory_naming_convention = 3 - # asset_library/available_urls = { - # "godotengine.org (Official)": "https://godotengine.org/asset-library/api" - # } - # asset_library/use_threads = true - # export/android/java_sdk_path = "" - # export/android/android_sdk_path = "" - # export/android/debug_keystore = "/home/emmet/.local/share/godot/keystores/debug.keystore" - # export/android/debug_keystore_user = "androiddebugkey" - # export/android/debug_keystore_pass = "android" - # export/android/force_system_user = false - # export/android/shutdown_adb_on_exit = true - # export/android/one_click_deploy_clear_previous_install = false - # export/android/use_wifi_for_remote_debug = false - # export/android/wifi_remote_debug_host = "localhost" - # export/macos/rcodesign = "" - # export/web/http_host = "localhost" - # export/web/http_port = 8060 - # export/web/use_tls = false - # export/web/tls_key = "" - # export/web/tls_certificate = "" - # export/windows/rcedit = "" - # export/windows/osslsigncode = "" - # export/windows/wine = "/home/emmet/.nix-profile/bin/wine64" - # _default_feature_profile = "" - # interface/editors/show_scene_tree_root_selection = true - # interface/editors/derive_script_globals_by_name = true - # docks/scene_tree/ask_before_deleting_related_animation_tracks = true - # _use_favorites_root_selection = false - # filesystem/file_server/port = 6010 - # filesystem/file_server/password = "" - # editors/3d/manipulator_gizmo_size = 80 - # editors/3d/manipulator_gizmo_opacity = 0.9 - # editors/3d/navigation/show_viewport_rotation_gizmo = true - # editors/3d/navigation/show_viewport_navigation_gizmo = false - # text_editor/behavior/files/auto_reload_and_parse_scripts_on_save = true - # text_editor/behavior/files/open_dominant_script_on_scene_change = false - # text_editor/external/use_external_editor = false - # text_editor/external/exec_path = "" - # text_editor/script_list/script_temperature_enabled = true - # text_editor/script_list/script_temperature_history_size = 15 - # text_editor/script_list/group_help_pages = true - # text_editor/script_list/sort_scripts_by = 0 - # text_editor/script_list/list_script_names_as = 0 - # text_editor/external/exec_flags = "{file}" - # version_control/username = "" - # version_control/ssh_public_key_path = "" - # version_control/ssh_private_key_path = "" - # editors/bone_mapper/handle_colors/unset = Color(0.3, 0.3, 0.3, 1) - # editors/bone_mapper/handle_colors/set = Color(0.1, 0.6, 0.25, 1) - # editors/bone_mapper/handle_colors/missing = Color(0.8, 0.2, 0.8, 1) - # editors/bone_mapper/handle_colors/error = Color(0.8, 0.2, 0.2, 1) - # network/debug_adapter/remote_port = 6006 - # network/debug_adapter/request_timeout = 1000 - # network/debug_adapter/sync_breakpoints = false - # editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size = 0.8 - # editors/3d_gizmos/gizmo_colors/path_tilt = Color(1, 1, 0.4, 0.9) - # editors/3d_gizmos/gizmo_colors/skeleton = Color(1, 0.8, 0.4, 1) - # editors/3d_gizmos/gizmo_colors/selected_bone = Color(0.8, 0.3, 0, 1) - # editors/3d_gizmos/gizmo_settings/bone_axis_length = 0.1 - # editors/3d_gizmos/gizmo_settings/bone_shape = 1 - # editors/3d_gizmos/gizmo_colors/csg = Color(0, 0.4, 1, 0.15) - # editors/grid_map/editor_side = 1 - # editors/grid_map/palette_min_width = 230 - # editors/grid_map/preview_size = 64 - # export/ssh/ssh = "" - # export/ssh/scp = "" - # network/language_server/remote_host = "127.0.0.1" - # network/language_server/remote_port = 6005 - # network/language_server/enable_smart_resolve = true - # network/language_server/show_native_symbols_in_editor = false - # network/language_server/use_thread = false - # network/language_server/poll_limit_usec = 100000 - # text_editor/theme/highlighting/gdscript/function_definition_color = Color(0.4, 0.9, 1, 1) - # text_editor/theme/highlighting/gdscript/global_function_color = Color(0.64, 0.64, 0.96, 1) - # text_editor/theme/highlighting/gdscript/node_path_color = Color(0.72, 0.77, 0.49, 1) - # text_editor/theme/highlighting/gdscript/node_reference_color = Color(0.39, 0.76, 0.35, 1) - # text_editor/theme/highlighting/gdscript/annotation_color = Color(1, 0.7, 0.45, 1) - # text_editor/theme/highlighting/gdscript/string_name_color = Color(1, 0.76, 0.65, 1) - # text_editor/theme/highlighting/comment_markers/critical_color = Color(0.77, 0.35, 0.35, 1) - # text_editor/theme/highlighting/comment_markers/warning_color = Color(0.72, 0.61, 0.48, 1) - # text_editor/theme/highlighting/comment_markers/notice_color = Color(0.56, 0.67, 0.51, 1) - # text_editor/theme/highlighting/comment_markers/critical_list = "ALERT,ATTENTION,CAUTION,CRITICAL,DANGER,SECURITY" - # text_editor/theme/highlighting/comment_markers/warning_list = "BUG,DEPRECATED,FIXME,HACK,TASK,TBD,TODO,WARNING" - # text_editor/theme/highlighting/comment_markers/notice_list = "INFO,NOTE,NOTICE,TEST,TESTING" - # editors/3d_gizmos/gizmo_colors/camera = Color(0.8, 0.4, 0.8, 1) - # editors/3d_gizmos/gizmo_colors/stream_player_3d = Color(0.4, 0.8, 1, 1) - # editors/3d_gizmos/gizmo_colors/occluder = Color(0.8, 0.5, 1, 1) - # editors/3d_gizmos/gizmo_colors/visibility_notifier = Color(0.8, 0.5, 0.7, 1) - # editors/3d_gizmos/gizmo_colors/particles = Color(0.8, 0.7, 0.4, 1) - # editors/3d_gizmos/gizmo_colors/particle_attractor = Color(1, 0.7, 0.5, 1) - # editors/3d_gizmos/gizmo_colors/particle_collision = Color(0.5, 0.7, 1, 1) - # editors/3d_gizmos/gizmo_colors/reflection_probe = Color(0.6, 1, 0.5, 1) - # editors/3d_gizmos/gizmo_colors/decal = Color(0.6, 0.5, 1, 1) - # editors/3d_gizmos/gizmo_colors/voxel_gi = Color(0.5, 1, 0.6, 1) - # editors/3d_gizmos/gizmo_colors/lightmap_lines = Color(0.5, 0.6, 1, 1) - # editors/3d_gizmos/gizmo_colors/lightprobe_lines = Color(0.5, 0.6, 1, 1) - # editors/3d_gizmos/gizmo_colors/joint_body_a = Color(0.6, 0.8, 1, 1) - # editors/3d_gizmos/gizmo_colors/joint_body_b = Color(0.6, 0.9, 1, 1) - # editors/3d_gizmos/gizmo_colors/fog_volume = Color(0.5, 0.7, 1, 1) - # text_editor/help/sort_functions_alphabetically = true - # metadata/script_setup_templates_dictionary = { - # "AnimatedSprite2D": "0NodeDefault", - # "Area2D": "0NodeDefault", - # "CanvasLayer": "0NodeDefault", - # "Node": "0NodeDefault", - # "Node2D": "0NodeDefault" - # } - # metadata/export_template_download_directory = "/home/emmet/.cache/godot" - #''; - }; -} diff --git a/modules/user/home.nix b/modules/user/home.nix deleted file mode 100644 index 80b2500..0000000 --- a/modules/user/home.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -{ - -} diff --git a/modules/user/hyprland/ashell.patch b/modules/user/hyprland/ashell.patch deleted file mode 100644 index 76bea3a..0000000 --- a/modules/user/hyprland/ashell.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff --git a/src/modules/workspaces.rs b/src/modules/workspaces.rs -index 1bafb6d..c448b02 100644 ---- a/src/modules/workspaces.rs -+++ b/src/modules/workspaces.rs -@@ -51,20 +51,20 @@ fn get_workspaces(config: &WorkspacesModuleConfig) -> Vec { - let (special, normal): (Vec<_>, Vec<_>) = workspaces.into_iter().partition(|w| w.id < 0); - - // map special workspaces -- for w in special.iter() { -- result.push(Workspace { -- id: w.id, -- name: w -- .name -- .split(":") -- .last() -- .map_or_else(|| "".to_string(), |s| s.to_owned()), -- monitor_id: Some(w.monitor_id as usize), -- monitor: w.monitor.clone(), -- active: monitors.iter().any(|m| m.special_workspace.id == w.id), -- windows: w.windows, -- }); -- } -+ //for w in special.iter() { -+ // result.push(Workspace { -+ // id: w.id, -+ // name: w -+ // .name -+ // .split(":") -+ // .last() -+ // .map_or_else(|| "".to_string(), |s| s.to_owned()), -+ // monitor_id: Some(w.monitor_id as usize), -+ // monitor: w.monitor.clone(), -+ // active: monitors.iter().any(|m| m.special_workspace.id == w.id), -+ // windows: w.windows, -+ // }); -+ //} - - // map normal workspaces - for w in normal.iter() { diff --git a/modules/user/hyprland/default.nix b/modules/user/hyprland/default.nix deleted file mode 100644 index 069009a..0000000 --- a/modules/user/hyprland/default.nix +++ /dev/null @@ -1,847 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: -let - cfg = config.userSettings.hyprland; - font = config.stylix.fonts.monospace.name; - term = config.userSettings.terminal; - spawnEditor = config.userSettings.spawnEditor; - spawnBrowser = config.userSettings.spawnBrowser; - performance = config.userSettings.hyprland.performanceOptimizations; -in -{ - options = { - userSettings.hyprland = { - enable = lib.mkEnableOption "Enable hyprland"; - performanceOptimizations = lib.mkOption { - default = false; - type = lib.types.bool; - description = "Enable performance optimizations"; - }; - }; - }; - - config = lib.mkIf cfg.enable { - userSettings.alacritty.enable = true; - programs.alacritty.settings.window.opacity = lib.mkOverride 40 (if performance then 1.0 else 0.85); - userSettings.kitty.enable = true; - programs.kitty.settings.background_opacity = lib.mkOverride 40 (if performance then "1.0" else "0.85"); - userSettings.emacs.opacity = lib.mkOverride 40 (if performance then 100 else 85); - userSettings.dmenuScripts = { - enable = true; - dmenuCmd = "fuzzel -d"; - }; - userSettings.hyprland.hyprprofiles.enable = lib.mkDefault true; - userSettings.stylix.enable = true; - - home.sessionVariables = { - NIXOS_OZONE_WL = 1; - ELECTRON_OZONE_PLATFORM_HINT = "wayland"; - XDG_CURRENT_DESKTOP = "Hyprland"; - XDG_SESSION_DESKTOP = "Hyprland"; - XDG_SESSION_TYPE = "wayland"; - GDK_BACKEND = "wayland,x11,*"; - QT_QPA_PLATFORM = "wayland;xcb"; - #QT_QPA_PLATFORMTHEME = lib.mkForce "qt5ct"; - QT_AUTO_SCREEN_SCALE_FACTOR = "1.25"; - QT_WAYLAND_DISABLE_WINDOWDECORATION = 1; - CLUTTER_BACKEND = "wayland"; - #GDK_PIXBUF_MODULE_FILE = "${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"; - #GSK_RENDERER = "gl"; - XCURSOR_THEME = config.gtk.cursorTheme.name; - GDK_DEBUG = "portals"; - GTK_USE_PORTALS = 1; - }; - - xdg.portal = - { - enable = true; - extraPortals = with pkgs; - [ - xdg-desktop-portal-wlr - xdg-desktop-portal-termfilechooser - ]; - }; - - xdg.portal.config.common = { - default = [ "hyprland" ]; - "org.freedesktop.impl.portal.FileChooser" = "termfilechooser"; - }; - xdg.portal.config.hyprland = { - default = [ "hyprland" ]; - "org.freedesktop.impl.portal.FileChooser" = "termfilechooser"; - }; - - home.sessionVariables.TERMCMD = "kitty --class=filechoose_yazi"; - - xdg.configFile."xdg-desktop-portal-termfilechooser/config" = - { - force = true; - text = - '' - [filechooser] - cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh - ''; - }; - - gtk.cursorTheme = { - package = pkgs.quintom-cursor-theme; - name = if (config.stylix.polarity == "light") then "Quintom_Ink" else "Quintom_Snow"; - size = 36; - }; - - wayland.windowManager.hyprland = { - enable = true; - package = inputs.hyprland.packages.${pkgs.system}.hyprland; - plugins = [ ]; - settings = { - env = [ - "AQ_DRM_DEVICES,${config.home.sessionVariables.AQ_DRM_DEVICES}" - "AW_NO_MODIFIERS,1" - ]; - exec-once = [ - "hyprctl setcursor ${config.gtk.cursorTheme.name} ${builtins.toString config.gtk.cursorTheme.size}" - "hyprpaper" - "WGPU_BACKEND=gl ashell" - "hypridle" - "iio-hyprland" - "hyprprofile Default" - "ydotoold" - "GOMAXPROCS=1 syncthing --no-browser" - "protonmail-bridge --noninteractive" - "sleep 5 && libinput-gestures" - "obs-notification-mute-daemon" - "alacritty --class scratch_term" - "kitty --class scratch_yazi -e yazi" - "alacritty --class scratch_numbat -e numbat" - "alacritty --class scratch_btm -e btm" - "element-desktop" - "sleep 5 && hyprctl keyword bind SUPER,S,exec,${spawnBrowser}" - ]; - - general = { - layout = "master"; - border_size = 0; - "col.active_border" = if performance then "0xff${config.lib.stylix.colors.base0B}" else "0xff${config.lib.stylix.colors.base08} 0xff${config.lib.stylix.colors.base09} 0xff${config.lib.stylix.colors.base0A} 0xff${config.lib.stylix.colors.base0B} 0xff${config.lib.stylix.colors.base0C} 0xff${config.lib.stylix.colors.base0D} 0xff${config.lib.stylix.colors.base0E} 0xff${config.lib.stylix.colors.base0F} 270deg"; - "col.inactive_border" = "0xff${config.lib.stylix.colors.base02}"; - resize_on_border = true; - gaps_in = 14; - gaps_out = 14; - }; - - group = { - "col.border_active" = config.wayland.windowManager.hyprland.settings.general."col.active_border"; - "col.border_inactive" = config.wayland.windowManager.hyprland.settings.general."col.inactive_border"; - groupbar = { - gradients = false; - "col.active" = "0xff${config.lib.stylix.colors.base0B}"; - "col.inactive" = "0xff${config.lib.stylix.colors.base02}"; - }; - }; - - decoration = { - shadow = { - enabled = (!performance); - }; - rounding = 0; - dim_special = 0.0; - dim_inactive = true; - dim_strength = 0.15; - blur = { - enabled = (!performance); - size = 10; - passes = 3; - ignore_opacity = true; - contrast = 1.17; - brightness = (if (config.stylix.polarity == "dark") then "0.65" else "1.45"); - xray = (!performance); - special = (!performance); - popups = (!performance); - }; - }; - - cursor = { - no_hardware_cursors = 1; - no_warps = false; - inactive_timeout = 30; - }; - - misc = { - disable_hyprland_logo = true; - mouse_move_enables_dpms = true; - enable_swallow = true; - swallow_regex = "(scratch_term)|(Alacritty)|(kitty)"; - font_family = font; - focus_on_activate = true; - }; - - bezier = lib.optionals (!performance) [ - "wind, 0.05, 0.9, 0.1, 1.05" - "winIn, 0.1, 1.1, 0.1, 1.0" - "winOut, 0.3, -0.3, 0, 1" - "liner, 1, 1, 1, 1" - "linear, 0.0, 0.0, 1.0, 1.0" - ]; - - animations = { - enabled = (!performance); - animation = lib.optionals (!performance) [ - "windowsIn, 1, 6, winIn, popin" - "windowsOut, 1, 5, winOut, popin" - "windowsMove, 1, 5, wind, slide" - "border, 1, 10, default" - "borderangle, 1, 100, linear, loop" - "fade, 1, 10, default" - "workspaces, 1, 5, wind" - "windows, 1, 6, wind, slide" - "specialWorkspace, 1, 6, default, slidefadevert -50%" - ]; - }; - - input = { - kb_layout = "us"; - kb_options = "caps:escape"; - repeat_delay = 450; - repeat_rate = 50; - accel_profile = "adaptive"; - follow_mouse = 2; - float_switch_override_focus = 0; - }; - - binds = { - movefocus_cycles_fullscreen = false; - }; - - bind = [ - "SUPER,SPACE,fullscreen,1" - "SUPERSHIFT,F,fullscreen,0" - "SUPER,Y,workspaceopt,allfloat" - "ALT,TAB,cyclenext" - "ALT,TAB,bringactivetotop" - "ALTSHIFT,TAB,cyclenext,prev" - "ALTSHIFT,TAB,bringactivetotop" - "SUPER,W,togglegroup" - "SUPER,TAB,changegroupactive,f" - "SUPERSHIFT,TAB,changegroupactive,b" - ''SUPER,V,exec,wl-copy $(wl-paste | tr "\n" " ")'' - "SUPERSHIFT,T,exec,screenshot-ocr" - "CTRLALT,Delete,exec,hyprctl kill" - "SUPERSHIFT,K,exec,hyprctl kill" - "SUPER,R,pass,^(com\.obsproject\.Studio)$" - "SUPERSHIFT,R,pass,^(com\.obsproject\.Studio)$" - "SUPER,RETURN,exec,${term}" - "SUPERSHIFT,RETURN,exec,${term} --class float_term" - "SUPER,A,exec,${spawnEditor}" - "SUPERCTRL,S,exec,container-open" - "SUPERCTRL,P,pin" - "SUPER,code:47,exec,fuzzel" - "SUPER,X,exec,fnottctl dismiss" - "SUPERSHIFT,X,exec,fnottctl dismiss all" - "SUPER,Q,killactive" - "SUPERSHIFT,Q,exit" - "SUPER,T,togglefloating" - ",code:148,exec,${term} -e numbat" - '',code:107,exec,grim -g "$(slurp)"'' - ''SHIFT,code:107,exec,grim -g "$(slurp -o)"'' - "SUPER,code:107,exec,grim" - ''CTRL,code:107,exec,grim -g "$(slurp)" - | wl-copy'' - ''SHIFTCTRL,code:107,exec,grim -g "$(slurp -o)" - | wl-copy'' - "SUPERCTRL,code:107,exec,grim - | wl-copy" - "SUPER,C,exec,wl-copy $(hyprpicker)" - "SUPERCTRL,G,exec,hyprgamemode" - "SUPER,H,movefocus,l" - "SUPER,J,movefocus,d" - "SUPER,K,movefocus,u" - "SUPER,L,movefocus,r" - "SUPERSHIFT,H,movewindow,l" - "SUPERSHIFT,J,movewindow,d" - "SUPERSHIFT,K,movewindow,u" - "SUPERSHIFT,L,movewindow,r" - "SUPER,1,focusworkspaceoncurrentmonitor,1" - "SUPER,2,focusworkspaceoncurrentmonitor,2" - "SUPER,3,focusworkspaceoncurrentmonitor,3" - "SUPER,4,focusworkspaceoncurrentmonitor,4" - "SUPER,5,focusworkspaceoncurrentmonitor,5" - "SUPER,6,focusworkspaceoncurrentmonitor,6" - "SUPER,7,focusworkspaceoncurrentmonitor,7" - "SUPER,8,focusworkspaceoncurrentmonitor,8" - "SUPER,9,focusworkspaceoncurrentmonitor,9" - "SUPERCTRL,right,exec,hyprnome" - "SUPERCTRL,left,exec,hyprnome --previous" - "SUPERSHIFT,right,exec,hyprnome --move" - "SUPERSHIFT,left,exec,hyprnome --previous --move" - "SUPERSHIFT,1,movetoworkspace,1" - "SUPERSHIFT,2,movetoworkspace,2" - "SUPERSHIFT,3,movetoworkspace,3" - "SUPERSHIFT,4,movetoworkspace,4" - "SUPERSHIFT,5,movetoworkspace,5" - "SUPERSHIFT,6,movetoworkspace,6" - "SUPERSHIFT,7,movetoworkspace,7" - "SUPERSHIFT,8,movetoworkspace,8" - "SUPERSHIFT,9,movetoworkspace,9" - ''SUPER,Z,exec,if hyprctl clients | grep scratch_term; then echo "scratch_term respawn not needed"; else alacritty --class scratch_term; fi'' - "SUPER,Z,togglespecialworkspace,scratch_term" - ''SUPER,F,exec,if hyprctl clients | grep scratch_yazi; then echo "scratch_yazi respawn not needed"; else kitty --class scratch_yazi -e yazi; fi'' - "SUPER,F,togglespecialworkspace,scratch_yazi" - ''SUPER,N,exec,if hyprctl clients | grep scratch_numbat; then echo "scratch_numbat respawn not needed"; else alacritty --class scratch_numbat -e numbat; fi'' - "SUPER,N,togglespecialworkspace,scratch_numbat" - ''SUPER,B,exec,if hyprctl clients | grep scratch_btm; then echo "scratch_yazi respawn not needed"; else alacritty --class scratch_btm -e btm; fi'' - "SUPER,B,togglespecialworkspace,scratch_btm" - ''SUPER,D,exec,if hyprctl clients | grep Element; then echo "scratch_yazi respawn not needed"; else element-desktop; fi'' - "SUPER,D,togglespecialworkspace,scratch_element" - ''SUPER,equal, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 + 0.5}')"'' - ''SUPER,minus, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 - 0.5}')"'' - "SUPER,I,exec,networkmanager_dmenu" - "SUPER,P,exec,keepmenu" - "SUPERSHIFT,P,exec,hyprprofile-dmenu" - "SUPERCTRL,R,exec,phoenix refresh" - "SUPER,S,exec,${spawnBrowser}" - ]; - - bindr = [ - "SUPER,SUPER_L,exec,nwggrid-wrapper" - ]; - - bindm = [ - "SUPER,mouse:272,movewindow" - "SUPER,mouse:273,resizewindow" - ]; - - bindl = [ - ",switch:on:Lid Switch,exec,loginctl lock-session" - "SUPERSHIFT,S,exec,systemctl suspend" - "SUPERCTRL,L,exec,loginctl lock-session" - ",code:122,exec,swayosd-client --output-volume lower" - ",code:123,exec,swayosd-client --output-volume raise" - ",code:121,exec,swayosd-client --output-volume mute-toggle" - ",code:256,exec,swayosd-client --output-volume mute-toggle" - "SHIFT,code:122,exec,swayosd-client --output-volume lower" - "SHIFT,code:123,exec,swayosd-client --output-volume raise" - ",code:232,exec,swayosd-client --brightness lower" - ",code:233,exec,swayosd-client --brightness raise" - ",code:237,exec,brightnessctl --device='asus::kbd_backlight' set 1-" - ",code:238,exec,brightnessctl --device='asus::kbd_backlight' set +1" - ",code:255,exec,airplane-mode" - ]; - - windowrulev2 = [ - "float,class:^(scratch_term)$" - "size 80% 85%,class:^(scratch_term)$" - "workspace special:scratch_term silent ,class:^(scratch_term)$" - "center,class:^(scratch_term)$" - "float,class:^(float_term)$" - "center,class:^(float_term)$" - "float,class:^(scratch_yazi)$" - "size 80% 85%,class:^(scratch_yazi)$" - "workspace special:scratch_yazi silent,class:^(scratch_yazi)$" - "center,class:^(scratch_yazi)$" - "float,class:^(filechoose_yazi)$" - "size 80% 85%,class:^(filechoose_yazi)$" - "center,class:^(filechoose_yazi)$" - "float,class:^(scratch_numbat)$" - "size 80% 85%,class:^(scratch_numbat)$" - "workspace special:scratch_numbat silent,class:^(scratch_numbat)$" - "center,class:^(scratch_numbat)$" - "float,class:^(scratch_btm)$" - "size 80% 85%,class:^(scratch_btm)$" - "workspace special:scratch_btm silent,class:^(scratch_btm)$" - "center,class:^(scratch_btm)$" - "float,class:^(Element)$" - "size 85% 90%,class:^(Element)$" - "workspace special:scratch_element silent,class:^(Element)$" - "center,class:^(Element)$" - "float,title:^(Save to Disk)$" - "size 70% 75%,title:^(Save to Disk)$" - "center,title:^(Save to Disk)$" - "float,class:^(pokefinder)$" - "float,class:^(Waydroid)$" - "float,title:(Blender Render)" - "size 86% 85%,title:(Blender Render)" - "center,title:(Blender Render)" - "float,class:^(libresprite)$" - "float,title:(Open Images)" - "size 86% 85%,title:(Open Images)" - "center,title:(Open Images)" - "float,title:(Create new document)" - "size 86% 85%,title:(Create new document)" - "center,title:(Create new document)" - "size 86% 85%,title:(Create new document)" - "float,title:(Create New Node)" - "size 70% 70%,title:(Create New Node)" - "center,title:(Create New Node)" - "float,title:(Resource)" - "size 70% 70%,title:(Resource)" - "center,title:(Resource)" - "tile,title:(Godot)" - "suppressevent maximize,class:^(steam)$" - ] ++ lib.optionals (!performance) [ - "opacity 0.80,class:^(org.pulseaudio.pavucontrol)$" - "opacity 1.0,class:^(org.qutebrowser.qutebrowser),fullscreen:1" - "opacity 0.85,class:^(Element)$" - "opacity 0.85,class:^(Logseq)$" - "opacity 1.0,class:^(Brave-browser),fullscreen:1" - "opacity 1.0,class:^(librewolf),fullscreen:1" - "opacity 0.85,title:^(My Local Dashboard Awesome Homepage - qutebrowser)$" - "opacity 0.85,title:\[.*\] - My Local Dashboard Awesome Homepage" - "opacity 0.85,class:^(org.keepassxc.KeePassXC)$" - "opacity 0.85,class:^(org.gnome.Nautilus)$" - "opacity 0.85,class:^(org.gnome.Nautilus)$" - "opacity 0.85,initialTitle:^(Notes)$,initialClass:^(Brave-browser)$" - - ]; - - layerrule = lib.optionals (!performance) [ - "blur,waybar" - "blur,ashell-main-layer" - "blur,launcher # fuzzel" - "blur,~nwggrid" - "blur,gtk-layer-shell" - "xray 1,waybar" - "xray 1,ashell-main-layer" - "xray 1,~nwggrid" - "xray 1,gtk-layer-shell" - "ignorezero, gtk-layer-shell" - "ignorezero, ashell-main-layer" - "animation fade,~nwggrid" - "animation popin 80%, ashell-main-layer" - ]; - - blurls = lib.optionals (!performance) [ - "waybar" - "launcher # fuzzel" - "~nwggrid" - "gtk-layer-shell" - ]; - - xwayland = { - force_zero_scaling = true; - }; - - ecosystem = { - no_update_news = true; - no_donation_nag = true; - }; - - }; - systemd.variables = ["--all"]; - xwayland = { enable = true; }; - systemd.enable = true; - }; - - home.packages = (with pkgs; [ - networkmanagerapplet - hyprland-monitor-attached - alacritty - kitty - killall - polkit_gnome - (ashell.overrideAttrs (o: { - patches = (o.patches or [ ]) ++ [ - ./ashell.patch - ]; - })) - nwg-launchers - (lib.hiPrio papirus-icon-theme) - (pkgs.writeScriptBin "nwggrid-wrapper" '' - #!/bin/sh - if pgrep -x "nwggrid-server" > /dev/null - then - nwggrid -client - else - GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00} & - sleep 0.6 && nwggrid -client - fi - '') - (pkgs.writeScriptBin "hyprgamemode" '' - #!/bin/sh - HYPRGAMEMODE=$(hyprctl getoption decoration:blur:enabled | awk 'NR==1{print $2}') - if [ "$HYPRGAMEMODE" = 1 ] ; then - sync; - hyprctl --batch "\ - keyword animations:enabled 0;\ - keyword decoration:shadow:enabled 0;\ - keyword decoration:blur:enabled 0;\ - keyword general:gaps_in 0;\ - keyword general:gaps_out 0;\ - keyword general:border_size 0;\ - keyword decoration:rounding 0"; - #pkill -STOP electron; - #pkill -STOP syncthing; - #pkill -STOP emacs; - #pkill -STOP emacsclient; - #systemctl --user stop nextcloud-client; - pkill ashell; - pkill hypridle; - exit; - else - hyprctl --batch "\ - keyword animations:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.animations.enabled};\ - keyword decoration:shadow:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.shadow.enabled};\ - keyword decoration:blur:enabled ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.blur.enabled};\ - keyword general:gaps_in ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_in};\ - keyword general:gaps_out ${builtins.toString config.wayland.windowManager.hyprland.settings.general.gaps_out};\ - keyword general:border_size ${builtins.toString config.wayland.windowManager.hyprland.settings.general.border_size};\ - keyword decoration:rounding ${builtins.toString config.wayland.windowManager.hyprland.settings.decoration.rounding}"; - #pkill -CONT electron; - #pkill -CONT syncthing; - #pkill -CONT emacs; - #pkill -CONT emacsclient; - #systemctl --user start nextcloud-client; - WGPU_BACKEND=gl ashell & disown; - hypridle & disown; - exit; - fi - '') - libva-utils - libinput-gestures - gsettings-desktop-schemas - (pkgs.makeDesktopItem { - name = "nwggrid"; - desktopName = "Application Launcher"; - exec = "nwggrid-wrapper"; - terminal = false; - type = "Application"; - noDisplay = true; - icon = "${config.home.homeDirectory}/.local/share/pixmaps/hyprland-logo-stylix.svg"; - }) - hyprnome - wlr-randr - wtype - ydotool - wl-clipboard - hyprland-protocols - hyprpicker - inputs.hyprlock.packages.${pkgs.system}.default - hypridle - hyprpaper - fnott - keepmenu - pinentry-gnome3 - wev - grim - slurp - kdePackages.qtwayland - xdg-utils - wlsunset - hyprshade - pavucontrol - (pkgs.writeScriptBin "workspace-on-monitor" '' - #!/bin/sh - hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id" - '') - (pkgs.writeScriptBin "open-under-ranger" '' - #!/bin/sh - command="$1" - echo $command - file="''${*:2}" - file=''${file// /\\ } - echo $file - workspace=$(hyprctl monitors -j | jq ".[] | select(.specialWorkspace.name == \"special:scratch_yazi\") | .activeWorkspace.id") - if [ -z "''${workspace}" ]; then - hyprctl dispatch exec -- "$command"; - else - hyprctl dispatch exec "[workspace $workspace]" -- "$command" "$file"; - fi - hyprctl dispatch togglespecialworkspace scratch_yazi - '') - (pkgs.writeScriptBin "sct" '' - #!/bin/sh - killall wlsunset &> /dev/null; - if [ $# -eq 1 ]; then - temphigh=$(( $1 + 1 )) - templow=$1 - wlsunset -t $templow -T $temphigh &> /dev/null & - else - killall wlsunset &> /dev/null; - fi - '') - (pkgs.writeScriptBin "scg" '' - #!/bin/sh - hyprshade toggle grayscale; - '') - (pkgs.writeScriptBin "obs-notification-mute-daemon" '' - #!/bin/sh - while true; do - if pgrep -x .obs-wrapped > /dev/null; - then - pkill -STOP fnott; - else - pkill -CONT fnott; - fi - sleep 10; - done - '') - (pkgs.writeScriptBin "suspend-unless-render" '' - #!/bin/sh - if pgrep -x nixos-rebuild > /dev/null || pgrep -x home-manager > /dev/null || pgrep -x kdenlive > /dev/null || pgrep -x FL64.exe > /dev/null || pgrep -x blender > /dev/null || pgrep -x flatpak > /dev/null; - then echo "Shouldn't suspend"; sleep 10; else echo "Should suspend"; systemctl suspend; fi - '') - ]); - home.file.".config/hypr/shaders/grayscale.glsl".text = '' - /* - * Grayscale - */ - #version 300 es - - precision highp float; - in vec2 v_texcoord; - uniform sampler2D tex; - out vec4 fragColor; - - // Enum for type of grayscale conversion - const int LUMINOSITY = 0; - const int LIGHTNESS = 1; - const int AVERAGE = 2; - - /** - * Type of grayscale conversion. - */ - const int Type = LUMINOSITY; - - // Enum for selecting luma coefficients - const int PAL = 0; - const int HDTV = 1; - const int HDR = 2; - - /** - * Formula used to calculate relative luminance. - * (Only applies to type = "luminosity".) - */ - const int LuminosityType = HDR; - - void main() { - vec4 pixColor = texture2D(tex, v_texcoord); - - float gray; - if (Type == LUMINOSITY) { - // https://en.wikipedia.org/wiki/Grayscale#Luma_coding_in_video_systems - if (LuminosityType == PAL) { - gray = dot(pixColor.rgb, vec3(0.299, 0.587, 0.114)); - } else if (LuminosityType == HDTV) { - gray = dot(pixColor.rgb, vec3(0.2126, 0.7152, 0.0722)); - } else if (LuminosityType == HDR) { - gray = dot(pixColor.rgb, vec3(0.2627, 0.6780, 0.0593)); - } - } else if (Type == LIGHTNESS) { - float maxPixColor = max(pixColor.r, max(pixColor.g, pixColor.b)); - float minPixColor = min(pixColor.r, min(pixColor.g, pixColor.b)); - gray = (maxPixColor + minPixColor) / 2.0; - } else if (Type == AVERAGE) { - gray = (pixColor.r + pixColor.g + pixColor.b) / 3.0; - } - vec3 grayscale = vec3(gray); - - fragColor = vec4(grayscale, pixColor.a); - } - ''; - home.file.".config/ashell/config.toml".text = '' -outputs = "All" -position = "Top" -app_launcher_cmd = "nwggrid-wrapper" -truncate_title_after_length = 150 -[modules] -left = [ "AppLauncher", "SystemInfo" ] -center = [ "Workspaces" ] -right = [ "Clock", "Settings", "Tray" ] -[workspaces] -visibility_mode = "MonitorSpecific" -enable_workspace_filling = true -[system.cpu] -warn_threshold = 80 -alert_threshold = 95 -[system.mem] -warn_threshold = 50 -alert_threshold = 75 -[system.temp] -warn_threshold = 90 -alert_threshold = 95 -[clock] -format = "%a %d %b %R" -[mediaPlayer] -max_title_length = 100 -[settings] -lockCmd = "hyprlock &" -audio_sinks_more_cmd = "pavucontrol -t 3" -audio_sources_more_cmd = "pavucontrol -t 4" -wifi_more_cmd = "nm-connection-editor" -vpn_more_cmd = "nm-connection-editor" -bluetooth_more_cmd = "blueman-manager" -[appearance] -style = "Solid" -opacity = ${if performance then "1.0" else "0.7"} -background_color = "#${config.lib.stylix.colors.base00}88" -primary_color = "#${config.lib.stylix.colors.base0A}" -secondary_color = "#${config.lib.stylix.colors.base01}" -success_color = "#${config.lib.stylix.colors.base0A}" -danger_color = "#${config.lib.stylix.colors.base08}" -text_color = "#${config.lib.stylix.colors.base07}" -workspace_colors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] -specialWorkspaceColors = [ "#${config.lib.stylix.colors.base0B}", "#${config.lib.stylix.colors.base0B}" ] -[appearance.menu] -opacity = ${if performance then "1.0" else "0.7"} -backdrop = 0.0 - ''; - home.file.".config/hypr/hypridle.conf".text = '' - general { - lock_cmd = pgrep hyprlock || hyprlock - before_sleep_cmd = loginctl lock-session - ignore_dbus_inhibit = false - } - - listener { - timeout = 165 # in seconds - on-timeout = loginctl lock-session - } - listener { - timeout = 180 # in seconds - on-timeout = systemctl suspend - on-resume = hyprctl dispatch dpms on - } - ''; - home.file.".config/hypr/hyprlock.conf".text = '' - background { - monitor = - path = screenshot - - # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations - blur_passes = 4 - blur_size = 5 - noise = 0.0117 - contrast = 0.8916 - brightness = 0.8172 - vibrancy = 0.1696 - vibrancy_darkness = 0.0 - } - - input-field { - monitor = - size = 200, 50 - outline_thickness = 3 - dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 - dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 - dots_center = false - dots_rounding = -1 # -1 default circle, -2 follow input-field rounding - outer_color = rgb(${config.lib.stylix.colors.base07-rgb-r},${config.lib.stylix.colors.base07-rgb-g},${config.lib.stylix.colors.base07-rgb-b}) - inner_color = rgb(${config.lib.stylix.colors.base00-rgb-r},${config.lib.stylix.colors.base00-rgb-g},${config.lib.stylix.colors.base00-rgb-b}) - font_color = rgb(${config.lib.stylix.colors.base07-rgb-r},${config.lib.stylix.colors.base07-rgb-g},${config.lib.stylix.colors.base07-rgb-b}) - fade_on_empty = true - fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. - placeholder_text = Input Password... # Text rendered in the input box when it's empty. - hide_input = false - rounding = -1 # -1 means complete rounding (circle/oval) - check_color = rgb(${config.lib.stylix.colors.base0A-rgb-r},${config.lib.stylix.colors.base0A-rgb-g},${config.lib.stylix.colors.base0A-rgb-b}) - fail_color = rgb(${config.lib.stylix.colors.base08-rgb-r},${config.lib.stylix.colors.base08-rgb-g},${config.lib.stylix.colors.base08-rgb-b}) - fail_text = $FAIL ($ATTEMPTS) # can be set to empty - fail_transition = 300 # transition time in ms between normal outer_color and fail_color - capslock_color = -1 - numlock_color = -1 - bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) - invert_numlock = false # change color if numlock is off - swap_font_color = false # see below - - position = 0, -20 - halign = center - valign = center - } - - label { - monitor = - text = Screen Locked - color = rgb(${config.lib.stylix.colors.base07-rgb-r},${config.lib.stylix.colors.base07-rgb-g},${config.lib.stylix.colors.base07-rgb-b}) - font_size = 25 - font_family = ${font} - - rotate = 0 # degrees, counter-clockwise - - position = 0, 160 - halign = center - valign = center - } - - label { - monitor = - text = $TIME12 - color = rgb(${config.lib.stylix.colors.base07-rgb-r},${config.lib.stylix.colors.base07-rgb-g},${config.lib.stylix.colors.base07-rgb-b}) - font_size = 20 - font_family = ${font} - rotate = 0 # degrees, counter-clockwise - - position = 0, 80 - halign = center - valign = center - } - ''; - services.hyprpolkitagent.enable = true; - services.swayosd.enable = true; - services.swayosd.topMargin = 0.5; - home.file.".config/nwg-launchers/nwggrid/terminal".text = "alacritty -e"; - - services.udiskie.enable = true; - services.udiskie.tray = "never"; - programs.fuzzel.enable = true; - programs.fuzzel.package = pkgs.fuzzel; - programs.fuzzel.settings = { - main = { - font = font + ":size=20"; - dpi-aware = "no"; - show-actions = "yes"; - terminal = "${pkgs.alacritty}/bin/alacritty"; - }; - colors = { - background = config.lib.stylix.colors.base00 + (if performance then "ff" else "bf"); - text = config.lib.stylix.colors.base07 + "ff"; - match = config.lib.stylix.colors.base05 + "ff"; - selection = config.lib.stylix.colors.base08 + "ff"; - selection-text = config.lib.stylix.colors.base00 + "ff"; - selection-match = config.lib.stylix.colors.base05 + "ff"; - border = config.lib.stylix.colors.base08 + "ff"; - }; - border = { - width = 0; - radius = 0; - }; - }; - services.fnott.enable = true; - services.fnott.settings = { - main = { - anchor = "bottom-right"; - stacking-order = "top-down"; - min-width = 400; - title-font = font + ":size=14"; - summary-font = font + ":size=12"; - body-font = font + ":size=11"; - border-size = 0; - }; - low = { - background = config.lib.stylix.colors.base00 + "e6"; - title-color = config.lib.stylix.colors.base03 + "ff"; - summary-color = config.lib.stylix.colors.base03 + "ff"; - body-color = config.lib.stylix.colors.base03 + "ff"; - idle-timeout = 150; - max-timeout = 30; - default-timeout = 8; - }; - normal = { - background = config.lib.stylix.colors.base00 + "e6"; - title-color = config.lib.stylix.colors.base07 + "ff"; - summary-color = config.lib.stylix.colors.base07 + "ff"; - body-color = config.lib.stylix.colors.base07 + "ff"; - idle-timeout = 150; - max-timeout = 30; - default-timeout = 8; - }; - critical = { - background = config.lib.stylix.colors.base00 + "e6"; - title-color = config.lib.stylix.colors.base08 + "ff"; - summary-color = config.lib.stylix.colors.base08 + "ff"; - body-color = config.lib.stylix.colors.base08 + "ff"; - idle-timeout = 0; - max-timeout = 0; - default-timeout = 0; - }; - }; - home.file.".config/hypr/hyprpaper.conf".text = '' - preload = ${config.stylix.image} - wallpaper = ,${config.stylix.image} - ''; - - }; -} diff --git a/modules/user/hyprland/hyprprofiles/default.nix b/modules/user/hyprland/hyprprofiles/default.nix deleted file mode 100644 index e672d72..0000000 --- a/modules/user/hyprland/hyprprofiles/default.nix +++ /dev/null @@ -1,76 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.userSettings.hyprland.hyprprofiles; - dmenuCmd = config.userSettings.dmenuScripts.dmenuCmd; - qutebrowserEnabled = config.userSettings.qutebrowser.enable; - qutebrowserDefault = (config.userSettings.browser == "qutebrowser"); -in -{ - options = { - userSettings.hyprland.hyprprofiles = { - enable = lib.mkEnableOption "Enable hyprprofile profile switcher"; - # TODO make option for list of profiles - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ - (pkgs.writeScriptBin "hyprprofile" '' - #!/bin/sh - prevprofile="$(cat ~/.hyprprofile)" - newprofile="$1" - if [ $# -eq 1 ]; then - if [ $newprofile = "Default" ]; then - echo "" > ~/.hyprprofile; - else - echo $newprofile > ~/.hyprprofile; - fi - if [ -f ~/.config/hyprprofiles/$prevprofile/exit-hook.sh ]; then - ~/.config/hyprprofiles/$prevprofile/exit-hook.sh; - fi - if [ -f ~/.config/hyprprofiles/$newprofile/start-hook.sh ]; then - ~/.config/hyprprofiles/$newprofile/start-hook.sh; - fi - fi - '') - (pkgs.writeScriptBin "hyprprofile-dmenu" '' - #!/bin/sh - choice="$(\ls ~/.config/hyprprofiles | ''+dmenuCmd+'')"; - hyprprofile $choice; - '')] ++ - lib.optionals qutebrowserEnabled [ - (pkgs.writeScriptBin "qutebrowser-hyprprofile" '' - #!/bin/sh - profile="$(cat ~/.hyprprofile)" - if [[ $profile ]]; then - container-open $profile $1; - else - qutebrowser --qt-flag ignore-gpu-blacklist --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag enable-accelerated-2d-canvas --qt-flag num-raster-threads=4 $1; - fi - '') - (pkgs.makeDesktopItem { - name = "qutebrowser-hyprprofile"; - desktopName = "Qutebrowser Hyprprofile"; - exec = "qutebrowser-hyprprofile %u"; - categories = ["Network" "WebBrowser"]; - keywords = ["Browser"]; - terminal = false; - type = "Application"; - noDisplay = false; - icon = "qutebrowser"; - }) - ]; - xdg.mimeApps.defaultApplications = lib.optionals qutebrowserDefault (lib.mkForce { - "text/html" = "qutebrowser-hyprprofile.desktop"; - "x-scheme-handler/http" = "qutebrowser-hyprprofile.desktop"; - "x-scheme-handler/https" = "qutebrowser-hyprprofile.desktop"; - "x-scheme-handler/about" = "qutebrowser-hyprprofile.desktop"; - "x-scheme-handler/unknown" = "qutebrowser-hyprprofile.desktop"; - }); - home.file.".config/hyprprofiles/" = { - source = ./profiles; - recursive = true; - executable = true; - }; - }; -} diff --git a/modules/user/japanese/default.nix b/modules/user/japanese/default.nix deleted file mode 100644 index dc80f12..0000000 --- a/modules/user/japanese/default.nix +++ /dev/null @@ -1,124 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.japanese; -in { - options = { - userSettings.japanese = { - enable = lib.mkEnableOption "Enable Japanese input"; - }; - }; - - config = lib.mkIf cfg.enable { - i18n.inputMethod = { - enabled = "fcitx5"; - fcitx5.addons = with pkgs; [ - fcitx5-mozc - fcitx5-gtk - ]; - }; - home.sessionVariables = { - GTK_IM_MODULE = lib.mkForce ""; - }; - home.file.".config/fcitx5/config".text = '' - [Hotkey] - # Enumerate when press trigger key repeatedly - EnumerateWithTriggerKeys=True - # Temporally switch between first and current Input Method - AltTriggerKeys= - # Enumerate Input Method Forward - EnumerateForwardKeys= - # Enumerate Input Method Backward - EnumerateBackwardKeys= - # Skip first input method while enumerating - EnumerateSkipFirst=False - # Toggle embedded preedit - TogglePreedit= - - [Hotkey/TriggerKeys] - 0=Super+comma - - [Hotkey/EnumerateGroupForwardKeys] - 0=Super+space - - [Hotkey/EnumerateGroupBackwardKeys] - 0=Shift+Super+space - - [Hotkey/ActivateKeys] - 0=Hangul_Hanja - - [Hotkey/DeactivateKeys] - 0=Hangul_Romaja - - [Hotkey/PrevPage] - 0=Up - - [Hotkey/NextPage] - 0=Down - - [Hotkey/PrevCandidate] - 0=Shift+Tab - - [Hotkey/NextCandidate] - 0=Tab - - [Behavior] - # Active By Default - ActiveByDefault=False - # Share Input State - ShareInputState=No - # Show preedit in application - PreeditEnabledByDefault=True - # Show Input Method Information when switch input method - ShowInputMethodInformation=True - # Show Input Method Information when changing focus - showInputMethodInformationWhenFocusIn=False - # Show compact input method information - CompactInputMethodInformation=True - # Show first input method information - ShowFirstInputMethodInformation=True - # Default page size - DefaultPageSize=5 - # Override Xkb Option - OverrideXkbOption=False - # Custom Xkb Option - CustomXkbOption= - # Force Enabled Addons - EnabledAddons= - # Force Disabled Addons - DisabledAddons= - # Preload input method to be used by default - PreloadInputMethod=True - # Allow input method in the password field - AllowInputMethodForPassword=False - # Show preedit text when typing password - ShowPreeditForPassword=False - # Interval of saving user data in minutes - AutoSavePeriod=30 - ''; -# home.file.".config/fcitx5/profile".text = '' -# [Groups/0] -# # Group Name -# Name=Default -# # Layout -# Default Layout=us -# # Default Input Method -# DefaultIM=mozc -# -# [Groups/0/Items/0] -# # Name -# Name=keyboard-us -# # Layout -# Layout= -# -# [Groups/0/Items/1] -# # Name -# Name=mozc -# # Layout -# Layout= -# -# [GroupOrder] -# 0=Default -# ''; - }; -} diff --git a/modules/user/keepass/default.nix b/modules/user/keepass/default.nix deleted file mode 100644 index 7711999..0000000 --- a/modules/user/keepass/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.keepass; -in { - options = { - userSettings.keepass = { - enable = lib.mkEnableOption "Enable keepass password manager"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - keepassxc - keepmenu - ]; - }; -} diff --git a/modules/user/localai/default.nix b/modules/user/localai/default.nix deleted file mode 100644 index 5fe5971..0000000 --- a/modules/user/localai/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ config, lib, pkgs, pkgs-stable, ...}: - -let - cfg = config.userSettings.ai; -in { - options = { - userSettings.ai = { - enable = lib.mkEnableOption "Enable localai"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ pkgs-stable.local-ai - (pkgs.writeScriptBin "aid" - '' - # ai daemon - pushd ~/.config/local-ai; - local-ai &> /dev/null & disown; - popd;'') - ]; - }; -} diff --git a/modules/user/media/default.nix b/modules/user/media/default.nix deleted file mode 100644 index cd843b7..0000000 --- a/modules/user/media/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -let - cfg = config.userSettings.media; -in { - options = { - userSettings.media = { - enable = lib.mkEnableOption "Enable media playback apps"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - vlc - mpv - yt-dlp_git - ffmpeg - ]; - - }; -} diff --git a/modules/user/music/default.nix b/modules/user/music/default.nix deleted file mode 100644 index 97cba87..0000000 --- a/modules/user/music/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.music; -in { - options = { - userSettings.music = { - enable = lib.mkEnableOption "Enable apps for making music"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - ardour - rosegarden - tenacity - mediainfo - easytag - bottles - # The following requires 64-bit FL Studio (FL64) to be installed to a bottle - # With a bottle name of "FL Studio" - (pkgs.writeShellScriptBin "flstudio" '' - #!/bin/sh - if [ -z "$1" ] - then - bottles-cli run -b "FL Studio" -p FL64 - #flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 - else - filepath=$(winepath --windows "$1") - echo \'"$filepath"\' - bottles-cli run -b "FL Studio" -p "FL64" --args \'"$filepath"\' - #flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 -args "$filepath" - fi - '') - (pkgs.makeDesktopItem { - name = "flstudio"; - desktopName = "FL Studio 64"; - exec = "flstudio %U"; - terminal = false; - type = "Application"; - icon = "flstudio"; - mimeTypes = ["application/octet-stream"]; - }) - (stdenv.mkDerivation { - name = "flstudio-icon"; - # icon from https://www.reddit.com/r/MacOS/comments/jtmp7z/i_made_icons_for_discord_spotify_and_fl_studio_in/ - src = [ ./flstudio.png ]; - - unpackPhase = '' - for srcFile in $src; do - # Copy file into build dir - cp $srcFile ./ - done - ''; - - installPhase = '' - mkdir -p $out $out/share $out/share/pixmaps - ls $src - ls - cp $src $out/share/pixmaps/flstudio.png - ''; - }) - ]; - - xdg.mimeApps.associations.added = { - "application/octet-stream" = "flstudio.desktop;"; - }; - }; -} diff --git a/modules/user/nix/default.nix b/modules/user/nix/default.nix deleted file mode 100644 index a2c00e0..0000000 --- a/modules/user/nix/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, pkgs, inputs, ... }: - -{ - config = { - home.stateVersion = "22.11"; - }; -} diff --git a/modules/user/office/default.nix b/modules/user/office/default.nix deleted file mode 100644 index 29c471d..0000000 --- a/modules/user/office/default.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.office; -in { - options = { - userSettings.office = { - enable = lib.mkEnableOption "Enable my office programs"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - shared-mime-info - kdePackages.dolphin - libreoffice-still - mate.atril - xournalpp - adwaita-icon-theme - foliate - gnome-maps - seahorse - element-desktop - openvpn - pomodoro-gtk - ]; - services.syncthing.enable = true; - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; - }; -} diff --git a/modules/user/plasma/default.nix b/modules/user/plasma/default.nix deleted file mode 100644 index 601a8ba..0000000 --- a/modules/user/plasma/default.nix +++ /dev/null @@ -1,885 +0,0 @@ -{config, lib, pkgs, inputs, ...}: -let - cfg = config.userSettings.plasma; -in { - options = { - userSettings.plasma = { - enable = lib.mkEnableOption "Enable plasma with config"; - }; - }; - - imports = [ inputs.plasma-manager.homeManagerModules.plasma-manager ]; - - config = lib.mkIf cfg.enable { - stylix.targets.gtk.enable = lib.mkForce false; - qt.enable = lib.mkForce false; - home.file = { - ".config/qt5ct/colors/oomox-current.conf".enable = lib.mkForce false; - ".config/Trolltech.conf".enable = lib.mkForce false; - ".config/kdeglobals".enable = lib.mkForce false; - ".config/qt5ct/qt5ct.conf".enable = lib.mkForce false; - }; - stylix.targets.kde.enable = true; - programs.plasma = { - enable = true; - workspace = { - clickItemTo = "select"; - wallpaper = builtins.toString config.stylix.image; - }; - shortcuts = { - "ActivityManager"."switch-to-activity-080837e2-f10a-45f7-84cb-a3022c9dc5d4" = [ ]; - "KDE Keyboard Layout Switcher"."Switch to Last-Used Keyboard Layout" = "Meta+Alt+L"; - "KDE Keyboard Layout Switcher"."Switch to Next Keyboard Layout" = "Meta+Alt+K"; - "kaccess"."Toggle Screen Reader On and Off" = "Meta+Alt+S"; - "kcm_touchpad"."Disable Touchpad" = "Touchpad Off"; - "kcm_touchpad"."Enable Touchpad" = "Touchpad On"; - "kcm_touchpad"."Toggle Touchpad" = ["Touchpad Toggle,Touchpad Toggle" "Meta+Ctrl+Zenkaku Hankaku"]; - "khotkeys"."{d03619b6-9b3c-48cc-9d9c-a2aadb485550}" = [ ]; - "kmix"."decrease_microphone_volume" = "Microphone Volume Down"; - "kmix"."decrease_volume" = "Volume Down"; - "kmix"."decrease_volume_small" = "Shift+Volume Down"; - "kmix"."increase_microphone_volume" = "Microphone Volume Up"; - "kmix"."increase_volume" = "Volume Up"; - "kmix"."increase_volume_small" = "Shift+Volume Up"; - "kmix"."mic_mute" = ["Microphone Mute" "Meta+Volume Mute,Microphone Mute" "Meta+Volume Mute,Mute Microphone"]; - "kmix"."mute" = "Volume Mute"; - "ksmserver"."Halt Without Confirmation" = "none,,Shut Down Without Confirmation"; - "ksmserver"."Lock Session" = ["Meta+L" "Screensaver,Meta+L" "Screensaver,Lock Session"]; - "ksmserver"."Log Out" = "Ctrl+Alt+Del"; - "ksmserver"."Log Out Without Confirmation" = "none,,Log Out Without Confirmation"; - "ksmserver"."LogOut" = [ ]; - "ksmserver"."Reboot" = "none,,Reboot"; - "ksmserver"."Reboot Without Confirmation" = "none,,Reboot Without Confirmation"; - "ksmserver"."Shut Down" = "none,,Shut Down"; - "kwin"."Activate Window Demanding Attention" = "Meta+Ctrl+A"; - "kwin"."Cube" = "Meta+C,none,Toggle Cube"; - "kwin"."Cycle Overview" = [ ]; - "kwin"."Cycle Overview Opposite" = [ ]; - "kwin"."Decrease Opacity" = "none,,Decrease Opacity of Active Window by 5%"; - "kwin"."Edit Tiles" = "Meta+T"; - "kwin"."Expose" = "Ctrl+F9"; - "kwin"."ExposeAll" = ["Ctrl+F10" "Launch (C),Ctrl+F10" "Launch (C),Toggle Present Windows (All desktops)"]; - "kwin"."ExposeClass" = "Ctrl+F7"; - "kwin"."ExposeClassCurrentDesktop" = [ ]; - "kwin"."Grid View" = "Meta+G"; - "kwin"."Increase Opacity" = "none,,Increase Opacity of Active Window by 5%"; - "kwin"."Invert" = "Meta+Ctrl+I"; - "kwin"."Invert Screen Colors" = [ ]; - "kwin"."InvertWindow" = "Meta+Ctrl+U"; - "kwin"."Kill Window" = "Meta+Ctrl+Esc"; - "kwin"."Move Tablet to Next Output" = [ ]; - "kwin"."MoveMouseToCenter" = "Meta+F6"; - "kwin"."MoveMouseToFocus" = "Meta+F5"; - "kwin"."MoveZoomDown" = [ ]; - "kwin"."MoveZoomLeft" = [ ]; - "kwin"."MoveZoomRight" = [ ]; - "kwin"."MoveZoomUp" = [ ]; - "kwin"."Overview" = "Meta+W"; - "kwin"."Setup Window Shortcut" = "none,,Setup Window Shortcut"; - "kwin"."Show Desktop" = "Meta+D"; - "kwin"."ShowDesktopGrid" = "Meta+F8,none"; - "kwin"."Suspend Compositing" = "Alt+Shift+F12,none"; - "kwin"."Switch One Desktop Down" = "none,Meta+Ctrl+Down,Switch One Desktop Down"; - "kwin"."Switch One Desktop Up" = "none,Meta+Ctrl+Up,Switch One Desktop Up"; - "kwin"."Switch One Desktop to the Left" = "none,Meta+Ctrl+Left,Switch One Desktop to the Left"; - "kwin"."Switch One Desktop to the Right" = "none,Meta+Ctrl+Right,Switch One Desktop to the Right"; - "kwin"."Switch Window Down" = "Meta+Alt+Down"; - "kwin"."Switch Window Left" = "Meta+Alt+Left"; - "kwin"."Switch Window Right" = "Meta+Alt+Right"; - "kwin"."Switch Window Up" = "Meta+Alt+Up"; - "kwin"."Switch to Desktop 1" = "Ctrl+F1"; - "kwin"."Switch to Desktop 10" = "none,,Switch to Desktop 10"; - "kwin"."Switch to Desktop 11" = "none,,Switch to Desktop 11"; - "kwin"."Switch to Desktop 12" = "none,,Switch to Desktop 12"; - "kwin"."Switch to Desktop 13" = "none,,Switch to Desktop 13"; - "kwin"."Switch to Desktop 14" = "none,,Switch to Desktop 14"; - "kwin"."Switch to Desktop 15" = "none,,Switch to Desktop 15"; - "kwin"."Switch to Desktop 16" = "none,,Switch to Desktop 16"; - "kwin"."Switch to Desktop 17" = "none,,Switch to Desktop 17"; - "kwin"."Switch to Desktop 18" = "none,,Switch to Desktop 18"; - "kwin"."Switch to Desktop 19" = "none,,Switch to Desktop 19"; - "kwin"."Switch to Desktop 2" = "Ctrl+F2"; - "kwin"."Switch to Desktop 20" = "none,,Switch to Desktop 20"; - "kwin"."Switch to Desktop 3" = "Ctrl+F3"; - "kwin"."Switch to Desktop 4" = "Ctrl+F4"; - "kwin"."Switch to Desktop 5" = "none,,Switch to Desktop 5"; - "kwin"."Switch to Desktop 6" = "none,,Switch to Desktop 6"; - "kwin"."Switch to Desktop 7" = "none,,Switch to Desktop 7"; - "kwin"."Switch to Desktop 8" = "none,,Switch to Desktop 8"; - "kwin"."Switch to Desktop 9" = "none,,Switch to Desktop 9"; - "kwin"."Switch to Next Desktop" = "none,,Switch to Next Desktop"; - "kwin"."Switch to Next Screen" = "none,,Switch to Next Screen"; - "kwin"."Switch to Previous Desktop" = "none,,Switch to Previous Desktop"; - "kwin"."Switch to Previous Screen" = "none,,Switch to Previous Screen"; - "kwin"."Switch to Screen 0" = "none,,Switch to Screen 0"; - "kwin"."Switch to Screen 1" = "none,,Switch to Screen 1"; - "kwin"."Switch to Screen 2" = "none,,Switch to Screen 2"; - "kwin"."Switch to Screen 3" = "none,,Switch to Screen 3"; - "kwin"."Switch to Screen 4" = "none,,Switch to Screen 4"; - "kwin"."Switch to Screen 5" = "none,,Switch to Screen 5"; - "kwin"."Switch to Screen 6" = "none,,Switch to Screen 6"; - "kwin"."Switch to Screen 7" = "none,,Switch to Screen 7"; - "kwin"."Switch to Screen Above" = "none,,Switch to Screen Above"; - "kwin"."Switch to Screen Below" = "none,,Switch to Screen Below"; - "kwin"."Switch to Screen to the Left" = "none,,Switch to Screen to the Left"; - "kwin"."Switch to Screen to the Right" = "none,,Switch to Screen to the Right"; - "kwin"."Toggle" = [ ]; - "kwin"."Toggle Night Color" = [ ]; - "kwin"."Toggle Window Raise/Lower" = "none,,Toggle Window Raise/Lower"; - "kwin"."Walk Through Desktop List" = [ ]; - "kwin"."Walk Through Desktop List (Reverse)" = [ ]; - "kwin"."Walk Through Desktops" = [ ]; - "kwin"."Walk Through Desktops (Reverse)" = [ ]; - "kwin"."Walk Through Windows" = "Alt+Tab"; - "kwin"."Walk Through Windows (Reverse)" = "Alt+Shift+Backtab,Alt+Shift+Tab,Walk Through Windows (Reverse)"; - "kwin"."Walk Through Windows Alternative" = "none,,Walk Through Windows Alternative"; - "kwin"."Walk Through Windows Alternative (Reverse)" = "none,,Walk Through Windows Alternative (Reverse)"; - "kwin"."Walk Through Windows of Current Application" = "Alt+`"; - "kwin"."Walk Through Windows of Current Application (Reverse)" = "Alt+~"; - "kwin"."Walk Through Windows of Current Application Alternative" = "none,,Walk Through Windows of Current Application Alternative"; - "kwin"."Walk Through Windows of Current Application Alternative (Reverse)" = "none,,Walk Through Windows of Current Application Alternative (Reverse)"; - "kwin"."Window Above Other Windows" = "none,,Keep Window Above Others"; - "kwin"."Window Below Other Windows" = "none,,Keep Window Below Others"; - "kwin"."Window Close" = "Alt+F4"; - "kwin"."Window Fullscreen" = "none,,Make Window Fullscreen"; - "kwin"."Window Grow Horizontal" = "none,,Expand Window Horizontally"; - "kwin"."Window Grow Vertical" = "none,,Expand Window Vertically"; - "kwin"."Window Lower" = "none,,Lower Window"; - "kwin"."Window Maximize" = "Meta+PgUp"; - "kwin"."Window Maximize Horizontal" = "none,,Maximize Window Horizontally"; - "kwin"."Window Maximize Vertical" = "none,,Maximize Window Vertically"; - "kwin"."Window Minimize" = "Meta+PgDown"; - "kwin"."Window Move" = "none,,Move Window"; - "kwin"."Window Move Center" = "none,,Move Window to the Center"; - "kwin"."Window No Border" = "none,,Toggle Window Titlebar and Frame"; - "kwin"."Window On All Desktops" = "none,,Keep Window on All Desktops"; - "kwin"."Window One Desktop Down" = "Meta+Ctrl+Shift+Down"; - "kwin"."Window One Desktop Up" = "Meta+Ctrl+Shift+Up"; - "kwin"."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left"; - "kwin"."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right"; - "kwin"."Window One Screen Down" = "none,,Move Window One Screen Down"; - "kwin"."Window One Screen Up" = "none,,Move Window One Screen Up"; - "kwin"."Window One Screen to the Left" = "none,,Move Window One Screen to the Left"; - "kwin"."Window One Screen to the Right" = "none,,Move Window One Screen to the Right"; - "kwin"."Window Operations Menu" = "Alt+F3"; - "kwin"."Window Pack Down" = "none,,Move Window Down"; - "kwin"."Window Pack Left" = "none,,Move Window Left"; - "kwin"."Window Pack Right" = "none,,Move Window Right"; - "kwin"."Window Pack Up" = "none,,Move Window Up"; - "kwin"."Window Quick Tile Bottom" = "Meta+Down"; - "kwin"."Window Quick Tile Bottom Left" = "none,,Quick Tile Window to the Bottom Left"; - "kwin"."Window Quick Tile Bottom Right" = "none,,Quick Tile Window to the Bottom Right"; - "kwin"."Window Quick Tile Left" = "Meta+Left"; - "kwin"."Window Quick Tile Right" = "Meta+Right"; - "kwin"."Window Quick Tile Top" = "Meta+Up"; - "kwin"."Window Quick Tile Top Left" = "none,,Quick Tile Window to the Top Left"; - "kwin"."Window Quick Tile Top Right" = "none,,Quick Tile Window to the Top Right"; - "kwin"."Window Raise" = "none,,Raise Window"; - "kwin"."Window Resize" = "none,,Resize Window"; - "kwin"."Window Shade" = "none,,Shade Window"; - "kwin"."Window Shrink Horizontal" = "none,,Shrink Window Horizontally"; - "kwin"."Window Shrink Vertical" = "none,,Shrink Window Vertically"; - "kwin"."Window to Desktop 1" = "none,,Window to Desktop 1"; - "kwin"."Window to Desktop 10" = "none,,Window to Desktop 10"; - "kwin"."Window to Desktop 11" = "none,,Window to Desktop 11"; - "kwin"."Window to Desktop 12" = "none,,Window to Desktop 12"; - "kwin"."Window to Desktop 13" = "none,,Window to Desktop 13"; - "kwin"."Window to Desktop 14" = "none,,Window to Desktop 14"; - "kwin"."Window to Desktop 15" = "none,,Window to Desktop 15"; - "kwin"."Window to Desktop 16" = "none,,Window to Desktop 16"; - "kwin"."Window to Desktop 17" = "none,,Window to Desktop 17"; - "kwin"."Window to Desktop 18" = "none,,Window to Desktop 18"; - "kwin"."Window to Desktop 19" = "none,,Window to Desktop 19"; - "kwin"."Window to Desktop 2" = "none,,Window to Desktop 2"; - "kwin"."Window to Desktop 20" = "none,,Window to Desktop 20"; - "kwin"."Window to Desktop 3" = "none,,Window to Desktop 3"; - "kwin"."Window to Desktop 4" = "none,,Window to Desktop 4"; - "kwin"."Window to Desktop 5" = "none,,Window to Desktop 5"; - "kwin"."Window to Desktop 6" = "none,,Window to Desktop 6"; - "kwin"."Window to Desktop 7" = "none,,Window to Desktop 7"; - "kwin"."Window to Desktop 8" = "none,,Window to Desktop 8"; - "kwin"."Window to Desktop 9" = "none,,Window to Desktop 9"; - "kwin"."Window to Next Desktop" = "none,,Window to Next Desktop"; - "kwin"."Window to Next Screen" = "Meta+Shift+Right"; - "kwin"."Window to Previous Desktop" = "none,,Window to Previous Desktop"; - "kwin"."Window to Previous Screen" = "Meta+Shift+Left"; - "kwin"."Window to Screen 0" = "none,,Move Window to Screen 0"; - "kwin"."Window to Screen 1" = "none,,Move Window to Screen 1"; - "kwin"."Window to Screen 2" = "none,,Move Window to Screen 2"; - "kwin"."Window to Screen 3" = "none,,Move Window to Screen 3"; - "kwin"."Window to Screen 4" = "none,,Move Window to Screen 4"; - "kwin"."Window to Screen 5" = "none,,Move Window to Screen 5"; - "kwin"."Window to Screen 6" = "none,,Move Window to Screen 6"; - "kwin"."Window to Screen 7" = "none,,Move Window to Screen 7"; - "kwin"."view_actual_size" = "none,Meta+0,Zoom to Actual Size"; - "kwin"."view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"]; - "kwin"."view_zoom_out" = "Meta+-"; - "mediacontrol"."mediavolumedown" = "none,,Media volume down"; - "mediacontrol"."mediavolumeup" = "none,,Media volume up"; - "mediacontrol"."nextmedia" = "Media Next"; - "mediacontrol"."pausemedia" = "Media Pause"; - "mediacontrol"."playmedia" = "none,,Play media playback"; - "mediacontrol"."playpausemedia" = "Media Play"; - "mediacontrol"."previousmedia" = "Media Previous"; - "mediacontrol"."stopmedia" = "Media Stop"; - "org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down"; - "org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down"; - "org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down"; - "org_kde_powerdevil"."Hibernate" = "Hibernate"; - "org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up"; - "org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up"; - "org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up"; - "org_kde_powerdevil"."PowerDown" = "Power Down"; - "org_kde_powerdevil"."PowerOff" = "Power Off"; - "org_kde_powerdevil"."Sleep" = "Sleep"; - "org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off"; - "org_kde_powerdevil"."Turn Off Screen" = [ ]; - "org_kde_powerdevil"."powerProfile" = ["Battery" "Meta+B,Battery" "Meta+B,Switch Power Profile"]; - "plasmashell"."activate application launcher" = ["Meta" ",Meta" "Alt+F1,Activate Application Launcher"]; - "plasmashell"."activate task manager entry 1" = "Meta+1"; - "plasmashell"."activate task manager entry 2" = "Meta+2"; - "plasmashell"."activate task manager entry 3" = "Meta+3"; - "plasmashell"."activate task manager entry 4" = "Meta+4"; - "plasmashell"."activate task manager entry 5" = "Meta+5"; - "plasmashell"."activate task manager entry 6" = "Meta+6"; - "plasmashell"."activate task manager entry 7" = "Meta+7"; - "plasmashell"."activate task manager entry 8" = "Meta+8"; - "plasmashell"."activate task manager entry 9" = "Meta+9"; - "plasmashell"."activate task manager entry 10" = "Meta+0"; - "plasmashell"."clear-history" = "none,,Clear Clipboard History"; - "plasmashell"."clipboard_action" = "Meta+Ctrl+X"; - "plasmashell"."cycle-panels" = "Meta+Alt+P"; - "plasmashell"."cycleNextAction" = "none,,Next History Item"; - "plasmashell"."cyclePrevAction" = "none,,Previous History Item"; - "plasmashell"."edit_clipboard" = [ ]; - "plasmashell"."manage activities" = "Meta+Q"; - "plasmashell"."next activity" = "Meta+Tab,none,Walk through activities"; - "plasmashell"."previous activity" = "Meta+Shift+Tab,none,Walk through activities (Reverse)"; - "plasmashell"."repeat_action" = "Meta+Ctrl+R"; - "plasmashell"."show dashboard" = "Ctrl+F12"; - "plasmashell"."show-barcode" = "none,,Show Barcode…"; - "plasmashell"."show-on-mouse-pos" = "Meta+V"; - "plasmashell"."stop current activity" = "Meta+S"; - "plasmashell"."switch to next activity" = "none,,Switch to Next Activity"; - "plasmashell"."switch to previous activity" = "none,,Switch to Previous Activity"; - "plasmashell"."toggle do not disturb" = "none,,Toggle do not disturb"; - "services/org.kde.plasma-systemmonitor.desktop"."_launch" = "Ctrl+Esc"; - "yakuake"."toggle-window-state" = "Meta+Z,F12,Open/Retract Yakuake"; - }; - configFile = { - "baloofilerc"."General"."dbVersion" = 2; - "baloofilerc"."General"."exclude filters" = "*~,*.part,*.o,*.la,*.lo,*.loT,*.moc,moc_*.cpp,qrc_*.cpp,ui_*.h,cmake_install.cmake,CMakeCache.txt,CTestTestfile.cmake,libtool,config.status,confdefs.h,autom4te,conftest,confstat,Makefile.am,*.gcode,.ninja_deps,.ninja_log,build.ninja,*.csproj,*.m4,*.rej,*.gmo,*.pc,*.omf,*.aux,*.tmp,*.po,*.vm*,*.nvram,*.rcore,*.swp,*.swap,lzo,litmain.sh,*.orig,.histfile.*,.xsession-errors*,*.map,*.so,*.a,*.db,*.qrc,*.ini,*.init,*.img,*.vdi,*.vbox*,vbox.log,*.qcow2,*.vmdk,*.vhd,*.vhdx,*.sql,*.sql.gz,*.ytdl,*.class,*.pyc,*.pyo,*.elc,*.qmlc,*.jsc,*.fastq,*.fq,*.gb,*.fasta,*.fna,*.gbff,*.faa,po,CVS,.svn,.git,_darcs,.bzr,.hg,CMakeFiles,CMakeTmp,CMakeTmpQmake,.moc,.obj,.pch,.uic,.npm,.yarn,.yarn-cache,__pycache__,node_modules,node_packages,nbproject,.venv,venv,core-dumps,lost+found"; - "baloofilerc"."General"."exclude filters version" = 8; - "dolphinrc"."ExtractDialog"."1680x1050 screen: Height" = 560; - "dolphinrc"."ExtractDialog"."1680x1050 screen: Width" = 1120; - "dolphinrc"."ExtractDialog"."DirHistory[$e]" = "$HOME/.local/bin/,$HOME/.local/share/fonts/MarkerFelt/,$HOME/Fonts/TheRain/,$HOME/Fonts/Emilya-Birthday/,$HOME/Fonts/CuteKitchen/,$HOME/Fonts/AmazingQuirky/"; - "dolphinrc"."ExtractDialog"."DirHistory\x5b$e\x5d" = "$HOME/.local/bin/,$HOME/.local/share/fonts/MarkerFelt/,$HOME/Fonts/TheRain/,$HOME/Fonts/Emilya-Birthday/,$HOME/Fonts/CuteKitchen/,$HOME/Fonts/AmazingQuirky/"; - "dolphinrc"."General"."ViewPropsTimestamp" = "2023,10,5,13,57,56.321"; - "dolphinrc"."IconsMode"."PreviewSize" = 192; - "dolphinrc"."KFileDialog Settings"."Places Icons Auto-resize" = false; - "dolphinrc"."KFileDialog Settings"."Places Icons Static Size" = 22; - "dolphinrc"."KFileDialog Settings"."detailViewIconSize" = 16; - "dolphinrc"."Search"."What" = "Content"; - "kactivitymanagerdrc"."activities"."080837e2-f10a-45f7-84cb-a3022c9dc5d4" = "Default"; - "kactivitymanagerdrc"."main"."currentActivity" = "080837e2-f10a-45f7-84cb-a3022c9dc5d4"; - "kcminputrc"."Mouse"."X11LibInputXAccelProfileFlat" = true; - "kcminputrc"."Mouse"."cursorSize" = 36; - "kcminputrc"."Mouse"."cursorTheme" = "ArcDusk-cursors"; - "kcminputrc"."Tmp"."update_info" = "delete_cursor_old_default_size.upd:DeleteCursorOldDefaultSize"; - "kded5rc"."Module-browserintegrationreminder"."autoload" = false; - "kded5rc"."Module-device_automounter"."autoload" = false; - "kded5rc"."PlasmaBrowserIntegration"."shownCount" = 4; - "khotkeysrc"."Data"."DataCount" = 3; - "khotkeysrc"."Data_1"."Comment" = "KMenuEdit Global Shortcuts"; - "khotkeysrc"."Data_1"."DataCount" = 1; - "khotkeysrc"."Data_1"."Enabled" = true; - "khotkeysrc"."Data_1"."Name" = "KMenuEdit"; - "khotkeysrc"."Data_1"."SystemGroup" = 1; - "khotkeysrc"."Data_1"."Type" = "ACTION_DATA_GROUP"; - "khotkeysrc"."Data_1Conditions"."Comment" = ""; - "khotkeysrc"."Data_1Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_1_1"."Comment" = "Comment"; - "khotkeysrc"."Data_1_1"."Enabled" = true; - "khotkeysrc"."Data_1_1"."Name" = "Search"; - "khotkeysrc"."Data_1_1"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_1_1Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_1_1Actions0"."CommandURL" = "http://google.com"; - "khotkeysrc"."Data_1_1Actions0"."Type" = "COMMAND_URL"; - "khotkeysrc"."Data_1_1Conditions"."Comment" = ""; - "khotkeysrc"."Data_1_1Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_1_1Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_1_1Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_1_1Triggers0"."Key" = ""; - "khotkeysrc"."Data_1_1Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_1_1Triggers0"."Uuid" = "{d03619b6-9b3c-48cc-9d9c-a2aadb485550}"; - "khotkeysrc"."Data_2"."Comment" = "This group contains various examples demonstrating most of the features of KHotkeys. (Note that this group and all its actions are disabled by default.)"; - "khotkeysrc"."Data_2"."DataCount" = 8; - "khotkeysrc"."Data_2"."Enabled" = false; - "khotkeysrc"."Data_2"."ImportId" = "kde32b1"; - "khotkeysrc"."Data_2"."Name" = "Examples"; - "khotkeysrc"."Data_2"."SystemGroup" = 0; - "khotkeysrc"."Data_2"."Type" = "ACTION_DATA_GROUP"; - "khotkeysrc"."Data_2Conditions"."Comment" = ""; - "khotkeysrc"."Data_2Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_1"."Comment" = "After pressing Ctrl+Alt+I, the KSIRC window will be activated, if it exists. Simple."; - "khotkeysrc"."Data_2_1"."Enabled" = false; - "khotkeysrc"."Data_2_1"."Name" = "Activate KSIRC Window"; - "khotkeysrc"."Data_2_1"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_1Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_1Actions0"."Type" = "ACTIVATE_WINDOW"; - "khotkeysrc"."Data_2_1Actions0Window"."Comment" = "KSIRC window"; - "khotkeysrc"."Data_2_1Actions0Window"."WindowsCount" = 1; - "khotkeysrc"."Data_2_1Actions0Window0"."Class" = "ksirc"; - "khotkeysrc"."Data_2_1Actions0Window0"."ClassType" = 1; - "khotkeysrc"."Data_2_1Actions0Window0"."Comment" = "KSIRC"; - "khotkeysrc"."Data_2_1Actions0Window0"."Role" = ""; - "khotkeysrc"."Data_2_1Actions0Window0"."RoleType" = 0; - "khotkeysrc"."Data_2_1Actions0Window0"."Title" = ""; - "khotkeysrc"."Data_2_1Actions0Window0"."TitleType" = 0; - "khotkeysrc"."Data_2_1Actions0Window0"."Type" = "SIMPLE"; - "khotkeysrc"."Data_2_1Actions0Window0"."WindowTypes" = 33; - "khotkeysrc"."Data_2_1Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_1Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_1Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_1Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_1Triggers0"."Key" = "Ctrl+Alt+I"; - "khotkeysrc"."Data_2_1Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_1Triggers0"."Uuid" = "{45612602-5728-4506-aea8-33d3685a58e2}"; - "khotkeysrc"."Data_2_2"."Comment" = "After pressing Alt+Ctrl+H the input of 'Hello' will be simulated, as if you typed it. This is especially useful if you have call to frequently type a word (for instance, 'unsigned'). Every keypress in the input is separated by a colon ':'. Note that the keypresses literally mean keypresses, so you have to write what you would press on the keyboard. In the table below, the left column shows the input and the right column shows what to type.\n\n\"enter\" (i.e. new line) Enter or Return\na (i.e. small a) A\nA (i.e. capital a) Shift+A\n: (colon) Shift+;\n' ' (space) Space"; - "khotkeysrc"."Data_2_2"."Enabled" = false; - "khotkeysrc"."Data_2_2"."Name" = "Type 'Hello'"; - "khotkeysrc"."Data_2_2"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_2Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_2Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_2Actions0"."Input" = "Shift+H:E:L:L:O\n"; - "khotkeysrc"."Data_2_2Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_2Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_2Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_2Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_2Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_2Triggers0"."Key" = "Ctrl+Alt+H"; - "khotkeysrc"."Data_2_2Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_2Triggers0"."Uuid" = "{d277ece4-e269-4243-844e-da95c7991c01}"; - "khotkeysrc"."Data_2_3"."Comment" = "This action runs Konsole, after pressing Ctrl+Alt+T."; - "khotkeysrc"."Data_2_3"."Enabled" = false; - "khotkeysrc"."Data_2_3"."Name" = "Run Konsole"; - "khotkeysrc"."Data_2_3"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_3Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_3Actions0"."CommandURL" = "konsole"; - "khotkeysrc"."Data_2_3Actions0"."Type" = "COMMAND_URL"; - "khotkeysrc"."Data_2_3Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_3Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_3Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_3Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_3Triggers0"."Key" = "Ctrl+Alt+T"; - "khotkeysrc"."Data_2_3Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_3Triggers0"."Uuid" = "{443adf4b-ca38-4261-b7a0-482a1b4bd977}"; - "khotkeysrc"."Data_2_4"."Comment" = "Read the comment on the \"Type 'Hello'\" action first.\n\nQt Designer uses Ctrl+F4 for closing windows. In KDE, however, Ctrl+F4 is the shortcut for going to virtual desktop 4, so this shortcut does not work in Qt Designer. Further, Qt Designer does not use KDE's standard Ctrl+W for closing the window.\n\nThis problem can be solved by remapping Ctrl+W to Ctrl+F4 when the active window is Qt Designer. When Qt Designer is active, every time Ctrl+W is pressed, Ctrl+F4 will be sent to Qt Designer instead. In other applications, the effect of Ctrl+W is unchanged.\n\nWe now need to specify three things: A new shortcut trigger on 'Ctrl+W', a new keyboard input action sending Ctrl+F4, and a new condition that the active window is Qt Designer.\nQt Designer seems to always have title 'Qt Designer by Trolltech', so the condition will check for the active window having that title."; - "khotkeysrc"."Data_2_4"."Enabled" = false; - "khotkeysrc"."Data_2_4"."Name" = "Remap Ctrl+W to Ctrl+F4 in Qt Designer"; - "khotkeysrc"."Data_2_4"."Type" = "GENERIC_ACTION_DATA"; - "khotkeysrc"."Data_2_4Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_4Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_4Actions0"."Input" = "Ctrl+F4"; - "khotkeysrc"."Data_2_4Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_4Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_4Conditions"."ConditionsCount" = 1; - "khotkeysrc"."Data_2_4Conditions0"."Type" = "ACTIVE_WINDOW"; - "khotkeysrc"."Data_2_4Conditions0Window"."Comment" = "Qt Designer"; - "khotkeysrc"."Data_2_4Conditions0Window"."WindowsCount" = 1; - "khotkeysrc"."Data_2_4Conditions0Window0"."Class" = ""; - "khotkeysrc"."Data_2_4Conditions0Window0"."ClassType" = 0; - "khotkeysrc"."Data_2_4Conditions0Window0"."Comment" = ""; - "khotkeysrc"."Data_2_4Conditions0Window0"."Role" = ""; - "khotkeysrc"."Data_2_4Conditions0Window0"."RoleType" = 0; - "khotkeysrc"."Data_2_4Conditions0Window0"."Title" = "Qt Designer by Trolltech"; - "khotkeysrc"."Data_2_4Conditions0Window0"."TitleType" = 2; - "khotkeysrc"."Data_2_4Conditions0Window0"."Type" = "SIMPLE"; - "khotkeysrc"."Data_2_4Conditions0Window0"."WindowTypes" = 33; - "khotkeysrc"."Data_2_4Triggers"."Comment" = ""; - "khotkeysrc"."Data_2_4Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_4Triggers0"."Key" = "Ctrl+W"; - "khotkeysrc"."Data_2_4Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_4Triggers0"."Uuid" = "{67ab2d77-f8d2-4e06-b2e4-0cd8e19ee075}"; - "khotkeysrc"."Data_2_5"."Comment" = "By pressing Alt+Ctrl+W a D-Bus call will be performed that will show the minicli. You can use any kind of D-Bus call, just like using the command line 'qdbus' tool."; - "khotkeysrc"."Data_2_5"."Enabled" = false; - "khotkeysrc"."Data_2_5"."Name" = "Perform D-Bus call 'qdbus org.kde.krunner /App display'"; - "khotkeysrc"."Data_2_5"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_5Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_5Actions0"."Arguments" = ""; - "khotkeysrc"."Data_2_5Actions0"."Call" = "popupExecuteCommand"; - "khotkeysrc"."Data_2_5Actions0"."RemoteApp" = "org.kde.krunner"; - "khotkeysrc"."Data_2_5Actions0"."RemoteObj" = "/App"; - "khotkeysrc"."Data_2_5Actions0"."Type" = "DBUS"; - "khotkeysrc"."Data_2_5Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_5Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_5Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_5Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_5Triggers0"."Key" = "Ctrl+Alt+W"; - "khotkeysrc"."Data_2_5Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_5Triggers0"."Uuid" = "{86084b22-0843-4503-b348-76af9dbd7eae}"; - "khotkeysrc"."Data_2_6"."Comment" = "Read the comment on the \"Type 'Hello'\" action first.\n\nJust like the \"Type 'Hello'\" action, this one simulates keyboard input, specifically, after pressing Ctrl+Alt+B, it sends B to XMMS (B in XMMS jumps to the next song). The 'Send to specific window' checkbox is checked and a window with its class containing 'XMMS_Player' is specified; this will make the input always be sent to this window. This way, you can control XMMS even if, for instance, it is on a different virtual desktop.\n\n(Run 'xprop' and click on the XMMS window and search for WM_CLASS to see 'XMMS_Player')."; - "khotkeysrc"."Data_2_6"."Enabled" = false; - "khotkeysrc"."Data_2_6"."Name" = "Next in XMMS"; - "khotkeysrc"."Data_2_6"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_6Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_6Actions0"."DestinationWindow" = 1; - "khotkeysrc"."Data_2_6Actions0"."Input" = "B"; - "khotkeysrc"."Data_2_6Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_6Actions0DestinationWindow"."Comment" = "XMMS window"; - "khotkeysrc"."Data_2_6Actions0DestinationWindow"."WindowsCount" = 1; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."Class" = "XMMS_Player"; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."ClassType" = 1; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."Comment" = "XMMS Player window"; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."Role" = ""; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."RoleType" = 0; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."Title" = ""; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."TitleType" = 0; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."Type" = "SIMPLE"; - "khotkeysrc"."Data_2_6Actions0DestinationWindow0"."WindowTypes" = 33; - "khotkeysrc"."Data_2_6Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_6Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_6Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_6Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_6Triggers0"."Key" = "Ctrl+Alt+B"; - "khotkeysrc"."Data_2_6Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_6Triggers0"."Uuid" = "{148b0bc3-908e-445e-9694-c0316bec61c3}"; - "khotkeysrc"."Data_2_7"."Comment" = "Konqueror in KDE3.1 has tabs, and now you can also have gestures.\n\nJust press the middle mouse button and start drawing one of the gestures, and after you are finished, release the mouse button. If you only need to paste the selection, it still works, just click the middle mouse button. (You can change the mouse button to use in the global settings).\n\nRight now, there are the following gestures available:\nmove right and back left - Forward (Alt+Right)\nmove left and back right - Back (Alt+Left)\nmove up and back down - Up (Alt+Up)\ncircle counterclockwise - Reload (F5)\n\nThe gesture shapes can be entered by performing them in the configuration dialog. You can also look at your numeric pad to help you: gestures are recognized like a 3x3 grid of fields, numbered 1 to 9.\n\nNote that you must perform exactly the gesture to trigger the action. Because of this, it is possible to enter more gestures for the action. You should try to avoid complicated gestures where you change the direction of mouse movement more than once. For instance, 45654 or 74123 are simple to perform, but 1236987 may be already quite difficult.\n\nThe conditions for all gestures are defined in this group. All these gestures are active only if the active window is Konqueror (class contains 'konqueror')."; - "khotkeysrc"."Data_2_7"."DataCount" = 4; - "khotkeysrc"."Data_2_7"."Enabled" = false; - "khotkeysrc"."Data_2_7"."Name" = "Konqi Gestures"; - "khotkeysrc"."Data_2_7"."SystemGroup" = 0; - "khotkeysrc"."Data_2_7"."Type" = "ACTION_DATA_GROUP"; - "khotkeysrc"."Data_2_7Conditions"."Comment" = "Konqueror window"; - "khotkeysrc"."Data_2_7Conditions"."ConditionsCount" = 1; - "khotkeysrc"."Data_2_7Conditions0"."Type" = "ACTIVE_WINDOW"; - "khotkeysrc"."Data_2_7Conditions0Window"."Comment" = "Konqueror"; - "khotkeysrc"."Data_2_7Conditions0Window"."WindowsCount" = 1; - "khotkeysrc"."Data_2_7Conditions0Window0"."Class" = "konqueror"; - "khotkeysrc"."Data_2_7Conditions0Window0"."ClassType" = 1; - "khotkeysrc"."Data_2_7Conditions0Window0"."Comment" = "Konqueror"; - "khotkeysrc"."Data_2_7Conditions0Window0"."Role" = ""; - "khotkeysrc"."Data_2_7Conditions0Window0"."RoleType" = 0; - "khotkeysrc"."Data_2_7Conditions0Window0"."Title" = ""; - "khotkeysrc"."Data_2_7Conditions0Window0"."TitleType" = 0; - "khotkeysrc"."Data_2_7Conditions0Window0"."Type" = "SIMPLE"; - "khotkeysrc"."Data_2_7Conditions0Window0"."WindowTypes" = 33; - "khotkeysrc"."Data_2_7_1"."Comment" = ""; - "khotkeysrc"."Data_2_7_1"."Enabled" = false; - "khotkeysrc"."Data_2_7_1"."Name" = "Back"; - "khotkeysrc"."Data_2_7_1"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_7_1Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_7_1Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_7_1Actions0"."Input" = "Alt+Left"; - "khotkeysrc"."Data_2_7_1Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_7_1Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_7_1Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_7_1Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_2_7_1Triggers"."TriggersCount" = 3; - "khotkeysrc"."Data_2_7_1Triggers0"."GesturePointData" = "0,0.0625,1,1,0.5,0.0625,0.0625,1,0.875,0.5,0.125,0.0625,1,0.75,0.5,0.1875,0.0625,1,0.625,0.5,0.25,0.0625,1,0.5,0.5,0.3125,0.0625,1,0.375,0.5,0.375,0.0625,1,0.25,0.5,0.4375,0.0625,1,0.125,0.5,0.5,0.0625,0,0,0.5,0.5625,0.0625,0,0.125,0.5,0.625,0.0625,0,0.25,0.5,0.6875,0.0625,0,0.375,0.5,0.75,0.0625,0,0.5,0.5,0.8125,0.0625,0,0.625,0.5,0.875,0.0625,0,0.75,0.5,0.9375,0.0625,0,0.875,0.5,1,0,0,1,0.5"; - "khotkeysrc"."Data_2_7_1Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_1Triggers1"."GesturePointData" = "0,0.0833333,1,0.5,0.5,0.0833333,0.0833333,1,0.375,0.5,0.166667,0.0833333,1,0.25,0.5,0.25,0.0833333,1,0.125,0.5,0.333333,0.0833333,0,0,0.5,0.416667,0.0833333,0,0.125,0.5,0.5,0.0833333,0,0.25,0.5,0.583333,0.0833333,0,0.375,0.5,0.666667,0.0833333,0,0.5,0.5,0.75,0.0833333,0,0.625,0.5,0.833333,0.0833333,0,0.75,0.5,0.916667,0.0833333,0,0.875,0.5,1,0,0,1,0.5"; - "khotkeysrc"."Data_2_7_1Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_1Triggers2"."GesturePointData" = "0,0.0833333,1,1,0.5,0.0833333,0.0833333,1,0.875,0.5,0.166667,0.0833333,1,0.75,0.5,0.25,0.0833333,1,0.625,0.5,0.333333,0.0833333,1,0.5,0.5,0.416667,0.0833333,1,0.375,0.5,0.5,0.0833333,1,0.25,0.5,0.583333,0.0833333,1,0.125,0.5,0.666667,0.0833333,0,0,0.5,0.75,0.0833333,0,0.125,0.5,0.833333,0.0833333,0,0.25,0.5,0.916667,0.0833333,0,0.375,0.5,1,0,0,0.5,0.5"; - "khotkeysrc"."Data_2_7_1Triggers2"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_2"."Comment" = ""; - "khotkeysrc"."Data_2_7_2"."Enabled" = false; - "khotkeysrc"."Data_2_7_2"."Name" = "Forward"; - "khotkeysrc"."Data_2_7_2"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_7_2Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_7_2Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_7_2Actions0"."Input" = "Alt+Right"; - "khotkeysrc"."Data_2_7_2Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_7_2Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_7_2Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_7_2Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_2_7_2Triggers"."TriggersCount" = 3; - "khotkeysrc"."Data_2_7_2Triggers0"."GesturePointData" = "0,0.0625,0,0,0.5,0.0625,0.0625,0,0.125,0.5,0.125,0.0625,0,0.25,0.5,0.1875,0.0625,0,0.375,0.5,0.25,0.0625,0,0.5,0.5,0.3125,0.0625,0,0.625,0.5,0.375,0.0625,0,0.75,0.5,0.4375,0.0625,0,0.875,0.5,0.5,0.0625,1,1,0.5,0.5625,0.0625,1,0.875,0.5,0.625,0.0625,1,0.75,0.5,0.6875,0.0625,1,0.625,0.5,0.75,0.0625,1,0.5,0.5,0.8125,0.0625,1,0.375,0.5,0.875,0.0625,1,0.25,0.5,0.9375,0.0625,1,0.125,0.5,1,0,0,0,0.5"; - "khotkeysrc"."Data_2_7_2Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_2Triggers1"."GesturePointData" = "0,0.0833333,0,0.5,0.5,0.0833333,0.0833333,0,0.625,0.5,0.166667,0.0833333,0,0.75,0.5,0.25,0.0833333,0,0.875,0.5,0.333333,0.0833333,1,1,0.5,0.416667,0.0833333,1,0.875,0.5,0.5,0.0833333,1,0.75,0.5,0.583333,0.0833333,1,0.625,0.5,0.666667,0.0833333,1,0.5,0.5,0.75,0.0833333,1,0.375,0.5,0.833333,0.0833333,1,0.25,0.5,0.916667,0.0833333,1,0.125,0.5,1,0,0,0,0.5"; - "khotkeysrc"."Data_2_7_2Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_2Triggers2"."GesturePointData" = "0,0.0833333,0,0,0.5,0.0833333,0.0833333,0,0.125,0.5,0.166667,0.0833333,0,0.25,0.5,0.25,0.0833333,0,0.375,0.5,0.333333,0.0833333,0,0.5,0.5,0.416667,0.0833333,0,0.625,0.5,0.5,0.0833333,0,0.75,0.5,0.583333,0.0833333,0,0.875,0.5,0.666667,0.0833333,1,1,0.5,0.75,0.0833333,1,0.875,0.5,0.833333,0.0833333,1,0.75,0.5,0.916667,0.0833333,1,0.625,0.5,1,0,0,0.5,0.5"; - "khotkeysrc"."Data_2_7_2Triggers2"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_3"."Comment" = ""; - "khotkeysrc"."Data_2_7_3"."Enabled" = false; - "khotkeysrc"."Data_2_7_3"."Name" = "Up"; - "khotkeysrc"."Data_2_7_3"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_7_3Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_7_3Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_7_3Actions0"."Input" = "Alt+Up"; - "khotkeysrc"."Data_2_7_3Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_7_3Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_7_3Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_7_3Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_2_7_3Triggers"."TriggersCount" = 3; - "khotkeysrc"."Data_2_7_3Triggers0"."GesturePointData" = "0,0.0625,-0.5,0.5,1,0.0625,0.0625,-0.5,0.5,0.875,0.125,0.0625,-0.5,0.5,0.75,0.1875,0.0625,-0.5,0.5,0.625,0.25,0.0625,-0.5,0.5,0.5,0.3125,0.0625,-0.5,0.5,0.375,0.375,0.0625,-0.5,0.5,0.25,0.4375,0.0625,-0.5,0.5,0.125,0.5,0.0625,0.5,0.5,0,0.5625,0.0625,0.5,0.5,0.125,0.625,0.0625,0.5,0.5,0.25,0.6875,0.0625,0.5,0.5,0.375,0.75,0.0625,0.5,0.5,0.5,0.8125,0.0625,0.5,0.5,0.625,0.875,0.0625,0.5,0.5,0.75,0.9375,0.0625,0.5,0.5,0.875,1,0,0,0.5,1"; - "khotkeysrc"."Data_2_7_3Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_3Triggers1"."GesturePointData" = "0,0.0833333,-0.5,0.5,1,0.0833333,0.0833333,-0.5,0.5,0.875,0.166667,0.0833333,-0.5,0.5,0.75,0.25,0.0833333,-0.5,0.5,0.625,0.333333,0.0833333,-0.5,0.5,0.5,0.416667,0.0833333,-0.5,0.5,0.375,0.5,0.0833333,-0.5,0.5,0.25,0.583333,0.0833333,-0.5,0.5,0.125,0.666667,0.0833333,0.5,0.5,0,0.75,0.0833333,0.5,0.5,0.125,0.833333,0.0833333,0.5,0.5,0.25,0.916667,0.0833333,0.5,0.5,0.375,1,0,0,0.5,0.5"; - "khotkeysrc"."Data_2_7_3Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_3Triggers2"."GesturePointData" = "0,0.0833333,-0.5,0.5,0.5,0.0833333,0.0833333,-0.5,0.5,0.375,0.166667,0.0833333,-0.5,0.5,0.25,0.25,0.0833333,-0.5,0.5,0.125,0.333333,0.0833333,0.5,0.5,0,0.416667,0.0833333,0.5,0.5,0.125,0.5,0.0833333,0.5,0.5,0.25,0.583333,0.0833333,0.5,0.5,0.375,0.666667,0.0833333,0.5,0.5,0.5,0.75,0.0833333,0.5,0.5,0.625,0.833333,0.0833333,0.5,0.5,0.75,0.916667,0.0833333,0.5,0.5,0.875,1,0,0,0.5,1"; - "khotkeysrc"."Data_2_7_3Triggers2"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_4"."Comment" = ""; - "khotkeysrc"."Data_2_7_4"."Enabled" = false; - "khotkeysrc"."Data_2_7_4"."Name" = "Reload"; - "khotkeysrc"."Data_2_7_4"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_7_4Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_7_4Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_2_7_4Actions0"."Input" = "F5"; - "khotkeysrc"."Data_2_7_4Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_2_7_4Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_7_4Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_7_4Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_2_7_4Triggers"."TriggersCount" = 3; - "khotkeysrc"."Data_2_7_4Triggers0"."GesturePointData" = "0,0.03125,0,0,1,0.03125,0.03125,0,0.125,1,0.0625,0.03125,0,0.25,1,0.09375,0.03125,0,0.375,1,0.125,0.03125,0,0.5,1,0.15625,0.03125,0,0.625,1,0.1875,0.03125,0,0.75,1,0.21875,0.03125,0,0.875,1,0.25,0.03125,-0.5,1,1,0.28125,0.03125,-0.5,1,0.875,0.3125,0.03125,-0.5,1,0.75,0.34375,0.03125,-0.5,1,0.625,0.375,0.03125,-0.5,1,0.5,0.40625,0.03125,-0.5,1,0.375,0.4375,0.03125,-0.5,1,0.25,0.46875,0.03125,-0.5,1,0.125,0.5,0.03125,1,1,0,0.53125,0.03125,1,0.875,0,0.5625,0.03125,1,0.75,0,0.59375,0.03125,1,0.625,0,0.625,0.03125,1,0.5,0,0.65625,0.03125,1,0.375,0,0.6875,0.03125,1,0.25,0,0.71875,0.03125,1,0.125,0,0.75,0.03125,0.5,0,0,0.78125,0.03125,0.5,0,0.125,0.8125,0.03125,0.5,0,0.25,0.84375,0.03125,0.5,0,0.375,0.875,0.03125,0.5,0,0.5,0.90625,0.03125,0.5,0,0.625,0.9375,0.03125,0.5,0,0.75,0.96875,0.03125,0.5,0,0.875,1,0,0,0,1"; - "khotkeysrc"."Data_2_7_4Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_4Triggers1"."GesturePointData" = "0,0.0277778,0,0,1,0.0277778,0.0277778,0,0.125,1,0.0555556,0.0277778,0,0.25,1,0.0833333,0.0277778,0,0.375,1,0.111111,0.0277778,0,0.5,1,0.138889,0.0277778,0,0.625,1,0.166667,0.0277778,0,0.75,1,0.194444,0.0277778,0,0.875,1,0.222222,0.0277778,-0.5,1,1,0.25,0.0277778,-0.5,1,0.875,0.277778,0.0277778,-0.5,1,0.75,0.305556,0.0277778,-0.5,1,0.625,0.333333,0.0277778,-0.5,1,0.5,0.361111,0.0277778,-0.5,1,0.375,0.388889,0.0277778,-0.5,1,0.25,0.416667,0.0277778,-0.5,1,0.125,0.444444,0.0277778,1,1,0,0.472222,0.0277778,1,0.875,0,0.5,0.0277778,1,0.75,0,0.527778,0.0277778,1,0.625,0,0.555556,0.0277778,1,0.5,0,0.583333,0.0277778,1,0.375,0,0.611111,0.0277778,1,0.25,0,0.638889,0.0277778,1,0.125,0,0.666667,0.0277778,0.5,0,0,0.694444,0.0277778,0.5,0,0.125,0.722222,0.0277778,0.5,0,0.25,0.75,0.0277778,0.5,0,0.375,0.777778,0.0277778,0.5,0,0.5,0.805556,0.0277778,0.5,0,0.625,0.833333,0.0277778,0.5,0,0.75,0.861111,0.0277778,0.5,0,0.875,0.888889,0.0277778,0,0,1,0.916667,0.0277778,0,0.125,1,0.944444,0.0277778,0,0.25,1,0.972222,0.0277778,0,0.375,1,1,0,0,0.5,1"; - "khotkeysrc"."Data_2_7_4Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_7_4Triggers2"."GesturePointData" = "0,0.0277778,0.5,0,0.5,0.0277778,0.0277778,0.5,0,0.625,0.0555556,0.0277778,0.5,0,0.75,0.0833333,0.0277778,0.5,0,0.875,0.111111,0.0277778,0,0,1,0.138889,0.0277778,0,0.125,1,0.166667,0.0277778,0,0.25,1,0.194444,0.0277778,0,0.375,1,0.222222,0.0277778,0,0.5,1,0.25,0.0277778,0,0.625,1,0.277778,0.0277778,0,0.75,1,0.305556,0.0277778,0,0.875,1,0.333333,0.0277778,-0.5,1,1,0.361111,0.0277778,-0.5,1,0.875,0.388889,0.0277778,-0.5,1,0.75,0.416667,0.0277778,-0.5,1,0.625,0.444444,0.0277778,-0.5,1,0.5,0.472222,0.0277778,-0.5,1,0.375,0.5,0.0277778,-0.5,1,0.25,0.527778,0.0277778,-0.5,1,0.125,0.555556,0.0277778,1,1,0,0.583333,0.0277778,1,0.875,0,0.611111,0.0277778,1,0.75,0,0.638889,0.0277778,1,0.625,0,0.666667,0.0277778,1,0.5,0,0.694444,0.0277778,1,0.375,0,0.722222,0.0277778,1,0.25,0,0.75,0.0277778,1,0.125,0,0.777778,0.0277778,0.5,0,0,0.805556,0.0277778,0.5,0,0.125,0.833333,0.0277778,0.5,0,0.25,0.861111,0.0277778,0.5,0,0.375,0.888889,0.0277778,0.5,0,0.5,0.916667,0.0277778,0.5,0,0.625,0.944444,0.0277778,0.5,0,0.75,0.972222,0.0277778,0.5,0,0.875,1,0,0,0,1"; - "khotkeysrc"."Data_2_7_4Triggers2"."Type" = "GESTURE"; - "khotkeysrc"."Data_2_8"."Comment" = "After pressing Win+E (Tux+E) a WWW browser will be launched, and it will open http://www.kde.org . You may run all kind of commands you can run in minicli (Alt+F2)."; - "khotkeysrc"."Data_2_8"."Enabled" = false; - "khotkeysrc"."Data_2_8"."Name" = "Go to KDE Website"; - "khotkeysrc"."Data_2_8"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_2_8Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_2_8Actions0"."CommandURL" = "http://www.kde.org"; - "khotkeysrc"."Data_2_8Actions0"."Type" = "COMMAND_URL"; - "khotkeysrc"."Data_2_8Conditions"."Comment" = ""; - "khotkeysrc"."Data_2_8Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_2_8Triggers"."Comment" = "Simple_action"; - "khotkeysrc"."Data_2_8Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_2_8Triggers0"."Key" = "Meta+E"; - "khotkeysrc"."Data_2_8Triggers0"."Type" = "SHORTCUT"; - "khotkeysrc"."Data_2_8Triggers0"."Uuid" = "{1f98e9e9-756a-48be-a9a5-75030b41c595}"; - "khotkeysrc"."Data_3"."Comment" = "Basic Konqueror gestures."; - "khotkeysrc"."Data_3"."DataCount" = 14; - "khotkeysrc"."Data_3"."Enabled" = true; - "khotkeysrc"."Data_3"."ImportId" = "konqueror_gestures_kde321"; - "khotkeysrc"."Data_3"."Name" = "Konqueror Gestures"; - "khotkeysrc"."Data_3"."SystemGroup" = 0; - "khotkeysrc"."Data_3"."Type" = "ACTION_DATA_GROUP"; - "khotkeysrc"."Data_3Conditions"."Comment" = "Konqueror window"; - "khotkeysrc"."Data_3Conditions"."ConditionsCount" = 1; - "khotkeysrc"."Data_3Conditions0"."Type" = "ACTIVE_WINDOW"; - "khotkeysrc"."Data_3Conditions0Window"."Comment" = "Konqueror"; - "khotkeysrc"."Data_3Conditions0Window"."WindowsCount" = 1; - "khotkeysrc"."Data_3Conditions0Window0"."Class" = "^konquerors"; - "khotkeysrc"."Data_3Conditions0Window0"."ClassType" = 3; - "khotkeysrc"."Data_3Conditions0Window0"."Comment" = "Konqueror"; - "khotkeysrc"."Data_3Conditions0Window0"."Role" = "konqueror-mainwindow#1"; - "khotkeysrc"."Data_3Conditions0Window0"."RoleType" = 0; - "khotkeysrc"."Data_3Conditions0Window0"."Title" = "file:/ - Konqueror"; - "khotkeysrc"."Data_3Conditions0Window0"."TitleType" = 0; - "khotkeysrc"."Data_3Conditions0Window0"."Type" = "SIMPLE"; - "khotkeysrc"."Data_3Conditions0Window0"."WindowTypes" = 1; - "khotkeysrc"."Data_3_1"."Comment" = "Press, move left, release."; - "khotkeysrc"."Data_3_1"."Enabled" = true; - "khotkeysrc"."Data_3_1"."Name" = "Back"; - "khotkeysrc"."Data_3_1"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_10"."Comment" = "Opera-style: Press, move up, release.\nNOTE: Conflicts with 'New Tab', and as such is disabled by default."; - "khotkeysrc"."Data_3_10"."Enabled" = false; - "khotkeysrc"."Data_3_10"."Name" = "Stop Loading"; - "khotkeysrc"."Data_3_10"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_10Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_10Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_10Actions0"."Input" = "Escape\n"; - "khotkeysrc"."Data_3_10Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_10Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_10Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_10Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_10Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_10Triggers0"."GesturePointData" = "0,0.125,-0.5,0.5,1,0.125,0.125,-0.5,0.5,0.875,0.25,0.125,-0.5,0.5,0.75,0.375,0.125,-0.5,0.5,0.625,0.5,0.125,-0.5,0.5,0.5,0.625,0.125,-0.5,0.5,0.375,0.75,0.125,-0.5,0.5,0.25,0.875,0.125,-0.5,0.5,0.125,1,0,0,0.5,0"; - "khotkeysrc"."Data_3_10Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_11"."Comment" = "Going up in URL/directory structure.\nMozilla-style: Press, move up, move left, move up, release."; - "khotkeysrc"."Data_3_11"."Enabled" = true; - "khotkeysrc"."Data_3_11"."Name" = "Up"; - "khotkeysrc"."Data_3_11"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_11Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_11Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_11Actions0"."Input" = "Alt+Up"; - "khotkeysrc"."Data_3_11Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_11Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_11Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_11Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_11Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_11Triggers0"."GesturePointData" = "0,0.0625,-0.5,1,1,0.0625,0.0625,-0.5,1,0.875,0.125,0.0625,-0.5,1,0.75,0.1875,0.0625,-0.5,1,0.625,0.25,0.0625,1,1,0.5,0.3125,0.0625,1,0.875,0.5,0.375,0.0625,1,0.75,0.5,0.4375,0.0625,1,0.625,0.5,0.5,0.0625,1,0.5,0.5,0.5625,0.0625,1,0.375,0.5,0.625,0.0625,1,0.25,0.5,0.6875,0.0625,1,0.125,0.5,0.75,0.0625,-0.5,0,0.5,0.8125,0.0625,-0.5,0,0.375,0.875,0.0625,-0.5,0,0.25,0.9375,0.0625,-0.5,0,0.125,1,0,0,0,0"; - "khotkeysrc"."Data_3_11Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_12"."Comment" = "Going up in URL/directory structure.\nOpera-style: Press, move up, move left, move up, release.\nNOTE: Conflicts with \"Activate Previous Tab\", and as such is disabled by default."; - "khotkeysrc"."Data_3_12"."Enabled" = false; - "khotkeysrc"."Data_3_12"."Name" = "Up #2"; - "khotkeysrc"."Data_3_12"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_12Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_12Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_12Actions0"."Input" = "Alt+Up\n"; - "khotkeysrc"."Data_3_12Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_12Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_12Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_12Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_12Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_12Triggers0"."GesturePointData" = "0,0.0625,-0.5,1,1,0.0625,0.0625,-0.5,1,0.875,0.125,0.0625,-0.5,1,0.75,0.1875,0.0625,-0.5,1,0.625,0.25,0.0625,-0.5,1,0.5,0.3125,0.0625,-0.5,1,0.375,0.375,0.0625,-0.5,1,0.25,0.4375,0.0625,-0.5,1,0.125,0.5,0.0625,1,1,0,0.5625,0.0625,1,0.875,0,0.625,0.0625,1,0.75,0,0.6875,0.0625,1,0.625,0,0.75,0.0625,1,0.5,0,0.8125,0.0625,1,0.375,0,0.875,0.0625,1,0.25,0,0.9375,0.0625,1,0.125,0,1,0,0,0,0"; - "khotkeysrc"."Data_3_12Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_13"."Comment" = "Press, move up, move right, release."; - "khotkeysrc"."Data_3_13"."Enabled" = true; - "khotkeysrc"."Data_3_13"."Name" = "Activate Next Tab"; - "khotkeysrc"."Data_3_13"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_13Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_13Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_13Actions0"."Input" = "Ctrl+.\n"; - "khotkeysrc"."Data_3_13Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_13Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_13Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_13Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_13Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_13Triggers0"."GesturePointData" = "0,0.0625,-0.5,0,1,0.0625,0.0625,-0.5,0,0.875,0.125,0.0625,-0.5,0,0.75,0.1875,0.0625,-0.5,0,0.625,0.25,0.0625,-0.5,0,0.5,0.3125,0.0625,-0.5,0,0.375,0.375,0.0625,-0.5,0,0.25,0.4375,0.0625,-0.5,0,0.125,0.5,0.0625,0,0,0,0.5625,0.0625,0,0.125,0,0.625,0.0625,0,0.25,0,0.6875,0.0625,0,0.375,0,0.75,0.0625,0,0.5,0,0.8125,0.0625,0,0.625,0,0.875,0.0625,0,0.75,0,0.9375,0.0625,0,0.875,0,1,0,0,1,0"; - "khotkeysrc"."Data_3_13Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_14"."Comment" = "Press, move up, move left, release."; - "khotkeysrc"."Data_3_14"."Enabled" = true; - "khotkeysrc"."Data_3_14"."Name" = "Activate Previous Tab"; - "khotkeysrc"."Data_3_14"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_14Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_14Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_14Actions0"."Input" = "Ctrl+,"; - "khotkeysrc"."Data_3_14Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_14Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_14Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_14Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_14Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_14Triggers0"."GesturePointData" = "0,0.0625,-0.5,1,1,0.0625,0.0625,-0.5,1,0.875,0.125,0.0625,-0.5,1,0.75,0.1875,0.0625,-0.5,1,0.625,0.25,0.0625,-0.5,1,0.5,0.3125,0.0625,-0.5,1,0.375,0.375,0.0625,-0.5,1,0.25,0.4375,0.0625,-0.5,1,0.125,0.5,0.0625,1,1,0,0.5625,0.0625,1,0.875,0,0.625,0.0625,1,0.75,0,0.6875,0.0625,1,0.625,0,0.75,0.0625,1,0.5,0,0.8125,0.0625,1,0.375,0,0.875,0.0625,1,0.25,0,0.9375,0.0625,1,0.125,0,1,0,0,0,0"; - "khotkeysrc"."Data_3_14Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_1Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_1Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_1Actions0"."Input" = "Alt+Left"; - "khotkeysrc"."Data_3_1Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_1Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_1Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_1Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_1Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_1Triggers0"."GesturePointData" = "0,0.125,1,1,0.5,0.125,0.125,1,0.875,0.5,0.25,0.125,1,0.75,0.5,0.375,0.125,1,0.625,0.5,0.5,0.125,1,0.5,0.5,0.625,0.125,1,0.375,0.5,0.75,0.125,1,0.25,0.5,0.875,0.125,1,0.125,0.5,1,0,0,0,0.5"; - "khotkeysrc"."Data_3_1Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_2"."Comment" = "Press, move down, move up, move down, release."; - "khotkeysrc"."Data_3_2"."Enabled" = true; - "khotkeysrc"."Data_3_2"."Name" = "Duplicate Tab"; - "khotkeysrc"."Data_3_2"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_2Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_2Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_2Actions0"."Input" = "Ctrl+Shift+D\n"; - "khotkeysrc"."Data_3_2Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_2Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_2Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_2Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_2Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_2Triggers0"."GesturePointData" = "0,0.0416667,0.5,0.5,0,0.0416667,0.0416667,0.5,0.5,0.125,0.0833333,0.0416667,0.5,0.5,0.25,0.125,0.0416667,0.5,0.5,0.375,0.166667,0.0416667,0.5,0.5,0.5,0.208333,0.0416667,0.5,0.5,0.625,0.25,0.0416667,0.5,0.5,0.75,0.291667,0.0416667,0.5,0.5,0.875,0.333333,0.0416667,-0.5,0.5,1,0.375,0.0416667,-0.5,0.5,0.875,0.416667,0.0416667,-0.5,0.5,0.75,0.458333,0.0416667,-0.5,0.5,0.625,0.5,0.0416667,-0.5,0.5,0.5,0.541667,0.0416667,-0.5,0.5,0.375,0.583333,0.0416667,-0.5,0.5,0.25,0.625,0.0416667,-0.5,0.5,0.125,0.666667,0.0416667,0.5,0.5,0,0.708333,0.0416667,0.5,0.5,0.125,0.75,0.0416667,0.5,0.5,0.25,0.791667,0.0416667,0.5,0.5,0.375,0.833333,0.0416667,0.5,0.5,0.5,0.875,0.0416667,0.5,0.5,0.625,0.916667,0.0416667,0.5,0.5,0.75,0.958333,0.0416667,0.5,0.5,0.875,1,0,0,0.5,1"; - "khotkeysrc"."Data_3_2Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_3"."Comment" = "Press, move down, move up, release."; - "khotkeysrc"."Data_3_3"."Enabled" = true; - "khotkeysrc"."Data_3_3"."Name" = "Duplicate Window"; - "khotkeysrc"."Data_3_3"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_3Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_3Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_3Actions0"."Input" = "Ctrl+D\n"; - "khotkeysrc"."Data_3_3Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_3Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_3Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_3Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_3Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_3Triggers0"."GesturePointData" = "0,0.0625,0.5,0.5,0,0.0625,0.0625,0.5,0.5,0.125,0.125,0.0625,0.5,0.5,0.25,0.1875,0.0625,0.5,0.5,0.375,0.25,0.0625,0.5,0.5,0.5,0.3125,0.0625,0.5,0.5,0.625,0.375,0.0625,0.5,0.5,0.75,0.4375,0.0625,0.5,0.5,0.875,0.5,0.0625,-0.5,0.5,1,0.5625,0.0625,-0.5,0.5,0.875,0.625,0.0625,-0.5,0.5,0.75,0.6875,0.0625,-0.5,0.5,0.625,0.75,0.0625,-0.5,0.5,0.5,0.8125,0.0625,-0.5,0.5,0.375,0.875,0.0625,-0.5,0.5,0.25,0.9375,0.0625,-0.5,0.5,0.125,1,0,0,0.5,0"; - "khotkeysrc"."Data_3_3Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_4"."Comment" = "Press, move right, release."; - "khotkeysrc"."Data_3_4"."Enabled" = true; - "khotkeysrc"."Data_3_4"."Name" = "Forward"; - "khotkeysrc"."Data_3_4"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_4Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_4Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_4Actions0"."Input" = "Alt+Right"; - "khotkeysrc"."Data_3_4Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_4Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_4Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_4Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_4Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_4Triggers0"."GesturePointData" = "0,0.125,0,0,0.5,0.125,0.125,0,0.125,0.5,0.25,0.125,0,0.25,0.5,0.375,0.125,0,0.375,0.5,0.5,0.125,0,0.5,0.5,0.625,0.125,0,0.625,0.5,0.75,0.125,0,0.75,0.5,0.875,0.125,0,0.875,0.5,1,0,0,1,0.5"; - "khotkeysrc"."Data_3_4Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_5"."Comment" = "Press, move down, move half up, move right, move down, release.\n(Drawing a lowercase 'h'.)"; - "khotkeysrc"."Data_3_5"."Enabled" = true; - "khotkeysrc"."Data_3_5"."Name" = "Home"; - "khotkeysrc"."Data_3_5"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_5Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_5Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_5Actions0"."Input" = "Alt+Home\n"; - "khotkeysrc"."Data_3_5Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_5Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_5Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_5Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_5Triggers"."TriggersCount" = 2; - "khotkeysrc"."Data_3_5Triggers0"."GesturePointData" = "0,0.0461748,0.5,0,0,0.0461748,0.0461748,0.5,0,0.125,0.0923495,0.0461748,0.5,0,0.25,0.138524,0.0461748,0.5,0,0.375,0.184699,0.0461748,0.5,0,0.5,0.230874,0.0461748,0.5,0,0.625,0.277049,0.0461748,0.5,0,0.75,0.323223,0.0461748,0.5,0,0.875,0.369398,0.065301,-0.25,0,1,0.434699,0.065301,-0.25,0.125,0.875,0.5,0.065301,-0.25,0.25,0.75,0.565301,0.065301,-0.25,0.375,0.625,0.630602,0.0461748,0,0.5,0.5,0.676777,0.0461748,0,0.625,0.5,0.722951,0.0461748,0,0.75,0.5,0.769126,0.0461748,0,0.875,0.5,0.815301,0.0461748,0.5,1,0.5,0.861476,0.0461748,0.5,1,0.625,0.90765,0.0461748,0.5,1,0.75,0.953825,0.0461748,0.5,1,0.875,1,0,0,1,1"; - "khotkeysrc"."Data_3_5Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_5Triggers1"."GesturePointData" = "0,0.0416667,0.5,0,0,0.0416667,0.0416667,0.5,0,0.125,0.0833333,0.0416667,0.5,0,0.25,0.125,0.0416667,0.5,0,0.375,0.166667,0.0416667,0.5,0,0.5,0.208333,0.0416667,0.5,0,0.625,0.25,0.0416667,0.5,0,0.75,0.291667,0.0416667,0.5,0,0.875,0.333333,0.0416667,-0.5,0,1,0.375,0.0416667,-0.5,0,0.875,0.416667,0.0416667,-0.5,0,0.75,0.458333,0.0416667,-0.5,0,0.625,0.5,0.0416667,0,0,0.5,0.541667,0.0416667,0,0.125,0.5,0.583333,0.0416667,0,0.25,0.5,0.625,0.0416667,0,0.375,0.5,0.666667,0.0416667,0,0.5,0.5,0.708333,0.0416667,0,0.625,0.5,0.75,0.0416667,0,0.75,0.5,0.791667,0.0416667,0,0.875,0.5,0.833333,0.0416667,0.5,1,0.5,0.875,0.0416667,0.5,1,0.625,0.916667,0.0416667,0.5,1,0.75,0.958333,0.0416667,0.5,1,0.875,1,0,0,1,1"; - "khotkeysrc"."Data_3_5Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_6"."Comment" = "Press, move right, move down, move right, release.\nMozilla-style: Press, move down, move right, release."; - "khotkeysrc"."Data_3_6"."Enabled" = true; - "khotkeysrc"."Data_3_6"."Name" = "Close Tab"; - "khotkeysrc"."Data_3_6"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_6Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_6Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_6Actions0"."Input" = "Ctrl+W\n"; - "khotkeysrc"."Data_3_6Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_6Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_6Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_6Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_6Triggers"."TriggersCount" = 2; - "khotkeysrc"."Data_3_6Triggers0"."GesturePointData" = "0,0.0625,0,0,0,0.0625,0.0625,0,0.125,0,0.125,0.0625,0,0.25,0,0.1875,0.0625,0,0.375,0,0.25,0.0625,0.5,0.5,0,0.3125,0.0625,0.5,0.5,0.125,0.375,0.0625,0.5,0.5,0.25,0.4375,0.0625,0.5,0.5,0.375,0.5,0.0625,0.5,0.5,0.5,0.5625,0.0625,0.5,0.5,0.625,0.625,0.0625,0.5,0.5,0.75,0.6875,0.0625,0.5,0.5,0.875,0.75,0.0625,0,0.5,1,0.8125,0.0625,0,0.625,1,0.875,0.0625,0,0.75,1,0.9375,0.0625,0,0.875,1,1,0,0,1,1"; - "khotkeysrc"."Data_3_6Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_6Triggers1"."GesturePointData" = "0,0.0625,0.5,0,0,0.0625,0.0625,0.5,0,0.125,0.125,0.0625,0.5,0,0.25,0.1875,0.0625,0.5,0,0.375,0.25,0.0625,0.5,0,0.5,0.3125,0.0625,0.5,0,0.625,0.375,0.0625,0.5,0,0.75,0.4375,0.0625,0.5,0,0.875,0.5,0.0625,0,0,1,0.5625,0.0625,0,0.125,1,0.625,0.0625,0,0.25,1,0.6875,0.0625,0,0.375,1,0.75,0.0625,0,0.5,1,0.8125,0.0625,0,0.625,1,0.875,0.0625,0,0.75,1,0.9375,0.0625,0,0.875,1,1,0,0,1,1"; - "khotkeysrc"."Data_3_6Triggers1"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_7"."Comment" = "Press, move up, release.\nConflicts with Opera-style 'Up #2', which is disabled by default."; - "khotkeysrc"."Data_3_7"."Enabled" = true; - "khotkeysrc"."Data_3_7"."Name" = "New Tab"; - "khotkeysrc"."Data_3_7"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_7Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_7Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_7Actions0"."Input" = "Ctrl+Shift+N"; - "khotkeysrc"."Data_3_7Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_7Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_7Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_7Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_7Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_7Triggers0"."GesturePointData" = "0,0.125,-0.5,0.5,1,0.125,0.125,-0.5,0.5,0.875,0.25,0.125,-0.5,0.5,0.75,0.375,0.125,-0.5,0.5,0.625,0.5,0.125,-0.5,0.5,0.5,0.625,0.125,-0.5,0.5,0.375,0.75,0.125,-0.5,0.5,0.25,0.875,0.125,-0.5,0.5,0.125,1,0,0,0.5,0"; - "khotkeysrc"."Data_3_7Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_8"."Comment" = "Press, move down, release."; - "khotkeysrc"."Data_3_8"."Enabled" = true; - "khotkeysrc"."Data_3_8"."Name" = "New Window"; - "khotkeysrc"."Data_3_8"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_8Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_8Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_8Actions0"."Input" = "Ctrl+N\n"; - "khotkeysrc"."Data_3_8Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_8Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_8Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_8Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_8Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_8Triggers0"."GesturePointData" = "0,0.125,0.5,0.5,0,0.125,0.125,0.5,0.5,0.125,0.25,0.125,0.5,0.5,0.25,0.375,0.125,0.5,0.5,0.375,0.5,0.125,0.5,0.5,0.5,0.625,0.125,0.5,0.5,0.625,0.75,0.125,0.5,0.5,0.75,0.875,0.125,0.5,0.5,0.875,1,0,0,0.5,1"; - "khotkeysrc"."Data_3_8Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."Data_3_9"."Comment" = "Press, move up, move down, release."; - "khotkeysrc"."Data_3_9"."Enabled" = true; - "khotkeysrc"."Data_3_9"."Name" = "Reload"; - "khotkeysrc"."Data_3_9"."Type" = "SIMPLE_ACTION_DATA"; - "khotkeysrc"."Data_3_9Actions"."ActionsCount" = 1; - "khotkeysrc"."Data_3_9Actions0"."DestinationWindow" = 2; - "khotkeysrc"."Data_3_9Actions0"."Input" = "F5"; - "khotkeysrc"."Data_3_9Actions0"."Type" = "KEYBOARD_INPUT"; - "khotkeysrc"."Data_3_9Conditions"."Comment" = ""; - "khotkeysrc"."Data_3_9Conditions"."ConditionsCount" = 0; - "khotkeysrc"."Data_3_9Triggers"."Comment" = "Gesture_triggers"; - "khotkeysrc"."Data_3_9Triggers"."TriggersCount" = 1; - "khotkeysrc"."Data_3_9Triggers0"."GesturePointData" = "0,0.0625,-0.5,0.5,1,0.0625,0.0625,-0.5,0.5,0.875,0.125,0.0625,-0.5,0.5,0.75,0.1875,0.0625,-0.5,0.5,0.625,0.25,0.0625,-0.5,0.5,0.5,0.3125,0.0625,-0.5,0.5,0.375,0.375,0.0625,-0.5,0.5,0.25,0.4375,0.0625,-0.5,0.5,0.125,0.5,0.0625,0.5,0.5,0,0.5625,0.0625,0.5,0.5,0.125,0.625,0.0625,0.5,0.5,0.25,0.6875,0.0625,0.5,0.5,0.375,0.75,0.0625,0.5,0.5,0.5,0.8125,0.0625,0.5,0.5,0.625,0.875,0.0625,0.5,0.5,0.75,0.9375,0.0625,0.5,0.5,0.875,1,0,0,0.5,1"; - "khotkeysrc"."Data_3_9Triggers0"."Type" = "GESTURE"; - "khotkeysrc"."General"."AllowKDEAppsToRememberWindowPositions" = ""; - "khotkeysrc"."General"."AllowKDEAppsToRememberWindowPositions\x5b$d\x5d" = ""; - "khotkeysrc"."General"."ColorSchemeHash\x5b$d\x5d" = ""; - "khotkeysrc"."General"."ColorScheme\x5b$d\x5d" = ""; - "khotkeysrc"."Gestures"."Disabled" = true; - "khotkeysrc"."Gestures"."MouseButton" = 2; - "khotkeysrc"."Gestures"."Timeout" = 300; - "khotkeysrc"."GesturesExclude"."Comment" = ""; - "khotkeysrc"."GesturesExclude"."WindowsCount" = 0; - "khotkeysrc"."Icons"."Theme" = ""; - "khotkeysrc"."Icons"."Theme\x5b$d\x5d" = ""; - "khotkeysrc"."KDE"."LookAndFeelPackage\x5b$d\x5d" = ""; - "khotkeysrc"."KDE"."SingleClick" = ""; - "khotkeysrc"."KDE"."SingleClick\x5b$d\x5d" = ""; - "khotkeysrc"."KDE"."widgetStyle" = ""; - "khotkeysrc"."KDE"."widgetStyle\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Allow Expansion" = ""; - "khotkeysrc"."KFileDialog Settings"."Allow Expansion\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Automatically select filename extension" = ""; - "khotkeysrc"."KFileDialog Settings"."Automatically select filename extension\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Breadcrumb Navigation" = ""; - "khotkeysrc"."KFileDialog Settings"."Breadcrumb Navigation\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Decoration position" = ""; - "khotkeysrc"."KFileDialog Settings"."Decoration position\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."LocationCombo Completionmode" = ""; - "khotkeysrc"."KFileDialog Settings"."LocationCombo Completionmode\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."PathCombo Completionmode" = ""; - "khotkeysrc"."KFileDialog Settings"."PathCombo Completionmode\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Bookmarks" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Bookmarks\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Full Path" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Full Path\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Inline Previews" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Inline Previews\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Preview" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Preview\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Speedbar" = ""; - "khotkeysrc"."KFileDialog Settings"."Show Speedbar\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Show hidden files" = ""; - "khotkeysrc"."KFileDialog Settings"."Show hidden files\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort by" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort by\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort directories first" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort directories first\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort hidden files last" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort hidden files last\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort reversed" = ""; - "khotkeysrc"."KFileDialog Settings"."Sort reversed\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."Speedbar Width" = ""; - "khotkeysrc"."KFileDialog Settings"."Speedbar Width\x5b$d\x5d" = ""; - "khotkeysrc"."KFileDialog Settings"."View Style" = ""; - "khotkeysrc"."KFileDialog Settings"."View Style\x5b$d\x5d" = ""; - "khotkeysrc"."Main"."AlreadyImported" = "defaults,kde32b1,konqueror_gestures_kde321"; - "khotkeysrc"."Main"."Disabled" = false; - "khotkeysrc"."Voice"."Shortcut" = ""; - "khotkeysrc"."WM"."activeBackground" = ""; - "khotkeysrc"."WM"."activeBackground\x5b$d\x5d" = ""; - "khotkeysrc"."WM"."activeBlend" = ""; - "khotkeysrc"."WM"."activeBlend\x5b$d\x5d" = ""; - "khotkeysrc"."WM"."activeForeground" = ""; - "khotkeysrc"."WM"."activeForeground\x5b$d\x5d" = ""; - "khotkeysrc"."WM"."inactiveBackground" = ""; - "khotkeysrc"."WM"."inactiveBackground\x5b$d\x5d" = ""; - "khotkeysrc"."WM"."inactiveBlend" = ""; - "khotkeysrc"."WM"."inactiveBlend\x5b$d\x5d" = ""; - "khotkeysrc"."WM"."inactiveForeground" = ""; - "khotkeysrc"."WM"."inactiveForeground\x5b$d\x5d" = ""; - "kscreenlockerrc"."Daemon"."Autolock" = false; - "kscreenlockerrc"."Greeter/Wallpaper/org/kde/image/General"."Image" = builtins.toString config.stylix.image; - "ksplashrc"."KSplash"."Theme" = ""; - "kwalletrc"."Wallet"."First Use" = false; - "kwinrc"."Desktops"."Id_1" = "7dfca09a-7b8f-4f7b-9acb-9b9e9eda8090"; - "kwinrc"."Desktops"."Number" = 1; - "kwinrc"."Desktops"."Rows" = 1; - "kwinrc"."Effect-blur"."NoiseStrength" = 14; - "kwinrc"."Effect-blurplus"."BlurDecorations" = true; - "kwinrc"."Effect-blurplus"."BlurDocks" = true; - "kwinrc"."Effect-blurplus"."BlurMatching" = false; - "kwinrc"."Effect-blurplus"."BlurMenus" = true; - "kwinrc"."Effect-blurplus"."BlurNonMatching" = true; - "kwinrc"."Effect-blurplus"."BlurStrength" = 6; - "kwinrc"."Effect-blurplus"."NoiseStrength" = 9; - "kwinrc"."Effect-blurplus"."PaintAsTranslucent" = true; - "kwinrc"."Effect-blurplus"."WindowClasses" = ""; - "kwinrc"."NightColor"."Active" = true; - "kwinrc"."NightColor"."Mode" = "Constant"; - "kwinrc"."NightColor"."NightTemperature" = 2800; - "kwinrc"."Plugins"."blurEnabled" = false; - "kwinrc"."Plugins"."contrastEnabled" = true; - "kwinrc"."Plugins"."diminactiveEnabled" = true; - "kwinrc"."Plugins"."dimscreenEnabled" = true; - "kwinrc"."Plugins"."forceblurEnabled" = true; - "kwinrc"."Plugins"."translucencyEnabled" = true; - "kwinrc"."Tiling"."padding" = 4; - "kwinrc"."Tiling/210922b3-3a6e-51f5-91ba-890c244e8799"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Tiling/213a9620-187e-58a6-b80b-85d8fb95dfce"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Tiling/31bcecfc-99a3-575a-852e-eb44d7d40d77"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Tiling/631e511d-5253-59c4-b851-807038351db0"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Tiling/90d850f3-1c43-54c3-b9b7-d85ed27c9140"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Tiling/afce9710-fc0e-580f-b02c-d719c208ba20"."tiles" = "{\"layoutDirection\":\"horizontal\",\"tiles\":[{\"width\":0.25},{\"width\":0.5},{\"width\":0.25}]}"; - "kwinrc"."Xwayland"."Scale" = 1; - "kwinrc"."org.kde.kdecoration2"."ButtonsOnRight" = "HIAFX"; - "kwinrc"."org.kde.kdecoration2"."theme" = "Breeze"; - "plasma-localerc"."Formats"."LANG" = "en_US.UTF-8"; - "plasmarc"."Theme"."name" = "default"; - "plasmarc"."Wallpapers"."usersWallpapers" = builtins.toString config.stylix.image; - "systemsettingsrc"."KFileDialog Settings"."detailViewIconSize" = 16; - "systemsettingsrc"."systemsettings_sidebar_mode"."HighlightNonDefaultSettings" = true; - }; - }; - }; -} diff --git a/modules/user/ranger/ranger.nix b/modules/user/ranger/ranger.nix deleted file mode 100644 index 877cb44..0000000 --- a/modules/user/ranger/ranger.nix +++ /dev/null @@ -1,72 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.ranger; -in { - options = { - userSettings.ranger = { - enable = lib.mkEnableOption "Enable ranger file manager"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - ranger - ripdrag - highlight - poppler_utils - librsvg - ffmpegthumbnailer - # TODO fix cbx script - (pkgs.writeScriptBin "cbx" '' - # this lets my copy and paste images and/or plaintext of files directly out of ranger - if [ "$#" -le "2" ]; then - if [ "$1" = "copy" -o "$1" = "cut" ]; then - if [ "$XDG_SESSION_TYPE" = "wayland" ]; then - wl-copy < $2; - else - # xclip -selection clipboard -t $(file -b --mime-type $2) -i $2; - xclip -selection clipboard -t image/png -i $2; - fi - fi - fi - '') - (pkgs.writeScriptBin "gcode-stats" '' - #!/bin/sh - - filename="$1"; - printtime=$(awk -F ":" '/;TIME:/{print $NF; exit}' "$filename"); - actualprinttime=$(echo "scale=2; $printtime / 3600" | bc); - filamentused=$(awk -F ": " '/;Filament used:/{print $NF; exit}' "$filename"); - bedtemp=$(awk -F " S" '/M140 S/{print $NF; exit}' "$filename"); - exttemp=$(awk -F " S" '/M104 S/{print $NF; exit}' "$filename"); - echo "Print Time: $actualprinttime""hr"" -Filament Used: $filamentused -Bed Temp: $bedtemp""C -Extruder Temp: $exttemp ""C" > /dev/stdout; - '') - ]; - - xdg.mimeApps.associations.added = { - "inode/directory" = "ranger.desktop"; - }; - home.file.".config/ranger/rc.conf".source = ./rc.conf; - home.file.".config/ranger/rifle.conf".source = ./rifle.conf; - home.file.".config/ranger/scope.sh" = { - source = ./scope.sh; - executable = true; - }; - home.file.".config/ranger/commands.py" = { - source = ./commands.py; - executable = true; - }; - home.file.".config/ranger/commands_full.py" = { - source = ./commands_full.py; - executable = true; - }; - home.file.".config/ranger/colorschemes/hail.py" = { - source = ./colorschemes/hail.py; - executable = true; - }; - }; -} diff --git a/modules/user/recording/default.nix b/modules/user/recording/default.nix deleted file mode 100644 index ba44907..0000000 --- a/modules/user/recording/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.recording; -in { - options = { - userSettings.recording = { - enable = lib.mkEnableOption "Enable studio recording and editing programs"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - obs-studio - kdePackages.kdenlive - tenacity - ardour - ]; - }; -} diff --git a/modules/user/remote/default.nix b/modules/user/remote/default.nix deleted file mode 100644 index f28a671..0000000 --- a/modules/user/remote/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.remote; -in { - options = { - userSettings.remote = { - enable = lib.mkEnableOption "Enable programs for controlling remote machines"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = with pkgs; [ - remmina - sshfs - ]; - }; -} diff --git a/modules/user/shell/default.nix b/modules/user/shell/default.nix deleted file mode 100644 index 438889e..0000000 --- a/modules/user/shell/default.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.shell; -in { - options = { - userSettings.shell = { - enable = lib.mkEnableOption "Enable fancy zsh with some necessary CLI utilities"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.zsh = { - enable = true; - enableAutosuggestions = true; - syntaxHighlighting.enable = true; - enableCompletion = true; - plugins = [ - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "v0.8.0"; - sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; - }; - } - ]; - shellAliases = { - phoenix = "sudo phoenix"; - ranger = "yazi"; - ls = "eza --icons -l -T -L=1"; - cat = "bat"; - htop = "btm"; - fd = "fd -Lu"; - w3m = "w3m -no-cookie -v"; - "," = "comma"; - ",," = "comma-shell"; - }; - initExtra = '' - PROMPT=" ◉ %U%F{magenta}%n%f%u@%U%F{blue}%m%f%u:%F{yellow}%~%f - %F{green}→%f " - RPROMPT="%F{red}▂%f%F{yellow}▄%f%F{green}▆%f%F{cyan}█%f%F{blue}▆%f%F{magenta}▄%f%F{white}▂%f" - [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' - bindkey '^P' history-beginning-search-backward - bindkey '^N' history-beginning-search-forward - ''; - }; - - programs.bash = { - enable = true; - enableCompletion = true; - shellAliases = config.programs.zsh.shellAliases; - }; - - home.packages = with pkgs; [ - gnugrep gnused w3m - bat eza bottom fd bc - direnv nix-direnv devenv - ]; - - programs.neovim = { - enable = true; - viAlias = true; - vimAlias = true; - }; - - programs.direnv.enable = true; - programs.direnv.enableZshIntegration = true; - programs.direnv.nix-direnv.enable = true; - programs.direnv.nix-direnv.package = pkgs.nix-direnv-flakes; - }; -} diff --git a/modules/user/shell/term-apps-extra.nix b/modules/user/shell/term-apps-extra.nix deleted file mode 100644 index 3f74d82..0000000 --- a/modules/user/shell/term-apps-extra.nix +++ /dev/null @@ -1,52 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.shell.extraApps; -in { - options = { - userSettings.shell.extraApps = { - enable = lib.mkEnableOption "Add some fun but mostly useless CLI apps"; - }; - }; - - config = lib.mkIf cfg.enable { - # Fun CLI apps that aren't necessary - home.packages = with pkgs; [ - # Command Line - disfetch lolcat cowsay - starfetch - (stdenv.mkDerivation { - name = "pokemon-colorscripts"; - version = "unstable"; - - src = fetchFromGitLab { - owner = "phoneybadger"; - repo = "pokemon-colorscripts"; - rev = "0483c85b93362637bdd0632056ff986c07f30868"; - sha256 = "sha256-rj0qKYHCu9SyNsj1PZn1g7arjcHuIDGHwubZg/yJt7A="; - }; - - installPhase = '' - mkdir -p $out $out/bin $out/opt - cp -rf $src/colorscripts $out/opt - cp $src/pokemon-colorscripts.py $out/opt - cp $src/pokemon.json $out/opt - ln -s $out/opt/pokemon-colorscripts.py $out/bin/pokemon-colorscripts - ''; - - meta = { - homepage = "https://github.com/Admiral-Fish/PokeFinder"; - description = "CLI utility to print out images of pokemon to terminal"; - license = lib.licenses.mit; - maintainers = []; - }; - }) - ]; - - programs.zsh.shellAliases = { - neofetch = "disfetch"; - fetch = "disfetch"; - gitfetch = "onefetch"; - }; - }; -} diff --git a/modules/user/shell/term-apps.nix b/modules/user/shell/term-apps.nix deleted file mode 100644 index 8b9b8d3..0000000 --- a/modules/user/shell/term-apps.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.shell.apps; -in { - options = { - userSettings.shell.apps = { - enable = lib.mkEnableOption "Enable a collection of additional useful CLI apps"; - }; - }; - - config = lib.mkIf cfg.enable { - # Collection of useful CLI apps - home.packages = with pkgs; [ - # Command Line - killall - libnotify - timer - brightnessctl - gnugrep - bat eza fd bottom ripgrep - rsync - zip unzip - w3m - pandoc - hwinfo - pciutils - numbat - (pkgs.writeShellScriptBin "airplane-mode" '' - #!/bin/sh - connectivity="$(nmcli n connectivity)" - if [ "$connectivity" == "full" ] - then - nmcli n off - else - nmcli n on - fi - '') - (pkgs.writeScriptBin "comma" '' - if [ "$#" = 0 ]; then - echo "usage: comma PKGNAME... [EXECUTABLE]"; - elif [ "$#" = 1 ]; then - nix-shell -p $1 --run $1; - elif [ "$#" = 2 ]; then - nix-shell -p $1 --run $2; - else - echo "error: too many arguments"; - echo "usage: comma PKGNAME... [EXECUTABLE]"; - fi - '') - (pkgs.writeScriptBin "comma-shell" '' - if [ "$#" = 0 ]; then - echo "usage: comma-shell PKGNAME1 [PKGNAME2 PKGNAME3...]"; - else - nix-shell -p $@ - fi - '') - ]; - - programs.zsh.shellAliases = { - w3m = "w3m -no-cookie -v"; - "," = "comma"; - ",," = "comma-shell"; - }; - }; -} diff --git a/modules/user/stylix/default.nix b/modules/user/stylix/default.nix deleted file mode 100644 index 3eca713..0000000 --- a/modules/user/stylix/default.nix +++ /dev/null @@ -1,122 +0,0 @@ -{ config, lib, pkgs, inputs, osConfig, ... }: - -let - cfg = config.userSettings.stylix; - theme = import (./. + "../../../themes"+("/"+config.userSettings.stylix.theme)); -in -{ - options = { - userSettings.stylix = { - enable = lib.mkEnableOption "Enable stylix theming"; - }; - userSettings.stylix.theme = lib.mkOption { - default = if (osConfig.stylix.enable) then osConfig.systemSettings.stylix.theme else "io"; - type = lib.types.enum (builtins.attrNames (lib.filterAttrs (name: type: type == "directory") (builtins.readDir ../../themes))); - description = "Theme for stylix to use for the user. A list of themes can be found in the `themes` directory."; - }; - }; - - # for whatever reason, I can't import stylix hmModule if the nixosModule is imported - imports = lib.optionals (!osConfig.stylix.enable) [ inputs.stylix.homeManagerModules.stylix ]; - - config = lib.mkIf cfg.enable { - stylix.enable = true; - home.file.".currenttheme".text = config.userSettings.stylix.theme; - stylix.autoEnable = false; - stylix.polarity = theme.polarity; - stylix.image = pkgs.fetchurl { - url = theme.backgroundUrl; - sha256 = theme.backgroundSha256; - }; - stylix.base16Scheme = theme; - - stylix.fonts = { - # TODO abstract fonts into an option - monospace = { - name = "Fira Code Nerd Font"; - package = pkgs.fira-code-nerdfont; - }; - serif = { - name = "Fira"; - package = pkgs.fira; - }; - sansSerif = { - name = "Fira Sans"; - package = pkgs.fira-sans; - }; - emoji = { - name = "Twitter Color Emoji"; - package = pkgs.twitter-color-emoji; - }; - sizes = { - terminal = 18; - applications = 12; - popups = 12; - desktop = 12; - }; - }; - - # move into alacritty config - stylix.targets.alacritty.enable = true; - #programs.alacritty.settings = { - # colors = { - # # TODO revisit these color mappings - # # these are just the default provided from stylix - # # but declared directly due to alacritty v3.0 breakage - # primary.background = "#"+config.lib.stylix.colors.base00; - # primary.foreground = "#"+config.lib.stylix.colors.base07; - # cursor.text = "#"+config.lib.stylix.colors.base00; - # cursor.cursor = "#"+config.lib.stylix.colors.base07; - # normal.black = "#"+config.lib.stylix.colors.base00; - # normal.red = "#"+config.lib.stylix.colors.base08; - # normal.green = "#"+config.lib.stylix.colors.base0B; - # normal.yellow = "#"+config.lib.stylix.colors.base0A; - # normal.blue = "#"+config.lib.stylix.colors.base0D; - # normal.magenta = "#"+config.lib.stylix.colors.base0E; - # normal.cyan = "#"+config.lib.stylix.colors.base0B; - # normal.white = "#"+config.lib.stylix.colors.base05; - # bright.black = "#"+config.lib.stylix.colors.base03; - # bright.red = "#"+config.lib.stylix.colors.base09; - # bright.green = "#"+config.lib.stylix.colors.base01; - # bright.yellow = "#"+config.lib.stylix.colors.base02; - # bright.blue = "#"+config.lib.stylix.colors.base04; - # bright.magenta = "#"+config.lib.stylix.colors.base06; - # bright.cyan = "#"+config.lib.stylix.colors.base0F; - # bright.white = "#"+config.lib.stylix.colors.base07; - # }; - # font.size = config.stylix.fonts.sizes.terminal; - # font.normal.family = config.stylix.fonts.monospace.name; - #}; - - # move into kitty config - stylix.targets.kitty.enable = true; - - stylix.targets.gtk.enable = true; - stylix.targets.kde.enable = true; - stylix.targets.qt.enable = true; - - home.file = { - ".config/qt5ct/colors/oomox-current.conf".source = config.lib.stylix.colors { - template = builtins.readFile ./oomox-current.conf.mustache; - extension = ".conf"; - }; - ".config/Trolltech.conf".source = config.lib.stylix.colors { - template = builtins.readFile ./Trolltech.conf.mustache; - extension = ".conf"; - }; - ".config/kdeglobals".source = config.lib.stylix.colors { - template = builtins.readFile ./Trolltech.conf.mustache; - extension = ""; - }; - }; - home.packages = with pkgs; [ - kdePackages.breeze kdePackages.breeze-icons pkgs.noto-fonts-monochrome-emoji - ]; - - fonts.fontconfig.defaultFonts = { - monospace = [ config.stylix.fonts.monospace.name ]; - sansSerif = [ config.stylix.fonts.sansSerif.name ]; - serif = [ config.stylix.fonts.serif.name ]; - }; - }; -} diff --git a/modules/user/terminal/alacritty.nix b/modules/user/terminal/alacritty.nix deleted file mode 100644 index 4bc00bf..0000000 --- a/modules/user/terminal/alacritty.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.alacritty; -in { - options = { - userSettings.alacritty = { - enable = lib.mkEnableOption "Enable alacritty"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.alacritty ]; - programs.alacritty.enable = true; - programs.alacritty.settings = { - window.opacity = lib.mkForce 0.85; - }; - }; -} diff --git a/modules/user/terminal/default.nix b/modules/user/terminal/default.nix deleted file mode 100644 index 93cd6c5..0000000 --- a/modules/user/terminal/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options = { - userSettings.terminal = lib.mkOption { - default = "alacritty"; - description = "Default terminal"; - type = lib.types.enum [ "alacritty" "kitty" ]; - }; - }; - - config = { - userSettings.alacritty.enable = lib.mkDefault (config.userSettings.terminal == "alacritty"); - userSettings.kitty.enable = lib.mkDefault (config.userSettings.terminal == "kitty"); - }; -} diff --git a/modules/user/terminal/kitty.nix b/modules/user/terminal/kitty.nix deleted file mode 100644 index 3e67ee8..0000000 --- a/modules/user/terminal/kitty.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.kitty; -in { - options = { - userSettings.kitty = { - enable = lib.mkEnableOption "Enable kitty"; - }; - }; - - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.kitty ]; - programs.kitty.enable = true; - programs.kitty.settings = { - background_opacity = lib.mkForce "0.85"; - modify_font = "cell_width 90%"; - confirm_os_window_close = 0; - }; - programs.kitty.keybindings = { - "ctrl+equal" = "change_font_size all +2.0"; - "ctrl+minus" = "change_font_size all -2.0"; - }; - }; -} diff --git a/modules/user/userInfo/default.nix b/modules/user/userInfo/default.nix deleted file mode 100644 index c36cdb0..0000000 --- a/modules/user/userInfo/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, pkgs, ... }: - -{ - options = { - userSettings = { - name = lib.mkOption { - default = ""; - description = "User full name"; - type = lib.types.str; - }; - email = lib.mkOption { - default = ""; - description = "User email"; - type = lib.types.str; - }; - }; - }; -} diff --git a/modules/user/virtualization/virtual-machines/default.nix b/modules/user/virtualization/virtual-machines/default.nix deleted file mode 100644 index df1da32..0000000 --- a/modules/user/virtualization/virtual-machines/default.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.userSettings.virtualization.virtualMachines; -in { - options = { - userSettings.virtualization.virtualMachines = { - enable = lib.mkEnableOption "Enable helpful VM apps"; - }; - }; - - config = lib.mkIf cfg.enable { - # Various packages related to virtualization, compatability and sandboxing - home.packages = with pkgs; [ - # Virtual Machines and wine - libvirt - virt-manager - qemu - uefi-run - lxc - swtpm - bottles - - # Filesystems - dosfstools - ]; - - home.file.".config/libvirt/qemu.conf".text = '' - nvram = ["/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd"] - ''; - }; -} diff --git a/modules/user/vscodium/default.nix b/modules/user/vscodium/default.nix deleted file mode 100644 index 6273a1e..0000000 --- a/modules/user/vscodium/default.nix +++ /dev/null @@ -1,95 +0,0 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.userSettings.vscodium; -in { - options = { - userSettings.vscodium = { - enable = lib.mkEnableOption "Enable vscodium"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.vscode = { - enable = true; - package = pkgs.vscodium; - profiles.default.extensions = with pkgs.vscode-extensions; [ - vscodevim.vim - kahole.magit - jnoortheen.nix-ide - mkhl.direnv - geequlim.godot-tools - yzhang.markdown-all-in-one - ]; - profiles.default.userSettings = { - "keyboard.dispatch" = "keyCode"; - }; - profiles.default.keybindings = [ - { - "key" = "g g"; - "command" = "cursorTop"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" ; - } - { "key" = "g r"; - "command" = "magit.refresh"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/" ; - } - { - "key" = "tab"; - "command" = "extension.vim_tab"; - "when" = "editorTextFocus && vim.active && !inDebugRepl && vim.mode != 'Insert' && editorLangId != 'magit'"; - } - { - "key" = "tab"; - "command" = "-extension.vim_tab"; - } - { - "key" = "x"; - "command" = "magit.discard-at-point"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"; - } - { - "key" = "k"; - "command" = "-magit.discard-at-point"; - } - { - "key" = "-"; - "command" = "magit.reverse-at-point"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"; - } - { - "key" = "v"; - "command" = "-magit.reverse-at-point"; - } - { - "key" = "shift+-"; - "command" = "magit.reverting"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"; - } - { - "key" = "shift+v"; - "command" = "-magit.reverting"; - } - { - "key" = "shift+o"; - "command" = "magit.resetting"; - "when" = "editorTextFocus && editorLangId == 'magit' && vim.mode =~ /^(?!SearchInProgressMode|CommandlineInProgress).*$/"; - } - { - "key" = "shift+x"; - "command" = "-magit.resetting"; - } - { - "key" = "x"; - "command" = "-magit.reset-mixed"; - } - { - "key" = "ctrl+u x"; - "command" = "-magit.reset-hard"; - } - ]; - mutableExtensionsDir = false; - - }; - stylix.targets.vscode.enable = true; - }; -} diff --git a/modules/user/xdg/default.nix b/modules/user/xdg/default.nix deleted file mode 100644 index 98c1f95..0000000 --- a/modules/user/xdg/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{config, lib, pkgs, ... }: - -let - cfg = config.userSettings.xdg; -in { - options = { - userSettings.xdg = { - enable = lib.mkEnableOption "Enable xdg user dirs with my xdg directory structure"; - }; - }; - - config = lib.mkIf cfg.enable { - # TODO fix mime associations, most of them are totally broken :( - xdg.enable = true; - xdg.userDirs = { - enable = true; - createDirectories = true; - music = "${config.home.homeDirectory}/Media/Music"; - videos = "${config.home.homeDirectory}/Media/Videos"; - pictures = "${config.home.homeDirectory}/Media/Pictures"; - templates = "${config.home.homeDirectory}/Templates"; - download = "${config.home.homeDirectory}/Downloads"; - documents = "${config.home.homeDirectory}/Documents"; - desktop = null; - publicShare = null; - extraConfig = { - XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles"; - XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive"; - XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects"; - XDG_CLOUD_DIR = "${config.home.homeDirectory}/Drive"; - XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books"; - XDG_VM_DIR = "${config.home.homeDirectory}/Machines"; - XDG_NOTES_DIR = "${config.home.homeDirectory}/Notes"; - XDG_KP_DIR = "${config.home.homeDirectory}/KP"; - }; - }; - xdg.mime.enable = true; - xdg.mimeApps.enable = true; - home.file.External.source = config.lib.file.mkOutOfStoreSymlink "/run/media/" + config.home.username; - }; -} diff --git a/modules/user/yazi/default.nix b/modules/user/yazi/default.nix deleted file mode 100644 index e3eda20..0000000 --- a/modules/user/yazi/default.nix +++ /dev/null @@ -1,75 +0,0 @@ -{ config, lib, pkgs, ...}: - -let - cfg = config.userSettings.yazi; -in { - options = { - userSettings.yazi = { - enable = lib.mkEnableOption "Enable yazi TUI file manager"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.yazi = { - enable = true; - enableZshIntegration = true; - keymap.manager.prepend_keymap = - [ - { run = "shell ' \"$@\"' --cursor=0 --interactive"; on = [ "@" ]; } - { run = "hidden toggle"; on = [ "" ]; } - { run = "yank"; on = [ "y" "y" ]; } - { run = "copy path"; on = [ "y" "p" ]; } - { run = "copy dirname"; on = [ "y" "d" ]; } - { run = "copy filename"; on = [ "y" "n" ]; } - { run = "copy name_without_ext"; on = [ "y" "N" ]; } - { run = "yank --cut"; on = [ "d" "d" ]; } - { run = "remove --force"; on = [ "d" "D" ]; } - { run = "paste"; on = [ "p" "p" ]; } - { run = "paste --force"; on = [ "p" "P" ]; } - { run = "cd --interactive"; on = [ "c" "d" ]; } - { run = "sort mtime --reverse=no"; on = [ "o" "m" ]; } - { run = "sort mtime --reverse=yes"; on = [ "o" "M" ]; } - { run = "sort natural --reverse=no"; on = [ "o" "b" ]; } - { run = "sort natural --reverse=yes"; on = [ "o" "B" ]; } - { run = "sort alphabetical --reverse=no"; on = [ "o" "a" ]; } - { run = "sort alphabetical --reverse=yes"; on = [ "o" "A" ]; } - { run = "sort extension --reverse=no"; on = [ "o" "e" ]; } - { run = "sort extension --reverse=yes"; on = [ "o" "E" ]; } - { run = "sort size --reverse=no"; on = [ "o" "s" ]; } - { run = "sort size --reverse=yes"; on = [ "o" "S" ]; } - { run = "tab_create --current"; on = [ "t" ]; } - { run = "close"; on = [ "x" ]; } - { run = "tab_switch 1 --relative"; on = [ "J" ]; } - { run = "tab_switch 1 --relative"; on = [ "" ]; } - { run = "tab_switch -1 --relative"; on = [ "K" ]; } - { run = "tab_switch -1 --relative"; on = [ "" ]; } - { run = "undo"; on = [ "u" ]; } - { run = "redo"; on = [ "" ]; } - ]; - plugins = { - full-border = pkgs.yaziPlugins.full-border; - git = pkgs.yaziPlugins.git; - sudo = pkgs.yaziPlugins.sudo; - piper = pkgs.yaziPlugins.piper; - }; - initLua = '' - require("full-border"):setup() - require("git"):setup() - ''; - settings = { - "plugin.prepend_fetchers" = [ - { - id = "git"; - name = "*"; - run = "git"; - } - { - id = "git"; - name = "*/"; - run = "git"; - } - ]; - }; - }; - }; -} diff --git a/patches/README.org b/patches/README.org index b444021..e91c04d 100644 --- a/patches/README.org +++ b/patches/README.org @@ -1,12 +1,13 @@ #+title: I never thought I'd have to do this, but here we are #+author: Emmet -Since I use =nixpkgs-unstable= (I am an Arch user (btw) at heart), there are some cases where certain packages will break or fail to build (usually due to my extremely customized, non-standard system). +Since I use =nixpkgs-unstable= (I am an Arch user by heart), there are some cases where certain packages will break or fail to build (usually due to my extremely customized, non-standard system). With Nix, I /could/ just rollback everything and wait to update until an upstream patch fixes things, but if it's a quick fix, I'd rather just patch it in immediately so that everything else can stay up to date. -Patches end up in and out of this directory. Ideally, there shouldn't be any patches here! - -** List of Current Patches +** List of Patches Here is a list of patches in this directory, along with a more detailed description of why it's necessary: -- n/a + +| Patch | Reason | +|------------------------------+----------------------------------------------------------------------------------------------| +| [[./emacs-no-version-check.patch][emacs-no-version-check.patch]] | [[https://github.com/NixOS/nixpkgs/commit/35ccb9db3f4f0872f05d175cf53d0e1f87ff09ea][35ccb9d]] breaks my nix-doom-emacs install by preventing home-manager from building. This patches undoes this commit. | diff --git a/patches/emacs-no-version-check.patch b/patches/emacs-no-version-check.patch new file mode 100644 index 0000000..5e66bd0 --- /dev/null +++ b/patches/emacs-no-version-check.patch @@ -0,0 +1,23 @@ +diff --git a/pkgs/applications/editors/emacs/build-support/generic.nix b/pkgs/applications/editors/emacs/build-support/generic.nix +index 3ff10ee86..56d03b6e6 100644 +--- a/pkgs/applications/editors/emacs/build-support/generic.nix ++++ b/pkgs/applications/editors/emacs/build-support/generic.nix +@@ -25,7 +25,8 @@ in + + libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs: + +-{ buildInputs ? [] ++{ version ? null ++, buildInputs ? [] + , nativeBuildInputs ? [] + , packageRequires ? [] + , propagatedBuildInputs ? [] +@@ -38,7 +39,7 @@ libBuildHelper.extendMkDerivation' stdenv.mkDerivation (finalAttrs: + }@args: + + { +- name = args.name or "emacs-${finalAttrs.pname}-${finalAttrs.version}"; ++ name = args.name or "emacs-${finalAttrs.pname}${lib.optionalString (version != null) "-${version}"}"; + + unpackCmd = args.unpackCmd or '' + case "$curSrc" in diff --git a/patches/nixpkgs-348697.patch b/patches/nixpkgs-348697.patch new file mode 100644 index 0000000..b0494ac --- /dev/null +++ b/patches/nixpkgs-348697.patch @@ -0,0 +1,76 @@ +diff --git a/pkgs/development/python-modules/pyqt/6.x.nix b/pkgs/development/python-modules/pyqt/6.x.nix +index 9f031347d354e..6356eeb9637f0 100644 +--- a/pkgs/development/python-modules/pyqt/6.x.nix ++++ b/pkgs/development/python-modules/pyqt/6.x.nix +@@ -25,17 +25,15 @@ + + buildPythonPackage rec { + pname = "pyqt6"; +- version = "6.7.0.dev2404081550"; ++ version = "6.8.0.dev2410141303"; + format = "pyproject"; + + disabled = pythonOlder "3.6"; + ++ # This is dangerous, how can we get web archive to archive the URL? + src = fetchurl { +- urls = [ +- "https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz" +- "http://web.archive.org/web/20240411124842if_/https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz" +- ]; +- hash = "sha256-H5qZ/rnruGh+UVSXLZyTSvjagmmli/iYq+7BaIzl1YQ="; ++ url = "https://riverbankcomputing.com/pypi/packages/PyQt6/PyQt6-${version}.tar.gz"; ++ hash = "sha256-eHYqj22us07uFkErJD2d0y0wueZxtQTwTFW9cI7yoK4="; + }; + + patches = [ +@@ -55,8 +53,11 @@ buildPythonPackage rec { + verbose = true + EOF + ++ # pythonRelaxDeps doesn't work and the wanted versions are not released AFAIK + substituteInPlace pyproject.toml \ +- --replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' ++ --replace-fail 'version = "${version}"' 'version = "${lib.versions.pad 3 version}"' \ ++ --replace-fail "sip >=6.9, <7" "sip >=6.8.6, <7" \ ++ --replace-fail 'PyQt-builder >=1.17, <2' "PyQt-builder >=1.16, <2" + ''; + + enableParallelBuilding = true; +diff --git a/pkgs/development/python-modules/sip/default.nix b/pkgs/development/python-modules/sip/default.nix +index 8a398654b08ce..8fd6240e4a512 100644 +--- a/pkgs/development/python-modules/sip/default.nix ++++ b/pkgs/development/python-modules/sip/default.nix +@@ -4,6 +4,7 @@ + fetchPypi, + pythonOlder, + setuptools, ++ setuptools-scm, + packaging, + tomli, + +@@ -15,17 +16,20 @@ + + buildPythonPackage rec { + pname = "sip"; +- version = "6.8.3"; ++ version = "6.8.6"; + pyproject = true; + + src = fetchPypi { + inherit pname version; +- hash = "sha256-iIVHsBi7JMNq3tUZ6T0+UT1MaqC6VbfMGv+9Rc8Qdiw="; ++ hash = "sha256-f8lZ5I5uxdWvi9Am9p9eJNCLPLirs0IXb1q4AwzAfXo="; + }; + +- nativeBuildInputs = [ setuptools ]; ++ build-system = [ ++ setuptools ++ setuptools-scm ++ ]; + +- propagatedBuildInputs = [ ++ dependencies = [ + packaging + setuptools + ] ++ lib.optionals (pythonOlder "3.11") [ tomli ]; diff --git a/profiles/README.org b/profiles/README.org new file mode 100644 index 0000000..5213f3b --- /dev/null +++ b/profiles/README.org @@ -0,0 +1,15 @@ +#+title: System Profiles + +This directory contains various system profiles which can easily be set in [[../flake.nix][my flake.nix]] by setting the =profile= variable. Each profile directory contains a =configuration.nix= for system-level configuration and a =home.nix= for user-level configuration. Setting the =profile= variable in [[../flake.nix][my flake]] will automatically source the correct =configuration.nix= and =home.nix=. + +Current profiles I have available are: +- [[./personal][Personal]] - What I would run on a personal laptop/desktop* +- [[./work][Work]] - What I would run on my work laptop/desktop* +- [[./homelab][Homelab]] - What I would run on a server or homelab* +- [[./worklab][Worklab]] - My homelab config with my work SSH keys preinstalled* +- [[./wsl][WSL]] - Windows Subsystem for Emacs (uses [[https://github.com/nix-community/NixOS-WSL][NixOS-WSL]]) +- [[./nix-on-droid][Nix on Droid]] - So that I can run Emacs on my phone (uses [[https://github.com/nix-community/nix-on-droid][nix-on-droid]]) + +*My [[./personal][personal]] and [[./work][work]] profiles are actually functionally identical (the [[./work][work]] profile is actually imported into the [[./personal][personal]] profile)! The only difference between them is that my [[./personal][personal]] profile has a few extra things like gaming and social apps. + +*My [[./homelab][homelab]] and [[./worklab][worklab]] profiles are similarly functionally identical (they both utilize the this [[./homelab/base.nix][base.nix]] file)! The only difference is that they have different preinstalled ssh keys. diff --git a/profiles/homelab/README.org b/profiles/homelab/README.org new file mode 100644 index 0000000..0e0a4ba --- /dev/null +++ b/profiles/homelab/README.org @@ -0,0 +1,3 @@ +#+title: Homelab Template + +This is a template system configuration to be installed as a homelab/server! diff --git a/profiles/homelab/base.nix b/profiles/homelab/base.nix new file mode 100644 index 0000000..277c359 --- /dev/null +++ b/profiles/homelab/base.nix @@ -0,0 +1,91 @@ +{ lib, pkgs, systemSettings, userSettings, ... }: + +{ + imports = + [ ../../system/hardware-configuration.nix + ../../system/hardware/time.nix # Network time sync + ../../system/security/firewall.nix + ../../system/security/doas.nix + ../../system/security/gpg.nix + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) + ]; + + # Fix nix path + nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" + "nixos-config=$HOME/dotfiles/system/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + + # Ensure nix flakes are enabled + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # I'm sorry Stallman-taichou + nixpkgs.config.allowUnfree = true; + + # Kernel modules + boot.kernelModules = [ "i2c-dev" "i2c-piix4" ]; + + # Bootloader + # Use systemd-boot if uefi, default to grub otherwise + boot.loader.systemd-boot.enable = if (systemSettings.bootMode == "uefi") then true else false; + boot.loader.efi.canTouchEfiVariables = if (systemSettings.bootMode == "uefi") then true else false; + boot.loader.efi.efiSysMountPoint = systemSettings.bootMountPath; # does nothing if running bios rather than uefi + boot.loader.grub.enable = if (systemSettings.bootMode == "uefi") then false else true; + boot.loader.grub.device = systemSettings.grubDevice; # does nothing if running uefi rather than bios + + # Networking + networking.hostName = systemSettings.hostname; # Define your hostname. + networking.networkmanager.enable = true; # Use networkmanager + + # Timezone and locale + time.timeZone = systemSettings.timezone; # time zone + i18n.defaultLocale = systemSettings.locale; + i18n.extraLocaleSettings = { + LC_ADDRESS = systemSettings.locale; + LC_IDENTIFICATION = systemSettings.locale; + LC_MEASUREMENT = systemSettings.locale; + LC_MONETARY = systemSettings.locale; + LC_NAME = systemSettings.locale; + LC_NUMERIC = systemSettings.locale; + LC_PAPER = systemSettings.locale; + LC_TELEPHONE = systemSettings.locale; + LC_TIME = systemSettings.locale; + }; + + # User account + users.users.${userSettings.username} = { + isNormalUser = true; + description = userSettings.name; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + uid = 1000; + }; + + # System packages + environment.systemPackages = with pkgs; [ + vim + wget + zsh + git + rclone + rdiff-backup + rsnapshot + cryptsetup + gocryptfs + ]; + + programs.fuse.userAllowOther = true; + + services.haveged.enable = true; + + # I use zsh btw + environment.shells = with pkgs; [ zsh ]; + users.defaultUserShell = pkgs.zsh; + programs.zsh.enable = true; + + # It is ok to leave this unchanged for compatibility purposes + system.stateVersion = "22.11"; + +} diff --git a/profiles/homelab/configuration.nix b/profiles/homelab/configuration.nix new file mode 100644 index 0000000..f589ee8 --- /dev/null +++ b/profiles/homelab/configuration.nix @@ -0,0 +1,9 @@ +{ userSettings, ... }: + +{ + imports = [ ./base.nix + ( import ../../system/security/sshd.nix { + authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDaeejVJwUVrIZSo1isbu+gkQ7+8ftCgCsczy3OclkEVWHyRTqlG6yp74hr3j8ZNsOhov7c2Q6RqC8oy669hlxi/y9BsvtlI7sBr94oAKFOmkCS4RiK72ngJjBvI0vbk89wQQjmAd3r8B7ZcedpNOC8CkHu8SebKdYPRIUvAbPc3fTEt7DsJkazAepZCB8LEhUp57FAqQ/Ezlt3X/1uwNq5S0EbE9Zm+nUpEfSqR9apY2neKWLyGiCxpK3dzyNOuulCxvtVz+ie2sTk/6SxM+qWEoVVxhdwyxPihEjgC0EvtG0S5mVh5JmcjRkJOzzBHJuw+6r8yWn/AxGdIsoJ4rKNxH1XH1iLHgCraOLOUjUNlmejTcQPu6o92a79fdz2gCHT/BuIjfCW7MErAC3YSmF45TSur/kiWCBaTqYo06pgbQ3w1vKg7fievQlQzsutmg47RvJp6fb74yxuOdVg39cShQu/l8r6zqm21JAeUaaIp4P/0MrAIMOOVUhbK0QgsNElO4yn0ZKH8wGIF8xORh7ikxUIAyq8C41gjJiO2sAFJc3M8DhduQU3X0lHB7U0Qyu+8ZXn05+zdFPXJ73LKc7DCcLkppRXJsdHLSDEFdWqFnV7o08B4qZkPMT4pmvhwhY0Pf1fwavOqxuTstzw18gUGyQzl0foQi0Qrmdazsp2Qw== emmet@snowfire"]; + inherit userSettings; }) + ]; +} diff --git a/profiles/homelab/home.nix b/profiles/homelab/home.nix new file mode 100644 index 0000000..cb76da8 --- /dev/null +++ b/profiles/homelab/home.nix @@ -0,0 +1,25 @@ +{ pkgs, userSettings, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = userSettings.username; + home.homeDirectory = "/home/"+userSettings.username; + + programs.home-manager.enable = true; + + imports = [ + ../../user/shell/sh.nix # My zsh and bash config + ../../user/app/ranger/ranger.nix # My ranger file manager config + ../../user/app/git/git.nix # My git config + ]; + + home.stateVersion = "22.11"; # Please read the comment before changing. + + home.packages = with pkgs; [ + # Core + zsh + git + ]; + +} diff --git a/profiles/nix-on-droid/README.org b/profiles/nix-on-droid/README.org new file mode 100644 index 0000000..eed6617 --- /dev/null +++ b/profiles/nix-on-droid/README.org @@ -0,0 +1,3 @@ +#+title: I need Emacs on the go! + +This is my =Nix on Droid= profile, which is a minimal installation I use on Android. This (obviously) requires [[https://github.com/nix-community/nix-on-droid][nix-on-droid]] to be installed. I essentially just use this for Emacs and some CLI apps. diff --git a/profiles/nix-on-droid/configuration.nix b/profiles/nix-on-droid/configuration.nix new file mode 100644 index 0000000..9ca3597 --- /dev/null +++ b/profiles/nix-on-droid/configuration.nix @@ -0,0 +1,60 @@ +{ config, lib, pkgs, pkgs-stable, pkgs-emacs, systemSettings, userSettings, inputs, ... }: + +{ + # Simply install just the packages + environment.packages = with pkgs; [ + # User-facing stuff that you really really want to have + vim # or some other editor, e.g. nano or neovim + + # Some common stuff that people expect to have + procps + killall + diffutils + findutils + utillinux + tzdata + hostname + man + gnugrep + gnupg + gnused + gnutar + bzip2 + gzip + xz + zip + unzip + git + ]; + + # Backup etc files instead of failing to activate generation if a file already exists in /etc + environment.etcBackupExtension = ".bak"; + + # Read the changelog before changing this value + system.stateVersion = "23.11"; + + # Set up nix for flakes + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # Set your time zone + #time.timeZone = "Europe/Berlin"; + + # Configure home-manager + home-manager = { + backupFileExtension = "hm-bak"; + useGlobalPkgs = true; + + config = ./home.nix; + + extraSpecialArgs = { + # pass config variables from above + inherit pkgs-stable; + inherit pkgs-emacs; + inherit systemSettings; + inherit userSettings; + inherit inputs; + }; + }; +} diff --git a/profiles/nix-on-droid/home.nix b/profiles/nix-on-droid/home.nix new file mode 100644 index 0000000..65aea7a --- /dev/null +++ b/profiles/nix-on-droid/home.nix @@ -0,0 +1,51 @@ +{ config, pkgs, userSettings, ... }: + +{ + programs.home-manager.enable = true; + + imports = [ + ../../user/shell/sh.nix # My zsh and bash config + ../../user/shell/cli-collection.nix # Useful CLI apps + ../../user/app/doom-emacs/doom.nix # My doom emacs config + ../../user/app/ranger/ranger.nix # My ranger file manager config + ../../user/app/git/git.nix # My git config + ../../user/style/stylix.nix # Styling and themes for my apps + ]; + + home.stateVersion = "22.11"; # Please read the comment before changing. + + home.packages = with pkgs; [ + # Core + zsh + git + ]; + + xdg.enable = true; + xdg.userDirs = { + enable = true; + createDirectories = true; + music = "${config.home.homeDirectory}/Media/Music"; + videos = "${config.home.homeDirectory}/Media/Videos"; + pictures = "${config.home.homeDirectory}/Media/Pictures"; + templates = "${config.home.homeDirectory}/Templates"; + download = "${config.home.homeDirectory}/Downloads"; + documents = "${config.home.homeDirectory}/Documents"; + desktop = null; + publicShare = null; + extraConfig = { + XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles"; + XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive"; + XDG_ORG_DIR = "${config.home.homeDirectory}/Org"; + XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books"; + }; + }; + xdg.mime.enable = true; + xdg.mimeApps.enable = true; + + home.sessionVariables = { + EDITOR = userSettings.editor; + }; + + news.display = "silent"; + +} diff --git a/hosts/TEMPLATE/README.org b/profiles/personal/README.org similarity index 100% rename from hosts/TEMPLATE/README.org rename to profiles/personal/README.org diff --git a/profiles/personal/configuration.nix b/profiles/personal/configuration.nix new file mode 100644 index 0000000..dcf8925 --- /dev/null +++ b/profiles/personal/configuration.nix @@ -0,0 +1,18 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ ... }: +{ + imports = + [ ../work/configuration.nix # Personal is essentially work system + games + ../../system/hardware-configuration.nix + ../../system/app/gamemode.nix + ../../system/app/steam.nix + ../../system/app/prismlauncher.nix + ../../system/security/doas.nix + ../../system/security/gpg.nix + ../../system/security/blocklist.nix + ../../system/security/firewall.nix + ]; +} diff --git a/profiles/personal/home.nix b/profiles/personal/home.nix new file mode 100644 index 0000000..b0f93ea --- /dev/null +++ b/profiles/personal/home.nix @@ -0,0 +1,35 @@ +{ config, pkgs, userSettings, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = userSettings.username; + home.homeDirectory = "/home/"+userSettings.username; + + programs.home-manager.enable = true; + + imports = [ ../work/home.nix # Personal is essentially work system + games + ../../user/app/games/games.nix # Various videogame apps + ]; + + home.stateVersion = "22.11"; # Please read the comment before changing. + + home.packages = with pkgs; [ + # Core + zsh + alacritty + brave + git + syncthing + + ]; + + xdg.enable = true; + xdg.userDirs = { + extraConfig = { + XDG_GAME_DIR = "${config.home.homeDirectory}/Media/Games"; + XDG_GAME_SAVE_DIR = "${config.home.homeDirectory}/Media/Game Saves"; + }; + }; + +} diff --git a/profiles/work/README.org b/profiles/work/README.org new file mode 100644 index 0000000..3f6d8af --- /dev/null +++ b/profiles/work/README.org @@ -0,0 +1,3 @@ +#+title: No time for games! + +This is my =Work= profile, including all the things I need to be efficient for the various hats I wear, and /not/ including distracting things such as games and social apps! diff --git a/profiles/work/configuration.nix b/profiles/work/configuration.nix new file mode 100644 index 0000000..f075b88 --- /dev/null +++ b/profiles/work/configuration.nix @@ -0,0 +1,149 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ pkgs, lib, systemSettings, userSettings, ... }: +{ + imports = + [ ../../system/hardware-configuration.nix + ../../system/hardware/systemd.nix # systemd config + ../../system/hardware/kernel.nix # Kernel config + ../../system/hardware/power.nix # Power management + ../../system/hardware/time.nix # Network time sync + ../../system/hardware/opengl.nix + ../../system/hardware/printing.nix + ../../system/hardware/bluetooth.nix + (./. + "../../../system/wm"+("/"+userSettings.wm)+".nix") # My window manager + #../../system/app/flatpak.nix + ../../system/app/virtualization.nix + ( import ../../system/app/docker.nix {storageDriver = null; inherit pkgs userSettings lib;} ) + ../../system/security/doas.nix + ../../system/security/gpg.nix + ../../system/security/blocklist.nix + ../../system/security/firewall.nix + ../../system/security/firejail.nix + ../../system/security/openvpn.nix + ../../system/security/automount.nix + ../../system/style/stylix.nix + ]; + + # Fix nix path + nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" + "nixos-config=$HOME/dotfiles/system/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + + # Ensure nix flakes are enabled + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + nixpkgs.overlays = [ + ( + final: prev: { + logseq = prev.logseq.overrideAttrs (oldAttrs: { + postFixup = '' + makeWrapper ${prev.electron_27}/bin/electron $out/bin/${oldAttrs.pname} \ + --set "LOCAL_GIT_DIRECTORY" ${prev.git} \ + --add-flags $out/share/${oldAttrs.pname}/resources/app \ + --add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}" \ + --prefix LD_LIBRARY_PATH : "${prev.lib.makeLibraryPath [ prev.stdenv.cc.cc.lib ]}" + ''; + }); + } + ) + ]; + + + # logseq + nixpkgs.config.permittedInsecurePackages = [ + "electron-27.3.11" + ]; + + # wheel group gets trusted access to nix daemon + nix.settings.trusted-users = [ "@wheel" ]; + + # I'm sorry Stallman-taichou + nixpkgs.config.allowUnfree = true; + + # Kernel modules + boot.kernelModules = [ "i2c-dev" "i2c-piix4" "cpufreq_powersave" ]; + + # Bootloader + # Use systemd-boot if uefi, default to grub otherwise + boot.loader.systemd-boot.enable = if (systemSettings.bootMode == "uefi") then true else false; + boot.loader.efi.canTouchEfiVariables = if (systemSettings.bootMode == "uefi") then true else false; + boot.loader.efi.efiSysMountPoint = systemSettings.bootMountPath; # does nothing if running bios rather than uefi + boot.loader.grub.enable = if (systemSettings.bootMode == "uefi") then false else true; + boot.loader.grub.device = systemSettings.grubDevice; # does nothing if running uefi rather than bios + + # Networking + networking.hostName = systemSettings.hostname; # Define your hostname. + networking.networkmanager.enable = true; # Use networkmanager + + # Timezone and locale + time.timeZone = systemSettings.timezone; # time zone + i18n.defaultLocale = systemSettings.locale; + i18n.extraLocaleSettings = { + LC_ADDRESS = systemSettings.locale; + LC_IDENTIFICATION = systemSettings.locale; + LC_MEASUREMENT = systemSettings.locale; + LC_MONETARY = systemSettings.locale; + LC_NAME = systemSettings.locale; + LC_NUMERIC = systemSettings.locale; + LC_PAPER = systemSettings.locale; + LC_TELEPHONE = systemSettings.locale; + LC_TIME = systemSettings.locale; + }; + + # User account + users.users.${userSettings.username} = { + isNormalUser = true; + description = userSettings.name; + extraGroups = [ "networkmanager" "wheel" "input" "dialout" "video" "render" ]; + packages = []; + uid = 1000; + }; + + # System packages + environment.systemPackages = with pkgs; [ + vim + logseq + wget + zsh + git + cryptsetup + home-manager + wpa_supplicant + (pkgs.writeScriptBin "comma" '' + if [ "$#" = 0 ]; then + echo "usage: comma PKGNAME... [EXECUTABLE]"; + elif [ "$#" = 1 ]; then + nix-shell -p $1 --run $1; + elif [ "$#" = 2 ]; then + nix-shell -p $1 --run $2; + else + echo "error: too many arguments"; + echo "usage: comma PKGNAME... [EXECUTABLE]"; + fi + '') + ]; + + # I use zsh btw + environment.shells = with pkgs; [ zsh ]; + users.defaultUserShell = pkgs.zsh; + programs.zsh.enable = true; + + fonts.fontDir.enable = true; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal + pkgs.xdg-desktop-portal-gtk + ]; + }; + + # It is ok to leave this unchanged for compatibility purposes + system.stateVersion = "22.11"; + +} diff --git a/profiles/work/home.nix b/profiles/work/home.nix new file mode 100644 index 0000000..53ce519 --- /dev/null +++ b/profiles/work/home.nix @@ -0,0 +1,252 @@ +{ config, pkgs, pkgs-stable, pkgs-kdenlive, userSettings, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = userSettings.username; + home.homeDirectory = "/home/"+userSettings.username; + + programs.home-manager.enable = true; + + imports = [ + (./. + "../../../user/wm"+("/"+userSettings.wm+"/"+userSettings.wm)+".nix") # My window manager selected from flake + ../../user/shell/sh.nix # My zsh and bash config + ../../user/shell/cli-collection.nix # Useful CLI apps + #../../user/app/doom-emacs/doom.nix # My doom emacs config + ../../user/app/nvim/nvim.nix # My doom emacs config + #../../user/app/emacsng # Me experimenting with emacsng and a vanilla config + ../../user/app/ranger/ranger.nix # My ranger file manager config + ../../user/app/git/git.nix # My git config + ../../user/app/keepass/keepass.nix # My password manager + (./. + "../../../user/app/browser"+("/"+userSettings.browser)+".nix") # My default browser selected from flake + ../../user/app/virtualization/virtualization.nix # Virtual machines + #../../user/app/flatpak/flatpak.nix # Flatpaks + ../../user/style/stylix.nix # Styling and themes for my apps + ../../user/lang/cc/cc.nix # C and C++ tools + ../../user/lang/godot/godot.nix # Game development + #../../user/pkgs/blockbench.nix # Blockbench ## marked as insecure + ../../user/hardware/bluetooth.nix # Bluetooth + ]; + + home.stateVersion = "22.11"; # Please read the comment before changing. + + home.packages = (with pkgs; [ + # Core + zsh + alacritty + brave + qutebrowser + git + syncthing + + # Office + nextcloud-client + libreoffice-fresh + mate.atril + openboard + xournalpp + gnome.adwaita-icon-theme + shared-mime-info + glib + newsflash + foliate + gnome.nautilus + gnome.gnome-calendar + gnome.seahorse + gnome.gnome-maps + openvpn + protonmail-bridge + texliveSmall + numbat + element-desktop-wayland + + openai-whisper-cpp + + wine + bottles + # The following requires 64-bit FL Studio (FL64) to be installed to a bottle + # With a bottle name of "FL Studio" + (pkgs.writeShellScriptBin "flstudio" '' + #!/bin/sh + if [ -z "$1" ] + then + bottles-cli run -b "FL Studio" -p FL64 + #flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 + else + filepath=$(winepath --windows "$1") + echo \'"$filepath"\' + bottles-cli run -b "FL Studio" -p "FL64" --args \'"$filepath"\' + #flatpak run --command=bottles-cli com.usebottles.bottles run -b FL\ Studio -p FL64 -args "$filepath" + fi + '') + (pkgs.makeDesktopItem { + name = "flstudio"; + desktopName = "FL Studio 64"; + exec = "flstudio %U"; + terminal = false; + type = "Application"; + icon = "flstudio"; + mimeTypes = ["application/octet-stream"]; + }) + (stdenv.mkDerivation { + name = "flstudio-icon"; + # icon from https://www.reddit.com/r/MacOS/comments/jtmp7z/i_made_icons_for_discord_spotify_and_fl_studio_in/ + src = [ ../../user/pkgs/flstudio.png ]; + + unpackPhase = '' + for srcFile in $src; do + # Copy file into build dir + cp $srcFile ./ + done + ''; + + installPhase = '' + mkdir -p $out $out/share $out/share/pixmaps + ls $src + ls + cp $src $out/share/pixmaps/flstudio.png + ''; + }) + + # Media + gimp + krita + pinta + inkscape + (pkgs-stable.lollypop.override { youtubeSupport = false; }) + vlc + mpv + yt-dlp + blender-hip + libresprite + (pkgs.appimageTools.wrapType2 { + name = "Cura"; + src = fetchurl { + url = "https://github.com/Ultimaker/Cura/releases/download/5.8.1/UltiMaker-Cura-5.8.1-linux-X64.AppImage"; + hash = "sha256-VLd+V00LhRZYplZbKkEp4DXsqAhA9WLQhF933QAZRX0="; + }; + extraPkgs = pkgs: with pkgs; []; + }) + #(pkgs-stable.cura.overrideAttrs (oldAttrs: { + # postInstall = oldAttrs.postInstall + ''cp -rf ${(pkgs.makeDesktopItem { + # name = "com.ultimaker.cura"; + # icon = "cura-icon"; + # desktopName = "Cura"; + # exec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura %F"; + # tryExec = "env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura"; + # terminal = false; + # type = "Application"; + # categories = ["Graphics"]; + # mimeTypes = ["model/stl" "application/vnd.ms-3mfdocument" "application/prs.wavefront-obj" + # "image/bmp" "image/gif" "image/jpeg" "image/png" "text/x-gcode" "application/x-amf" + # "application/x-ply" "application/x-ctm" "model/vnd.collada+xml" "model/gltf-binary" + # "model/gltf+json" "model/vnd.collada+xml+zip"]; + # })}/share/applications $out/share''; + #})) + #(pkgs.writeShellScriptBin "curax" ''env QT_QPA_PLATFORM=xcb ${pkgs-stable.cura}/bin/cura $@'') + (pkgs-stable.curaengine_stable) + openscad + (stdenv.mkDerivation { + name = "cura-slicer"; + version = "0.0.7"; + src = fetchFromGitHub { + owner = "Spiritdude"; + repo = "Cura-CLI-Wrapper"; + rev = "ff076db33cfefb770e1824461a6336288f9459c7"; + sha256 = "sha256-BkvdlqUqoTYEJpCCT3Utq+ZBU7g45JZFJjGhFEXPXi4="; + }; + phases = "installPhase"; + installPhase = '' + mkdir -p $out $out/bin $out/share $out/share/cura-slicer + cp $src/cura-slicer $out/bin + cp $src/settings/fdmprinter.def.json $out/share/cura-slicer + cp $src/settings/base.ini $out/share/cura-slicer + sed -i 's+#!/usr/bin/perl+#! /usr/bin/env nix-shell\n#! nix-shell -i perl -p perl538 perl538Packages.JSON+g' $out/bin/cura-slicer + sed -i 's+/usr/share+/home/${userSettings.username}/.nix-profile/share+g' $out/bin/cura-slicer + ''; + propagatedBuildInputs = with pkgs-stable; [ + curaengine_stable + ]; + }) + obs-studio + ffmpeg + (pkgs.writeScriptBin "kdenlive-accel" '' + #!/bin/sh + DRI_PRIME=0 kdenlive "$1" + '') + movit + mediainfo + libmediainfo + audio-recorder + gnome.cheese + ardour + rosegarden + tenacity + + # Various dev packages + remmina + sshfs + texinfo + libffi zlib + nodePackages.ungit + ventoy + kdenlive + ]); + + home.file.".local/share/pixmaps/nixos-snowflake-stylix.svg".source = + config.lib.stylix.colors { + template = builtins.readFile ../../user/pkgs/nixos-snowflake-stylix.svg.mustache; + extension = "svg"; + }; + + services.syncthing.enable = true; + services.nextcloud-client = { + enable = true; + startInBackground = true; + }; + + xdg.enable = true; + xdg.userDirs = { + enable = true; + createDirectories = true; + music = "${config.home.homeDirectory}/Media/Music"; + videos = "${config.home.homeDirectory}/Media/Videos"; + pictures = "${config.home.homeDirectory}/Media/Pictures"; + templates = "${config.home.homeDirectory}/Templates"; + download = "${config.home.homeDirectory}/Downloads"; + documents = "${config.home.homeDirectory}/Documents"; + desktop = null; + publicShare = null; + extraConfig = { + XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles"; + XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive"; + XDG_VM_DIR = "${config.home.homeDirectory}/Machines"; + XDG_ORG_DIR = "${config.home.homeDirectory}/Org"; + XDG_PODCAST_DIR = "${config.home.homeDirectory}/Media/Podcasts"; + XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books"; + }; + }; + xdg.mime.enable = true; + xdg.mimeApps.enable = true; + xdg.mimeApps.associations.added = { + # TODO fix mime associations, most of them are totally broken :( + "application/octet-stream" = "flstudio.desktop;"; + }; + + home.sessionVariables = { + EDITOR = userSettings.editor; + SPAWNEDITOR = userSettings.spawnEditor; + TERM = userSettings.term; + BROWSER = userSettings.browser; + }; + + news.display = "silent"; + + gtk.iconTheme = { + package = pkgs.papirus-icon-theme; + name = if (config.stylix.polarity == "dark") then "Papirus-Dark" else "Papirus-Light"; + }; + + services.pasystray.enable = true; + +} diff --git a/profiles/worklab/README.org b/profiles/worklab/README.org new file mode 100644 index 0000000..b1c5ff7 --- /dev/null +++ b/profiles/worklab/README.org @@ -0,0 +1,3 @@ +#+title: Worklab Template + +This is literally just my homelab configuration, but setup to work with the ssh keys on my work computer. Used for small servers at work. diff --git a/profiles/worklab/configuration.nix b/profiles/worklab/configuration.nix new file mode 100644 index 0000000..91b5179 --- /dev/null +++ b/profiles/worklab/configuration.nix @@ -0,0 +1,9 @@ +{ userSettings, ... }: + +{ + imports = [ ../homelab/base.nix + ( import ../../system/security/sshd.nix { + authorizedKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDBW6X3nd54sLK5UOvkyxBZ0dC57+xXKsAkr6XyP3k64gsFNahIYZGyZ+E9DdGIP1SZPDkwlcnGfFTPo/dPq5QjxtBmAOd/q4hIb5mqojNfOwqZQVwHjzLYSiGBaMVe4XAGCoNxTwXTimVU8wtyvlmBJzuOLmxZq9tRBpN3g+PT5HT1S9mrrQ4l5Y+2CNTwfga6/+/H1g4hpYG6H9qdIWOrel1hWvGUH3A1d/5mJIx3GkOAl7WBReQNbwlTm/8mkIcNBMtp3JQg5yuTQ6dLGwMOspMB5sGSCnaDx6CrelQglRihxkunW9ktA2MYaIn3l5fNwaHilW63d0sb9Y/Rr/bFKybmGYVY4PR9+tQg4D4YqofkSfRKmB98dtxUZg4yduXjxCYrhDTDseCjXACncItdD9TmxabaBQtWiWIGmX3bhx31SoctwdpS+mzbB5WVIVb/Fo/cOvPj6ugB5ZQf2uH+U5nsGVYsSsNGS1zVDybeILr1z2ne2AcaqwB5Z7iz/E0=" ]; + inherit userSettings; }) + ]; +} diff --git a/profiles/worklab/home.nix b/profiles/worklab/home.nix new file mode 100644 index 0000000..96bcc74 --- /dev/null +++ b/profiles/worklab/home.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + imports = [ ../homelab/home.nix ]; +} diff --git a/profiles/wsl/README.org b/profiles/wsl/README.org new file mode 100644 index 0000000..af200da --- /dev/null +++ b/profiles/wsl/README.org @@ -0,0 +1,5 @@ +#+title: Trying to use a computer without Linux is hard + +This is my =WSL= profile, which is a minimal installation I use on Windows underneath WSL. This (obviously) requires [[https://github.com/nix-community/NixOS-WSL][NixOS-WSL]] to be installed. I essentially just use this for Emacs, some useful CLI apps I can't live without (namely ranger), and LibreOffice, which runs strangely slow on Windows (hmm, I wonder why? It's not like Microsoft has a competing office suite or anything...) + +The [[./nixos-wsl][nixos-wsl]] directory is taken directly from [[https://github.com/nix-community/NixOS-WSL][NixOS-WSL]] and merely patched slightly to allow it to run with the unstable channel of nixpkgs. diff --git a/profiles/wsl/configuration.nix b/profiles/wsl/configuration.nix new file mode 100644 index 0000000..2c8db3f --- /dev/null +++ b/profiles/wsl/configuration.nix @@ -0,0 +1,114 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ lib, pkgs, systemSettings, userSettings, ... }: + +with lib; +let + nixos-wsl = import ./nixos-wsl; +in +{ + imports = + [ nixos-wsl.nixosModules.wsl + ../../system/hardware/kernel.nix # Kernel config + ../../system/hardware/systemd.nix # systemd config + ../../system/hardware/time.nix # Network time sync + ../../system/hardware/opengl.nix + ../../system/hardware/printing.nix + ../../system/hardware/bluetooth.nix + ../../system/security/doas.nix + ../../system/security/gpg.nix + ../../system/security/blocklist.nix + ../../system/security/firewall.nix + ../../system/security/firejail.nix + ../../system/style/stylix.nix + ]; + + wsl = { + enable = true; + automountPath = "/mnt"; + defaultUser = userSettings.username; + startMenuLaunchers = true; + + # Enable native Docker support + # docker-native.enable = true; + + # Enable integration with Docker Desktop (needs to be installed) + # docker-desktop.enable = true; + + }; + + # Fix nix path + nix.nixPath = [ "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos" + "nixos-config=$HOME/dotfiles/system/configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + + # Experimental features + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + # Ensure nix flakes are enabled + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + + # I'm sorry Stallman-taichou + nixpkgs.config.allowUnfree = true; + + # Kernel modules + boot.kernelModules = [ "i2c-dev" "i2c-piix4" "cpufreq_powersave" ]; + + # Networking + networking.hostName = systemSettings.hostname; # Define your hostname. + + # Timezone and locale + time.timeZone = systemSettings.timezone; # time zone + i18n.defaultLocale = systemSettings.locale; + i18n.extraLocaleSettings = { + LC_ADDRESS = systemSettings.locale; + LC_IDENTIFICATION = systemSettings.locale; + LC_MEASUREMENT = systemSettings.locale; + LC_MONETARY = systemSettings.locale; + LC_NAME = systemSettings.locale; + LC_NUMERIC = systemSettings.locale; + LC_PAPER = systemSettings.locale; + LC_TELEPHONE = systemSettings.locale; + LC_TIME = systemSettings.locale; + }; + + # User account + users.users.${userSettings.username} = { + isNormalUser = true; + description = userSettings.name; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + uid = 1000; + }; + + # System packages + environment.systemPackages = with pkgs; [ + vim + wget + zsh + git + home-manager + ]; + + # I use zsh btw + environment.shells = with pkgs; [ zsh ]; + users.defaultUserShell = pkgs.zsh; + programs.zsh.enable = true; + + xdg.portal = { + enable = true; + extraPortals = [ + pkgs.xdg-desktop-portal + pkgs.xdg-desktop-portal-gtk + ]; + }; + + # It is ok to leave this unchanged for compatibility purposes + system.stateVersion = "22.05"; + +} diff --git a/profiles/wsl/home.nix b/profiles/wsl/home.nix new file mode 100644 index 0000000..164b89f --- /dev/null +++ b/profiles/wsl/home.nix @@ -0,0 +1,67 @@ +{ config, pkgs, userSettings, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = userSettings.username; + home.homeDirectory = "/home/"+userSettings.username; + + programs.home-manager.enable = true; + + imports = [ + ../../user/shell/sh.nix # My zsh and bash config + ../../user/shell/cli-collection.nix # Useful CLI apps + ../../user/app/doom-emacs/doom.nix # My doom emacs config + ../../user/app/ranger/ranger.nix # My ranger file manager config + ../../user/app/git/git.nix # My git config + ../../user/style/stylix.nix # Styling and themes for my apps + ]; + + home.stateVersion = "22.11"; # Please read the comment before changing. + + home.packages = with pkgs; [ + # Core + zsh + git + syncthing + + # Office + libreoffice-fresh + + # Various dev packages + texinfo + libffi zlib + nodePackages.ungit + ]; + + services.syncthing.enable = true; + + xdg.enable = true; + xdg.userDirs = { + enable = true; + createDirectories = true; + music = "${config.home.homeDirectory}/Media/Music"; + videos = "${config.home.homeDirectory}/Media/Videos"; + pictures = "${config.home.homeDirectory}/Media/Pictures"; + templates = "${config.home.homeDirectory}/Templates"; + download = "${config.home.homeDirectory}/Downloads"; + documents = "${config.home.homeDirectory}/Documents"; + desktop = null; + publicShare = null; + extraConfig = { + XDG_DOTFILES_DIR = "${config.home.homeDirectory}/.dotfiles"; + XDG_ARCHIVE_DIR = "${config.home.homeDirectory}/Archive"; + XDG_ORG_DIR = "${config.home.homeDirectory}/Org"; + XDG_BOOK_DIR = "${config.home.homeDirectory}/Media/Books"; + }; + }; + xdg.mime.enable = true; + xdg.mimeApps.enable = true; + + home.sessionVariables = { + EDITOR = userSettings.editor; + }; + + news.display = "silent"; + +} diff --git a/profiles/wsl/nixos-wsl/LICENSE b/profiles/wsl/nixos-wsl/LICENSE new file mode 100755 index 0000000..ef51da2 --- /dev/null +++ b/profiles/wsl/nixos-wsl/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS + +APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + +Copyright [yyyy] [name of copyright owner] + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/profiles/wsl/nixos-wsl/README.md b/profiles/wsl/nixos-wsl/README.md new file mode 100755 index 0000000..b3a4ff9 --- /dev/null +++ b/profiles/wsl/nixos-wsl/README.md @@ -0,0 +1,112 @@ +

+ NixOS on WSL
+ Matrix Chat + nixpkgs 22.05 + Downloads +

+ +A minimal root filesystem for running NixOS on WSL. It can be used with +[DistroLauncher](https://github.com/microsoft/WSL-DistroLauncher) as +`install.tar.gz` or as input to `wsl --import --version 2`. + +## Quick start + +First, [download the latest release\'s installer](https://github.com/nix-community/NixOS-WSL/releases/latest). + +Then open up a Terminal, PowerShell or Command Prompt and run: + +```sh +wsl --import NixOS .\NixOS\ nixos-wsl-installer.tar.gz --version 2 +``` + +This sets up a new WSL distribution `NixOS` that is installed under +`.\NixOS`. `nixos-wsl-installer.tar.gz` is the path to the file you +downloaded earlier. You might need to change this path or change to the download directory first. + +You can now run NixOS: + +```sh +wsl -d NixOS +``` + +The installer will unpack the file system and subsequently start NixOS. +A few warnings about file systems and locales will pop up. You can +safely ignore them. After systemd has started, you should be greeted +with a bash prompt inside your fresh NixOS installation. + +If you want to make NixOS your default distribution, you can do so with + +```sh +wsl -s NixOS +``` + +## Building your own system tarball + +This requires access to a system that already has Nix installed. Please refer to the [Nix installation guide](https://nixos.org/guides/install-nix.html) if that\'s not the case. + +If you have a flakes-enabled Nix, you can use the following command to +build your own tarball instead of relying on a prebuilt one: + +```cmd +nix build github:nix-community/NixOS-WSL#nixosConfigurations.mysystem.config.system.build.installer +``` + +Or, if you want to build with local changes, run inside your checkout: + +```cmd +nix build .#nixosConfigurations.mysystem.config.system.build.installer +``` + +Without a flakes-enabled Nix, you can build a tarball using: + +```cmd +nix-build -A nixosConfigurations.mysystem.config.system.build.installer +``` + +The resulting installer tarball can then be found under +`./result/tarball/nixos-wsl-installer.tar.gz`. + +You can also build a rootfs tarball without wrapping it in the installer +by replacing `installer` with `tarball` in the above commands. The +rootfs tarball can then be found under +`./result/tarball/nixos-wsl-x86_64-linux.tar.gz`. + +## Design + +Getting NixOS to run under WSL requires some workarounds: + +### systemd support + +WSL comes with its own (non-substitutable) init system while NixOS uses +systemd. Simply starting systemd later on does not work out of the box, +because systemd as system instance refuses to start if it is not PID 1. +This unfortunate combination is resolved in two ways: + +- the user\'s default shell is replaced by a wrapper script that acts + is init system and then drops to the actual shell +- systemd is started in its own PID namespace; therefore, it is PID 1. + The shell wrapper (see above) enters the systemd namespace before + dropping to the shell. + +### Installer + +Usually WSL distributions ship as a tarball of their root file system. +These tarballs however, can not contain any hard-links due to the way +they are unpacked by WSL, resulting in an \"Unspecified Error\". By +default some Nix-derivations will contain hard-links when they are +built. This results in system tarballs that can not be imported into +WSL. To circumvent this problem, the rootfs tarball is wrapped in that +of a minimal distribution (the installer), that is packaged without any +hard-links. When the installer system is started for the first time, it +overwrites itself with the contents of the rootfs tarball. + +## License + +Apache License, Version 2.0. See `LICENSE` or for details. + +## Further links + +- [DistroLauncher](https://github.com/microsoft/WSL-DistroLauncher) +- [A quick way into a systemd \"bottle\" for WSL](https://github.com/arkane-systems/genie) +- [NixOS in Windows Store for Windows Subsystem for Linux](https://github.com/NixOS/nixpkgs/issues/30391) +- [wsl2-hacks](https://github.com/shayne/wsl2-hacks) diff --git a/profiles/wsl/nixos-wsl/default.nix b/profiles/wsl/nixos-wsl/default.nix new file mode 100755 index 0000000..873ece4 --- /dev/null +++ b/profiles/wsl/nixos-wsl/default.nix @@ -0,0 +1,13 @@ +(import + ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in + fetchTarball { + url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { + src = ./.; + }).defaultNix diff --git a/profiles/wsl/nixos-wsl/flake.lock b/profiles/wsl/nixos-wsl/flake.lock new file mode 100755 index 0000000..ba649f6 --- /dev/null +++ b/profiles/wsl/nixos-wsl/flake.lock @@ -0,0 +1,59 @@ +{ + "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1660318005, + "narHash": "sha256-g9WCa9lVUmOV6dYRbEPjv/TLOR5hamjeCcKExVGS3OQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5c211b47aeadcc178c5320afd4e74c7eed5c389f", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.05", + "type": "indirect" + } + }, + "root": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/profiles/wsl/nixos-wsl/flake.nix b/profiles/wsl/nixos-wsl/flake.nix new file mode 100755 index 0000000..8a62b47 --- /dev/null +++ b/profiles/wsl/nixos-wsl/flake.nix @@ -0,0 +1,56 @@ +{ + description = "NixOS WSL"; + + inputs = { + nixpkgs.url = "nixpkgs/nixos-22.05"; + flake-utils.url = "github:numtide/flake-utils"; + + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + }; + + outputs = { self, nixpkgs, flake-utils, ... }: + { + + nixosModules.wsl = { + imports = [ + ./modules/build-tarball.nix + ./modules/docker-desktop.nix + ./modules/docker-native.nix + ./modules/installer.nix + ./modules/interop.nix + ./modules/wsl-distro.nix + ]; + }; + + nixosConfigurations.mysystem = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + ]; + }; + + } // + flake-utils.lib.eachSystem + (with flake-utils.lib.system; [ "x86_64-linux" "aarch64-linux" ]) + (system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + checks.check-format = pkgs.runCommand "check-format" + { + buildInputs = with pkgs; [ nixpkgs-fmt ]; + } '' + nixpkgs-fmt --check ${./.} + mkdir $out # success + ''; + + devShell = pkgs.mkShell { + nativeBuildInputs = with pkgs; [ nixpkgs-fmt ]; + }; + } + ); +} diff --git a/profiles/wsl/nixos-wsl/modules/build-tarball.nix b/profiles/wsl/nixos-wsl/modules/build-tarball.nix new file mode 100755 index 0000000..feba78d --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/build-tarball.nix @@ -0,0 +1,97 @@ +{ config, pkgs, lib, ... }: +with builtins; with lib; +let + pkgs2storeContents = l: map (x: { object = x; symlink = "none"; }) l; + + nixpkgs = lib.cleanSource pkgs.path; + + channelSources = pkgs.runCommand "nixos-${config.system.nixos.version}" + { preferLocalBuild = true; } + '' + mkdir -p $out + cp -prd ${nixpkgs.outPath} $out/nixos + chmod -R u+w $out/nixos + if [ ! -e $out/nixos/nixpkgs ]; then + ln -s . $out/nixos/nixpkgs + fi + echo -n ${toString config.system.nixos.revision} > $out/nixos/.git-revision + echo -n ${toString config.system.nixos.versionSuffix} > $out/nixos/.version-suffix + echo ${toString config.system.nixos.versionSuffix} | sed -e s/pre// > $out/nixos/svn-revision + ''; + + preparer = pkgs.writeShellScriptBin "wsl-prepare" '' + set -e + + mkdir -m 0755 ./bin ./etc + mkdir -m 1777 ./tmp + + # WSL requires a /bin/sh - only temporary, NixOS's activate will overwrite + ln -s ${config.users.users.root.shell} ./bin/sh + + # WSL also requires a /bin/mount, otherwise the host fs isn't accessible + ln -s /nix/var/nix/profiles/system/sw/bin/mount ./bin/mount + + # Set system profile + system=${config.system.build.toplevel} + ./$system/sw/bin/nix-store --store `pwd` --load-db < ./nix-path-registration + rm ./nix-path-registration + ./$system/sw/bin/nix-env --store `pwd` -p ./nix/var/nix/profiles/system --set $system + + # Set channel + mkdir -p ./nix/var/nix/profiles/per-user/root + ./$system/sw/bin/nix-env --store `pwd` -p ./nix/var/nix/profiles/per-user/root/channels --set ${channelSources} + mkdir -m 0700 -p ./root/.nix-defexpr + ln -s /nix/var/nix/profiles/per-user/root/channels ./root/.nix-defexpr/channels + + # It's now a NixOS! + touch ./etc/NIXOS + + # Write wsl.conf so that it is present when NixOS is started for the first time + cp ${config.environment.etc."wsl.conf".source} ./etc/wsl.conf + + ${lib.optionalString config.wsl.tarball.includeConfig '' + # Copy the system configuration + mkdir -p ./etc/nixos/nixos-wsl + cp -R ${lib.cleanSource ../.}/. ./etc/nixos/nixos-wsl + mv ./etc/nixos/nixos-wsl/configuration.nix ./etc/nixos/configuration.nix + # Patch the import path to avoid having a flake.nix in /etc/nixos + sed -i 's|import \./default\.nix|import \./nixos-wsl|' ./etc/nixos/configuration.nix + ''} + ''; + +in +{ + + options.wsl.tarball = { + includeConfig = mkOption { + type = types.bool; + default = true; + description = "Whether or not to copy the system configuration into the tarball"; + }; + }; + + + config = mkIf config.wsl.enable { + # These options make no sense without the wsl-distro module anyway + + system.build.tarball = pkgs.callPackage "${nixpkgs}/nixos/lib/make-system-tarball.nix" { + # No contents, structure will be added by prepare script + contents = [ ]; + + fileName = "nixos-wsl-${pkgs.hostPlatform.system}"; + + storeContents = pkgs2storeContents [ + config.system.build.toplevel + channelSources + preparer + ]; + + extraCommands = "${preparer}/bin/wsl-prepare"; + + # Use gzip + compressCommand = "gzip"; + compressionExtension = ".gz"; + }; + + }; +} diff --git a/profiles/wsl/nixos-wsl/modules/docker-desktop.nix b/profiles/wsl/nixos-wsl/modules/docker-desktop.nix new file mode 100755 index 0000000..ade86e9 --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/docker-desktop.nix @@ -0,0 +1,41 @@ +{ config, lib, pkgs, ... }: +with builtins; with lib; { + + imports = [ + (mkRenamedOptionModule [ "wsl" "docker" ] [ "wsl" "docker-desktop" ]) + ]; + + options.wsl.docker-desktop = with types; { + enable = mkEnableOption "Docker Desktop integration"; + }; + + config = + let + cfg = config.wsl.docker-desktop; + in + mkIf (config.wsl.enable && cfg.enable) { + + environment.systemPackages = with pkgs; [ + docker + docker-compose + ]; + + systemd.services.docker-desktop-proxy = { + description = "Docker Desktop proxy"; + script = '' + ${config.wsl.automountPath}/wsl/docker-desktop/docker-desktop-user-distro proxy --docker-desktop-root ${config.wsl.automountPath}/wsl/docker-desktop + ''; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = "30s"; + }; + }; + + users.groups.docker.members = [ + config.wsl.defaultUser + ]; + + }; + +} diff --git a/profiles/wsl/nixos-wsl/modules/docker-native.nix b/profiles/wsl/nixos-wsl/modules/docker-native.nix new file mode 100755 index 0000000..35d10ef --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/docker-native.nix @@ -0,0 +1,40 @@ +{ config, lib, pkgs, ... }: +with builtins; with lib; { + + options.wsl.docker-native = with types; { + enable = mkEnableOption "Native Docker integration in NixOS."; + + addToDockerGroup = mkOption { + type = bool; + default = config.security.sudo.wheelNeedsPassword; + description = '' + Wether to add the default user to the docker group. + + This is not recommended, if you have a password, because it essentially permits unauthenticated root access. + ''; + }; + }; + + config = + let + cfg = config.wsl.docker-native; + in + mkIf (config.wsl.enable && cfg.enable) { + nixpkgs.overlays = [ + (self: super: { + docker = super.docker.override { iptables = pkgs.iptables-legacy; }; + }) + ]; + + environment.systemPackages = with pkgs; [ + docker + docker-compose + ]; + + virtualisation.docker.enable = true; + + users.groups.docker.members = lib.mkIf cfg.addToDockerGroup [ + config.wsl.defaultUser + ]; + }; +} diff --git a/profiles/wsl/nixos-wsl/modules/installer.nix b/profiles/wsl/nixos-wsl/modules/installer.nix new file mode 100755 index 0000000..45d191a --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/installer.nix @@ -0,0 +1,73 @@ +{ config, lib, pkgs, ... }: +with builtins; with lib; { + + config = mkIf config.wsl.enable ( + let + mkTarball = pkgs.callPackage "${lib.cleanSource pkgs.path}/nixos/lib/make-system-tarball.nix"; + + pkgs2storeContents = map (x: { object = x; symlink = "none"; }); + + rootfs = let tarball = config.system.build.tarball; in "${tarball}/tarball/${tarball.fileName}.tar${tarball.extension}"; + + installer = pkgs.writeScript "installer.sh" '' + #!${pkgs.busybox}/bin/sh + BASEPATH=$PATH + export PATH=$BASEPATH:${pkgs.busybox}/bin # Add busybox to path + + set -e + cd / + + echo "Unpacking root file system..." + ${pkgs.pv}/bin/pv ${rootfs} | tar xz + + echo "Activating nix configuration..." + /nix/var/nix/profiles/system/activate + PATH=$BASEPATH:/run/current-system/sw/bin # Use packages from target system + + echo "Cleaning up installer files..." + nix-collect-garbage + rm /nix-path-registration + + echo "Optimizing store..." + nix-store --optimize + + # Don't package the shell here, it's contained in the rootfs + exec ${builtins.unsafeDiscardStringContext config.users.users.root.shell} "$@" + ''; + + # Set installer.sh as the root shell + passwd = pkgs.writeText "passwd" '' + root:x:0:0:System administrator:/root:${installer} + ''; + in + { + + system.build.installer = mkTarball { + fileName = "nixos-wsl-installer"; + compressCommand = "gzip"; + compressionExtension = ".gz"; + extraArgs = "--hard-dereference"; + + storeContents = with pkgs; pkgs2storeContents [ + installer + ]; + + contents = [ + { source = config.environment.etc."wsl.conf".source; target = "/etc/wsl.conf"; } + { source = config.environment.etc."fstab".source; target = "/etc/fstab"; } + { source = passwd; target = "/etc/passwd"; } + { source = "${pkgs.busybox}/bin/busybox"; target = "/bin/sh"; } + { source = "${pkgs.busybox}/bin/busybox"; target = "/bin/mount"; } + ]; + + extraCommands = pkgs.writeShellScript "prepare" '' + export PATH=$PATH:${pkgs.coreutils}/bin + mkdir -p bin + ln -s /init bin/wslpath + ''; + }; + + } + ); + +} diff --git a/profiles/wsl/nixos-wsl/modules/interop.nix b/profiles/wsl/nixos-wsl/modules/interop.nix new file mode 100755 index 0000000..b7babfb --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/interop.nix @@ -0,0 +1,88 @@ +{ lib, pkgs, config, ... }: + +with builtins; with lib; +{ + imports = [ + (mkRenamedOptionModule [ "wsl" "compatibility" "interopPreserveArgvZero" ] [ "wsl" "interop" "preserveArgvZero" ]) + ]; + + options.wsl.interop = with types; { + register = mkOption { + type = bool; + default = false; # Use the existing registration by default + description = "Explicitly register the binfmt_misc handler for Windows executables"; + }; + + includePath = mkOption { + type = bool; + default = true; + description = "Include Windows PATH in WSL PATH"; + }; + + preserveArgvZero = mkOption { + type = nullOr bool; + default = null; + description = '' + Register binfmt interpreter for Windows executables with 'preserves argv[0]' flag. + + Default (null): autodetect, at some performance cost. + To avoid the performance cost, set this to true for WSL Preview 0.58 and up, + or to false for any older versions, including pre-Microsoft Store and Windows 10. + ''; + }; + }; + + config = + let + cfg = config.wsl.interop; + in + mkIf config.wsl.enable { + + boot.binfmt.registrations = mkIf cfg.register { + WSLInterop = + let + compat = cfg.preserveArgvZero; + + # WSL Preview 0.58 and up registers the /init binfmt interp for Windows executable + # with the "preserve argv[0]" flag, so if you run `./foo.exe`, the interp gets invoked + # as `/init foo.exe ./foo.exe`. + # argv[0] --^ ^-- actual path + # + # Older versions expect to be called without the argv[0] bit, simply as `/init ./foo.exe`. + # + # We detect that by running `/init /known-not-existing-path.exe` and checking the exit code: + # the new style interp expects at least two arguments, so exits with exit code 1, + # presumably meaning "parsing error"; the old style interp attempts to actually run + # the executable, fails to find it, and exits with 255. + compatWrapper = pkgs.writeShellScript "nixos-wsl-binfmt-hack" '' + /init /nixos-wsl-does-not-exist.exe + [ $? -eq 255 ] && shift + exec /init "$@" + ''; + + # use the autodetect hack if unset, otherwise call /init directly + interpreter = if compat == null then compatWrapper else "/init"; + + # enable for the wrapper and autodetect hack + preserveArgvZero = if compat == false then false else true; + in + { + magicOrExtension = "MZ"; + fixBinary = true; + wrapInterpreterInShell = false; + inherit interpreter preserveArgvZero; + }; + }; + + # Include Windows %PATH% in Linux $PATH. + environment.extraInit = mkIf cfg.includePath ''PATH="$PATH:$WSLPATH"''; + + warnings = + let + registrations = config.boot.binfmt.registrations; + in + optional (!(registrations ? WSLInterop) && (length (attrNames config.boot.binfmt.registrations)) != 0) "Having any binfmt registrations without re-registering WSLInterop (wsl.interop.register) will break running .exe files from WSL2"; + }; + + +} diff --git a/profiles/wsl/nixos-wsl/modules/wsl-distro.nix b/profiles/wsl/nixos-wsl/modules/wsl-distro.nix new file mode 100755 index 0000000..6b95c3d --- /dev/null +++ b/profiles/wsl/nixos-wsl/modules/wsl-distro.nix @@ -0,0 +1,139 @@ +{ lib, pkgs, config, ... }: + +with builtins; with lib; +{ + options.wsl = with types; + let + coercedToStr = coercedTo (oneOf [ bool path int ]) (toString) str; + in + { + enable = mkEnableOption "support for running NixOS as a WSL distribution"; + automountPath = mkOption { + type = str; + default = "/mnt"; + description = "The path where windows drives are mounted (e.g. /mnt/c)"; + }; + automountOptions = mkOption { + type = str; + default = "metadata,uid=1000,gid=100"; + description = "Options to use when mounting windows drives"; + }; + defaultUser = mkOption { + type = str; + default = "nixos"; + description = "The name of the default user"; + }; + startMenuLaunchers = mkEnableOption "shortcuts for GUI applications in the windows start menu"; + wslConf = mkOption { + type = attrsOf (attrsOf (oneOf [ str int bool ])); + description = "Entries that are added to /etc/wsl.conf"; + }; + }; + + config = + let + cfg = config.wsl; + syschdemd = import ../syschdemd.nix { inherit lib pkgs config; inherit (cfg) automountPath defaultUser; defaultUserHome = config.users.users.${cfg.defaultUser}.home; }; + in + mkIf cfg.enable { + + wsl.wslConf = { + automount = { + enabled = true; + mountFsTab = true; + root = "${cfg.automountPath}/"; + options = cfg.automountOptions; + }; + network = { + generateResolvConf = mkDefault true; + generateHosts = mkDefault true; + }; + }; + + # WSL is closer to a container than anything else + boot.isContainer = true; + + environment.noXlibs = lib.mkForce false; # override xlibs not being installed (due to isContainer) to enable the use of GUI apps + hardware.opengl.enable = true; # Enable GPU acceleration + + environment = { + + etc = { + "wsl.conf".text = generators.toINI { } cfg.wslConf; + + # DNS settings are managed by WSL + hosts.enable = !config.wsl.wslConf.network.generateHosts; + "resolv.conf".enable = !config.wsl.wslConf.network.generateResolvConf; + }; + + systemPackages = [ + (pkgs.runCommand "wslpath" { } '' + mkdir -p $out/bin + ln -s /init $out/bin/wslpath + '') + ]; + }; + + networking.dhcpcd.enable = false; + + users.users.${cfg.defaultUser} = { + isNormalUser = true; + uid = 1000; + extraGroups = [ "wheel" ]; # Allow the default user to use sudo + }; + + users.users.root = { + shell = "${syschdemd}/bin/syschdemd"; + # Otherwise WSL fails to login as root with "initgroups failed 5" + extraGroups = [ "root" ]; + }; + + security.sudo = { + extraConfig = '' + Defaults env_keep+=INSIDE_NAMESPACE + ''; + wheelNeedsPassword = mkDefault false; # The default user will not have a password by default + }; + + system.activationScripts = { + copy-launchers = mkIf cfg.startMenuLaunchers ( + stringAfter [ ] '' + for x in applications icons; do + echo "Copying /usr/share/$x" + mkdir -p /usr/share/$x + ${pkgs.rsync}/bin/rsync -ar --delete $systemConfig/sw/share/$x/. /usr/share/$x + done + '' + ); + populateBin = stringAfter [ ] '' + echo "setting up /bin..." + ln -sf /init /bin/wslpath + ln -sf ${pkgs.bashInteractive}/bin/bash /bin/sh + ln -sf ${pkgs.util-linux}/bin/mount /bin/mount + ''; + }; + + systemd = { + # Disable systemd units that don't make sense on WSL + services = { + "serial-getty@ttyS0".enable = false; + "serial-getty@hvc0".enable = false; + "getty@tty1".enable = false; + "autovt@".enable = false; + firewall.enable = false; + systemd-resolved.enable = false; + systemd-udevd.enable = false; + }; + + tmpfiles.rules = [ + # Don't remove the X11 socket + "d /tmp/.X11-unix 1777 root root" + ]; + + # Don't allow emergency mode, because we don't have a console. + enableEmergencyMode = false; + }; + + warnings = (optional (config.systemd.services.systemd-resolved.enable && config.wsl.wslConf.network.generateResolvConf) "systemd-resolved is enabled, but resolv.conf is managed by WSL"); + }; +} diff --git a/profiles/wsl/nixos-wsl/syschdemd.nix b/profiles/wsl/nixos-wsl/syschdemd.nix new file mode 100755 index 0000000..406dd86 --- /dev/null +++ b/profiles/wsl/nixos-wsl/syschdemd.nix @@ -0,0 +1,28 @@ +{ lib +, pkgs +, config +, automountPath +, defaultUser +, defaultUserHome ? "/home/${defaultUser}" +, ... +}: + +pkgs.substituteAll { + name = "syschdemd"; + src = ./syschdemd.sh; + dir = "bin"; + isExecutable = true; + + buildInputs = with pkgs; [ daemonize ]; + + inherit defaultUser defaultUserHome; + inherit (pkgs) daemonize; + inherit (config.security) wrapperDir; + fsPackagesPath = lib.makeBinPath config.system.fsPackages; + + systemdWrapper = pkgs.writeShellScript "systemd-wrapper.sh" '' + mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc || true + mount --make-rshared ${automountPath} + exec systemd + ''; +} diff --git a/profiles/wsl/nixos-wsl/syschdemd.sh b/profiles/wsl/nixos-wsl/syschdemd.sh new file mode 100755 index 0000000..6223cda --- /dev/null +++ b/profiles/wsl/nixos-wsl/syschdemd.sh @@ -0,0 +1,78 @@ +#! @shell@ + +set -e + +sw="/nix/var/nix/profiles/system/sw/bin" +systemPath=$(${sw}/readlink -f /nix/var/nix/profiles/system) + +function start_systemd { + echo "Starting systemd..." >&2 + + PATH=/run/current-system/systemd/lib/systemd:@fsPackagesPath@ \ + LOCALE_ARCHIVE=/run/current-system/sw/lib/locale/locale-archive \ + @daemonize@/bin/daemonize /run/current-system/sw/bin/unshare -fp --mount-proc @systemdWrapper@ + + # Wait until systemd has been started to prevent a race condition from occuring + while ! $sw/pgrep -xf systemd | $sw/tail -n1 >/run/systemd.pid; do + $sw/sleep 1s + done + + # Wait for systemd to start services + status=1 + while [[ $status -gt 0 ]]; do + $sw/sleep 1 + status=0 + $sw/nsenter -t $(/dev/null || + status=$? + done +} + +# Needs root to work +if [[ $EUID -ne 0 ]]; then + echo "[ERROR] Requires root! :( Make sure the WSL default user is set to root" >&2 + exit 1 +fi + +if [ ! -e "/run/current-system" ]; then + LANG="C.UTF-8" /nix/var/nix/profiles/system/activate +fi + +if [ ! -e "/run/systemd.pid" ]; then + start_systemd +fi + +userShell=$($sw/getent passwd @defaultUser@ | $sw/cut -d: -f7) +if [[ $# -gt 0 ]]; then + # wsl seems to prefix with "-c" + shift + cmd="$@" +else + cmd="$userShell" +fi + +# Pass external environment but filter variables specific to root user. +exportCmd="$(export -p | $sw/grep -vE ' (HOME|LOGNAME|SHELL|USER)='); export WSLPATH=\"$PATH\"; export INSIDE_NAMESPACE=true" + +if [[ -z "${INSIDE_NAMESPACE:-}" ]]; then + + # Test whether systemd is still alive if it was started previously + if ! [ -d "/proc/$( /dev/null && pwd ) + +# Relax permissions temporarily so git can work +sudo $SCRIPT_DIR/soften.sh $SCRIPT_DIR; + +# Stash local edits, pull changes, and re-apply local edits +pushd $SCRIPT_DIR &> /dev/null; +git stash; +git pull; +git stash apply; +popd &> /dev/null; + +# Permissions for files that should be owned by root +sudo $SCRIPT_DIR/harden.sh $SCRIPT_DIR; diff --git a/soften.sh b/soften.sh new file mode 100755 index 0000000..84dde5f --- /dev/null +++ b/soften.sh @@ -0,0 +1,27 @@ +#!/bin/sh + +# This will soften the security of these dotfiles, allowing +# the default unpriveleged user with UID/GID of 1000 to edit ALL FILES +# in the dotfiles directory + +# This mainly is just here to be used by some scripts + +# Run this inside of ~/.dotfiles (or whatever directory you installed +# the dotfiles to) + +# Run this as root! + +# BTW, this assumes your user account has a UID/GID of 1000 + +# After running this, YOUR UNPRIVELEGED USER CAN MAKE EDITS TO +# IMPORTANT SYSTEM FILES WHICH MAY COMPROMISE THE SYSTEM AFTER +# RUNNING nixos-rebuild switch! + +if [ "$#" = 1 ]; then + SCRIPT_DIR=$1; +else + SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +fi +pushd $SCRIPT_DIR &> /dev/null; +sudo chown -R 1000:users .; +popd &> /dev/null; diff --git a/sync-posthook.sh b/sync-posthook.sh new file mode 100755 index 0000000..9dcca1f --- /dev/null +++ b/sync-posthook.sh @@ -0,0 +1,22 @@ +#!/bin/sh + +# Post hooks to be called after a +# configuration sync + +# Mainly just to reload stylix + +# xmonad +pgrep xmobar &> /dev/null && echo "Killing old xmobar instances" && echo "Running killall xmobar" && killall xmobar &> /dev/null; # xmonad will restart xmobar +pgrep xmonad &> /dev/null && echo "Recompiling xmonad" && echo "Running xmonad --recompile && xmonad --restart" && xmonad --recompile &> /dev/null && xmonad --restart &> /dev/null; +pgrep .dunst-wrapped &> /dev/null && echo "Restarting dunst" && killall .dunst-wrapped && echo "Running dunst" && dunst &> /dev/null & disown; +pgrep xmonad &> /dev/null && echo "Reapplying background from stylix via feh" && echo "Running ~/.fehbg-stylix" && ~/.fehbg-stylix &> /dev/null & disown; + +# hyprland +pgrep Hyprland &> /dev/null && echo "Reloading hyprland" && hyprctl reload &> /dev/null; +pgrep .waybar-wrapped &> /dev/null && echo "Restarting waybar" && killall .waybar-wrapped && echo "Running waybar" && waybar &> /dev/null & disown; +pgrep fnott &> /dev/null && echo "Restarting fnott" && killall fnott && echo "Running fnott" && fnott &> /dev/null & disown; +pgrep hyprpaper &> /dev/null && echo "Reapplying background via hyprpaper" && killall hyprpaper && echo "Running hyprpaper" && hyprpaper &> /dev/null & disown; +pgrep nwggrid-server &> /dev/null && echo "Restarting nwggrid-server" && killall nwggrid-server && echo "Running nwggrid-wrapper" && nwggrid-wrapper &> /dev/null & disown; + +# emacs +pgrep emacs &> /dev/null && echo "Reloading emacs stylix theme" && echo "Running emacsclient --no-wait --eval \"(load-theme 'doom-stylix t nil)\"" && emacsclient --no-wait --eval "(load-theme 'doom-stylix t nil)" &> /dev/null; diff --git a/sync-system.sh b/sync-system.sh new file mode 100755 index 0000000..34f27e8 --- /dev/null +++ b/sync-system.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Script to synchronize system state +# with configuration files for nixos system +# and home-manager + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Rebuild system +sudo nixos-rebuild switch --flake $SCRIPT_DIR#system; diff --git a/sync-user.sh b/sync-user.sh new file mode 100755 index 0000000..803e8c5 --- /dev/null +++ b/sync-user.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +# Script to synchronize system state +# with configuration files for nixos system +# and home-manager + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Fix root-owned sqlite errors +sudo chown -R 1000:users ~/.cache/nix; + +# Install and build home-manager configuration +home-manager switch --flake $SCRIPT_DIR#user; + +$SCRIPT_DIR/sync-posthook.sh diff --git a/sync.sh b/sync.sh new file mode 100755 index 0000000..73977ec --- /dev/null +++ b/sync.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +# Script to synchronize system state +# with configuration files for nixos system +# and home-manager + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +$SCRIPT_DIR/sync-system.sh +$SCRIPT_DIR/sync-user.sh diff --git a/system/README.org b/system/README.org new file mode 100644 index 0000000..f304994 --- /dev/null +++ b/system/README.org @@ -0,0 +1,29 @@ +#+title: System-level Nix Modules +#+author: Emmet + +Separate Nix files can be imported as modules using an import block: +#+BEGIN_SRC nix +imports = [ import1.nix + import2.nix + ... + ]; +#+END_SRC + +My system-level Nix modules are organized into this directory: +- [[./hardware-configuration.nix][hardware-configuration]] - Default hardware config generated for my system +- [[./bin][bin]] - My own scripts + - [[./bin/phoenix.nix][phoenix]] - My nix command wrapper +- [[./app][app]] - Necessary system-level configuration to get various apps working +- [[./hardware][hardware]] - Hardware configurations I may need to use +- [[./security][security]] - System-level security stuff +- [[./style][style]] - Stylix setup (system-wide base16 theme generation) +- [[./wm][wm]] - Necessary system-level configuration to get various window managers, wayland compositors, and/or desktop environments working + +** Variables imported from flake.nix +Variables can be imported from [[../flake.nix][flake.nix]] by setting the =specialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. + +I use this to pass a few attribute sets: +- =userSettings= - Settings for the normal user (see [[../flake.nix][flake.nix]] for more details) +- =systemSettings= - Settings for the system (see [[../flake.nix][flake.nix]] for more details) +- =inputs= - Flake inputs (see [[../flake.nix][flake.nix]] for more details) +- =pkgs-stable= - Allows me to include stable versions of packages along with (my default) unstable versions of packages diff --git a/system/app/docker.nix b/system/app/docker.nix new file mode 100644 index 0000000..3e36b88 --- /dev/null +++ b/system/app/docker.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, userSettings, storageDriver ? null, ... }: + +assert lib.asserts.assertOneOf "storageDriver" storageDriver [ + null + "aufs" + "btrfs" + "devicemapper" + "overlay" + "overlay2" + "zfs" +]; + +{ + virtualisation.docker = { + enable = true; + enableOnBoot = true; + storageDriver = storageDriver; + autoPrune.enable = true; + }; + users.users.${userSettings.username}.extraGroups = [ "docker" ]; + environment.systemPackages = with pkgs; [ + docker + docker-compose + lazydocker + ]; +} diff --git a/system/app/flatpak.nix b/system/app/flatpak.nix new file mode 100644 index 0000000..b674d62 --- /dev/null +++ b/system/app/flatpak.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + # Need some flatpaks + services.flatpak.enable = true; + xdg.portal.enable = true; +} diff --git a/system/app/gamemode.nix b/system/app/gamemode.nix new file mode 100644 index 0000000..934211e --- /dev/null +++ b/system/app/gamemode.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + # Feral GameMode + environment.systemPackages = [ pkgs.gamemode ]; + programs.gamemode.enable = true; +} diff --git a/system/app/prismlauncher.nix b/system/app/prismlauncher.nix new file mode 100644 index 0000000..f6932a6 --- /dev/null +++ b/system/app/prismlauncher.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.prismlauncher ]; +} diff --git a/system/app/steam.nix b/system/app/steam.nix new file mode 100644 index 0000000..8162a71 --- /dev/null +++ b/system/app/steam.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + hardware.opengl.driSupport32Bit = true; + programs.steam.enable = true; + environment.systemPackages = [ pkgs.steam ]; +} diff --git a/system/app/virtualization.nix b/system/app/virtualization.nix new file mode 100644 index 0000000..ce24573 --- /dev/null +++ b/system/app/virtualization.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ virt-manager distrobox ]; + virtualisation.libvirtd = { + allowedBridges = [ + "nm-bridge" + "virbr0" + ]; + enable = true; + qemu.runAsRoot = false; + }; + virtualisation.waydroid.enable = true; +} diff --git a/system/bin/phoenix.nix b/system/bin/phoenix.nix new file mode 100644 index 0000000..15e8ccc --- /dev/null +++ b/system/bin/phoenix.nix @@ -0,0 +1,74 @@ +{ pkgs, userSettings, ... }: +# TODO make this work on nix-on-droid! +let myScript = '' + if [ "$1" = "sync" ]; then + if [ "$#" = 1 ]; then + ''+userSettings.dotfilesDir+''/sync.sh; + exit 0; + elif [ "$2" = "user" ]; then + ''+userSettings.dotfilesDir+''/sync-user.sh; + exit 0; + elif [ "$2" = "system" ]; then + ''+userSettings.dotfilesDir+''/sync-system.sh; + exit 0; + else + echo "Please pass 'system' or 'user' if supplying a second argument" + fi + elif [ "$1" = "refresh" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'refresh' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/sync-posthook.sh; + exit 0; + elif [ "$1" = "update" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'update' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/update.sh; + exit 0; + elif [ "$1" = "upgrade" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'update' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/upgrade.sh; + exit 0; + elif [ "$1" = "pull" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'upgrade' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/pull.sh; + exit 0; + elif [ "$1" = "harden" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'harden' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/harden.sh; + exit 0; + elif [ "$1" = "soften" ]; then + if [ "$#" -gt 1 ]; then + echo "Warning: The 'soften' command has no subcommands (no $2 subcommand)"; + fi + ''+userSettings.dotfilesDir+''/soften.sh; + exit 0; + elif [ "$1" = "gc" ]; then + if [ "$#" -gt 2 ]; then + echo "Warning: The 'gc' command only accepts one argument (collect_older_than)"; + fi + if [ "$2" = "full" ]; then + sudo nix-collect-garbage --delete-old; + nix-collect-garbage --delete-old; + elif [ "$2" ]; then + sudo nix-collect-garbage --delete-older-than $2; + nix-collect-garbage --delete-older-than $2; + else + sudo nix-collect-garbage --delete-older-than 30d; + nix-collect-garbage --delete-older-than 30d; + fi + fi + ''; +in +{ + environment.systemPackages = [ + (pkgs.writeScriptBin "phoenix" myScript) + ]; +} diff --git a/hosts/snowfire/hardware-configuration.nix b/system/hardware-configuration.nix similarity index 54% rename from hosts/snowfire/hardware-configuration.nix rename to system/hardware-configuration.nix index 2c624a5..313c9f1 100644 --- a/hosts/snowfire/hardware-configuration.nix +++ b/system/hardware-configuration.nix @@ -9,68 +9,29 @@ ]; services.fstrim.enable = true; - services.lact.enable = true; - #services.lact.settings = {}; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" "radeon" ]; boot.initrd.kernelModules = [ "radeon" ]; boot.kernelModules = [ "kvm-amd" "radeon" "zenpower" "8812au" ]; boot.blacklistedKernelModules = [ "k10temp" ]; - boot.kernelParams = [ "amd_pstate=active" "acpi_osi=Linux" "acpi_wake=USB0" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ]; - networking.wireguard.enable = true; - # https://wiki.nixos.org/wiki/Mesa - hardware = { - graphics = - let - fn = oa: { - nativeBuildInputs = oa.nativeBuildInputs ++ [ pkgs.glslang ]; - mesonFlags = oa.mesonFlags ++ [ "-Dvulkan-layers=device-select,overlay" ]; - # patches = oa.patches ++ [ ./mesa-vulkan-layer-nvidia.patch ]; See below - postInstall = oa.postInstall + '' - mv $out/lib/libVkLayer* $drivers/lib - - #Device Select layer - layer=VkLayer_MESA_device_select - substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \ - --replace "lib''${layer}" "$drivers/lib/lib''${layer}" - - #Overlay layer - layer=VkLayer_MESA_overlay - substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \ - --replace "lib''${layer}" "$drivers/lib/lib''${layer}" - ''; - }; - in - with pkgs; { - enable = true; - enable32Bit = true; - package = (mesa.overrideAttrs fn).drivers; - package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers; - #extraPackages = with pkgs; [ amdvlk ]; - #extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; - }; - }; + boot.kernelParams = [ "amd_pstate=active" ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower rtl8812au ]; hardware.opengl.extraPackages = [ pkgs.rocmPackages.clr.icd ]; hardware.opengl.extraPackages32 = [ ]; - #environment.systemPackages = with pkgs.rocmPackages; [ hipcc hip-common hiprand hipblas hipfft hipcub hipify ]; - environment.systemPackages = with pkgs.rocmPackages; [ hipcc hip-common hiprand hipfft hipcub hipify ]; + environment.systemPackages = with pkgs.rocmPackages; [ hipcc hip-common hiprand hipblas hipfft hipcub hipify ]; + services.xserver.videoDrivers = lib.mkDefault [ "modesetting" ]; - hardware.amdgpu.initrd.enable = true; - hardware.amdgpu.opencl.enable = true; - #hardware.amdgpu.amdvlk.enable = true; - #hardware.amdgpu.overdrive.enable = true; - environment.sessionVariables = { - VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/radeon_icd.x86_64.json"; # fix for godot + hardware.graphics = { + enable = lib.mkDefault true; + enable32Bit = lib.mkDefault true; }; - # makes disk io not freeze the computer - services.udev.extraRules = '' - ACTION=="add|change", SUBSYSTEM=="block", ENV{ID_SERIAL_SHORT}=="BTKA121225GP512A", ATTR{queue/scheduler}="bfq" - ''; + hardware.amdgpu.initrd.enable = true; + hardware.amdgpu.opencl.enable = true; + hardware.amdgpu.amdvlk.enable = true; systemd.tmpfiles.rules = let @@ -116,25 +77,30 @@ }; boot.kernel.sysctl = { - "vm.swappiness" = 180; - "vm.vfs_cache_pressure" = 500; - "vm.dirty_background_ratio" = 4; - "vm.dirty_ratio" = 8; + "vm.swappiness" = 90; + "vm.vfs_cache_pressure" = 50; + "vm.dirty_background_ratio" = 2; + "vm.dirty_ratio" = 5; + }; + + services.btrfs.autoScrub = { + enable = true; + interval = "weekly"; }; fileSystems."/" = - { device = "/dev/disk/by-uuid/88f5f921-0a64-4711-9d74-e0f8a3a1b3af"; - fsType = "ext4"; + { device = "/dev/disk/by-uuid/637d8261-0650-4ece-a35b-59d97baf64a7"; + fsType = "btrfs"; + options = [ "noatime,compress-force=zstd:2,discard=async,commit=120,clear_cache,space_cache=v2,subvol=@" ]; }; - boot.initrd.luks.devices."luks-09f429eb-1add-48da-b3b8-1a811c0d1472".device = "/dev/disk/by-uuid/09f429eb-1add-48da-b3b8-1a811c0d1472"; + boot.initrd.luks.devices."luks-385106b5-71f7-460e-9a2b-2416f3b54cb6".device = "/dev/disk/by-uuid/385106b5-71f7-460e-9a2b-2416f3b54cb6"; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/4695-0F2E"; + { device = "/dev/disk/by-uuid/F09D-73C9"; fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; }; - + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/system/hardware/bluetooth.nix b/system/hardware/bluetooth.nix new file mode 100644 index 0000000..82cc112 --- /dev/null +++ b/system/hardware/bluetooth.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + # Bluetooth + hardware.bluetooth.enable = true; + services.blueman.enable = true; +} diff --git a/system/hardware/kernel.nix b/system/hardware/kernel.nix new file mode 100644 index 0000000..3295c3a --- /dev/null +++ b/system/hardware/kernel.nix @@ -0,0 +1,6 @@ +{ config, pkgs, ... }: + +{ + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + boot.consoleLogLevel = 0; +} diff --git a/system/hardware/opengl.nix b/system/hardware/opengl.nix new file mode 100644 index 0000000..7e49f80 --- /dev/null +++ b/system/hardware/opengl.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + # OpenGL + hardware.opengl.enable = true; + hardware.opengl.extraPackages = with pkgs; [ + rocmPackages.clr.icd + ]; +} diff --git a/system/hardware/power.nix b/system/hardware/power.nix new file mode 100644 index 0000000..893d1a8 --- /dev/null +++ b/system/hardware/power.nix @@ -0,0 +1,48 @@ +{ ... }: + +{ + services.tlp = { + enable = true; + settings = { + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "balance"; + CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance"; + CPU_DRIVER_OPMODE_ON_AC = "active"; + CPU_DRIVER_OPMODE_ON_BAT = "active"; + + WIFI_PWR_ON_AC = "on"; + WIFI_PWR_ON_BAT = "on"; + RUNTIME_PM_ON_AC = "auto"; + RUNTIME_PM_ON_BAT = "auto"; + + CPU_MIN_PERF_ON_AC = 10; + CPU_MAX_PERF_ON_AC = 90; + CPU_MIN_PERF_ON_BAT = 10; + CPU_MAX_PERF_ON_BAT = 50; + + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + CPU_HWP_DYN_BOOST_ON_AC = 1; + CPU_HWP_DYN_BOOST_ON_BAT = 0; + + START_CHARGE_THRESH_BAT0 = 75; + STOP_CHARGE_THRESH_BAT0 = 80; + + MEM_SLEEP_ON_AC = "deep"; + MEM_SLEEP_ON_BAT = "deep"; + + PLATFORM_PROFILE_ON_AC = "performance"; + PLATFORM_PROFILE_ON_BAT = "low-power"; + + RADEON_DPM_STATE_ON_AC = "performance"; + RADEON_DPM_STATE_ON_BAT = "battery"; + RADEON_POWER_PROFILE_ON_AC = "high"; + RADEON_POWER_PROFILE_ON_BAT = "low"; + + INTEL_GPU_MIN_FREQ_ON_AC = 600; + INTEL_GPU_MIN_FREQ_ON_BAT = 600; + }; + }; + +} diff --git a/system/hardware/printing.nix b/system/hardware/printing.nix new file mode 100644 index 0000000..3386343 --- /dev/null +++ b/system/hardware/printing.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + # Enable printing + services.printing.enable = true; + services.avahi.enable = true; + services.avahi.nssmdns4 = true; + services.avahi.openFirewall = true; + environment.systemPackages = [ pkgs.cups-filters ]; +} diff --git a/system/hardware/systemd.nix b/system/hardware/systemd.nix new file mode 100644 index 0000000..e05058c --- /dev/null +++ b/system/hardware/systemd.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + services.journald.extraConfig = "SystemMaxUse=50M\nSystemMaxFiles=5"; + services.journald.rateLimitBurst = 500; + services.journald.rateLimitInterval = "30s"; +} diff --git a/system/hardware/time.nix b/system/hardware/time.nix new file mode 100644 index 0000000..5e79a60 --- /dev/null +++ b/system/hardware/time.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + services.timesyncd.enable = true; +} diff --git a/system/security/automount.nix b/system/security/automount.nix new file mode 100644 index 0000000..fdc5da0 --- /dev/null +++ b/system/security/automount.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + services.devmon.enable = true; + services.gvfs.enable = true; + services.udisks2.enable = true; +} diff --git a/system/security/blocklist.nix b/system/security/blocklist.nix new file mode 100644 index 0000000..0653a09 --- /dev/null +++ b/system/security/blocklist.nix @@ -0,0 +1,9 @@ +{ inputs, ... }: + +let blocklist = builtins.readFile "${inputs.blocklist-hosts}/alternates/gambling-porn/hosts"; +in +{ + networking.extraHosts = '' + "${blocklist}" + ''; +} diff --git a/system/security/doas.nix b/system/security/doas.nix new file mode 100644 index 0000000..f3ab361 --- /dev/null +++ b/system/security/doas.nix @@ -0,0 +1,23 @@ +{ userSettings, pkgs, ... }: + +{ + # Doas instead of sudo + security.doas.enable = true; + security.sudo.enable = false; + security.doas.extraRules = [ + { + users = [ "${userSettings.username}" ]; + keepEnv = true; + persist = true; + } + { + users = [ "${userSettings.username}" ]; + cmd = "tee"; + noPass = true; + } + ]; + + environment.systemPackages = [ + (pkgs.writeScriptBin "sudo" ''exec doas "$@"'') + ]; +} diff --git a/modules/system/security/firejail/profiles/prismlauncher.profile b/system/security/firejail-profiles/prismlauncher.profile similarity index 100% rename from modules/system/security/firejail/profiles/prismlauncher.profile rename to system/security/firejail-profiles/prismlauncher.profile diff --git a/system/security/firejail.nix b/system/security/firejail.nix new file mode 100644 index 0000000..03533d3 --- /dev/null +++ b/system/security/firejail.nix @@ -0,0 +1,20 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = with pkgs; [ firejail ]; + programs.firejail.enable = true; + programs.firejail.wrappedBinaries = { + #prismlauncher = { + # executable = "${pkgs.prismlauncher}/bin/prismlauncher"; + # profile = ./firejail-profiles/prismlauncher.profile; + #}; + steam = { + executable = "${pkgs.steam}/bin/steam"; + profile = "${pkgs.firejail}/etc/firejail/steam.profile"; + }; + steam-run = { + executable = "${pkgs.steam}/bin/steam-run"; + profile = "${pkgs.firejail}/etc/firejail/steam.profile"; + }; + }; +} diff --git a/system/security/firewall.nix b/system/security/firewall.nix new file mode 100644 index 0000000..ff582da --- /dev/null +++ b/system/security/firewall.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + # Firewall + networking.firewall.enable = true; + # Open ports in the firewall. + networking.firewall.allowedTCPPorts = [ 22000 21027 ]; # syncthing + networking.firewall.allowedUDPPorts = [ 22000 21027 ]; # syncthing + # Or disable the firewall altogether. + # networking.firewall.enable = false; +} diff --git a/system/security/gpg.nix b/system/security/gpg.nix new file mode 100644 index 0000000..df99f96 --- /dev/null +++ b/system/security/gpg.nix @@ -0,0 +1,11 @@ +{ ... }: + +{ + # 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; + }; +} diff --git a/system/security/openvpn.nix b/system/security/openvpn.nix new file mode 100644 index 0000000..b1fe8c0 --- /dev/null +++ b/system/security/openvpn.nix @@ -0,0 +1,6 @@ +{ pkgs, ... }: + +{ + environment.systemPackages = [ pkgs.openvpn ]; + environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn"; +} diff --git a/system/security/sshd.nix b/system/security/sshd.nix new file mode 100644 index 0000000..672548b --- /dev/null +++ b/system/security/sshd.nix @@ -0,0 +1,14 @@ +{ userSettings, authorizedKeys ? [], ... }: + +{ + # Enable incoming ssh + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = false; + PermitRootLogin = "no"; + }; + }; + users.users.${userSettings.username}.openssh.authorizedKeys.keys = authorizedKeys; +} diff --git a/system/style/stylix.nix b/system/style/stylix.nix new file mode 100644 index 0000000..7b7bf6b --- /dev/null +++ b/system/style/stylix.nix @@ -0,0 +1,50 @@ +{ lib, pkgs, inputs, userSettings, ... }: + +let + themePath = "../../../themes/"+userSettings.theme+"/"+userSettings.theme+".yaml"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); + myLightDMTheme = if themePolarity == "light" then "Adwaita" else "Adwaita-dark"; + backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/backgroundurl.txt"); + backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt"); +in +{ + imports = [ inputs.stylix.nixosModules.stylix ]; + + stylix.autoEnable = false; + stylix.polarity = themePolarity; + stylix.image = pkgs.fetchurl { + url = backgroundUrl; + sha256 = backgroundSha256; + }; + stylix.base16Scheme = ./. + themePath; + stylix.fonts = { + monospace = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + serif = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + sansSerif = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + emoji = { + name = "Noto Color Emoji"; + package = pkgs.noto-fonts-emoji-blob-bin; + }; + }; + + stylix.targets.lightdm.enable = true; + services.xserver.displayManager.lightdm = { + greeters.slick.enable = true; + greeters.slick.theme.name = myLightDMTheme; + }; + stylix.targets.console.enable = true; + + environment.sessionVariables = { + QT_QPA_PLATFORMTHEME = "qt5ct"; + }; + +} diff --git a/system/wm/dbus.nix b/system/wm/dbus.nix new file mode 100644 index 0000000..c034326 --- /dev/null +++ b/system/wm/dbus.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + services.dbus = { + enable = true; + packages = [ pkgs.dconf ]; + }; + + programs.dconf = { + enable = true; + }; +} diff --git a/system/wm/fonts.nix b/system/wm/fonts.nix new file mode 100644 index 0000000..a1ec65e --- /dev/null +++ b/system/wm/fonts.nix @@ -0,0 +1,11 @@ +{ pkgs-stable, ... }: + +{ + # Fonts are nice to have + fonts.packages = with pkgs-stable; [ + # Fonts + nerdfonts + powerline + ]; + +} diff --git a/system/wm/gnome-keyring.nix b/system/wm/gnome-keyring.nix new file mode 100644 index 0000000..19fe9c4 --- /dev/null +++ b/system/wm/gnome-keyring.nix @@ -0,0 +1,7 @@ +{ ... }: + +{ + services.gnome = { + gnome-keyring.enable = true; + }; +} diff --git a/system/wm/hyprland.nix b/system/wm/hyprland.nix new file mode 100644 index 0000000..5d7cada --- /dev/null +++ b/system/wm/hyprland.nix @@ -0,0 +1,41 @@ +{ inputs, pkgs, lib, ... }: let + pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; +in +{ + # Import wayland config + imports = [ ./wayland.nix + ./pipewire.nix + ./dbus.nix + ]; + + # Security + security = { + pam.services.login.enableGnomeKeyring = true; + }; + + services.gnome.gnome-keyring.enable = true; + + programs = { + hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.system}.hyprland; + xwayland = { + enable = true; + }; + portalPackage = pkgs-hyprland.xdg-desktop-portal-hyprland; + }; + }; + + services.xserver.excludePackages = [ pkgs.xterm ]; + + services.xserver = { + displayManager.sddm = { + enable = true; + wayland.enable = true; + enableHidpi = true; + theme = "chili"; + package = pkgs.sddm; + }; + + }; +} diff --git a/system/wm/pipewire.nix b/system/wm/pipewire.nix new file mode 100644 index 0000000..2c14a10 --- /dev/null +++ b/system/wm/pipewire.nix @@ -0,0 +1,13 @@ +{ ... }: + +{ + # Pipewire + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; +} diff --git a/system/wm/wayland.nix b/system/wm/wayland.nix new file mode 100644 index 0000000..3234013 --- /dev/null +++ b/system/wm/wayland.nix @@ -0,0 +1,32 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./pipewire.nix + ./dbus.nix + ./gnome-keyring.nix + ./fonts.nix + ]; + + environment.systemPackages = with pkgs; + [ wayland waydroid + (sddm-chili-theme.override { + themeConfig = { + background = config.stylix.image; + ScreenWidth = 1920; + ScreenHeight = 1080; + blur = true; + recursiveBlurLoops = 3; + recursiveBlurRadius = 5; + };}) + ]; + + # Configure xwayland + services.xserver = { + enable = true; + xkb = { + layout = "us"; + variant = ""; + options = "caps:escape"; + }; + }; +} diff --git a/system/wm/x11.nix b/system/wm/x11.nix new file mode 100644 index 0000000..993c399 --- /dev/null +++ b/system/wm/x11.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +{ + imports = [ ./pipewire.nix + ./dbus.nix + ./gnome-keyring.nix + ./fonts.nix + ]; + + # Configure X11 + services.xserver = { + enable = true; + layout = "us"; + xkbVariant = ""; + xkbOptions = "caps:escape"; + excludePackages = [ pkgs.xterm ]; + displayManager = { + lightdm.enable = true; + sessionCommands = '' + xset -dpms + xset s blank + xset r rate 350 50 + xset s 300 + ${pkgs.lightlocker}/bin/light-locker --idle-hint & + ''; + }; + libinput = { + touchpad.disableWhileTyping = true; + }; + }; +} diff --git a/themes/README.org b/themes/README.org new file mode 100644 index 0000000..d178a05 --- /dev/null +++ b/themes/README.org @@ -0,0 +1,13 @@ +#+title: My Themes +#+author: Emmet + +Inside this directory are all of my themes! + +Each theme directory stores a few relevant files: +- =${theme-name}.yaml= - This stores all 16 colors for the theme +- =backgroundurl.txt= - A direct link to the wallpaper associated with the theme +- =backgroundsha26.txt= - =sha256sum= of the wallpaper +- =polarity.txt= - Whether or not the background is =light= or =dark= +- =${theme-name}.png= - A screenshot of the theme for previewing purposes + +Look at any of the directories here for more info! diff --git a/modules/themes/alph/README.org b/themes/alph/README.org similarity index 100% rename from modules/themes/alph/README.org rename to themes/alph/README.org diff --git a/themes/alph/alph.yaml b/themes/alph/alph.yaml new file mode 100644 index 0000000..40403eb --- /dev/null +++ b/themes/alph/alph.yaml @@ -0,0 +1,18 @@ +scheme: "Alph" +author: "LibrePhoenix" +base00: "fbfbff" +base01: "D8E4F4" +base02: "BCCDE1" +base03: "9FB4D1" +base04: "667D9F" +base05: "444452" +base06: "333349" +base07: "141229" +base08: "AD0617" +base09: "872626" +base0A: "AD6A06" +base0B: "06AD72" +base0C: "06A3AD" +base0D: "0A5D97" +base0E: "5B037A" +base0F: "87267C" diff --git a/themes/alph/backgroundsha256.txt b/themes/alph/backgroundsha256.txt new file mode 100644 index 0000000..f942354 --- /dev/null +++ b/themes/alph/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-ZM0X0IXsUwAgxdZileDOol8kBANxjW8oGrgha3OFjYE= diff --git a/themes/alph/backgroundurl.txt b/themes/alph/backgroundurl.txt new file mode 100644 index 0000000..8398587 --- /dev/null +++ b/themes/alph/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/132/401/75/painting-clouds-sky-landscape-wallpaper-57bfb2f40fd59f8acf4284a1e191c785.jpg diff --git a/themes/alph/polarity.txt b/themes/alph/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/alph/polarity.txt @@ -0,0 +1 @@ +light diff --git a/modules/themes/ashes/README.org b/themes/ashes/README.org similarity index 100% rename from modules/themes/ashes/README.org rename to themes/ashes/README.org diff --git a/themes/ashes/ashes.yaml b/themes/ashes/ashes.yaml new file mode 100644 index 0000000..7278667 --- /dev/null +++ b/themes/ashes/ashes.yaml @@ -0,0 +1,19 @@ +# Ashes scheme for the Base16 Builder (https://github.com/chriskempson/base16-builder) +scheme: "Ashes" +author: "Jannik Siebert (https://github.com/janniks)" +base00: "1C2023" # ---- +base01: "393F45" # --- +base02: "565E65" # -- +base03: "747C84" # - +base04: "ADB3BA" # + +base05: "C7CCD1" # ++ +base06: "DFE2E5" # +++ +base07: "F3F4F5" # ++++ +base08: "C7AE95" # orange +base09: "C7C795" # yellow +base0A: "AEC795" # poison green +base0B: "95C7AE" # turquois +base0C: "95AEC7" # aqua +base0D: "AE95C7" # purple +base0E: "C795AE" # pink +base0F: "C79595" # light red diff --git a/themes/ashes/backgroundsha256.txt b/themes/ashes/backgroundsha256.txt new file mode 100644 index 0000000..bf464a2 --- /dev/null +++ b/themes/ashes/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-ul7ecqPw9bSr+JRSd+3OlKwVfB+5378L7ObYydJDsgQ= diff --git a/themes/ashes/backgroundurl.txt b/themes/ashes/backgroundurl.txt new file mode 100644 index 0000000..4efbb1d --- /dev/null +++ b/themes/ashes/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/anime-road-to-city-everlasting-summer-4k-ep.jpg diff --git a/themes/ashes/polarity.txt b/themes/ashes/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/ashes/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-cave/README.org b/themes/atelier-cave/README.org similarity index 100% rename from modules/themes/atelier-cave/README.org rename to themes/atelier-cave/README.org diff --git a/themes/atelier-cave/atelier-cave.yaml b/themes/atelier-cave/atelier-cave.yaml new file mode 100644 index 0000000..725ecb4 --- /dev/null +++ b/themes/atelier-cave/atelier-cave.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Cave" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "19171c" +base01: "26232a" +base02: "585260" +base03: "655f6d" +base04: "7e7887" +base05: "8b8792" +base06: "e2dfe7" +base07: "efecf4" +base08: "be4678" +base09: "aa573c" +base0A: "a06e3b" +base0B: "2a9292" +base0C: "398bc6" +base0D: "576ddb" +base0E: "955ae7" +base0F: "bf40bf" diff --git a/themes/atelier-cave/backgroundsha256.txt b/themes/atelier-cave/backgroundsha256.txt new file mode 100644 index 0000000..131b0be --- /dev/null +++ b/themes/atelier-cave/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-AVPJYFLEQr9x1V2yQLkMc1g7GqcBPJiKRFuj8MaKe5c= diff --git a/themes/atelier-cave/backgroundurl.txt b/themes/atelier-cave/backgroundurl.txt new file mode 100644 index 0000000..952db2b --- /dev/null +++ b/themes/atelier-cave/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/anime-girl-angel-ring-5k-7c.jpg diff --git a/themes/atelier-cave/polarity.txt b/themes/atelier-cave/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-cave/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-dune/README.org b/themes/atelier-dune/README.org similarity index 100% rename from modules/themes/atelier-dune/README.org rename to themes/atelier-dune/README.org diff --git a/themes/atelier-dune/atelier-dune.yaml b/themes/atelier-dune/atelier-dune.yaml new file mode 100644 index 0000000..806e20c --- /dev/null +++ b/themes/atelier-dune/atelier-dune.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Dune" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "20201d" +base01: "292824" +base02: "6e6b5e" +base03: "7d7a68" +base04: "999580" +base05: "a6a28c" +base06: "e8e4cf" +base07: "fefbec" +base08: "d73737" +base09: "b65611" +base0A: "ae9513" +base0B: "60ac39" +base0C: "1fad83" +base0D: "6684e1" +base0E: "b854d4" +base0F: "d43552" diff --git a/themes/atelier-dune/backgroundsha256.txt b/themes/atelier-dune/backgroundsha256.txt new file mode 100644 index 0000000..fac6d85 --- /dev/null +++ b/themes/atelier-dune/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-wplFIlIIYHTofJMuBLtpSWwrFyzz8ao1Gq4wGqgz7qY= diff --git a/themes/atelier-dune/backgroundurl.txt b/themes/atelier-dune/backgroundurl.txt new file mode 100644 index 0000000..45f18ad --- /dev/null +++ b/themes/atelier-dune/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/tengen-toppa-gurren-lagann-4k-1m.jpg diff --git a/themes/atelier-dune/polarity.txt b/themes/atelier-dune/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-dune/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-estuary/README.org b/themes/atelier-estuary/README.org similarity index 100% rename from modules/themes/atelier-estuary/README.org rename to themes/atelier-estuary/README.org diff --git a/themes/atelier-estuary/atelier-estuary.yaml b/themes/atelier-estuary/atelier-estuary.yaml new file mode 100644 index 0000000..90eaf4a --- /dev/null +++ b/themes/atelier-estuary/atelier-estuary.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Estuary" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "22221b" +base01: "302f27" +base02: "5f5e4e" +base03: "6c6b5a" +base04: "878573" +base05: "929181" +base06: "e7e6df" +base07: "f4f3ec" +base08: "ba6236" +base09: "ae7313" +base0A: "a5980d" +base0B: "7d9726" +base0C: "5b9d48" +base0D: "36a166" +base0E: "5f9182" +base0F: "9d6c7c" diff --git a/themes/atelier-estuary/backgroundsha256.txt b/themes/atelier-estuary/backgroundsha256.txt new file mode 100644 index 0000000..7ea63f8 --- /dev/null +++ b/themes/atelier-estuary/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-f97njdnllbsnnIjZnz/j0l2qIFWbEsGF2QtV1JTF2Yg= diff --git a/themes/atelier-estuary/backgroundurl.txt b/themes/atelier-estuary/backgroundurl.txt new file mode 100644 index 0000000..1774ba9 --- /dev/null +++ b/themes/atelier-estuary/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/352/194/322/digital-art-artwork-dragon-skeleton-wallpaper-15f339ed090d16293ff528ba738d87f9.jpg diff --git a/themes/atelier-estuary/polarity.txt b/themes/atelier-estuary/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-estuary/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-forest/README.org b/themes/atelier-forest/README.org similarity index 100% rename from modules/themes/atelier-forest/README.org rename to themes/atelier-forest/README.org diff --git a/themes/atelier-forest/atelier-forest.yaml b/themes/atelier-forest/atelier-forest.yaml new file mode 100644 index 0000000..9704dfc --- /dev/null +++ b/themes/atelier-forest/atelier-forest.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Forest" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "1b1918" +base01: "2c2421" +base02: "68615e" +base03: "766e6b" +base04: "9c9491" +base05: "a8a19f" +base06: "e6e2e0" +base07: "f1efee" +base08: "f22c40" +base09: "df5320" +base0A: "c38418" +base0B: "7b9726" +base0C: "3d97b8" +base0D: "407ee7" +base0E: "6666ea" +base0F: "c33ff3" diff --git a/themes/atelier-forest/backgroundsha256.txt b/themes/atelier-forest/backgroundsha256.txt new file mode 100644 index 0000000..06c1816 --- /dev/null +++ b/themes/atelier-forest/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-+ayGF3G14PfZwZnIeqCpnV/awnwdpue3OBmJYTirb2U= diff --git a/themes/atelier-forest/backgroundurl.txt b/themes/atelier-forest/backgroundurl.txt new file mode 100644 index 0000000..d49eb2b --- /dev/null +++ b/themes/atelier-forest/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/72/wallhaven-72p97v.jpg diff --git a/themes/atelier-forest/polarity.txt b/themes/atelier-forest/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-forest/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-heath/README.org b/themes/atelier-heath/README.org similarity index 100% rename from modules/themes/atelier-heath/README.org rename to themes/atelier-heath/README.org diff --git a/themes/atelier-heath/atelier-heath.yaml b/themes/atelier-heath/atelier-heath.yaml new file mode 100644 index 0000000..8a711fc --- /dev/null +++ b/themes/atelier-heath/atelier-heath.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Heath" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "1b181b" +base01: "292329" +base02: "695d69" +base03: "776977" +base04: "9e8f9e" +base05: "ab9bab" +base06: "d8cad8" +base07: "f7f3f7" +base08: "ca402b" +base09: "a65926" +base0A: "bb8a35" +base0B: "918b3b" +base0C: "159393" +base0D: "516aec" +base0E: "7b59c0" +base0F: "cc33cc" diff --git a/themes/atelier-heath/backgroundsha256.txt b/themes/atelier-heath/backgroundsha256.txt new file mode 100644 index 0000000..bebe3b9 --- /dev/null +++ b/themes/atelier-heath/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-KuPdCD5IT0/LJghqQKuAFiFtztp+FyRJRdsjdrAzPI8= diff --git a/themes/atelier-heath/backgroundurl.txt b/themes/atelier-heath/backgroundurl.txt new file mode 100644 index 0000000..955f855 --- /dev/null +++ b/themes/atelier-heath/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/861/102/512/moonlight-fantasy-landscape-moon-full-moon-wallpaper-0960b8dd31ca4d2b96b7684fd021067d.jpg diff --git a/themes/atelier-heath/polarity.txt b/themes/atelier-heath/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-heath/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-lakeside/README.org b/themes/atelier-lakeside/README.org similarity index 100% rename from modules/themes/atelier-lakeside/README.org rename to themes/atelier-lakeside/README.org diff --git a/themes/atelier-lakeside/atelier-lakeside.yaml b/themes/atelier-lakeside/atelier-lakeside.yaml new file mode 100644 index 0000000..6c383d3 --- /dev/null +++ b/themes/atelier-lakeside/atelier-lakeside.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Lakeside" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "161b1d" +base01: "1f292e" +base02: "516d7b" +base03: "5a7b8c" +base04: "7195a8" +base05: "7ea2b4" +base06: "c1e4f6" +base07: "ebf8ff" +base08: "d22d72" +base09: "935c25" +base0A: "8a8a0f" +base0B: "568c3b" +base0C: "2d8f6f" +base0D: "257fad" +base0E: "6b6bb8" +base0F: "b72dd2" diff --git a/themes/atelier-lakeside/backgroundsha256.txt b/themes/atelier-lakeside/backgroundsha256.txt new file mode 100644 index 0000000..6d1c790 --- /dev/null +++ b/themes/atelier-lakeside/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-8ytn00rZUiJxgtjXqTxtR7qusokxjY68u+UiWuwD8Bs= diff --git a/themes/atelier-lakeside/backgroundurl.txt b/themes/atelier-lakeside/backgroundurl.txt new file mode 100644 index 0000000..301266e --- /dev/null +++ b/themes/atelier-lakeside/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/410/867/750/vector-forest-sunset-forest-sunset-forest-wallpaper-b3abc35d0d699b056fa6b247589b18a8.jpg diff --git a/themes/atelier-lakeside/polarity.txt b/themes/atelier-lakeside/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-lakeside/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-plateau/README.org b/themes/atelier-plateau/README.org similarity index 100% rename from modules/themes/atelier-plateau/README.org rename to themes/atelier-plateau/README.org diff --git a/themes/atelier-plateau/atelier-plateau.yaml b/themes/atelier-plateau/atelier-plateau.yaml new file mode 100644 index 0000000..1e81c0a --- /dev/null +++ b/themes/atelier-plateau/atelier-plateau.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Plateau" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "1b1818" +base01: "292424" +base02: "585050" +base03: "655d5d" +base04: "7e7777" +base05: "8a8585" +base06: "e7dfdf" +base07: "f4ecec" +base08: "ca4949" +base09: "b45a3c" +base0A: "a06e3b" +base0B: "4b8b8b" +base0C: "5485b6" +base0D: "7272ca" +base0E: "8464c4" +base0F: "bd5187" diff --git a/themes/atelier-plateau/backgroundsha256.txt b/themes/atelier-plateau/backgroundsha256.txt new file mode 100644 index 0000000..d541554 --- /dev/null +++ b/themes/atelier-plateau/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-GL4QjCZFLAgsMM05cLqAx9Sd293NfU79azFhuzBGhW0= diff --git a/themes/atelier-plateau/backgroundurl.txt b/themes/atelier-plateau/backgroundurl.txt new file mode 100644 index 0000000..124d5a5 --- /dev/null +++ b/themes/atelier-plateau/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/428/434/322/art-computer-digital-art-concept-art-wallpaper-b9a0c85d016a9d0b66a7b84f509116ad.jpg diff --git a/themes/atelier-plateau/polarity.txt b/themes/atelier-plateau/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-plateau/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-savanna/README.org b/themes/atelier-savanna/README.org similarity index 100% rename from modules/themes/atelier-savanna/README.org rename to themes/atelier-savanna/README.org diff --git a/themes/atelier-savanna/atelier-savanna.yaml b/themes/atelier-savanna/atelier-savanna.yaml new file mode 100644 index 0000000..0e69954 --- /dev/null +++ b/themes/atelier-savanna/atelier-savanna.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Savanna" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "171c19" +base01: "232a25" +base02: "526057" +base03: "5f6d64" +base04: "78877d" +base05: "87928a" +base06: "dfe7e2" +base07: "ecf4ee" +base08: "b16139" +base09: "9f713c" +base0A: "a07e3b" +base0B: "489963" +base0C: "1c9aa0" +base0D: "478c90" +base0E: "55859b" +base0F: "867469" diff --git a/themes/atelier-savanna/backgroundsha256.txt b/themes/atelier-savanna/backgroundsha256.txt new file mode 100644 index 0000000..fbf3086 --- /dev/null +++ b/themes/atelier-savanna/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-0ubzlyIj3Uz9vQa+qvz/+q/1trgbNUEpQysqtEFs54g= diff --git a/themes/atelier-savanna/backgroundurl.txt b/themes/atelier-savanna/backgroundurl.txt new file mode 100644 index 0000000..fd5ab9f --- /dev/null +++ b/themes/atelier-savanna/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/760/955/638/artwork-landscape-sky-mountains-wallpaper-78664db880d01c78404c214e28e2847a.jpg diff --git a/themes/atelier-savanna/polarity.txt b/themes/atelier-savanna/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-savanna/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-seaside/README.org b/themes/atelier-seaside/README.org similarity index 100% rename from modules/themes/atelier-seaside/README.org rename to themes/atelier-seaside/README.org diff --git a/themes/atelier-seaside/atelier-seaside.yaml b/themes/atelier-seaside/atelier-seaside.yaml new file mode 100644 index 0000000..bcc649f --- /dev/null +++ b/themes/atelier-seaside/atelier-seaside.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Seaside" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "131513" +base01: "242924" +base02: "5e6e5e" +base03: "687d68" +base04: "809980" +base05: "8ca68c" +base06: "cfe8cf" +base07: "f4fbf4" +base08: "e6193c" +base09: "87711d" +base0A: "98981b" +base0B: "29a329" +base0C: "1999b3" +base0D: "3d62f5" +base0E: "ad2bee" +base0F: "e619c3" diff --git a/themes/atelier-seaside/backgroundsha256.txt b/themes/atelier-seaside/backgroundsha256.txt new file mode 100644 index 0000000..74730ad --- /dev/null +++ b/themes/atelier-seaside/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-GcHU4qYRGFubobNENwp8prpd/da4tzHwRyN+rsH2dYA= diff --git a/themes/atelier-seaside/backgroundurl.txt b/themes/atelier-seaside/backgroundurl.txt new file mode 100644 index 0000000..abd6483 --- /dev/null +++ b/themes/atelier-seaside/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/714/495/609/landscape-artwork-digital-art-fantasy-art-wallpaper-9960e89d112afd2ba6e738ff70b1e63d.jpg diff --git a/themes/atelier-seaside/polarity.txt b/themes/atelier-seaside/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-seaside/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/atelier-sulphurpool/README.org b/themes/atelier-sulphurpool/README.org similarity index 100% rename from modules/themes/atelier-sulphurpool/README.org rename to themes/atelier-sulphurpool/README.org diff --git a/themes/atelier-sulphurpool/atelier-sulphurpool.yaml b/themes/atelier-sulphurpool/atelier-sulphurpool.yaml new file mode 100644 index 0000000..c9f0b1f --- /dev/null +++ b/themes/atelier-sulphurpool/atelier-sulphurpool.yaml @@ -0,0 +1,18 @@ +scheme: "Atelier Sulphurpool" +author: "Bram de Haan (http://atelierbramdehaan.nl)" +base00: "202746" +base01: "293256" +base02: "5e6687" +base03: "6b7394" +base04: "898ea4" +base05: "979db4" +base06: "dfe2f1" +base07: "f5f7ff" +base08: "c94922" +base09: "c76b29" +base0A: "c08b30" +base0B: "ac9739" +base0C: "22a2c9" +base0D: "3d8fd1" +base0E: "6679cc" +base0F: "9c637a" diff --git a/themes/atelier-sulphurpool/backgroundsha256.txt b/themes/atelier-sulphurpool/backgroundsha256.txt new file mode 100644 index 0000000..606c5a1 --- /dev/null +++ b/themes/atelier-sulphurpool/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-mnh2uKy3PO0otUdTw4Bv4JDnMYj/m7Gt7P7XDJb2+c0= diff --git a/themes/atelier-sulphurpool/backgroundurl.txt b/themes/atelier-sulphurpool/backgroundurl.txt new file mode 100644 index 0000000..8711482 --- /dev/null +++ b/themes/atelier-sulphurpool/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/13/960/9/digital-art-fantasy-art-colorful-space-art-wallpaper-99330d2ae61a6c661d5ea4793fc17511.jpg diff --git a/themes/atelier-sulphurpool/polarity.txt b/themes/atelier-sulphurpool/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/atelier-sulphurpool/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/ayu-dark/README.org b/themes/ayu-dark/README.org similarity index 100% rename from modules/themes/ayu-dark/README.org rename to themes/ayu-dark/README.org diff --git a/themes/ayu-dark/ayu-dark.yaml b/themes/ayu-dark/ayu-dark.yaml new file mode 100644 index 0000000..6eeb8b2 --- /dev/null +++ b/themes/ayu-dark/ayu-dark.yaml @@ -0,0 +1,18 @@ +scheme: "Ayu Dark" +author: "Khue Nguyen " +base00: "0F1419" +base01: "131721" +base02: "272D38" +base03: "3E4B59" +base04: "BFBDB6" +base05: "E6E1CF" +base06: "E6E1CF" +base07: "F3F4F5" +base08: "F07178" +base09: "FF8F40" +base0A: "FFB454" +base0B: "B8CC52" +base0C: "95E6CB" +base0D: "59C2FF" +base0E: "D2A6FF" +base0F: "E6B673" diff --git a/themes/ayu-dark/backgroundsha256.txt b/themes/ayu-dark/backgroundsha256.txt new file mode 100644 index 0000000..8b4f2d4 --- /dev/null +++ b/themes/ayu-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-0BiSjEZnwh6KnWuNau+9lf1PVBYRnq228l4OA/nm5YI= diff --git a/themes/ayu-dark/backgroundurl.txt b/themes/ayu-dark/backgroundurl.txt new file mode 100644 index 0000000..7196a95 --- /dev/null +++ b/themes/ayu-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/zy/wallhaven-zy8wwo.jpg diff --git a/themes/ayu-dark/polarity.txt b/themes/ayu-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/ayu-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/background-test.sh b/themes/background-test.sh similarity index 56% rename from modules/themes/background-test.sh rename to themes/background-test.sh index a8cce14..885cc3f 100755 --- a/modules/themes/background-test.sh +++ b/themes/background-test.sh @@ -1,7 +1,7 @@ #!/bin/sh for i in $(ls -d */); do - if curl --output /dev/null --silent --head --fail $(cat $i/default.nix | grep "backgroundUrl" | cut -d'"' -f 2); then + if curl --output /dev/null --silent --head --fail $(cat $i/backgroundurl.txt); then echo "$i background successfully downloads"; else echo -e "\033[0;31m$i background download fails\033[0m" diff --git a/modules/themes/bespin/README.org b/themes/bespin/README.org similarity index 100% rename from modules/themes/bespin/README.org rename to themes/bespin/README.org diff --git a/themes/bespin/backgroundsha256.txt b/themes/bespin/backgroundsha256.txt new file mode 100644 index 0000000..ff23001 --- /dev/null +++ b/themes/bespin/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-uVPfyCXyyBVSfgbiQy5rhngNjuAmxk89btary3Iiwq0= diff --git a/themes/bespin/backgroundurl.txt b/themes/bespin/backgroundurl.txt new file mode 100644 index 0000000..a6451f4 --- /dev/null +++ b/themes/bespin/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/597/635/621/sword-fantasy-forest-twilight-river-hd-wallpaper-f98078cd21caad7b46d7b83fb021566d.jpg diff --git a/themes/bespin/bespin.yaml b/themes/bespin/bespin.yaml new file mode 100644 index 0000000..bbdd0fd --- /dev/null +++ b/themes/bespin/bespin.yaml @@ -0,0 +1,19 @@ +# Base16 Builder scheme by Jan T. Sott +scheme: "Bespin" +author: "Jan T. Sott" +base00: "28211c" +base01: "36312e" +base02: "5e5d5c" +base03: "666666" +base04: "797977" +base05: "8a8986" +base06: "9d9b97" +base07: "baae9e" +base08: "cf6a4c" +base09: "cf7d34" +base0A: "f9ee98" +base0B: "54be0d" +base0C: "afc4db" +base0D: "5ea6ea" +base0E: "9b859d" +base0F: "937121" \ No newline at end of file diff --git a/themes/bespin/polarity.txt b/themes/bespin/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/bespin/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/caret/README.org b/themes/caret/README.org similarity index 100% rename from modules/themes/caret/README.org rename to themes/caret/README.org diff --git a/themes/caret/backgroundsha256.txt b/themes/caret/backgroundsha256.txt new file mode 100644 index 0000000..04e0b9c --- /dev/null +++ b/themes/caret/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-sHr/BFWhRvzr0gVD73E7fSlGG8/9G2D3/M46UNf+qvU= diff --git a/themes/caret/backgroundurl.txt b/themes/caret/backgroundurl.txt new file mode 100644 index 0000000..ab4dd34 --- /dev/null +++ b/themes/caret/backgroundurl.txt @@ -0,0 +1 @@ +https://raw.githubusercontent.com/D3Ext/aesthetic-wallpapers/main/images/gruvbox_retrocity.png diff --git a/themes/caret/caret.yaml b/themes/caret/caret.yaml new file mode 100644 index 0000000..1ef4adf --- /dev/null +++ b/themes/caret/caret.yaml @@ -0,0 +1,18 @@ +scheme: "Caret Dark" +author: "projekt0n" +base00: "2a2d25" +base01: "3f4536" +base02: "586048" +base03: "6d7859" +base04: "9db573" +base05: "b0c48d" +base06: "c5d4ab" +base07: "fdfffa" +base08: "f18e91" +base09: "e2a66f" +base0A: "e0c98a" +base0B: "a1ea9e" +base0C: "a1ea93" +base0D: "67cfa3" +base0E: "80b7cb" +base0F: "baacd7" diff --git a/themes/caret/polarity.txt b/themes/caret/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/caret/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/catppuccin-frappe/README.org b/themes/catppuccin-frappe/README.org similarity index 100% rename from modules/themes/catppuccin-frappe/README.org rename to themes/catppuccin-frappe/README.org diff --git a/themes/catppuccin-frappe/backgroundsha256.txt b/themes/catppuccin-frappe/backgroundsha256.txt new file mode 100644 index 0000000..61f6058 --- /dev/null +++ b/themes/catppuccin-frappe/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-krJtLOP+9mV87l0/XCkqtk558VeHP3ZjThLEh97ESek= diff --git a/themes/catppuccin-frappe/backgroundurl.txt b/themes/catppuccin-frappe/backgroundurl.txt new file mode 100644 index 0000000..343ed5e --- /dev/null +++ b/themes/catppuccin-frappe/backgroundurl.txt @@ -0,0 +1 @@ +https://images3.alphacoders.com/126/1266078.jpg diff --git a/themes/catppuccin-frappe/catppuccin-frappe.yaml b/themes/catppuccin-frappe/catppuccin-frappe.yaml new file mode 100644 index 0000000..9bf1082 --- /dev/null +++ b/themes/catppuccin-frappe/catppuccin-frappe.yaml @@ -0,0 +1,18 @@ +scheme: "Catppuccin Frappe" +author: "https://github.com/catppuccin/catppuccin" +base00: "303446" # base +base01: "292c3c" # mantle +base02: "414559" # surface0 +base03: "51576d" # surface1 +base04: "626880" # surface2 +base05: "c6d0f5" # text +base06: "f2d5cf" # rosewater +base07: "babbf1" # lavender +base08: "e78284" # red +base09: "ef9f76" # peach +base0A: "e5c890" # yellow +base0B: "a6d189" # green +base0C: "81c8be" # teal +base0D: "8caaee" # blue +base0E: "ca9ee6" # mauve +base0F: "eebebe" # flamingo diff --git a/themes/catppuccin-frappe/polarity.txt b/themes/catppuccin-frappe/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/catppuccin-frappe/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/catppuccin-mocha/README.org b/themes/catppuccin-mocha/README.org similarity index 100% rename from modules/themes/catppuccin-mocha/README.org rename to themes/catppuccin-mocha/README.org diff --git a/themes/catppuccin-mocha/backgroundsha256.txt b/themes/catppuccin-mocha/backgroundsha256.txt new file mode 100644 index 0000000..8976491 --- /dev/null +++ b/themes/catppuccin-mocha/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-wCXKHemZYxVYnWVwh6Ng/nGlUroRotXgvcOdSfqRPeo= diff --git a/themes/catppuccin-mocha/backgroundurl.txt b/themes/catppuccin-mocha/backgroundurl.txt new file mode 100644 index 0000000..db3ed32 --- /dev/null +++ b/themes/catppuccin-mocha/backgroundurl.txt @@ -0,0 +1 @@ +https://images7.alphacoders.com/126/1266081.jpg diff --git a/themes/catppuccin-mocha/catppuccin-mocha.yaml b/themes/catppuccin-mocha/catppuccin-mocha.yaml new file mode 100644 index 0000000..c2a68ec --- /dev/null +++ b/themes/catppuccin-mocha/catppuccin-mocha.yaml @@ -0,0 +1,18 @@ +scheme: "Catppuccin Mocha" +author: "https://github.com/catppuccin/catppuccin" +base00: "1e1e2e" # base +base01: "181825" # mantle +base02: "313244" # surface0 +base03: "45475a" # surface1 +base04: "585b70" # surface2 +base05: "cdd6f4" # text +base06: "f5e0dc" # rosewater +base07: "b4befe" # lavender +base08: "f38ba8" # red +base09: "fab387" # peach +base0A: "f9e2af" # yellow +base0B: "a6e3a1" # green +base0C: "94e2d5" # teal +base0D: "89b4fa" # blue +base0E: "cba6f7" # mauve +base0F: "f2cdcd" # flamingo diff --git a/themes/catppuccin-mocha/polarity.txt b/themes/catppuccin-mocha/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/catppuccin-mocha/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/darkmoss/README.org b/themes/darkmoss/README.org similarity index 100% rename from modules/themes/darkmoss/README.org rename to themes/darkmoss/README.org diff --git a/themes/darkmoss/backgroundsha256.txt b/themes/darkmoss/backgroundsha256.txt new file mode 100644 index 0000000..5e930d3 --- /dev/null +++ b/themes/darkmoss/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-JGEY8mhpXNLCXPoWCXvGWbLkfkpeZRl+hxiLPGwVmSQ= diff --git a/themes/darkmoss/backgroundurl.txt b/themes/darkmoss/backgroundurl.txt new file mode 100644 index 0000000..133ec56 --- /dev/null +++ b/themes/darkmoss/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/0w/wallhaven-0wrp3p.jpg diff --git a/themes/darkmoss/darkmoss.yaml b/themes/darkmoss/darkmoss.yaml new file mode 100644 index 0000000..5a0daec --- /dev/null +++ b/themes/darkmoss/darkmoss.yaml @@ -0,0 +1,18 @@ +scheme: "darkmoss" +author: "Gabriel Avanzi (https://github.com/avanzzzi)" +base00: "171e1f" +base01: "252c2d" +base02: "373c3d" +base03: "555e5f" +base04: "818f80" +base05: "c7c7a5" +base06: "e3e3c8" +base07: "e1eaef" +base08: "ff4658" +base09: "e6db74" +base0A: "fdb11f" +base0B: "499180" +base0C: "66d9ef" +base0D: "498091" +base0E: "9bc0c8" +base0F: "d27b53" diff --git a/themes/darkmoss/polarity.txt b/themes/darkmoss/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/darkmoss/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/doom-one/README.org b/themes/doom-one/README.org similarity index 100% rename from modules/themes/doom-one/README.org rename to themes/doom-one/README.org diff --git a/themes/doom-one/backgroundsha256.txt b/themes/doom-one/backgroundsha256.txt new file mode 100644 index 0000000..a77cf8d --- /dev/null +++ b/themes/doom-one/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-gYGwWAgRjpZQGUMZsw5GJ11dKKrU6/bX3xcKXQZVOac= diff --git a/themes/doom-one/backgroundurl.txt b/themes/doom-one/backgroundurl.txt new file mode 100644 index 0000000..6e9451e --- /dev/null +++ b/themes/doom-one/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/834/299/692/city-lights-girl-moon-wallpaper-e178a9faa68bf35ee7e3f2afc50e43fc.jpg diff --git a/themes/doom-one/doom-one.yaml b/themes/doom-one/doom-one.yaml new file mode 100644 index 0000000..f1cd99c --- /dev/null +++ b/themes/doom-one/doom-one.yaml @@ -0,0 +1,21 @@ +# Doom One scheme +# Based on Doom One by hlissner (https://github.com/doomemacs/themes) +# With help from doom-one.vim by romgrk (https://github.com/romgrk/doom-one.vim) +scheme: "Doom One" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "1b2229" # ---- +base01: "3f444a" # --- +base02: "5B6268" # -- +base03: "202328" # - +base04: "73797e" # + +base05: "9ca0a4" # ++ +base06: "b1b1b1" # +++ +base07: "e6e6e6" # ++++ +base08: "ff6c6b" # red +base09: "ECBE7B" # yellow +base0A: "98be65" # green +base0B: "4db5bd" # teal +base0C: "51afef" # blue +base0D: "a9a1e1" # purple +base0E: "46D9FF" # pink +base0F: "5699AF" # light red diff --git a/themes/doom-one/polarity.txt b/themes/doom-one/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/doom-one/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/dracula/README.org b/themes/dracula/README.org similarity index 100% rename from modules/themes/dracula/README.org rename to themes/dracula/README.org diff --git a/themes/dracula/backgroundsha256.txt b/themes/dracula/backgroundsha256.txt new file mode 100644 index 0000000..fe65626 --- /dev/null +++ b/themes/dracula/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-rgJkrd7S/uWugPyBVTicbn6HtC8ru5HtEHP426CRSCE= diff --git a/themes/dracula/backgroundurl.txt b/themes/dracula/backgroundurl.txt new file mode 100644 index 0000000..bc3d269 --- /dev/null +++ b/themes/dracula/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/heights-are-not-scary-5k-7s.jpg diff --git a/themes/dracula/dracula.yaml b/themes/dracula/dracula.yaml new file mode 100644 index 0000000..0645feb --- /dev/null +++ b/themes/dracula/dracula.yaml @@ -0,0 +1,18 @@ +scheme: "Dracula" +author: "Mike Barkmin (http://github.com/mikebarkmin) based on Dracula Theme (https://github.com/dracula)" +base00: "282936" #background +base01: "333547" # I modified this slightly +base02: "4d4f68" +base03: "626483" +base04: "62d6e8" +base05: "e9e9f4" #foreground +base06: "f1f2f8" +base07: "f7f7fb" +base08: "ea51b2" +base09: "b45bcf" +base0A: "00f769" +base0B: "ebff87" +base0C: "a1efe4" +base0D: "62d6e8" +base0E: "b45bcf" +base0F: "00f769" diff --git a/themes/dracula/polarity.txt b/themes/dracula/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/dracula/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/ember/README.org b/themes/ember/README.org similarity index 100% rename from modules/themes/ember/README.org rename to themes/ember/README.org diff --git a/themes/ember/backgroundsha256.txt b/themes/ember/backgroundsha256.txt new file mode 100644 index 0000000..6fcd29b --- /dev/null +++ b/themes/ember/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-3HX1ADHBXR50YGmS0Y7i6n19AUX74sy8tJnOLZzMjEw= diff --git a/themes/ember/backgroundurl.txt b/themes/ember/backgroundurl.txt new file mode 100644 index 0000000..d9e99ef --- /dev/null +++ b/themes/ember/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/x8/wallhaven-x82ldl.jpg diff --git a/themes/ember/ember.yaml b/themes/ember/ember.yaml new file mode 100644 index 0000000..3cd806c --- /dev/null +++ b/themes/ember/ember.yaml @@ -0,0 +1,18 @@ +scheme: "Ember" +author: "Emmet K (https://gitlab.com/librephoenix)" +base00: "330a0a" +base01: "4d0a0a" +base02: "662a0a" +base03: "992f0a" +base04: "c05a0a" +base05: "f89852" +base06: "ffb441" +base07: "ffc8b5" +base08: "f92622" +base09: "fd751f" +base0A: "fdc51f" +base0B: "8682fe" +base0C: "f1bf84" +base0D: "b6b98f" +base0E: "a275a0" +base0F: "bb86cc" diff --git a/themes/ember/polarity.txt b/themes/ember/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/ember/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/emil/README.org b/themes/emil/README.org similarity index 100% rename from modules/themes/emil/README.org rename to themes/emil/README.org diff --git a/themes/emil/backgroundsha256.txt b/themes/emil/backgroundsha256.txt new file mode 100644 index 0000000..c23a7cd --- /dev/null +++ b/themes/emil/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-qD/yPZHqDgpMwhqPNtyO4r3dtAnR9oMx6DLizZvDHpk= diff --git a/themes/emil/backgroundurl.txt b/themes/emil/backgroundurl.txt new file mode 100644 index 0000000..c9633c3 --- /dev/null +++ b/themes/emil/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/535/845/69/digital-art-artwork-fantasy-art-planet-sun-hd-wallpaper-d866fd38b0b06cd800cc016ed8d284fa.jpg diff --git a/themes/emil/emil.yaml b/themes/emil/emil.yaml new file mode 100644 index 0000000..4819daf --- /dev/null +++ b/themes/emil/emil.yaml @@ -0,0 +1,18 @@ +scheme: "emil" +author: "limelier" +base00: "efefef" +base01: "bebed2" +base02: "9e9eaf" +base03: "7c7c98" +base04: "505063" +base05: "313145" +base06: "22223a" +base07: "1a1a2f" +base08: "f43979" +base09: "d22a8b" +base0A: "ff669b" +base0B: "0073a8" +base0C: "2155d6" +base0D: "471397" +base0E: "6916b6" +base0F: "8d17a5" diff --git a/themes/emil/polarity.txt b/themes/emil/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/emil/polarity.txt @@ -0,0 +1 @@ +light diff --git a/modules/themes/eris/README.org b/themes/eris/README.org similarity index 100% rename from modules/themes/eris/README.org rename to themes/eris/README.org diff --git a/themes/eris/backgroundsha256.txt b/themes/eris/backgroundsha256.txt new file mode 100644 index 0000000..a9b5607 --- /dev/null +++ b/themes/eris/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-w8BF0TvHX0LBZqPvgKJi0Zg6aWIKLgS/jyoRRu6M54A= diff --git a/themes/eris/backgroundurl.txt b/themes/eris/backgroundurl.txt new file mode 100644 index 0000000..f070fc3 --- /dev/null +++ b/themes/eris/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/531/951/621/digital-digital-art-artwork-illustration-minimalism-hd-wallpaper-08869d3810a06c28a09cf1be487204ea.jpg diff --git a/themes/eris/eris.yaml b/themes/eris/eris.yaml new file mode 100644 index 0000000..a94bd24 --- /dev/null +++ b/themes/eris/eris.yaml @@ -0,0 +1,18 @@ +scheme: "eris" +author: "ed (https://codeberg.org/ed)" +base00: "0a0920" +base01: "13133a" +base02: "23255a" +base03: "333773" +base04: "4a5293" +base05: "606bac" +base06: "7986c5" +base07: "9aaae5" +base08: "f768a3" +base09: "f768a3" +base0A: "faaea2" +base0B: "faaea2" +base0C: "258fc4" +base0D: "258fc4" +base0E: "f768a3" +base0F: "f768a3" diff --git a/themes/eris/polarity.txt b/themes/eris/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/eris/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/eva/README.org b/themes/eva/README.org similarity index 100% rename from modules/themes/eva/README.org rename to themes/eva/README.org diff --git a/themes/eva/backgroundsha256.txt b/themes/eva/backgroundsha256.txt new file mode 100644 index 0000000..5fed936 --- /dev/null +++ b/themes/eva/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-eWXpVrveYCG8cq3Pu/734DbO8tdofjUUIlrSNfOUTlM= diff --git a/themes/eva/backgroundurl.txt b/themes/eva/backgroundurl.txt new file mode 100644 index 0000000..c6af0cc --- /dev/null +++ b/themes/eva/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/13/wallhaven-13m9z9.jpg diff --git a/themes/eva/eva.yaml b/themes/eva/eva.yaml new file mode 100644 index 0000000..8f0e563 --- /dev/null +++ b/themes/eva/eva.yaml @@ -0,0 +1,18 @@ +scheme: "Eva" +author: "kjakapat (https://github.com/kjakapat)" +base00: "2a3b4d" # default background +base01: "3d566f" +base02: "4b6988" +base03: "55799c" # commments +base04: "7e90a3" +base05: "9fa2a6" # foreground +base06: "d6d7d9" +base07: "ffffff" +base08: "c4676c" # red +base09: "ff9966" # orange +base0A: "ffff66" # yellow +base0B: "66ff66" # green +base0C: "4b8f77" # cyan +base0D: "15f4ee" # blue +base0E: "9c6cd3" # purple +base0F: "bb64a9" # magenta diff --git a/themes/eva/polarity.txt b/themes/eva/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/eva/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/everforest/README.org b/themes/everforest/README.org similarity index 100% rename from modules/themes/everforest/README.org rename to themes/everforest/README.org diff --git a/themes/everforest/backgroundsha256.txt b/themes/everforest/backgroundsha256.txt new file mode 100644 index 0000000..01cb522 --- /dev/null +++ b/themes/everforest/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-xtnvDoIs+kKvRXo/L+ifq/q+yWNeqh1EUsaRkmDTtz4= diff --git a/themes/everforest/backgroundurl.txt b/themes/everforest/backgroundurl.txt new file mode 100644 index 0000000..17d3ae2 --- /dev/null +++ b/themes/everforest/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/83/wallhaven-839ppy.png diff --git a/themes/everforest/everforest.yaml b/themes/everforest/everforest.yaml new file mode 100644 index 0000000..4545a8a --- /dev/null +++ b/themes/everforest/everforest.yaml @@ -0,0 +1,18 @@ +scheme: "Everforest" +author: "Sainnhe Park (https://github.com/sainnhe)" +base00: "2f383e" # bg0, palette1 dark (medium) +base01: "374247" # bg1, palette1 dark (medium) +base02: "4a555b" # bg3, palette1 dark (medium) +base03: "859289" # grey1, palette2 dark +base04: "9da9a0" # grey2, palette2 dark +base05: "d3c6aa" # fg, palette2 dark +base06: "e4e1cd" # bg3, palette1 light (medium) +base07: "fdf6e3" # bg0, palette1 light (medium) +base08: "7fbbb3" # blue, palette2 dark +base09: "d699b6" # purple, palette2 dark +base0A: "dbbc7f" # yellow, palette2 dark +base0B: "83c092" # aqua, palette2 dark +base0C: "e69875" # orange, palette2 dark +base0D: "a7c080" # green, palette2 dark +base0E: "e67e80" # red, palette2 dark +base0F: "eaedc8" # bg_visual, palette1 dark (medium) diff --git a/themes/everforest/polarity.txt b/themes/everforest/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/everforest/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/fairy-floss/README.org b/themes/fairy-floss/README.org similarity index 100% rename from modules/themes/fairy-floss/README.org rename to themes/fairy-floss/README.org diff --git a/themes/fairy-floss/backgroundsha256.txt b/themes/fairy-floss/backgroundsha256.txt new file mode 100644 index 0000000..37cedfa --- /dev/null +++ b/themes/fairy-floss/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-bv9c0RWYGT3EX8tfqzanQ8ZwVNcxbpmRYv5ymk7hido= diff --git a/themes/fairy-floss/backgroundurl.txt b/themes/fairy-floss/backgroundurl.txt new file mode 100644 index 0000000..deb32fe --- /dev/null +++ b/themes/fairy-floss/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/rr/wallhaven-rrgydw.jpg diff --git a/themes/fairy-floss/fairy-floss.yaml b/themes/fairy-floss/fairy-floss.yaml new file mode 100644 index 0000000..e3c71a3 --- /dev/null +++ b/themes/fairy-floss/fairy-floss.yaml @@ -0,0 +1,20 @@ +# Fairy Floss scheme +# Based on fairyfloss by sailorhg (https://github.com/sailorhg/fairyfloss) +scheme: "Fairy Floss" +author: "sailorhg (https://github.com/sailorhg)" +base00: "343145" # ---- +base01: "464258" # --- +base02: "6A6483" # -- +base03: "422013" # - +base04: "9673D3" # + +base05: "A0A0C0" # ++ +base06: "B5B2Bd" # +++ +base07: "F8F8F0" # ++++ +base08: "CC6666" +base09: "FFEA00" +base0A: "C2FFDF" +base0B: "55b3cc" +base0C: "8295D6" +base0D: "FFB8D1" +base0E: "C5A3FF" +base0F: "96CBFE" diff --git a/themes/fairy-floss/polarity.txt b/themes/fairy-floss/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/fairy-floss/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/gigavolt/README.org b/themes/gigavolt/README.org similarity index 100% rename from modules/themes/gigavolt/README.org rename to themes/gigavolt/README.org diff --git a/themes/gigavolt/backgroundsha256.txt b/themes/gigavolt/backgroundsha256.txt new file mode 100644 index 0000000..a1e95bf --- /dev/null +++ b/themes/gigavolt/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-5H/VP5qzdJQgpzndacXt12wbFcfxaWDqAoZxFSetekg= diff --git a/themes/gigavolt/backgroundurl.txt b/themes/gigavolt/backgroundurl.txt new file mode 100644 index 0000000..5a6c8d9 --- /dev/null +++ b/themes/gigavolt/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/240/608/936/anime-original-bird-building-city-hd-wallpaper-d3ead31ac8d55c6d18129e0391683261.jpg diff --git a/themes/gigavolt/gigavolt.yaml b/themes/gigavolt/gigavolt.yaml new file mode 100644 index 0000000..164bbda --- /dev/null +++ b/themes/gigavolt/gigavolt.yaml @@ -0,0 +1,18 @@ +scheme: "Gigavolt" +author: "Aidan Swope (http://github.com/Whillikers)" +base00: "202126" +base01: "2d303d" +base02: "5a576e" +base03: "a1d2e6" +base04: "cad3ff" +base05: "e9e7e1" +base06: "eff0f9" +base07: "f2fbff" +base08: "ff661a" +base09: "19f988" +base0A: "ffdc2d" +base0B: "f2e6a9" +base0C: "fb6acb" +base0D: "40bfff" +base0E: "ae94f9" +base0F: "6187ff" diff --git a/themes/gigavolt/polarity.txt b/themes/gigavolt/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/gigavolt/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/gruvbox-dark-hard/README.org b/themes/gruvbox-dark-hard/README.org similarity index 100% rename from modules/themes/gruvbox-dark-hard/README.org rename to themes/gruvbox-dark-hard/README.org diff --git a/themes/gruvbox-dark-hard/backgroundsha256.txt b/themes/gruvbox-dark-hard/backgroundsha256.txt new file mode 100644 index 0000000..b9eeafd --- /dev/null +++ b/themes/gruvbox-dark-hard/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-dBmKkLR8yI1W7d9IRTOaErHf0KApSq0UsY5LWxAaSuA= diff --git a/themes/gruvbox-dark-hard/backgroundurl.txt b/themes/gruvbox-dark-hard/backgroundurl.txt new file mode 100644 index 0000000..4c417a3 --- /dev/null +++ b/themes/gruvbox-dark-hard/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/39/wallhaven-3911w9.jpg diff --git a/themes/gruvbox-dark-hard/gruvbox-dark-hard.yaml b/themes/gruvbox-dark-hard/gruvbox-dark-hard.yaml new file mode 100644 index 0000000..de8f94d --- /dev/null +++ b/themes/gruvbox-dark-hard/gruvbox-dark-hard.yaml @@ -0,0 +1,18 @@ +scheme: "Gruvbox dark, hard" +author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)" +base00: "1d2021" # ---- +base01: "3c3836" # --- +base02: "504945" # -- +base03: "665c54" # - +base04: "bdae93" # + +base05: "d5c4a1" # ++ +base06: "ebdbb2" # +++ +base07: "fbf1c7" # ++++ +base08: "fb4934" # red +base09: "fe8019" # orange +base0A: "fabd2f" # yellow +base0B: "b8bb26" # green +base0C: "8ec07c" # aqua/cyan +base0D: "83a598" # blue +base0E: "d3869b" # purple +base0F: "d65d0e" # brown diff --git a/themes/gruvbox-dark-hard/polarity.txt b/themes/gruvbox-dark-hard/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/gruvbox-dark-hard/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/gruvbox-dark-medium/README.org b/themes/gruvbox-dark-medium/README.org similarity index 100% rename from modules/themes/gruvbox-dark-medium/README.org rename to themes/gruvbox-dark-medium/README.org diff --git a/themes/gruvbox-dark-medium/backgroundsha256.txt b/themes/gruvbox-dark-medium/backgroundsha256.txt new file mode 100644 index 0000000..b9eeafd --- /dev/null +++ b/themes/gruvbox-dark-medium/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-dBmKkLR8yI1W7d9IRTOaErHf0KApSq0UsY5LWxAaSuA= diff --git a/themes/gruvbox-dark-medium/backgroundurl.txt b/themes/gruvbox-dark-medium/backgroundurl.txt new file mode 100644 index 0000000..4c417a3 --- /dev/null +++ b/themes/gruvbox-dark-medium/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/39/wallhaven-3911w9.jpg diff --git a/themes/gruvbox-dark-medium/gruvbox-dark-medium.yaml b/themes/gruvbox-dark-medium/gruvbox-dark-medium.yaml new file mode 100644 index 0000000..7104d67 --- /dev/null +++ b/themes/gruvbox-dark-medium/gruvbox-dark-medium.yaml @@ -0,0 +1,18 @@ +scheme: "Gruvbox dark, medium" +author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)" +base00: "282828" # ---- +base01: "3c3836" # --- +base02: "504945" # -- +base03: "665c54" # - +base04: "bdae93" # + +base05: "d5c4a1" # ++ +base06: "ebdbb2" # +++ +base07: "fbf1c7" # ++++ +base08: "fb4934" # red +base09: "fe8019" # orange +base0A: "fabd2f" # yellow +base0B: "b8bb26" # green +base0C: "8ec07c" # aqua/cyan +base0D: "83a598" # blue +base0E: "d3869b" # purple +base0F: "d65d0e" # brown diff --git a/themes/gruvbox-dark-medium/polarity.txt b/themes/gruvbox-dark-medium/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/gruvbox-dark-medium/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/gruvbox-light-hard/README.org b/themes/gruvbox-light-hard/README.org similarity index 100% rename from modules/themes/gruvbox-light-hard/README.org rename to themes/gruvbox-light-hard/README.org diff --git a/themes/gruvbox-light-hard/backgroundsha256.txt b/themes/gruvbox-light-hard/backgroundsha256.txt new file mode 100644 index 0000000..a0f4687 --- /dev/null +++ b/themes/gruvbox-light-hard/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-12U/Z4HGv31MihexuwCnTX6mcfOvkdUsMghahKzoPBE= diff --git a/themes/gruvbox-light-hard/backgroundurl.txt b/themes/gruvbox-light-hard/backgroundurl.txt new file mode 100644 index 0000000..b6f5fd5 --- /dev/null +++ b/themes/gruvbox-light-hard/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/dp/wallhaven-dppjk3.jpg diff --git a/themes/gruvbox-light-hard/gruvbox-light-hard.yaml b/themes/gruvbox-light-hard/gruvbox-light-hard.yaml new file mode 100644 index 0000000..2b3b8e3 --- /dev/null +++ b/themes/gruvbox-light-hard/gruvbox-light-hard.yaml @@ -0,0 +1,18 @@ +scheme: "Gruvbox light, hard" +author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)" +base00: "f9f5d7" # ---- +base01: "ebdbb2" # --- +base02: "d5c4a1" # -- +base03: "bdae93" # - +base04: "665c54" # + +base05: "504945" # ++ +base06: "3c3836" # +++ +base07: "282828" # ++++ +base08: "9d0006" # red +base09: "af3a03" # orange +base0A: "b57614" # yellow +base0B: "79740e" # green +base0C: "427b58" # aqua/cyan +base0D: "076678" # blue +base0E: "8f3f71" # purple +base0F: "d65d0e" # brown diff --git a/themes/gruvbox-light-hard/polarity.txt b/themes/gruvbox-light-hard/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/gruvbox-light-hard/polarity.txt @@ -0,0 +1 @@ +light diff --git a/modules/themes/gruvbox-light-medium/README.org b/themes/gruvbox-light-medium/README.org similarity index 100% rename from modules/themes/gruvbox-light-medium/README.org rename to themes/gruvbox-light-medium/README.org diff --git a/themes/gruvbox-light-medium/backgroundsha256.txt b/themes/gruvbox-light-medium/backgroundsha256.txt new file mode 100644 index 0000000..a0f4687 --- /dev/null +++ b/themes/gruvbox-light-medium/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-12U/Z4HGv31MihexuwCnTX6mcfOvkdUsMghahKzoPBE= diff --git a/themes/gruvbox-light-medium/backgroundurl.txt b/themes/gruvbox-light-medium/backgroundurl.txt new file mode 100644 index 0000000..b6f5fd5 --- /dev/null +++ b/themes/gruvbox-light-medium/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/dp/wallhaven-dppjk3.jpg diff --git a/themes/gruvbox-light-medium/gruvbox-light-medium.yaml b/themes/gruvbox-light-medium/gruvbox-light-medium.yaml new file mode 100644 index 0000000..9fe060d --- /dev/null +++ b/themes/gruvbox-light-medium/gruvbox-light-medium.yaml @@ -0,0 +1,18 @@ +scheme: "Gruvbox light, medium" +author: "Dawid Kurek (dawikur@gmail.com), morhetz (https://github.com/morhetz/gruvbox)" +base00: "fbf1c7" # ---- +base01: "ebdbb2" # --- +base02: "d5c4a1" # -- +base03: "bdae93" # - +base04: "665c54" # + +base05: "504945" # ++ +base06: "3c3836" # +++ +base07: "282828" # ++++ +base08: "9d0006" # red +base09: "af3a03" # orange +base0A: "b57614" # yellow +base0B: "79740e" # green +base0C: "427b58" # aqua/cyan +base0D: "076678" # blue +base0E: "8f3f71" # purple +base0F: "d65d0e" # brown diff --git a/themes/gruvbox-light-medium/polarity.txt b/themes/gruvbox-light-medium/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/gruvbox-light-medium/polarity.txt @@ -0,0 +1 @@ +light diff --git a/modules/themes/helios/README.org b/themes/helios/README.org similarity index 100% rename from modules/themes/helios/README.org rename to themes/helios/README.org diff --git a/themes/helios/backgroundsha256.txt b/themes/helios/backgroundsha256.txt new file mode 100644 index 0000000..34c1ecc --- /dev/null +++ b/themes/helios/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-KDp90rltTtMEiQtsA8VPq2Msi/D51mPPEdo1tiRIo7E= diff --git a/themes/helios/backgroundurl.txt b/themes/helios/backgroundurl.txt new file mode 100644 index 0000000..9f3496e --- /dev/null +++ b/themes/helios/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/one-last-time-8h.jpg diff --git a/themes/helios/helios.yaml b/themes/helios/helios.yaml new file mode 100644 index 0000000..d1c1445 --- /dev/null +++ b/themes/helios/helios.yaml @@ -0,0 +1,19 @@ +scheme: "Helios" +author: "Alex Meyer (https://github.com/reyemxela)" +base00: "1d2021" # ---- +base01: "383c3e" # --- +base02: "53585b" # -- +base03: "6f7579" # - +base04: "cdcdcd" # + +base05: "d5d5d5" # ++ +base06: "dddddd" # +++ +base07: "e5e5e5" # ++++ +base08: "d72638" # red +base09: "eb8413" # orange +base0A: "f19d1a" # yellow +base0B: "88b92d" # green +base0C: "1ba595" # aqua/cyan +base0D: "1e8bac" # blue +base0E: "be4264" # purple +base0F: "c85e0d" # brown + diff --git a/themes/helios/polarity.txt b/themes/helios/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/helios/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/henna/README.org b/themes/henna/README.org similarity index 100% rename from modules/themes/henna/README.org rename to themes/henna/README.org diff --git a/themes/henna/backgroundsha256.txt b/themes/henna/backgroundsha256.txt new file mode 100644 index 0000000..ab3ec6a --- /dev/null +++ b/themes/henna/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-0skcwkVzZ3VdLImlMUT9sab3631vTttKk8LupTqM71Q= diff --git a/themes/henna/backgroundurl.txt b/themes/henna/backgroundurl.txt new file mode 100644 index 0000000..643e5b2 --- /dev/null +++ b/themes/henna/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/71/196/981/digital-art-minimalism-nature-hills-wallpaper-88f64d4860b08ca8d02c41def8f2349a.jpg diff --git a/themes/henna/henna.yaml b/themes/henna/henna.yaml new file mode 100644 index 0000000..a05d28b --- /dev/null +++ b/themes/henna/henna.yaml @@ -0,0 +1,20 @@ +# Henna scheme +# Based on vscode-henna by httpsterio (https://github.com/httpsterio/vscode-henna) +scheme: "Henna" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "10151a" # ---- +base01: "1B1F23" # --- +base02: "2c313a" # -- +base03: "3B4048" # - +base04: "495162" # + +base05: "606F73" # ++ +base06: "6B717D" # +++ +base07: "f8f8f0" # ++++ +base08: "e74c3c" +base09: "fd7c56" +base0A: "9cd230" +base0B: "53df83" +base0C: "1abc9c" +base0D: "56b5c2" +base0E: "FFB8D1" +base0F: "ECBE7B" diff --git a/themes/henna/polarity.txt b/themes/henna/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/henna/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/horizon-dark/README.org b/themes/horizon-dark/README.org similarity index 100% rename from modules/themes/horizon-dark/README.org rename to themes/horizon-dark/README.org diff --git a/themes/horizon-dark/backgroundsha256.txt b/themes/horizon-dark/backgroundsha256.txt new file mode 100644 index 0000000..0377205 --- /dev/null +++ b/themes/horizon-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-a09gjqeVRB6JlDvis+QRDquNuefDAj/NHw9FHAj8yys= diff --git a/themes/horizon-dark/backgroundurl.txt b/themes/horizon-dark/backgroundurl.txt new file mode 100644 index 0000000..327b24e --- /dev/null +++ b/themes/horizon-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/966/951/802/digital-digital-art-artwork-illustration-fantasy-art-hd-wallpaper-4856fd282030fc78505c71cea802646a.jpg diff --git a/themes/horizon-dark/horizon-dark.yaml b/themes/horizon-dark/horizon-dark.yaml new file mode 100644 index 0000000..ee7d8df --- /dev/null +++ b/themes/horizon-dark/horizon-dark.yaml @@ -0,0 +1,18 @@ +scheme: "Horizon Dark" +author: "Michaël Ball (http://github.com/michael-ball/)" +base00: "1C1E26" +base01: "232530" +base02: "2E303E" +base03: "6F6F70" +base04: "9DA0A2" +base05: "CBCED0" +base06: "DCDFE4" +base07: "E3E6EE" +base08: "E93C58" +base09: "E58D7D" +base0A: "EFB993" +base0B: "EFAF8E" +base0C: "24A8B4" +base0D: "DF5273" +base0E: "B072D1" +base0F: "E4A382" diff --git a/themes/horizon-dark/polarity.txt b/themes/horizon-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/horizon-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/io/README.org b/themes/io/README.org similarity index 100% rename from modules/themes/io/README.org rename to themes/io/README.org diff --git a/themes/io/backgroundsha256.txt b/themes/io/backgroundsha256.txt new file mode 100644 index 0000000..01a4ac5 --- /dev/null +++ b/themes/io/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-GjM/Bu0zispdtPCFPzAk+zGlKYYg5XwTTxZ0TXOW9Fg= diff --git a/themes/io/backgroundurl.txt b/themes/io/backgroundurl.txt new file mode 100644 index 0000000..eacb57a --- /dev/null +++ b/themes/io/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/aurora-s-embrace-a-borealis-beauty-in-anime-ub.jpg diff --git a/themes/io/io.yaml b/themes/io/io.yaml new file mode 100644 index 0000000..5af69a4 --- /dev/null +++ b/themes/io/io.yaml @@ -0,0 +1,18 @@ +scheme: "Io" +author: "LibrePhoenix (forked from Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77))" +base00: "1a181a" +base01: "262326" +base02: "302c30" +base03: "373238" +base04: "463f47" +base05: "bfaab7" +base06: "dbd7da" +base07: "faf7f9" +base08: "de5b44" +base09: "e39755" +base0A: "a84a73" +base0B: "c965bf" +base0C: "9c5fce" +base0D: "0e85b9" +base0E: "6ac38f" +base0F: "a3ab5a" diff --git a/themes/io/polarity.txt b/themes/io/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/io/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/isotope/README.org b/themes/isotope/README.org similarity index 100% rename from modules/themes/isotope/README.org rename to themes/isotope/README.org diff --git a/themes/isotope/backgroundsha256.txt b/themes/isotope/backgroundsha256.txt new file mode 100644 index 0000000..5450dea --- /dev/null +++ b/themes/isotope/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-zYzUBaCvYVgmfw1/irgleRpTIrm4dsP8F3RmR8m/DBk= diff --git a/themes/isotope/backgroundurl.txt b/themes/isotope/backgroundurl.txt new file mode 100644 index 0000000..455a891 --- /dev/null +++ b/themes/isotope/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/108/140/869/digital-digital-art-artwork-fantasy-art-drawing-hd-wallpaper-d8b62d28c0f06c48d03c114ec8f2b4aa.jpg diff --git a/themes/isotope/isotope.yaml b/themes/isotope/isotope.yaml new file mode 100644 index 0000000..7393a52 --- /dev/null +++ b/themes/isotope/isotope.yaml @@ -0,0 +1,19 @@ +# Base16 Builder scheme by Jan T. Sott +scheme: "Isotope" +author: "Jan T. Sott" +base00: "000000" +base01: "404040" +base02: "606060" +base03: "808080" +base04: "c0c0c0" +base05: "d0d0d0" +base06: "e0e0e0" +base07: "ffffff" +base08: "ff0000" +base09: "ff9900" +base0A: "ff0099" +base0B: "33ff00" +base0C: "00ffff" +base0D: "0066ff" +base0E: "cc00ff" +base0F: "3300ff" \ No newline at end of file diff --git a/themes/isotope/polarity.txt b/themes/isotope/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/isotope/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/manegarm/README.org b/themes/manegarm/README.org similarity index 100% rename from modules/themes/manegarm/README.org rename to themes/manegarm/README.org diff --git a/themes/manegarm/backgroundsha256.txt b/themes/manegarm/backgroundsha256.txt new file mode 100644 index 0000000..4150676 --- /dev/null +++ b/themes/manegarm/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-JdL2TfIJCQdzmoex/uqJzJJ1V8nVmTWRBC296O8ynnw= diff --git a/themes/manegarm/backgroundurl.txt b/themes/manegarm/backgroundurl.txt new file mode 100644 index 0000000..833ccfe --- /dev/null +++ b/themes/manegarm/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/86/440/1017/digital-digital-art-artwork-illustration-drawing-hd-wallpaper-60cb37b6dd08e0d36729f856e7bcb083.jpg diff --git a/themes/manegarm/manegarm.yaml b/themes/manegarm/manegarm.yaml new file mode 100644 index 0000000..41aaecc --- /dev/null +++ b/themes/manegarm/manegarm.yaml @@ -0,0 +1,21 @@ +# Manegarm scheme +# Based on manegarm in doom-themes (https://github.com/doomemacs/themes) +# by kenranunderscore (https://github.com/kenranunderscore) +scheme: "Manegarm" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "1c1408" # ---- +base01: "241c0a" # --- +base02: "351a0f" # -- +base03: "422013" # - +base04: "5b8512" # + +base05: "73797e" # ++ +base06: "9ca0a4" # +++ +base07: "dfdfdf" # ++++ +base08: "ff4e00" +base09: "ff7000" +base0A: "7cb518" +base0B: "ffbf00" +base0C: "0075c4" +base0D: "d72638" +base0E: "76597b" +base0F: "dbc077" diff --git a/themes/manegarm/polarity.txt b/themes/manegarm/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/manegarm/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/material-vivid/README.org b/themes/material-vivid/README.org similarity index 100% rename from modules/themes/material-vivid/README.org rename to themes/material-vivid/README.org diff --git a/themes/material-vivid/backgroundsha256.txt b/themes/material-vivid/backgroundsha256.txt new file mode 100644 index 0000000..bfff7a6 --- /dev/null +++ b/themes/material-vivid/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-LBgsEyiFJUv1FT26dq2ACIFtQZXTIeKtEk92cLoNv4g= diff --git a/themes/material-vivid/backgroundurl.txt b/themes/material-vivid/backgroundurl.txt new file mode 100644 index 0000000..1d2ce7f --- /dev/null +++ b/themes/material-vivid/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/e7/wallhaven-e7z71l.jpg diff --git a/themes/material-vivid/material-vivid.yaml b/themes/material-vivid/material-vivid.yaml new file mode 100644 index 0000000..ed68566 --- /dev/null +++ b/themes/material-vivid/material-vivid.yaml @@ -0,0 +1,18 @@ +scheme: "Material Vivid" +author: "joshyrobot" +base00: "202124" +base01: "27292c" +base02: "323639" +base03: "44464d" +base04: "676c71" +base05: "80868b" +base06: "9e9e9e" +base07: "ffffff" +base08: "f44336" +base09: "ff9800" +base0A: "ffeb3b" +base0B: "00e676" +base0C: "00bcd4" +base0D: "2196f3" +base0E: "673ab7" +base0F: "8d6e63" diff --git a/themes/material-vivid/polarity.txt b/themes/material-vivid/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/material-vivid/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/miramare/README.org b/themes/miramare/README.org similarity index 100% rename from modules/themes/miramare/README.org rename to themes/miramare/README.org diff --git a/themes/miramare/backgroundsha256.txt b/themes/miramare/backgroundsha256.txt new file mode 100644 index 0000000..5faeedf --- /dev/null +++ b/themes/miramare/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-3Yo3qdzMRQGh/C3Qo5gpS2V1D4u1MptmqsXb+QO9EsE= diff --git a/themes/miramare/backgroundurl.txt b/themes/miramare/backgroundurl.txt new file mode 100644 index 0000000..b54409e --- /dev/null +++ b/themes/miramare/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/v9/wallhaven-v9qy9l.jpg diff --git a/themes/miramare/miramare.yaml b/themes/miramare/miramare.yaml new file mode 100644 index 0000000..880085d --- /dev/null +++ b/themes/miramare/miramare.yaml @@ -0,0 +1,20 @@ +# Miramare scheme +# Based on miramare by franbach (https://github.com/franbach/miramare) +scheme: "Miramare" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "0d1001" # ---- +base01: "241c0a" # --- +base02: "3c3836" # -- +base03: "5b5b5b" # - +base04: "7c6f64" # + +base05: "928374" # ++ +base06: "d8caac" # +++ +base07: "e6d6ac" # ++++ +base08: "e68183" +base09: "e39b7b" +base0A: "d9bb80" +base0B: "87af87" +base0C: "0075c4" +base0D: "89beba" +base0E: "87af87" +base0F: "87c095" diff --git a/themes/miramare/polarity.txt b/themes/miramare/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/miramare/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/monokai/README.org b/themes/monokai/README.org similarity index 100% rename from modules/themes/monokai/README.org rename to themes/monokai/README.org diff --git a/themes/monokai/backgroundsha256.txt b/themes/monokai/backgroundsha256.txt new file mode 100644 index 0000000..6411fb2 --- /dev/null +++ b/themes/monokai/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-zQXOIdWGxvwh6KFeiWwfRFNqIHtWzCsVHK8ondcYi2w= diff --git a/themes/monokai/backgroundurl.txt b/themes/monokai/backgroundurl.txt new file mode 100644 index 0000000..e746a49 --- /dev/null +++ b/themes/monokai/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/xl/wallhaven-xl225z.png diff --git a/themes/monokai/monokai.yaml b/themes/monokai/monokai.yaml new file mode 100644 index 0000000..a97181c --- /dev/null +++ b/themes/monokai/monokai.yaml @@ -0,0 +1,18 @@ +scheme: "Monokai" +author: "Wimer Hazenberg (http://www.monokai.nl)" +base00: "272822" +base01: "383830" +base02: "49483e" +base03: "75715e" +base04: "a59f85" +base05: "f8f8f2" +base06: "f5f4f1" +base07: "f9f8f5" +base08: "f92672" +base09: "fd971f" +base0A: "f4bf75" +base0B: "a6e22e" +base0C: "a1efe4" +base0D: "66d9ef" +base0E: "ae81ff" +base0F: "cc6633" \ No newline at end of file diff --git a/themes/monokai/polarity.txt b/themes/monokai/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/monokai/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/nord/README.org b/themes/nord/README.org similarity index 100% rename from modules/themes/nord/README.org rename to themes/nord/README.org diff --git a/themes/nord/backgroundsha256.txt b/themes/nord/backgroundsha256.txt new file mode 100644 index 0000000..d1751c7 --- /dev/null +++ b/themes/nord/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-+zlCkbmA6GwJStrL1+BP08GezbhDB07TTYBgu86xWOw= diff --git a/themes/nord/backgroundurl.txt b/themes/nord/backgroundurl.txt new file mode 100644 index 0000000..d960960 --- /dev/null +++ b/themes/nord/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/976/74/465/multiple-display-mountains-snow-nature-wallpaper-c1b4ba2a902ec5b27032d3c4aefe604d.jpg diff --git a/themes/nord/nord.yaml b/themes/nord/nord.yaml new file mode 100644 index 0000000..1371883 --- /dev/null +++ b/themes/nord/nord.yaml @@ -0,0 +1,18 @@ +scheme: "Nord" +author: "arcticicestudio" +base00: "2E3440" +base01: "3B4252" +base02: "434C5E" +base03: "4C566A" +base04: "D8DEE9" +base05: "E5E9F0" +base06: "ECEFF4" +base07: "8FBCBB" +base08: "BF616A" +base09: "D08770" +base0A: "EBCB8B" +base0B: "A3BE8C" +base0C: "88C0D0" +base0D: "81A1C1" +base0E: "B48EAD" +base0F: "5E81AC" diff --git a/themes/nord/polarity.txt b/themes/nord/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/nord/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/oceanic-next/README.org b/themes/oceanic-next/README.org similarity index 100% rename from modules/themes/oceanic-next/README.org rename to themes/oceanic-next/README.org diff --git a/themes/oceanic-next/backgroundsha256.txt b/themes/oceanic-next/backgroundsha256.txt new file mode 100644 index 0000000..4267eb3 --- /dev/null +++ b/themes/oceanic-next/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-F67ItsyBFzcU3KNvqwL8DEeXHZlLpmg8xRT8Fr0dolI= diff --git a/themes/oceanic-next/backgroundurl.txt b/themes/oceanic-next/backgroundurl.txt new file mode 100644 index 0000000..2834911 --- /dev/null +++ b/themes/oceanic-next/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/1024/162/573/nature-beach-ocean-sea-wallpaper-c8660d98d0b02c48b02cb11e3882646a.jpg diff --git a/themes/oceanic-next/oceanic-next.yaml b/themes/oceanic-next/oceanic-next.yaml new file mode 100644 index 0000000..2c3230f --- /dev/null +++ b/themes/oceanic-next/oceanic-next.yaml @@ -0,0 +1,18 @@ +scheme: "OceanicNext" +author: "https://github.com/voronianski/oceanic-next-color-scheme" +base00: "1B2B34" +base01: "343D46" +base02: "4F5B66" +base03: "65737E" +base04: "A7ADBA" +base05: "C0C5CE" +base06: "CDD3DE" +base07: "D8DEE9" +base08: "EC5f67" +base09: "F99157" +base0A: "FAC863" +base0B: "99C794" +base0C: "5FB3B3" +base0D: "6699CC" +base0E: "C594C5" +base0F: "AB7967" diff --git a/themes/oceanic-next/polarity.txt b/themes/oceanic-next/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/oceanic-next/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/old-hope/README.org b/themes/old-hope/README.org similarity index 100% rename from modules/themes/old-hope/README.org rename to themes/old-hope/README.org diff --git a/themes/old-hope/backgroundsha256.txt b/themes/old-hope/backgroundsha256.txt new file mode 100644 index 0000000..0b8bd46 --- /dev/null +++ b/themes/old-hope/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-3Z8kpA+JBs3nQhe+zUZF0zoXFGbJCfePp3/RzpcuN6Q= diff --git a/themes/old-hope/backgroundurl.txt b/themes/old-hope/backgroundurl.txt new file mode 100644 index 0000000..67ba66e --- /dev/null +++ b/themes/old-hope/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/218/1018/501/star-wars-star-wars-the-rise-of-skywalker-jedi-kylo-ren-lightsaber-hd-wallpaper-534b63fd3d29abf5efe66267283ba8c8.jpg diff --git a/themes/old-hope/old-hope.yaml b/themes/old-hope/old-hope.yaml new file mode 100644 index 0000000..0291342 --- /dev/null +++ b/themes/old-hope/old-hope.yaml @@ -0,0 +1,20 @@ +# Old Hope scheme +# Based on An Old Hope Theme by mohkale (https://github.com/mohkale/an-old-hope-theme) +scheme: "Old Hope" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "1c1d20" # ---- +base01: "202328" # --- +base02: "23272e" # -- +base03: "3f444a" # - +base04: "5B6268" # + +base05: "686b78" # ++ +base06: "9ca0a4" # +++ +base07: "cbccd1" # ++++ +base08: "ea3d54" +base09: "ee7b29" +base0A: "fedd38" +base0B: "78bd65" +base0C: "78bd65" +base0D: "4fb3d8" +base0E: "b978ab" +base0F: "4fb3d8" diff --git a/themes/old-hope/polarity.txt b/themes/old-hope/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/old-hope/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/outrun-dark/README.org b/themes/outrun-dark/README.org similarity index 100% rename from modules/themes/outrun-dark/README.org rename to themes/outrun-dark/README.org diff --git a/themes/outrun-dark/backgroundsha256.txt b/themes/outrun-dark/backgroundsha256.txt new file mode 100644 index 0000000..40174d0 --- /dev/null +++ b/themes/outrun-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-wySC8BjvJKZAnbGOeyyp1xwt/EMAwsTON0os6n1/fp8= diff --git a/themes/outrun-dark/backgroundurl.txt b/themes/outrun-dark/backgroundurl.txt new file mode 100644 index 0000000..b682eee --- /dev/null +++ b/themes/outrun-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/586/965/67/night-sky-illustration-futuristic-art-night-wallpaper-88366d08c0d00c08207cf12ef892b49a.jpg diff --git a/themes/outrun-dark/outrun-dark.yaml b/themes/outrun-dark/outrun-dark.yaml new file mode 100644 index 0000000..b6e0c7e --- /dev/null +++ b/themes/outrun-dark/outrun-dark.yaml @@ -0,0 +1,18 @@ +scheme: "Outrun Dark" +author: "Hugo Delahousse (http://github.com/hugodelahousse/)" +base00: "00002A" +base01: "20204A" +base02: "30305A" +base03: "50507A" +base04: "B0B0DA" +base05: "D0D0FA" +base06: "E0E0FF" +base07: "F5F5FF" +base08: "FF4242" +base09: "FC8D28" +base0A: "F3E877" +base0B: "59F176" +base0C: "0EF0F0" +base0D: "66B0FF" +base0E: "F10596" +base0F: "F003EF" diff --git a/themes/outrun-dark/polarity.txt b/themes/outrun-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/outrun-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/modules/themes/selenized-dark/README.org b/themes/selenized-dark/README.org similarity index 100% rename from modules/themes/selenized-dark/README.org rename to themes/selenized-dark/README.org diff --git a/themes/selenized-dark/backgroundsha256.txt b/themes/selenized-dark/backgroundsha256.txt new file mode 100644 index 0000000..c041396 --- /dev/null +++ b/themes/selenized-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-ugnjfKCIpyH0enWB5l52j+1pWG1FwX8X5BeRh68NRuE= diff --git a/themes/selenized-dark/backgroundurl.txt b/themes/selenized-dark/backgroundurl.txt new file mode 100644 index 0000000..1ca4a63 --- /dev/null +++ b/themes/selenized-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/474/140/1011/stars-sea-clouds-night-wallpaper-7bede9caa0ccfc6d8a1eb0759c9972b0.jpg diff --git a/themes/selenized-dark/polarity.txt b/themes/selenized-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/selenized-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/selenized-dark/selenized-dark.yaml b/themes/selenized-dark/selenized-dark.yaml new file mode 100644 index 0000000..173e853 --- /dev/null +++ b/themes/selenized-dark/selenized-dark.yaml @@ -0,0 +1,18 @@ +scheme: "selenized-dark" +author: "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali" +base00: "103c48" +base01: "184956" +base02: "2d5b69" +base03: "72898f" +base04: "72898f" +base05: "adbcbc" +base06: "cad8d9" +base07: "cad8d9" +base08: "fa5750" +base09: "ed8649" +base0A: "dbb32d" +base0B: "75b938" +base0C: "41c7b9" +base0D: "4695f7" +base0E: "af88eb" +base0F: "f275be" diff --git a/modules/themes/selenized-light/README.org b/themes/selenized-light/README.org similarity index 100% rename from modules/themes/selenized-light/README.org rename to themes/selenized-light/README.org diff --git a/themes/selenized-light/backgroundsha256.txt b/themes/selenized-light/backgroundsha256.txt new file mode 100644 index 0000000..f4d87e6 --- /dev/null +++ b/themes/selenized-light/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-QFWU0b/dKHA1duzpDFZ4PfTt1ku4ZnekUnUZKX1drxQ= diff --git a/themes/selenized-light/backgroundurl.txt b/themes/selenized-light/backgroundurl.txt new file mode 100644 index 0000000..0f40ae4 --- /dev/null +++ b/themes/selenized-light/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/790/734/537/landscape-digital-art-coast-sky-wallpaper-2fbce811ee788644e4f742a5f338be69.jpg diff --git a/themes/selenized-light/polarity.txt b/themes/selenized-light/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/selenized-light/polarity.txt @@ -0,0 +1 @@ +light diff --git a/themes/selenized-light/selenized-light.yaml b/themes/selenized-light/selenized-light.yaml new file mode 100644 index 0000000..0836da6 --- /dev/null +++ b/themes/selenized-light/selenized-light.yaml @@ -0,0 +1,18 @@ +scheme: "selenized-light" +author: "Jan Warchol (https://github.com/jan-warchol/selenized) / adapted to base16 by ali" +base00: "fbf3db" +base01: "ece3cc" +base02: "d5cdb6" +base03: "909995" +base04: "909995" +base05: "53676d" +base06: "3a4d53" +base07: "3a4d53" +base08: "cc1729" +base09: "bc5819" +base0A: "a78300" +base0B: "428b00" +base0C: "00978a" +base0D: "006dce" +base0E: "825dc0" +base0F: "c44392" diff --git a/modules/themes/solarized-dark/README.org b/themes/solarized-dark/README.org similarity index 100% rename from modules/themes/solarized-dark/README.org rename to themes/solarized-dark/README.org diff --git a/themes/solarized-dark/backgroundsha256.txt b/themes/solarized-dark/backgroundsha256.txt new file mode 100644 index 0000000..c041396 --- /dev/null +++ b/themes/solarized-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-ugnjfKCIpyH0enWB5l52j+1pWG1FwX8X5BeRh68NRuE= diff --git a/themes/solarized-dark/backgroundurl.txt b/themes/solarized-dark/backgroundurl.txt new file mode 100644 index 0000000..1ca4a63 --- /dev/null +++ b/themes/solarized-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/474/140/1011/stars-sea-clouds-night-wallpaper-7bede9caa0ccfc6d8a1eb0759c9972b0.jpg diff --git a/themes/solarized-dark/polarity.txt b/themes/solarized-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/solarized-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/solarized-dark/solarized-dark.yaml b/themes/solarized-dark/solarized-dark.yaml new file mode 100644 index 0000000..61f48a5 --- /dev/null +++ b/themes/solarized-dark/solarized-dark.yaml @@ -0,0 +1,18 @@ +scheme: "Solarized Dark" +author: "Ethan Schoonover (modified by aramisgithub)" +base00: "002b36" +base01: "073642" +base02: "586e75" +base03: "657b83" +base04: "839496" +base05: "93a1a1" +base06: "eee8d5" +base07: "fdf6e3" +base08: "dc322f" +base09: "cb4b16" +base0A: "b58900" +base0B: "859900" +base0C: "2aa198" +base0D: "268bd2" +base0E: "6c71c4" +base0F: "d33682" diff --git a/modules/themes/solarized-light/README.org b/themes/solarized-light/README.org similarity index 100% rename from modules/themes/solarized-light/README.org rename to themes/solarized-light/README.org diff --git a/themes/solarized-light/backgroundsha256.txt b/themes/solarized-light/backgroundsha256.txt new file mode 100644 index 0000000..f4d87e6 --- /dev/null +++ b/themes/solarized-light/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-QFWU0b/dKHA1duzpDFZ4PfTt1ku4ZnekUnUZKX1drxQ= diff --git a/themes/solarized-light/backgroundurl.txt b/themes/solarized-light/backgroundurl.txt new file mode 100644 index 0000000..0f40ae4 --- /dev/null +++ b/themes/solarized-light/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/790/734/537/landscape-digital-art-coast-sky-wallpaper-2fbce811ee788644e4f742a5f338be69.jpg diff --git a/themes/solarized-light/polarity.txt b/themes/solarized-light/polarity.txt new file mode 100644 index 0000000..162faa6 --- /dev/null +++ b/themes/solarized-light/polarity.txt @@ -0,0 +1 @@ +light diff --git a/themes/solarized-light/solarized-light.yaml b/themes/solarized-light/solarized-light.yaml new file mode 100644 index 0000000..31da6d3 --- /dev/null +++ b/themes/solarized-light/solarized-light.yaml @@ -0,0 +1,18 @@ +scheme: "Solarized Light" +author: "Ethan Schoonover (modified by aramisgithub)" +base00: "fdf6e3" +base01: "eee8d5" +base02: "93a1a1" +base03: "839496" +base04: "657b83" +base05: "586e75" +base06: "073642" +base07: "002b36" +base08: "dc322f" +base09: "cb4b16" +base0A: "b58900" +base0B: "859900" +base0C: "2aa198" +base0D: "268bd2" +base0E: "6c71c4" +base0F: "d33682" diff --git a/modules/themes/spaceduck/README.org b/themes/spaceduck/README.org similarity index 100% rename from modules/themes/spaceduck/README.org rename to themes/spaceduck/README.org diff --git a/themes/spaceduck/backgroundsha256.txt b/themes/spaceduck/backgroundsha256.txt new file mode 100644 index 0000000..db1d141 --- /dev/null +++ b/themes/spaceduck/backgroundsha256.txt @@ -0,0 +1,2 @@ +sha256-+xl4H3UiVmMRNvMhIlaLdVTYYqnSyCTSX2UOTGsDQ8c= + diff --git a/themes/spaceduck/backgroundurl.txt b/themes/spaceduck/backgroundurl.txt new file mode 100644 index 0000000..ca3b097 --- /dev/null +++ b/themes/spaceduck/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/6d/wallhaven-6d5k6x.jpg diff --git a/themes/spaceduck/polarity.txt b/themes/spaceduck/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/spaceduck/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/spaceduck/spaceduck.yaml b/themes/spaceduck/spaceduck.yaml new file mode 100644 index 0000000..79cf12d --- /dev/null +++ b/themes/spaceduck/spaceduck.yaml @@ -0,0 +1,18 @@ +scheme: "Spaceduck" +author: "Guillermo Rodriguez (https://github.com/pineapplegiant), packaged by Gabriel Fontes (https://github.com/Misterio77)" +base00: "16172d" +base01: "1b1c36" +base02: "30365F" +base03: "686f9a" +base04: "818596" +base05: "ecf0c1" +base06: "c1c3cc" +base07: "ffffff" +base08: "e33400" +base09: "e39400" +base0A: "f2ce00" +base0B: "5ccc96" +base0C: "00a3cc" +base0D: "7a5ccc" +base0E: "b3a1e6" +base0F: "ce6f8f" diff --git a/modules/themes/stella/README.org b/themes/stella/README.org similarity index 100% rename from modules/themes/stella/README.org rename to themes/stella/README.org diff --git a/themes/stella/backgroundsha256.txt b/themes/stella/backgroundsha256.txt new file mode 100644 index 0000000..e02eff5 --- /dev/null +++ b/themes/stella/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-ZdzYsYawW2pINFG8bHLBd62iyD4p/9Iw09H3pB0SUyw= diff --git a/themes/stella/backgroundurl.txt b/themes/stella/backgroundurl.txt new file mode 100644 index 0000000..8524203 --- /dev/null +++ b/themes/stella/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/662/963/756/artwork-night-stars-sailing-ship-wallpaper-f8e6cdf800802ca8b0acb18ea86274ca.jpg diff --git a/themes/stella/polarity.txt b/themes/stella/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/stella/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/stella/stella.yaml b/themes/stella/stella.yaml new file mode 100644 index 0000000..8e42d31 --- /dev/null +++ b/themes/stella/stella.yaml @@ -0,0 +1,18 @@ +scheme: "Stella" +author: "Shrimpram" +base00: "2B213C" +base01: "362B48" +base02: "4D4160" +base03: "655978" +base04: "7F7192" +base05: "998BAD" +base06: "B4A5C8" +base07: "EBDCFF" +base08: "C79987" +base09: "8865C6" +base0A: "C7C691" +base0B: "ACC79B" +base0C: "9BC7BF" +base0D: "A5AAD4" +base0E: "C594FF" +base0F: "C7AB87" diff --git a/modules/themes/summerfruit-dark/README.org b/themes/summerfruit-dark/README.org similarity index 100% rename from modules/themes/summerfruit-dark/README.org rename to themes/summerfruit-dark/README.org diff --git a/themes/summerfruit-dark/backgroundsha256.txt b/themes/summerfruit-dark/backgroundsha256.txt new file mode 100644 index 0000000..effac21 --- /dev/null +++ b/themes/summerfruit-dark/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-/3k+6paAH2Z36f5g4eeK62+dXF+8szDj4EO8vXYRg8o= diff --git a/themes/summerfruit-dark/backgroundurl.txt b/themes/summerfruit-dark/backgroundurl.txt new file mode 100644 index 0000000..cb45ad3 --- /dev/null +++ b/themes/summerfruit-dark/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/rr/wallhaven-rrow61.png diff --git a/themes/summerfruit-dark/polarity.txt b/themes/summerfruit-dark/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/summerfruit-dark/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/summerfruit-dark/summerfruit-dark.yaml b/themes/summerfruit-dark/summerfruit-dark.yaml new file mode 100644 index 0000000..99d4894 --- /dev/null +++ b/themes/summerfruit-dark/summerfruit-dark.yaml @@ -0,0 +1,18 @@ +scheme: "Summerfruit Dark" +author: "Christopher Corley (http://christop.club/)" +base00: "151515" +base01: "202020" +base02: "303030" +base03: "505050" +base04: "B0B0B0" +base05: "D0D0D0" +base06: "E0E0E0" +base07: "FFFFFF" +base08: "FF0086" +base09: "FD8900" +base0A: "ABA800" +base0B: "00C918" +base0C: "1FAAAA" +base0D: "3777E6" +base0E: "AD00A1" +base0F: "CC6633" diff --git a/modules/themes/tomorrow-night/README.org b/themes/tomorrow-night/README.org similarity index 100% rename from modules/themes/tomorrow-night/README.org rename to themes/tomorrow-night/README.org diff --git a/themes/tomorrow-night/backgroundsha256.txt b/themes/tomorrow-night/backgroundsha256.txt new file mode 100644 index 0000000..7d5aa52 --- /dev/null +++ b/themes/tomorrow-night/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-G8wLZitUlaquirgCtHCFu6dQHJophD8/c7INNMhh49M= diff --git a/themes/tomorrow-night/backgroundurl.txt b/themes/tomorrow-night/backgroundurl.txt new file mode 100644 index 0000000..b98dfb5 --- /dev/null +++ b/themes/tomorrow-night/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/28/wallhaven-28867y.png diff --git a/themes/tomorrow-night/polarity.txt b/themes/tomorrow-night/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/tomorrow-night/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/tomorrow-night/tomorrow-night.yaml b/themes/tomorrow-night/tomorrow-night.yaml new file mode 100644 index 0000000..7577258 --- /dev/null +++ b/themes/tomorrow-night/tomorrow-night.yaml @@ -0,0 +1,18 @@ +scheme: "Tomorrow Night" +author: "Chris Kempson (http://chriskempson.com)" +base00: "1d1f21" +base01: "282a2e" +base02: "373b41" +base03: "969896" +base04: "b4b7b4" +base05: "c5c8c6" +base06: "e0e0e0" +base07: "ffffff" +base08: "cc6666" +base09: "de935f" +base0A: "f0c674" +base0B: "b5bd68" +base0C: "8abeb7" +base0D: "81a2be" +base0E: "b294bb" +base0F: "a3685a" \ No newline at end of file diff --git a/modules/themes/twilight/README.org b/themes/twilight/README.org similarity index 100% rename from modules/themes/twilight/README.org rename to themes/twilight/README.org diff --git a/themes/twilight/backgroundsha256.txt b/themes/twilight/backgroundsha256.txt new file mode 100644 index 0000000..b59ad54 --- /dev/null +++ b/themes/twilight/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-5s6cyM2rv/uFW1upqruYiqcofEakdHylAEy65OfArZ4= diff --git a/themes/twilight/backgroundurl.txt b/themes/twilight/backgroundurl.txt new file mode 100644 index 0000000..7e00252 --- /dev/null +++ b/themes/twilight/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/q6/wallhaven-q6m557.png diff --git a/themes/twilight/polarity.txt b/themes/twilight/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/twilight/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/twilight/twilight.yaml b/themes/twilight/twilight.yaml new file mode 100644 index 0000000..2757b89 --- /dev/null +++ b/themes/twilight/twilight.yaml @@ -0,0 +1,18 @@ +scheme: "Twilight" +author: "David Hart (https://github.com/hartbit)" +base00: "1e1e1e" +base01: "323537" +base02: "464b50" +base03: "5f5a60" +base04: "838184" +base05: "a7a7a7" +base06: "c3c3c3" +base07: "ffffff" +base08: "cf6a4c" +base09: "cda869" +base0A: "f9ee98" +base0B: "8f9d6a" +base0C: "afc4db" +base0D: "7587a6" +base0E: "9b859d" +base0F: "9b703f" \ No newline at end of file diff --git a/modules/themes/ubuntu/README.org b/themes/ubuntu/README.org similarity index 100% rename from modules/themes/ubuntu/README.org rename to themes/ubuntu/README.org diff --git a/themes/ubuntu/backgroundsha256.txt b/themes/ubuntu/backgroundsha256.txt new file mode 100644 index 0000000..8b4bf85 --- /dev/null +++ b/themes/ubuntu/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-5TPwZAQekK1Aq2YdomcJ0irGmIXVPUpgxRwuEetthYw= diff --git a/themes/ubuntu/backgroundurl.txt b/themes/ubuntu/backgroundurl.txt new file mode 100644 index 0000000..07e66fb --- /dev/null +++ b/themes/ubuntu/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/download/sea-of-dreamscape-r4-1920x1080.jpg diff --git a/themes/ubuntu/polarity.txt b/themes/ubuntu/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/ubuntu/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/ubuntu/ubuntu.yaml b/themes/ubuntu/ubuntu.yaml new file mode 100644 index 0000000..217109d --- /dev/null +++ b/themes/ubuntu/ubuntu.yaml @@ -0,0 +1,21 @@ +# Ubuntu scheme +# (Made by emmet https://gitlab.com/librephoenix) +# Based on https://design.ubuntu.com/brand/colour-palette +scheme: "Ubuntu" +author: "librephoenix (https://gitlab.com/librephoenix)" +base00: "2C001E" # ---- +base01: "411934" # --- +base02: "56334B" # -- +base03: "6B4C61" # - +base04: "806678" # + +base05: "957F8E" # ++ +base06: "DFE2E5" # +++ +base07: "A08C99" # ++++ +base08: "E95420" +base09: "F7C3B1" +base0A: "AEC795" +base0B: "95C7A4" +base0C: "95AEA1" +base0D: "772953" +base0E: "7E4770" +base0F: "C79595" diff --git a/modules/themes/uwunicorn/README.org b/themes/uwunicorn/README.org similarity index 100% rename from modules/themes/uwunicorn/README.org rename to themes/uwunicorn/README.org diff --git a/themes/uwunicorn/backgroundsha256.txt b/themes/uwunicorn/backgroundsha256.txt new file mode 100644 index 0000000..6796b9f --- /dev/null +++ b/themes/uwunicorn/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-vNBappcgqa8O2aj+Zz4aBrSsD97v0dDXQDeyC4o0gpc= diff --git a/themes/uwunicorn/backgroundurl.txt b/themes/uwunicorn/backgroundurl.txt new file mode 100644 index 0000000..38cb635 --- /dev/null +++ b/themes/uwunicorn/backgroundurl.txt @@ -0,0 +1 @@ +https://r4.wallpaperflare.com/wallpaper/30/586/460/artwork-fantasy-art-digital-art-forest-wallpaper-3cdadbae5dd4b0ca4dd008fd72d13bf3.jpg diff --git a/themes/uwunicorn/polarity.txt b/themes/uwunicorn/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/uwunicorn/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/uwunicorn/uwunicorn.yaml b/themes/uwunicorn/uwunicorn.yaml new file mode 100644 index 0000000..725c4be --- /dev/null +++ b/themes/uwunicorn/uwunicorn.yaml @@ -0,0 +1,18 @@ +scheme: "UwUnicorn" +author: "Fernando Marques (https://github.com/RakkiUwU) and Gabriel Fontes (https://github.com/Misterio77), modified by me (https://librephoenix.com)" +base00: "241b26" +base01: "2f2a3f" +base02: "46354a" +base03: "6c3c62" +base04: "7e5f83" +base05: "eed5d9" +base06: "d9c2c6" +base07: "e4ccd0" +base08: "de5b44" +base09: "e39755" +base0A: "a84a73" +base0B: "c965bf" +base0C: "9c5fce" +base0D: "6a9eb5" +base0E: "6ac38f" +base0F: "a3ab5a" diff --git a/modules/themes/windows-95/README.org b/themes/windows-95/README.org similarity index 100% rename from modules/themes/windows-95/README.org rename to themes/windows-95/README.org diff --git a/themes/windows-95/backgroundsha256.txt b/themes/windows-95/backgroundsha256.txt new file mode 100644 index 0000000..5a30da5 --- /dev/null +++ b/themes/windows-95/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-xgMi6fH3yMGk0txu0p5x01OY9qC4x597vEgSy/G9TBY= diff --git a/themes/windows-95/backgroundurl.txt b/themes/windows-95/backgroundurl.txt new file mode 100644 index 0000000..6649751 --- /dev/null +++ b/themes/windows-95/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/01/wallhaven-01e6xw.jpg diff --git a/themes/windows-95/polarity.txt b/themes/windows-95/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/windows-95/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/windows-95/windows-95.yaml b/themes/windows-95/windows-95.yaml new file mode 100644 index 0000000..5559078 --- /dev/null +++ b/themes/windows-95/windows-95.yaml @@ -0,0 +1,18 @@ +scheme: "Windows 95" +author: "Fergus Collins (https://github.com/C-Fergus)" +base00: "000000" # black +base01: "1C1C1C" # darkish black +base02: "383838" # brightish black +base03: "545454" # bright black +base04: "7e7e7e" # darker white +base05: "a8a8a8" # white +base06: "d2d2d2" # middle white +base07: "fcfcfc" # bright white +base08: "fc5454" # bright red +base09: "a85400" # yellow +base0A: "fcfc54" # bright yellow +base0B: "54fc54" # bright green +base0C: "54fcfc" # bright cyan +base0D: "5454fc" # bright blue +base0E: "fc54fc" # bright magenta +base0F: "00a800" # green \ No newline at end of file diff --git a/modules/themes/woodland/README.org b/themes/woodland/README.org similarity index 100% rename from modules/themes/woodland/README.org rename to themes/woodland/README.org diff --git a/themes/woodland/backgroundsha256.txt b/themes/woodland/backgroundsha256.txt new file mode 100644 index 0000000..df3743f --- /dev/null +++ b/themes/woodland/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-lbmtPDD0+PP7UXy6MO0UdFtQIwsnvNUczolqTZW7k88= diff --git a/themes/woodland/backgroundurl.txt b/themes/woodland/backgroundurl.txt new file mode 100644 index 0000000..0574e45 --- /dev/null +++ b/themes/woodland/backgroundurl.txt @@ -0,0 +1 @@ +https://images.hdqwalls.com/wallpapers/beyond-the-railroad-crossing-5k-5b.jpg diff --git a/themes/woodland/polarity.txt b/themes/woodland/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/woodland/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/woodland/woodland.yaml b/themes/woodland/woodland.yaml new file mode 100644 index 0000000..6d9f1a9 --- /dev/null +++ b/themes/woodland/woodland.yaml @@ -0,0 +1,18 @@ +scheme: "Woodland" +author: "Jay Cornwall (https://jcornwall.com)" +base00: "231e18" +base01: "302b25" +base02: "48413a" +base03: "9d8b70" +base04: "b4a490" +base05: "cabcb1" +base06: "d7c8bc" +base07: "e4d4c8" +base08: "d35c5c" +base09: "ca7f32" +base0A: "e0ac16" +base0B: "b7ba53" +base0C: "6eb958" +base0D: "88a4d3" +base0E: "bb90e2" +base0F: "b49368" diff --git a/modules/themes/xcode-dusk/README.org b/themes/xcode-dusk/README.org similarity index 100% rename from modules/themes/xcode-dusk/README.org rename to themes/xcode-dusk/README.org diff --git a/themes/xcode-dusk/backgroundsha256.txt b/themes/xcode-dusk/backgroundsha256.txt new file mode 100644 index 0000000..6f0f773 --- /dev/null +++ b/themes/xcode-dusk/backgroundsha256.txt @@ -0,0 +1 @@ +sha256-z/attvjcG1nReBjCVBY/JS2Eu2U44+Pd2OtIF1dPb1M= diff --git a/themes/xcode-dusk/backgroundurl.txt b/themes/xcode-dusk/backgroundurl.txt new file mode 100644 index 0000000..87adf1b --- /dev/null +++ b/themes/xcode-dusk/backgroundurl.txt @@ -0,0 +1 @@ +https://w.wallhaven.cc/full/yx/wallhaven-yxe85x.jpg diff --git a/themes/xcode-dusk/polarity.txt b/themes/xcode-dusk/polarity.txt new file mode 100644 index 0000000..4520e2f --- /dev/null +++ b/themes/xcode-dusk/polarity.txt @@ -0,0 +1 @@ +dark diff --git a/themes/xcode-dusk/xcode-dusk.yaml b/themes/xcode-dusk/xcode-dusk.yaml new file mode 100644 index 0000000..7159038 --- /dev/null +++ b/themes/xcode-dusk/xcode-dusk.yaml @@ -0,0 +1,18 @@ +scheme: "XCode Dusk" +author: "Elsa Gonsiorowski (https://github.com/gonsie)" +base00: "282B35" +base01: "3D4048" +base02: "53555D" +base03: "686A71" +base04: "7E8086" +base05: "939599" +base06: "A9AAAE" +base07: "BEBFC2" +base08: "B21889" +base09: "786DC5" +base0A: "438288" +base0B: "DF0002" +base0C: "00A0BE" +base0D: "790EAD" +base0E: "B21889" +base0F: "C77C48" diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..26ab74c --- /dev/null +++ b/update.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +# Script to update my flake without +# synchronizing configuration + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Update flake +pushd $SCRIPT_DIR &> /dev/null; +sudo nix flake update; +sudo nix-channel --update; +nix-channel --update; +popd &> /dev/null; diff --git a/upgrade.sh b/upgrade.sh new file mode 100755 index 0000000..0830316 --- /dev/null +++ b/upgrade.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +# Script to update system and sync +# Does not pull changes from git + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) + +# Update flake +$SCRIPT_DIR/update.sh; + +# Synchronize system +$SCRIPT_DIR/sync.sh; diff --git a/user/README.org b/user/README.org new file mode 100644 index 0000000..d6e1a6e --- /dev/null +++ b/user/README.org @@ -0,0 +1,47 @@ +#+title: User-level Nix Modules +#+author: Emmet + +Separate Nix files can be imported as modules using an import block: +#+BEGIN_SRC nix +imports = [ import1.nix + import2.nix + ... + ]; +#+END_SRC + +My user-level Nix modules are organized into this directory: +- [[./app][app]] - Apps or collections of apps bundled with my configs + - [[./app/browser][browser]] - Used to set default browser + - [[./app/dmenu-scripts][dmenu-scripts]] + - [[./app/doom-emacs][doom-emacs]] + - [[./app/flatpak][flatpak]] - Installs flatpak as a utility (flatpaks must be installed manually) + - [[./app/games][games]] - Gaming setup + - [[./app/git][git]] + - [[./app/keepass][keepass]] + - [[./app/ranger][ranger]] + - [[./app/terminal][terminal]] - Configuration for terminal emulators + - [[./app/virtualization][virtualization]] - Virtualization and compatability layers +- [[./lang][lang]] - Various bundled programming languages + - I will probably get rid of this in favor of a shell.nix for every project, once I learn how that works +- [[./pkgs][pkgs]] - "Package builds" for packages not in the Nix repositories + - [[./pkgs/pokemon-colorscripts.nix][pokemon-colorscripts]] + - [[./pkgs/rogauracore.nix][rogauracore]] - not working yet +- [[./shell][shell]] - My default bash and zsh configs + - [[./shell/sh.nix][sh]] - bash and zsh configs + - [[./shell/cli-collection.nix][cli-collection]] - Curated useful CLI utilities +- [[./style][style]] - Stylix setup (system-wide base16 theme generation) +- [[./wm][wm]] - Window manager, compositor, wayland compositor, and/or desktop environment setups + - [[./wm/hyprland][hyprland]] + - [[./wm/xmonad][xmonad]] + - [[./wm/picom][picom]] + +** Variables imported from flake.nix +Variables can be imported from [[../flake.nix][flake.nix]] by setting the =extraSpecialArgs= block inside the flake (see [[../flake.nix][my flake]] for more details). This allows variables to merely be managed in one place ([[../flake.nix][flake.nix]]) rather than having to manage them in multiple locations. + +I use this to pass a few attribute sets: +- =userSettings= - Settings for the normal user (see [[../flake.nix][flake.nix]] for more details) +- =systemSettings= - Settings for the system (see [[../flake.nix][flake.nix]] for more details) +- =inputs= - Flake inputs (see [[../flake.nix][flake.nix]] for more details) +- =pkgs-stable= - Allows me to include stable versions of packages along with (my default) unstable versions of packages +- =pkgs-emacs= - Pinned version of nixpkgs I use for Emacs and its dependencies +- =pkgs-kdenlive= - Pinned version of nixpkgs I use for kdenlive diff --git a/user/app/browser/brave.nix b/user/app/browser/brave.nix new file mode 100644 index 0000000..b26853f --- /dev/null +++ b/user/app/browser/brave.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + # Module installing brave as default browser + home.packages = [ pkgs.brave ]; + + xdg.mimeApps.defaultApplications = { + "text/html" = "brave-browser.desktop"; + "x-scheme-handler/http" = "brave-browser.desktop"; + "x-scheme-handler/https" = "brave-browser.desktop"; + "x-scheme-handler/about" = "brave-browser.desktop"; + "x-scheme-handler/unknown" = "brave-browser.desktop"; + }; + + home.sessionVariables = { + DEFAULT_BROWSER = "${pkgs.brave}/bin/brave"; + }; + +} diff --git a/user/app/browser/floorp.nix b/user/app/browser/floorp.nix new file mode 100644 index 0000000..c7fe445 --- /dev/null +++ b/user/app/browser/floorp.nix @@ -0,0 +1,19 @@ +{ pkgs, ... }: + +{ + # Module installing as default browser + home.packages = [ pkgs.floorp ]; + + home.sessionVariables = { + DEFAULT_BROWSER = "${pkgs.floorp}/bin/floorp"; + }; + + xdg.mimeApps.defaultApplications = { + "text/html" = "floorp.desktop"; + "x-scheme-handler/http" = "floorp.desktop"; + "x-scheme-handler/https" = "floorp.desktop"; + "x-scheme-handler/about" = "floorp.desktop"; + "x-scheme-handler/unknown" = "floorp.desktop"; + }; + +} diff --git a/user/app/browser/librewolf.nix b/user/app/browser/librewolf.nix new file mode 100644 index 0000000..b8f0c5f --- /dev/null +++ b/user/app/browser/librewolf.nix @@ -0,0 +1,46 @@ +{ pkgs, userSettings, ... }: + +{ + # Module installing librewolf as default browser + home.packages = if (userSettings.wmType == "wayland") then [ pkgs.librewolf-wayland ] + else [ pkgs.librewolf ]; + + home.sessionVariables = if (userSettings.wmType == "wayland") + then { DEFAULT_BROWSER = "${pkgs.librewolf-wayland}/bin/librewolf";} + else + { DEFAULT_BROWSER = "${pkgs.librewolf}/bin/librewolf";}; + + home.file.".librewolf/librewolf.overrides.cfg".text = '' + defaultPref("font.name.serif.x-western","''+userSettings.font+''"); + + defaultPref("font.size.variable.x-western",20); + defaultPref("browser.toolbars.bookmarks.visibility","always"); + defaultPref("privacy.resisttFingerprinting.letterboxing", true); + defaultPref("network.http.referer.XOriginPolicy",2); + defaultPref("privacy.clearOnShutdown.history",true); + defaultPref("privacy.clearOnShutdown.downloads",true); + defaultPref("privacy.clearOnShutdown.cookies",true); + defaultPref("gfx.webrender.software.opengl",false); + defaultPref("webgl.disabled",true); + pref("font.name.serif.x-western","''+userSettings.font+''"); + + pref("font.size.variable.x-western",20); + pref("browser.toolbars.bookmarks.visibility","always"); + pref("privacy.resisttFingerprinting.letterboxing", true); + pref("network.http.referer.XOriginPolicy",2); + pref("privacy.clearOnShutdown.history",true); + pref("privacy.clearOnShutdown.downloads",true); + pref("privacy.clearOnShutdown.cookies",true); + pref("gfx.webrender.software.opengl",false); + pref("webgl.disabled",true); + ''; + + xdg.mimeApps.defaultApplications = { + "text/html" = "librewolf.desktop"; + "x-scheme-handler/http" = "librewolf.desktop"; + "x-scheme-handler/https" = "librewolf.desktop"; + "x-scheme-handler/about" = "librewolf.desktop"; + "x-scheme-handler/unknown" = "librewolf.desktop"; + }; + +} diff --git a/user/app/browser/qute-containers.nix b/user/app/browser/qute-containers.nix new file mode 100644 index 0000000..3bb1fd0 --- /dev/null +++ b/user/app/browser/qute-containers.nix @@ -0,0 +1,34 @@ +{ lib, stdenv, fetchFromGitHub, dmenuCmd ? "rofi -dmenu", ... }: + +let name = "qute-containers"; + version = "unstable"; + dmenu = dmenuCmd; +in + stdenv.mkDerivation { + inherit name version; + + src = fetchFromGitHub { + owner = "s-praveen-kumar"; + repo = "qute-containers"; + rev = "c6164b94104fa8565200b87bfc87a2e08ca15ac7"; + sha256 = "sha256-g684sPSEJTRSk2V8LVrQsNeRIYtaQueRpZeREWtmQKw="; + }; + + phases = "installPhase"; + + postPatch = ''sed -i "s/qutebrowser/qutebrowser --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag num-raster-threads=4/g" container-open''; + + installPhase = '' + mkdir -p $out $out/bin + cp $src/* $out/bin + sed -i 's/DMENU=\"rofi -dmenu\"/DMENU=\"''+dmenu+''\"/g' $out/bin/containers_config + sed -i 's/DMENU_FLAGS//g' $out/bin/container-open + ''; + + meta = { + homepage = "https://github.com/s-praveen-kumar/qute-containers"; + description = "Browser Containers for Qutebrowser"; + license = lib.licenses.mit; + maintainers = []; + }; + } diff --git a/modules/user/browser/qutebrowser-logo.png b/user/app/browser/qutebrowser-logo.png similarity index 100% rename from modules/user/browser/qutebrowser-logo.png rename to user/app/browser/qutebrowser-logo.png diff --git a/modules/user/browser/qutebrowser.nix b/user/app/browser/qutebrowser.nix similarity index 50% rename from modules/user/browser/qutebrowser.nix rename to user/app/browser/qutebrowser.nix index f70a137..0717c41 100644 --- a/modules/user/browser/qutebrowser.nix +++ b/user/app/browser/qutebrowser.nix @@ -1,163 +1,110 @@ -{ config, lib, pkgs, ... }: -let - cfg = config.userSettings.qutebrowser; - font = config.stylix.fonts.monospace.name; - generateHomepage = name: font: config: - '' - +{ config, pkgs, userSettings, ... }: +let generateHomepage = name: font: config: + '' + - - My Local Dashboard Awesome Homepage - - + - /*div*/ - div { - margin:auto; - width:50%; - text-align:center; - } - /*class made for ascii art icon*/ - .icon { - line-height:10% - } - - + + +
+
+
+
+ +
+
+
+
+ +

Welcome to Qutebrowser

+
+

''+name+" "+''Profile

+
+ +
+

[o] [Search]

+

[b] [Quickmarks]

+

[S h] [History]

+

[t] [New tab]

+

[x] [Close tab]

+
+ - - -
-
-
-
- -
-
-
-
- -

Welcome to Qutebrowser

-
-

''+name+" "+''Profile

-
- - - + + ''; +in +{ - - ''; - qute-containers = ({ lib, stdenv, fetchFromGitHub, dmenuCmd ? config.userSettings.dmenuScripts.dmenuCmd, ... }: - let name = "qute-containers"; - version = "unstable"; - dmenu = dmenuCmd; - in - stdenv.mkDerivation { - inherit name version; - - src = fetchFromGitHub { - owner = "s-praveen-kumar"; - repo = "qute-containers"; - rev = "c6164b94104fa8565200b87bfc87a2e08ca15ac7"; - sha256 = "sha256-g684sPSEJTRSk2V8LVrQsNeRIYtaQueRpZeREWtmQKw="; - }; - - phases = "installPhase"; - - postPatch = ''sed -i "s/qutebrowser/qutebrowser --qt-flag ignore-gpu-blacklist --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag enable-accelerated-2d-canvas --qt-flag num-raster-threads=4/g" container-open''; - - installPhase = '' - mkdir -p $out $out/bin - cp $src/* $out/bin - sed -i 's/DMENU=\"rofi -dmenu\"/DMENU=\"''+dmenu+''\"/g' $out/bin/containers_config - sed -i 's/DMENU_FLAGS//g' $out/bin/container-open - ''; - - meta = { - homepage = "https://github.com/s-praveen-kumar/qute-containers"; - description = "Browser Containers for Qutebrowser"; - license = lib.licenses.mit; - maintainers = []; - }; - }); -in { - options = { - userSettings.qutebrowser = { - enable = lib.mkEnableOption "Enable qutebrowser with my settings"; - }; + home.packages = [ pkgs.qutebrowser + (pkgs.callPackage ./qute-containers.nix { dmenuCmd = "fuzzel -d"; }) + ]; + home.sessionVariables = { DEFAULT_BROWSER = "${pkgs.qutebrowser}/bin/qutebrowser"; }; + xdg.mimeApps.defaultApplications = { + "text/html" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; + "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; }; + home.file.".config/qutebrowser/userscripts/container-open".source = "${(pkgs.callPackage ./qute-containers.nix { dmenuCmd = "fuzzel -d"; })}/bin/container-open"; + home.file.".config/qutebrowser/userscripts/containers_config".source = "${(pkgs.callPackage ./qute-containers.nix { dmenuCmd = "fuzzel -d"; })}/bin/containers_config"; - config = lib.mkIf cfg.enable { - home.packages = [ pkgs.qutebrowser - (pkgs.callPackage qute-containers {}) - ]; - - home.file.".config/qutebrowser/userscripts/container-open".source = "${(pkgs.callPackage qute-containers {})}/bin/container-open"; - home.file.".config/qutebrowser/userscripts/containers_config".source = "${(pkgs.callPackage qute-containers {})}/bin/containers_config"; - - programs.qutebrowser.enable = true; - programs.qutebrowser.extraConfig = '' + programs.qutebrowser.enable = true; + programs.qutebrowser.extraConfig = '' import sys import os.path secretsExists = False @@ -168,23 +115,8 @@ if (os.path.isfile(secretFile)): import qutesecrets secretsExists = True -quickmarksFile = os.path.join(os.path.dirname(__file__),'quickmarks') -quickmarksHtmlFilePath = os.path.join(os.path.dirname(__file__),'quickmarks.html') -quickmarksHtmlFile = open(quickmarksHtmlFilePath,"w") -quickmarksHtmlFileText = 'My Local Dashboard Awesome Homepage



Quickmarks


' -quickmarksHtmlFile.write(quickmarksHtmlFileText) -quickmarksHtmlFile.close() - -config.set('content.blocking.method','both') - config.set('scrolling.smooth',True) -config.set('qt.args',['ignore-gpu-blacklist','enable-gpu-rasterization','enable-accelerated-video-decode','enable-quic','enable-zero-copy','enable-native-gpu-memory-buffers','num-raster-threads=4','allow-file-access-from-files','enable-features=VaapiVideoDecoder,VaapiIgnoreDriverChecks,Vulkan,DefaultANGLEVulkan,VulkanFromANGLE']) -config.set('qt.workarounds.disable_accelerated_2d_canvas','never') +config.set('qt.args',['ignore-gpu-blacklist','enable-gpu-rasterization','enable-native-gpu-memory-buffers','num-raster-threads=4']) config.load_autoconfig(True) base00 = "#''+config.lib.stylix.colors.base00+''" @@ -233,8 +165,7 @@ c.colors.webpage.darkmode.policy.images = 'never' c.url.default_page = str(config.configdir)+'/qute-home.html' c.url.start_pages = str(config.configdir)+'/qute-home.html' -c.url.searchengines = {'DEFAULT': 'https://search.brave.com/search?q={}&source=web', - 'sp': 'https://startpage.com/do/search?query={}', +c.url.searchengines = {'DEFAULT': 'https://startpage.com/do/search?query={}', 'd' : 'https://duckduckgo.com/?q={}&ia=web', 'az' : 'https://www.amazon.com/s?k={}', 'aw' : 'https://wiki.archlinux.org/index.php?search={}&title=Special%3ASearch&wprov=acrw1', @@ -256,14 +187,11 @@ c.url.searchengines = {'DEFAULT': 'https://search.brave.com/search?q={}&source=w config.set('completion.open_categories',["searchengines","quickmarks","bookmarks"]) config.set('downloads.location.directory', '~/Downloads') -config.set('downloads.location.prompt', False) -config.set('downloads.position', 'bottom') -config.set('downloads.remove_finished', 5000) config.set('fileselect.handler', 'external') -config.set('fileselect.single_file.command', ['kitty','--class','filechoose_yazi','-e','yazi','--chooser-file={}']) -config.set('fileselect.multiple_files.command', ['kitty','--class','filechoose_yazi','-e','yazi','--chooser-file={}']) -config.set('fileselect.folder.command', ['kitty','--class','--filechoose_yazi','-e','yazi','--chooser-file={}']) # needs fixing upstream to work +config.set('fileselect.single_file.command', ['kitty','-e','ranger','--choosefile={}']) +config.set('fileselect.multiple_files.command', ['kitty','-e','ranger','--choosefiles={}']) +config.set('fileselect.folder.command', ['kitty','-e','ranger','--choosedir={}']) # bindings from doom emacs config.bind('', 'cmd-set-text :') @@ -309,6 +237,7 @@ config.bind(',m', 'hint links spawn mpv {hint-url}') config.bind(',co', 'spawn container-open') config.bind(',cf', 'hint links userscript container-open') +# TODO stylix user CSS # current_stylesheet_directory = '~/.config/qutebrowser/themes/' # current_stylesheet = base16_theme+'-all-sites.css' # current_stylesheet_path = current_stylesheet_directory + current_stylesheet @@ -408,7 +337,7 @@ c.colors.tabs.selected.odd.bg = base02 c.colors.tabs.selected.even.fg = base05 c.colors.tabs.selected.even.bg = base02 -font = "''+font+''" +font = "''+userSettings.font+''" c.fonts.default_family = font c.fonts.default_size = '14pt' @@ -419,35 +348,26 @@ c.fonts.web.family.sans_serif = font c.fonts.web.family.fixed = font c.fonts.web.family.fantasy = font c.fonts.web.family.cursive = font - ''; - - home.file.".config/qutebrowser/containers".text = '' -Gamedev + ''; + + home.file.".config/qutebrowser/containers".text = '' Teaching -Youtube - ''; - - home.file.".config/qutebrowser/qute-home.html".text = generateHomepage "Default" font config; - home.file.".config/qutebrowser/logo.png".source = ./qutebrowser-logo.png; - home.file.".browser/Gamedev/config/qute-home.html".text = generateHomepage "Gamedev" font config; - home.file.".browser/Gamedev/config/logo.png".source = ./qutebrowser-logo.png; - home.file.".browser/Teaching/config/qute-home.html".text = generateHomepage "Teaching" font config; - home.file.".browser/Teaching/config/logo.png".source = ./qutebrowser-logo.png; - home.file.".browser/Youtube/config/qute-home.html".text = generateHomepage "Youtube" font config; - home.file.".browser/Youtube/config/logo.png".source = ./qutebrowser-logo.png; +Tech +Gamedev +Bard + ''; - xdg.mimeApps.defaultApplications = lib.mkIf (config.userSettings.browser == "qutebrowser" ) { - "text/html" = "org.qutebrowser.qutebrowser.desktop"; - "x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop"; - "x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop"; - "x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop"; - "x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop"; - }; + home.file.".config/qutebrowser/qute-home.html".text = generateHomepage "Default" userSettings.font config; + home.file.".config/qutebrowser/logo.png".source = ./qutebrowser-logo.png; + home.file.".browser/Teaching/config/qute-home.html".text = generateHomepage "Teaching" userSettings.font config; + home.file.".browser/Teaching/config/logo.png".source = ./qutebrowser-logo.png; + home.file.".browser/Tech/config/qute-home.html".text = generateHomepage "Tech" userSettings.font config; + home.file.".browser/Tech/config/logo.png".source = ./qutebrowser-logo.png; + home.file.".browser/Gaming/config/qute-home.html".text = generateHomepage "Gaming" userSettings.font config; + home.file.".browser/Gaming/config/logo.png".source = ./qutebrowser-logo.png; + home.file.".browser/Gamedev/config/qute-home.html".text = generateHomepage "Gamedev" userSettings.font config; + home.file.".browser/Gamedev/config/logo.png".source = ./qutebrowser-logo.png; + home.file.".browser/Bard/config/qute-home.html".text = generateHomepage "Bard" userSettings.font config; + home.file.".browser/Bard/config/logo.png".source = ./qutebrowser-logo.png; - home.sessionVariables = lib.mkIf (config.userSettings.browser == "qutebrowser") { - DEFAULT_BROWSER = "${pkgs.qutebrowser}/bin/qutebrowser"; - QTWEBENGINE_CHROMIUM_FLAGS = "--disable-gpu"; # FIXME https://github.com/qutebrowser/qutebrowser/issues/8535 - }; - - }; } diff --git a/user/app/dmenu-scripts/networkmanager-dmenu.nix b/user/app/dmenu-scripts/networkmanager-dmenu.nix new file mode 100644 index 0000000..a6b38b9 --- /dev/null +++ b/user/app/dmenu-scripts/networkmanager-dmenu.nix @@ -0,0 +1,18 @@ +{ pkgs, dmenu_command ? "rofi -show dmenu", ... }: + +{ + home.packages = with pkgs; [ networkmanager_dmenu networkmanagerapplet ]; + + home.file.".config/networkmanager-dmenu/config.ini".text = '' + [dmenu] + dmenu_command = ''+dmenu_command+'' + + compact = True + wifi_chars = ▂▄▆█ + list_saved = True + + [editor] + terminal = alacritty + # gui_if_available = (Default: True) + ''; +} diff --git a/user/app/doom-emacs/README.org b/user/app/doom-emacs/README.org new file mode 100644 index 0000000..d8dde8c --- /dev/null +++ b/user/app/doom-emacs/README.org @@ -0,0 +1,23 @@ +#+title: Doom Emacs + +* What is Doom Emacs? +[[https://github.com/doomemacs/doomemacs][Doom Emacs]] is a distribution of the [[https://www.gnu.org/software/emacs/][Emacs Text Editor]] designed for [[https://www.vim.org/][Vim]] users. I like to use Emacs due to its extensibility and extra features it is capable of (besides text editing). Some of these extra features include: +- [[https://orgmode.org/][Org Mode]] (Hierarchical text-based document format) +- [[https://www.orgroam.com/][Org Roam]] (A second brain / personal wiki) +- [[https://orgmode.org/][Org Agenda]] (Calendar and todo list) +- [[https://magit.vc/][magit]] (Git Client) + +[[https://raw.githubusercontent.com/librephoenix/nixos-config-screenshots/main/app/doom.png]] + +I have found Emacs to be incredibly efficient, and transferring my workflow to fit inside of Emacs has allowed me to get much more work done. I primarily use Emacs for writing, note-taking, task/project management and organizing information. + +* My Config +This directory includes my Doom Emacs configuration, which consists of: +- [[./config.el][config.el]] - Main configuration +- [[./init.el][init.el]] - Doom modules (easy sets of packages curated by Doom) +- [[./packages.el][packages.el]] - Additional packages from Melpa (Emacs package manager). +- [[./themes/doom-stylix-theme.el.mustache][doom-stylix-theme.el.mustache]] - Mustache Doom Emacs template to be used with stylix, requires my [[../../style/stylix.nix][stylix.nix module]] as well +- [[./doom.nix][doom.nix]] - Loads Nix Doom Emacs and my configuration into my flake when imported +- A few other [[./scripts][random scripts]] + +My full config is a [[./doom.org][literate org document (doom.org)]]. diff --git a/user/app/doom-emacs/config.el b/user/app/doom-emacs/config.el new file mode 100644 index 0000000..91ba209 --- /dev/null +++ b/user/app/doom-emacs/config.el @@ -0,0 +1,1642 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;;;------ User configuration ------;;; +(setq use-package-always-defer t) + +;; Import relevant system variables from flake (see doom.nix) +;; includes variables like user-full-name, user-username, user-home-directory, user-email-address, doom-font, +;; and a few other custom variables I use later +(load! "~/.emacs.d/system-vars.el") +;; custom variables include: +;; dotfiles-dir, absolute path to home directory +;; user-default-roam-dir, name of default org-roam directory for the machine (relative to ~/Org) +;; system-nix-profile, profile selected from my dotfiles ("personal" "work" "wsl" etc...) +;; system-wm-type, wayland or x11? only should be considered if system-nix-profile is "personal" or "work" + +;; I prefer visual lines +(setq display-line-numbers-type 'visual + line-move-visual t) +(use-package-hook! evil + :pre-init + (setq evil-respect-visual-line-mode t) ;; sane j and k behavior + t) + +;; I also like evil mode visual movement +(map! :map evil-normal-state-map + :desc "Move to next visual line" + "j" 'evil-next-visual-line + :desc "Move to previous visual line" + "k" 'evil-previous-visual-line) + +;; Theme +(setq custom-theme-directory "~/.emacs.d/themes") +(setq doom-theme 'doom-stylix) +;; +unicode-init-fonts-h often errors out +(remove-hook 'doom-init-ui-hook '+unicode-init-fonts-h) + +;; Transparent background +(if (string= system-nix-profile "wsl") + ;; Can't be that tranparent under wsl because no blur + (funcall (lambda () + (set-frame-parameter nil 'alpha-background 98) + (add-to-list 'default-frame-alist '(alpha-background . 98)) + )) + ;; On Linux I can enable blur, however + (funcall (lambda () + (set-frame-parameter nil 'alpha-background 85) + (add-to-list 'default-frame-alist '(alpha-background . 85)) + )) +) + +(add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) + +;; Icons in completion buffers +(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) +(all-the-icons-completion-mode) + +;; Grammar tasing should be voluntary +(setq writegood-mode nil) + +;; Beacon shows where the cursor is, even when fast scrolling +(setq beacon-mode t) + +(setq company-idle-delay 0.05) + +;; Quicker window management keybindings +(bind-key* "C-j" #'evil-window-down) +(bind-key* "C-k" #'evil-window-up) +(bind-key* "C-h" #'evil-window-left) +(bind-key* "C-l" #'evil-window-right) +(bind-key* "C-q" #'evil-window-delete) +(bind-key* "M-q" #'kill-current-buffer) +(bind-key* "M-w" #'+workspace/close-window-or-workspace) +(bind-key* "M-n" #'next-buffer) +(bind-key* "M-p" #'previous-buffer) +(bind-key* "M-z" #'+vterm/toggle) +(bind-key* "M-e" #'+eshell/toggle) +(bind-key* (kbd "M-") #'+vterm/here) +(bind-key* (kbd "M-E") #'+eshell/here) + +;; Buffer management +(bind-key* "" #'next-buffer) +(bind-key* "" #'previous-buffer) + +;; Disables custom.el +(setq custom-file null-device) + +;; emacs-dashboard setup +(require 'all-the-icons) +(require 'dashboard) +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")) + doom-fallback-buffer-name "*dashboard*") +(setq image-scaling-factor 1) + +;; emacs-dashboard variables +(setq dashboard-banner-logo-title "Welcome to Nix Doom Emacs") +(setq dashboard-startup-banner "~/.emacs.d/dashboard-logo.webp") +(setq dashboard-icon-type 'all-the-icons) ;; use `all-the-icons' package +(setq dashboard-set-heading-icons t) +(setq dashboard-set-file-icons t) +(setq dashboard-set-navigator t) +(setq dashboard-items '()) +(setq dashboard-center-content t) +(setq dashboard-footer-messages '("Here to do customizing, or actual work?" + "M-x insert-inspiring-message" + "My software never has bugs. It just develops random features." + "Dad, what are clouds made of? Linux servers, mostly." + "There is no place like ~" + "~ sweet ~" + "sudo chown -R us ./allyourbase" + "I’ll tell you a DNS joke but it could take 24 hours for everyone to get it." + "I'd tell you a UDP joke, but you might not get it." + "I'll tell you a TCP joke. Do you want to hear it?")) + +;; Remove basic evil input and cursors from dashboard +(defun disable-cursor() + (setq-local evil-normal-state-cursor '(bar . 0)) + (hl-line-mode -1) +) +(add-hook 'dashboard-mode-hook 'disable-cursor) +(evil-define-key 'normal dashboard-mode-map + "j" 'evil-normal-state + "k" 'evil-normal-state + "h" 'evil-normal-state + "l" 'evil-normal-state) +(setq dashboard-navigator-buttons + `(;; line1 + ( (,"Roam" "" "" (lambda (&rest _)) 'org-formula) + (,(all-the-icons-octicon "globe" :height 1.0 :v-adjust 0.0) + "Notes overview" "" (lambda (&rest _) (org-roam-default-overview)) 'org-formula) + (,(all-the-icons-fileicon "org" :height 1.0 :v-adjust 0.0) + "Switch roam db" "" (lambda (&rest _) (org-roam-switch-db)) 'org-formula) + ) + ;; line 2 + ( (,"Git" "" "" (lambda (&rest _)) 'diredfl-exec-priv) + (,(all-the-icons-octicon "mark-github" :height 1.0 :v-adjust 0.0) + "GitHub" "" (lambda (&rest _) (browse-url "https://github.com/librephoenix")) 'diredfl-exec-priv) + (,(all-the-icons-faicon "gitlab" :height 1.0 :v-adjust 0.0) + "GitLab" "" (lambda (&rest _) (browse-url "https://gitlab.com/librephoenix")) 'diredfl-exec-priv) + (,(all-the-icons-faicon "coffee" :height 1.0 :v-adjust 0.0) + "Gitea" "" (lambda (&rest _) (browse-url my-gitea-domain)) 'diredfl-exec-priv) + (,(all-the-icons-octicon "triangle-up" :height 1.2 :v-adjust -0.1) + "Codeberg" "" (lambda (&rest _) (browse-url "https://codeberg.org/librephoenix")) 'diredfl-exec-priv) + ) + ;; line 3 + ( (,"Agenda" "" "" (lambda (&rest _)) 'dired-warning) + (,(all-the-icons-octicon "checklist" :height 1.0 :v-adjust 0.0) + "Agenda todos" "" (lambda (&rest _) (org-agenda-list)) 'dired-warning) + (,(all-the-icons-octicon "calendar" :height 1.0 :v-adjust 0.0) + "Agenda calendar" "" (lambda (&rest _) (cfw:open-org-calendar)) 'dired-warning) + ) + ;; line 4 + ( (,"Config" "" "" (lambda (&rest _)) 'dired-mark) + (,(all-the-icons-faicon "cogs" :height 1.0 :v-adjust 0.0) + "System config" "" (lambda (&rest _) (projectile-switch-project-by-name "~/.dotfiles" t)) 'dired-mark) + (,(all-the-icons-material "help" :height 1.0 :v-adjust -0.2) + "Doom documentation" "" (lambda (&rest _) (doom/help)) 'dired-mark) + ))) + +(setq dashboard-footer-icon + (all-the-icons-faicon "list-alt" + :height 1.0 + :v-adjust -0.15 + :face 'font-lock-keyword-face)) +(dashboard-setup-startup-hook) + +(map! :leader :desc "Open dashboard" "b b" #'dashboard-refresh-buffer) + +(setq scroll-conservatively 101) + +;; Smooth scrolling +;; requires good-scroll.el +;;(good-scroll-mode 1) +;;(setq good-scroll-duration 0.4 +;; good-scroll-step 270 +;; good-scroll-render-rate 0.03) +;; +;;(global-set-key (kbd "") #'good-scroll-up-full-screen) +;;(global-set-key (kbd "") #'good-scroll-down-full-screen) + +(setq scroll-margin 30) +(setq hscroll-margin 10) + +;; Requires for faster loading +(require 'org-agenda) +(require 'dired) + +;; Garbage collection to speed things up +(add-hook 'after-init-hook + #'(lambda () + (setq gc-cons-threshold (* 100 1024 1024)))) +(add-hook 'focus-out-hook 'garbage-collect) +(run-with-idle-timer 5 t 'garbage-collect) + +;; Enable autorevert globally so that buffers update when files change on disk. +;; Very useful when used with file syncing (i.e. syncthing) +(setq global-auto-revert-mode nil) +(setq auto-revert-use-notify t) + +;; Neotree fun +(defun neotree-snipe-dir () + (interactive) + (if (projectile-project-root) + (neotree-dir (projectile-project-root)) + (neotree-dir (file-name-directory (file-truename (buffer-name)))) + ) +) + +(map! :leader :desc "Open neotree here" "o n" #'neotree-snipe-dir + :desc "Hide neotree" "o N" #'neotree-hide) + +;; For camelCase +(global-subword-mode 1) + +;; ripgrep as grep +(setq grep-command "rg -nS --no-heading " + grep-use-null-device nil) + +;; Mini-frames ;; cool but kinda suboptimal atm +;(add-load-path! "~/.emacs.d/mini-frame") +;(require 'mini-frame) +;(setq mini-frame-ignore-commands '(evil-ex-search-forward helpful-variable helpful-callable)) +;(setq mini-frame-show-parameters +; '((left . 216) +; (top . 240) +; (width . 0.78) +; (height . 20) +; (alpha-background . 90)) +;) +;(setq mini-frame-detach-on-hide nil) +;(setq mini-frame-resize t) +;(setq resize-mini-frames t) +;(setq mini-frame-standalone nil) +;(mini-frame-mode 1) + +;;;------ Registers ------;;; + +(map! :leader + :desc "Jump to register" + "r" 'jump-to-register) + +(if (string= system-nix-profile "personal") (set-register ?f (cons 'file (concat user-home-directory "/Org/Family.s/Notes/hledger.org")))) +(set-register ?h (cons 'file user-home-directory)) +(set-register ?r (cons 'file (concat dotfiles-dir "/README.org"))) + +;;;------ Org mode configuration ------;;; + +;; Set default org directory +(setq org-directory "~/Org") +(setq org-attach-directory "~/Org/.attach") +(setq org-attach-id-dir "~/Org/.attach") +(setq org-id-locations-file "~/Org/.orgids") +(setq org-cycle-include-plain-lists 'integrate) + +(remove-hook 'after-save-hook #'+literate|recompile-maybe) +(set-company-backend! 'org-mode nil) + +;; Automatically show images but manually control their size +(setq org-startup-with-inline-images t + org-image-actual-width nil) + +(require 'evil-org) +(require 'evil-org-agenda) +(add-hook 'org-mode-hook 'evil-org-mode -100) + +;; Top-level headings should be bigger! +(custom-set-faces! + `(outline-1 :height 1.3 :foreground ,(nth 1 (nth 14 doom-themes--colors))) + `(outline-2 :height 1.25 :foreground ,(nth 1 (nth 15 doom-themes--colors))) + `(outline-3 :height 1.2 :foreground ,(nth 1 (nth 19 doom-themes--colors))) + `(outline-4 :height 1.1 :foreground ,(nth 1 (nth 23 doom-themes--colors))) + `(outline-5 :height 1.1 :foreground ,(nth 1 (nth 24 doom-themes--colors))) + `(outline-6 :height 1.1 :foreground ,(nth 1 (nth 16 doom-themes--colors))) + `(outline-7 :height 1.05 :foreground ,(nth 1 (nth 18 doom-themes--colors))) + `(outline-8 :height 1.05 :foreground ,(nth 1 (nth 11 doom-themes--colors))) + '(variable-pitch :family "Intel One Mono") + `(org-agenda-date :inherit 'unspecified :foreground ,(nth 1 (nth 19 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-today :inherit 'unspecified :foreground ,(nth 1 (nth 15 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-weekend :inherit 'unspecified :foreground ,(nth 1 (nth 24 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-weekend-today :inherit 'unspecified :foreground ,(nth 1 (nth 15 doom-themes--colors)) :weight bold :height 1.1) +) + +(after! org (org-eldoc-load)) + +(with-eval-after-load 'org (global-org-modern-mode)) + +;; Add frame borders and window dividers +(modify-all-frames-parameters + '((right-divider-width . 5) + (internal-border-width . 5))) +(dolist (face '(window-divider + window-divider-first-pixel + window-divider-last-pixel)) + (face-spec-reset-face face) + (set-face-foreground face (face-attribute 'default :background))) +(set-face-background 'fringe (face-attribute 'default :background)) + +(setq + ;; Edit settings + org-auto-align-tags nil + org-tags-column 0 + org-catch-invisible-edits 'show-and-error + org-special-ctrl-a/e t + org-insert-heading-respect-content t + + ;; Org styling, hide markup etc. + org-hide-emphasis-markers t + org-pretty-entities t + org-ellipsis "…") + +(setq-default line-spacing 0) + +; Automatic table of contents is nice +(if (require 'toc-org nil t) + (progn + (add-hook 'org-mode-hook 'toc-org-mode) + (add-hook 'markdown-mode-hook 'toc-org-mode)) + (warn "toc-org not found")) + +;;---- this block from http://fgiasson.com/blog/index.php/2016/06/21/optimal-emacs-settings-for-org-mode-for-literate-programming/ ----;; +;; Tangle Org files when we save them +(defun tangle-on-save-org-mode-file() + (when (string= (message "%s" major-mode) "org-mode") + (org-babel-tangle))) + +(add-hook 'after-save-hook 'tangle-on-save-org-mode-file) +;; ---- end block ---- ;; + +;; Better org table editing +;; This breaks multiline visual block edits +;;(setq-default evil-insert-state-exit-hook '(org-update-parent-todo-statistics +;; t)) +;;(setq org-table-automatic-realign nil) + +;; Better for org source blocks +(setq electric-indent-mode nil) +(setq org-src-window-setup 'current-window) +(set-popup-rule! "^\\*Org Src" + :side 'top' + :size 0.9) + +;; Horizontal scrolling tables +(add-load-path! "~/.emacs.d/phscroll") +(setq org-startup-truncated nil) +(with-eval-after-load "org" + (require 'org-phscroll)) +(setq phscroll-calculate-in-pixels t) + +;; Org side tree outline +(add-load-path! "~/.emacs.d/org-side-tree") +(require 'org-side-tree) +(setq org-side-tree-persistent nil) +(setq org-side-tree-fontify t) +(setq org-side-tree-enable-folding t) +(defun org-side-tree-create-or-toggle () + (interactive) + (if (or (org-side-tree-has-tree-p) (eq major-mode 'org-side-tree-mode)) + (org-side-tree-toggle) + (org-side-tree))) +(map! :leader + "O t" #'org-side-tree-create-or-toggle) +(map! :map org-side-tree-mode-map + "SPC" nil) + +(require 'org-download) + +;; Drag-and-drop to `dired` +(add-hook 'dired-mode-hook 'org-download-enable) + +;; system-wm-type, wayland or x11? only should be considered if system-nix-profile is "personal" or "work" +(if (string= system-wm-type "wayland") + (setq org-download-screenshot-method "grim -g \"$(slurp)\" %s") + (setq org-download-screenshot-method "flameshot gui -p %s") +) + +(after! org-download + (setq org-download-method 'directory)) + +(after! org + (setq-default org-download-image-dir "img/" + org-download-heading-lvl nil)) + +(add-to-list 'display-buffer-alist '("^*Async Shell Command*" . (display-buffer-no-window))) + +(defun org-download-clipboard-basename () + (interactive) + (setq org-download-path-last-dir org-download-image-dir) + (setq org-download-image-dir (completing-read "directory: " (-filter #'f-directory-p (directory-files-recursively "." "" t)) nil t)) + (org-download-clipboard (completing-read "basename: " '() nil nil)) + (setq org-download-image-dir org-download-path-last-dir) +) + +(map! :leader + :desc "Insert a screenshot" + "i s" 'org-download-screenshot + :desc "Insert image from clipboard" + "i p" 'org-download-clipboard + "i P" 'org-download-clipboard-basename) + +(defun org-new-file-from-template() + "Copy a template from ~/Templates into a time stamped unique-named file in the +same directory as the org-buffer and insert a link to this file." + (interactive) + (setq template-file (completing-read "Template file:" (directory-files "~/Templates"))) + (setq filename + (concat + (make-temp-name + (concat (file-name-directory (buffer-file-name)) + "files/" + (file-name-nondirectory (buffer-file-name)) + "_" + (format-time-string "%Y%m%d_%H%M%S_")) ) (file-name-extension template-file t))) + (copy-file (concat user-home-directory "/Templates/" template-file) filename) + (setq prettyname (read-from-minibuffer "Pretty name:")) + (insert (concat "[[./files/" (file-name-nondirectory filename) "][" prettyname "]]")) + (org-display-inline-images)) + +(map! :leader + :desc "Create a new file from a template and insert a link at point" + "i t" 'my-org-new-file-from-template) + +(if (not (string= system-nix-profile "wsl")) + (when (require 'openwith nil 'noerror) + (setq openwith-associations + (list + (list (openwith-make-extension-regexp + '("mpg" "mpeg" "mp3" "mp4" + "avi" "wmv" "wav" "mov" "flv" + "ogm" "ogg" "mkv")) + "mpv" + '(file)) + (list (openwith-make-extension-regexp + '("doc" "xls" "ppt" "odt" "ods" "odg" "odp")) + "libreoffice" + '(file)) + '("\\.lyx" "lyx" (file)) + '("\\.chm" "kchmviewer" (file)) + (list (openwith-make-extension-regexp + '("pdf" "ps" "ps.gz" "dvi")) + "atril" + '(file)) + (list (openwith-make-extension-regexp + '("kdenlive")) + "kdenlive-accel" + '(file)) + (list (openwith-make-extension-regexp + '("kra")) + "krita" + '(file)) + (list (openwith-make-extension-regexp + '("blend" "blend1")) + "blender" + '(file)) + (list (openwith-make-extension-regexp + '("helio")) + "helio" + '(file)) + (list (openwith-make-extension-regexp + '("svg")) + "inkscape" + '(file)) + (list (openwith-make-extension-regexp + '("flp")) + "flstudio" + '(file)) + (list (openwith-make-extension-regexp + '("mid")) + "rosegarden" + '(file)) + )) + (openwith-mode 1))) + +(add-load-path! "~/.emacs.d/org-krita") +(require 'org-krita) +(add-hook 'org-mode-hook 'org-krita-mode) +(setq org-krita-extract-filename "preview.png") +(setq org-krita-scale 1) + +(add-load-path! "~/.emacs.d/org-xournalpp") +(require 'org-xournalpp) +(add-hook 'org-mode-hook 'org-xournalpp-mode) +(setq org-xournalpp-template-getter + '(closure + (t) + nil + (file-truename "~/Templates/template.xopp") ; use my own template + ) +) + +;; override width to static 250 for now +;; so I don't have massive images in org mode (scrolling not fun) +(defun org-xournalpp--create-image (link refresh) + "Extract svg/png from given LINK and return image. + +Regenerate the cached inline image, if REFRESH is true. + +If the path from LINK does not exist, nil is returned." + (let ((width 250) + (xopp-path (f-expand (org-element-property :path link)))) + (when (f-exists? xopp-path) + (if width + (create-image (org-xournalpp--get-image xopp-path refresh) + org-xournalpp-image-type + nil + :width width) + (create-image (org-xournalpp--get-image xopp-path refresh) + org-xournalpp-image-type + nil))))) + +(defun org-copy-link-to-clipboard-at-point () + "Copy current link at point into clipboard (useful for images and links)" + ;; Remember to press C-g to kill this foreground process if it hangs! + (interactive) + (if (eq major-mode #'org-mode) + (link-hint-copy-link-at-point) + ) + (if (eq major-mode #'ranger-mode) + (ranger-copy-absolute-file-paths) + ) + (if (eq major-mode #'image-mode) + (image-mode-copy-file-name-as-kill) + ) + (shell-command "~/.emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh " nil nil) +) + +(if (string= system-nix-profile "wsl") + (map! :leader + :desc "Copy link at point" + "y y" 'link-hint-copy-link-at-point) + (map! :leader + :desc "Copy link/file at point into system clipbord (C-g to escape if copying a file)" + "y y" 'org-copy-link-to-clipboard-at-point)) + +;; Online images inside of org mode is pretty cool +;; This snippit is from Tobias on Stack Exchange +;; https://emacs.stackexchange.com/questions/42281/org-mode-is-it-possible-to-display-online-images +(require 'org-yt) + +(defun org-image-link (protocol link _description) + "Interpret LINK as base64-encoded image data." + (cl-assert (string-match "\\`img" protocol) nil + "Expected protocol type starting with img") + (let ((buf (url-retrieve-synchronously (concat (substring protocol 3) ":" link)))) + (cl-assert buf nil + "Download of image \"%s\" failed." link) + (with-current-buffer buf + (goto-char (point-min)) + (re-search-forward "\r?\n\r?\n") + (buffer-substring-no-properties (point) (point-max))))) + +(org-link-set-parameters + "imghttp" + :image-data-fun #'org-image-link) + +(org-link-set-parameters + "imghttps" + :image-data-fun #'org-image-link) + +;; Mermaid diagrams +(setq ob-mermaid-cli-path "~/.nix-profile/bin/mmdc") + +;; Print org mode +(defun org-simple-print-buffer () + "Open an htmlized form of current buffer and open in a web browser to print" + (interactive) + (htmlize-buffer) + (browse-url-of-buffer (concat (buffer-name) ".html")) + (sleep-for 1) + (kill-buffer (concat (buffer-name) ".html"))) + +;; Doesn't work yet, bc htmlize-region takes arguments BEG and END +;(defun org-simple-print-region() +; "Open an htmlized form of current region and open in a web browser to print" +; (interactive) +; (htmlize-region ) +; (browse-url-of-buffer (concat (buffer-name) ".html")) +; (sleep-for 1) +; (kill-buffer (concat (buffer-name) ".html"))) + +(map! :leader + :prefix ("P" . "Print") + :desc "Simple print buffer in web browser" + "p" 'org-simple-print-buffer) + +(map! :leader + :prefix ("P" . "Print") + :desc "Simple print buffer in web browser" + "b" 'org-simple-print-buffer) + +;(map! :leader +; :prefix ("P" . "Print") +; :desc "Simple print region in web browser" +; "r" 'org-simple-print-region) + +;; Display macros inline in buffers +(add-to-list 'font-lock-extra-managed-props 'display) + +(font-lock-add-keywords + 'org-mode + '(("\\({{{[a-zA-Z#%)(_-+0-9]+}}}\\)" 0 + `(face nil display + ,(format "%s" + (let* ((input-str (match-string 0)) + (el (with-temp-buffer + (insert input-str) + (goto-char (point-min)) + (org-element-context))) + (text (org-macro-expand el org-macro-templates))) + (if text + text + input-str))))))) + +;; Org transclusion +(require 'org-transclusion) +(after! org + (map! :map global-map "" #'org-transclusion-add :leader :prefix "n" :desc "Org Transclusion Mode" "t" #'org-transclusion-mode) + (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) + (setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) +) + +(defun org-jekyll-new-post () + (interactive) + (setq new-blog-post-title (read-from-minibuffer "Post name: ")) + (setq new-blog-post-date (format-time-string "%Y-%m-%d" (date-to-time (org-read-date)))) + (setq new-blog-post-slug (downcase (replace-regexp-in-string "[^[:alpha:][:digit:]_-]" "" (string-replace " " "-" new-blog-post-title)))) + (setq new-blog-post-file (concat (projectile-project-root) "org/_posts/" new-blog-post-date "-" new-blog-post-slug ".org")) + (let ((org-capture-templates + `(("p" "New Jekyll blog post" plain (file new-blog-post-file) + ,(concat "#+title: " new-blog-post-title "\n#+options: toc:nil num:nil\n#+begin_export html\n---\nlayout: post\ntitle: " new-blog-post-title "\nexcerpt: %?\ntags: \npermalink: " new-blog-post-date "-" new-blog-post-slug "\n---\n#+end_export\n\n#+attr_html: :alt " new-blog-post-title " :align center\n[[../assets/" new-blog-post-date "-" new-blog-post-slug ".png]]"))) + )) (org-capture)) +) + +(defun org-jekyll-rename-post () + (interactive) + (setq new-blog-post-title (read-from-minibuffer "Post name: ")) + (setq new-blog-post-date (format-time-string "%Y-%m-%d" (date-to-time (org-read-date)))) + (setq new-blog-post-slug (downcase (replace-regexp-in-string "[^[:alpha:][:digit:]_-]" "" (string-replace " " "-" new-blog-post-title)))) + (org-roam-set-keyword "title" new-blog-post-title) + (replace-regexp "permalink: .*\n" (concat "permalink: " new-blog-post-date "-" new-blog-post-slug "\n") nil (point-min) (point-max)) + (replace-regexp "title: .*\n" (concat "title: " new-blog-post-title "\n") nil (point-min) (point-max)) + (setq prev-blog-post-filename-base (file-name-base (buffer-file-name))) + (doom/move-this-file (concat new-blog-post-date "-" new-blog-post-slug ".org")) + (shell-command (concat "sed -i s/" prev-blog-post-filename-base "/" (file-name-base (buffer-file-name)) "/g *.org") nil) + (replace-regexp prev-blog-post-filename-base (file-name-base (buffer-file-name)) nil (point-min) (point-max)) + (save-buffer) +) + +(map! :leader + :prefix ("N") + + :desc "New blog post" + "p" #'org-jekyll-new-post + + :desc "Rename or redate blog post and update links accordingly" + "e" #'org-jekyll-rename-post +) + +(require 'crdt) +(setq crdt-default-tls t) +(setq crdt-use-stunnel t) +(setq crdt-default-name "Emmet") +(if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el")) +(defun crdt-connect-default () + (interactive) + (crdt-connect crdt-default-server-address crdt-default-name) +) +(map! :leader + :desc "crdt" + :prefix ("C") + + :desc "Connect to a crdt server" + "c" #'crdt-connect-default + + :desc "Connect to default crdt server" + "C" #'crdt-connect-default + + :desc "Disconnect from a crdt server" + "d" #'crdt-disconnect + + :desc "Add buffer to a session" + "a" #'crdt-share-buffer + + :desc "Stop sharing buffer when running a server" + "s" #'crdt-stop-share-buffer + + :desc "Run M-x on the (remote) crdt session" + "x" #'crdt-M-x + + :desc "List crdt buffers in a session" + "l" #'crdt-list-buffers + + :desc "List crdt users in a session" + "u" #'crdt-list-users +) + +(require 'org-analyzer) +(setq org-analyzer-wrapper-command "org-analyzer") +(setq org-analyzer-jar-file-name "~/.nix-profile/bin/org-analyzer.jar") +(setq org-analyzer-java-program "~/.nix-profile/bin/org-analyzer") ;; Is not actually java, buta wrapper shell script + +(defun org-analyzer-start-process (org-dir) + "Start the org analyzer process . +Argument ORG-DIR is where the org-files are located." + (org-analyzer-cleanup-process-state) + (unless (file-exists-p org-dir) + (warn "org-analyzer was started with org-directory set to + \"%s\"\nbut this directory does not exist. +Please set the variable `org-directory' to the location where you keep your org files." + org-directory)) + (let* ((name (format " *org-analyzer [org-dir:%s]*" org-dir)) + (proc-buffer (generate-new-buffer name)) + (proc nil)) + (setq org-analyzer-process-buffer proc-buffer) + (with-current-buffer proc-buffer + (setq default-directory (if (file-exists-p org-dir) + org-dir default-directory) + proc (condition-case err + (let ((process-connection-type nil) + (process-environment process-environment)) + (start-process name + (current-buffer) + org-analyzer-wrapper-command + "--port" + (format "%d" org-analyzer-http-port) + "--started-from-emacs" + (if (file-exists-p org-dir) org-dir ""))) + (error + (concat "Can't start org-analyzer (%s: %s)" + (car err) (cadr err))))) + (set-process-query-on-exit-flag proc nil) + (set-process-filter proc #'org-analyzer-process-filter)) + proc-buffer)) + +;;;------ Org roam configuration ------;;; +(require 'org-roam) +(require 'org-roam-dailies) + +(setq org-roam-directory (concat "~/Org/" user-default-roam-dir "/Notes") + org-roam-db-location (concat "~/Org/" user-default-roam-dir "/Notes/org-roam.db")) + +(setq org-roam-node-display-template + "${title:65}📝${tags:*}") + +(org-roam-db-autosync-mode) + +(setq mode-line-misc-info '((which-function-mode + (which-func-mode + ("" which-func-format " "))) + ("" so-long-mode-line-info) + (global-mode-string + ("" global-mode-string)) + " " + org-roam-db-choice) +) + +(setq org-roam-list-files-commands '(rg)) + +(setq full-org-roam-db-list nil) + +(setq full-org-roam-db-list (directory-files "~/Org" t "\\.[p,s]$")) +(dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list + (append (directory-files item t "\\.[p,s]$") full-org-roam-db-list))) + +(setq org-roam-db-choice user-default-roam-dir) +(setq full-org-roam-db-list-pretty (list)) +(dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list-pretty + (append (list + (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" item)) full-org-roam-db-list-pretty))) + +(defun org-roam-open-dashboard () + "Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)" + (interactive) + (if (org-roam-node-from-title-or-alias "Overview") + (org-roam-node-open (org-roam-node-from-title-or-alias "Overview")) + (dired org-roam-directory)) +) + +(defun org-roam-open-inbox () + "Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)" + (interactive) + (if (org-roam-node-from-title-or-alias "Inbox") + (org-roam-node-open (org-roam-node-from-title-or-alias "Inbox")) + (message "No inbox found, capture something with M-x org-roam-capture-inbox")) +) + +(defun org-roam-capture-inbox () + (interactive) + (org-roam-capture- :node (org-roam-node-from-title-or-alias "Inbox") + :templates '(("i" "inbox" plain "* %?" + :if-new (file+head "%<%Y%m%d%H%M%S>-inbox.org" "#+title: Inbox\n"))))) + +(defun org-roam-switch-db (&optional arg silent) + "Switch to a different org-roam database, arg" + (interactive) + (when (not arg) + (setq full-org-roam-db-list nil) + + (setq full-org-roam-db-list (directory-files "~/Org" t "\\.[p,s]$")) + (dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list + (append (directory-files item t "\\.[p,s]$") full-org-roam-db-list))) + + (setq full-org-roam-db-list-pretty (list)) + (dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list-pretty + (append (list + (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" item)) full-org-roam-db-list-pretty))) + + (setq org-roam-db-choice (completing-read "Select org roam database: " + full-org-roam-db-list-pretty nil t))) + (when arg + (setq org-roam-db-choice arg)) + + (setq org-roam-directory (file-truename (concat "~/Org/" org-roam-db-choice "/Notes")) + org-roam-db-location (file-truename (concat "~/Org/" org-roam-db-choice "/Notes/org-roam.db")) + org-directory (file-truename (concat "~/Org/" org-roam-db-choice "/Notes"))) + (when (not silent) + (org-roam-open-dashboard)) + + (org-roam-db-sync) + + (message (concat "Switched to " org-roam-db-choice " org-roam database!"))) + +(defun org-roam-default-overview () + (interactive) + (org-roam-switch-db user-default-roam-dir)) + +(defun org-roam-switch-db-id-open (arg ID &optional switchpersist) + "Switch to another org-roam db and visit file with id arg" + "If switchpersist is non-nil, stay in the new org-roam db after visiting file" + (interactive) + (setq prev-org-roam-db-choice org-roam-db-choice) + (org-roam-switch-db arg 1) + (org-roam-id-open ID) + (when (not switchpersist) + (org-roam-switch-db prev-org-roam-db-choice 1))) + +;;;------ Org-roam-agenda configuration ------;;; +(defun text-in-buffer-p (TEXT) +(save-excursion (goto-char (point-min)) (search-forward TEXT nil t))) + +(defun apply-old-todos-tag-maybe (&optional FILE) + (interactive) + (if (stringp FILE) + (setq the-daily-node-filename FILE) + (setq the-daily-node-filename buffer-file-name)) + (if (org-roam-dailies--daily-note-p the-daily-node-filename) + (if (<= (nth 2 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 2 org-agenda-current-date)) + (if (<= (nth 1 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 1 org-agenda-current-date)) + (if (<= (nth 0 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 0 org-agenda-current-date)) + (funcall (lambda () + (with-current-buffer (get-file-buffer the-daily-node-filename) (org-roam-tag-add '("old-todos"))) + (with-current-buffer (get-file-buffer the-daily-node-filename) (org-roam-tag-remove '("todos"))) + ) + ) + ) + ) + ) + ) +) + +(defun apply-old-todos-tag-maybe-and-save (FILE) + (interactive) + (find-file-noselect FILE) + (apply-old-todos-tag-maybe FILE) + (with-current-buffer (get-file-buffer the-daily-node-filename) (save-buffer)) + (with-current-buffer (get-file-buffer the-daily-node-filename) (kill-buffer)) +) + +(defun org-current-buffer-has-todos () + "Return non-nil if current buffer has any todo entry." + + (org-element-map ; (2) + (org-element-parse-buffer 'headline) ; (1) + 'headline + (lambda (h) + (eq (org-element-property :todo-type h) + 'todo)) + nil 'first-match)) ; (3) + +(defun org-has-recent-timestamps (OLD-DAYS) + "Return non-nil only if current buffer has entries with timestamps + more recent than OLD-DAYS days" + (interactive) + (if (org-element-map (org-element-parse-buffer) 'timestamp + (lambda (h) + (org-element-property :raw-value h))) + (org-element-map ; (2) + (org-element-parse-buffer) ; (1) + 'timestamp + (lambda (h) + (time-less-p (time-subtract (current-time) (* 60 60 24 OLD-DAYS)) (date-to-time (org-element-property :raw-value h)))) + nil 'first-match) nil)) + +(setq org-timestamps-days-for-old 21) + +; This has a bug where it won't sync a new agenda file +; if I'm editing an org roam node file while set to another +; org roam db +(defun add-todos-tag-on-save-org-mode-file() + (interactive) + (when (string= (message "%s" major-mode) "org-mode") + (if (org-roam-node-p (org-roam-node-at-point)) + (funcall (lambda() + (if (or (org-current-buffer-has-todos) (org-has-recent-timestamps org-timestamps-days-for-old)) + (org-roam-tag-add '("todos")) + (org-roam-tag-remove '("todos")) + ) + (apply-old-todos-tag-maybe) + ) + ) + ) + ) +) + +(add-hook 'before-save-hook 'add-todos-tag-on-save-org-mode-file) + +(defun org-roam-filter-by-tag (tag-name) + (lambda (node) + (member tag-name (org-roam-node-tags node)))) + +(defun org-roam-list-notes-by-tag (tag-name) + (mapcar #'org-roam-node-file + (seq-filter + (org-roam-filter-by-tag tag-name) + (org-roam-node-list)))) + +(defun org-roam-dailies-apply-old-todos-tags-to-all () +; (dolist (daily-node org-roam-dailies-files) +; (apply-old-todos-tag-maybe-and-save daily-node) +; ) + (setq num 0) + (while (< num (list-length (org-roam-list-notes-by-tag "todos"))) + (apply-old-todos-tag-maybe-and-save (nth num (org-roam-list-notes-by-tag "todos"))) + (setq num (1+ num)) + ) +) + +;; Refreshing org roam agenda +(defun org-roam-refresh-agenda-list () + (interactive) + (setq prev-org-roam-db-choice org-roam-db-choice) + (setq org-agenda-files '()) + (setq org-id-files '()) + (setq org-roam-directory (file-truename "~/Org") + org-roam-db-location (file-truename "~/Org/org-roam.db") + org-directory (file-truename "~/Org/")) + (org-roam-db-sync) + (setq org-agenda-files (org-roam-list-notes-by-tag "todos")) + (setq org-id-files (org-roam-list-files)) + (setq org-agenda-files (-uniq org-agenda-files)) + (org-roam-switch-db prev-org-roam-db-choice 1) +) + +;; Build agenda only when org agenda first opened for session +(setq org-roam-agenda-initialized nil) +(defun org-roam-refresh-agenda-list-init () + (if (not org-roam-agenda-initialized) + (funcall + (lambda () + (org-roam-refresh-agenda-list) + (setq org-roam-agenda-initialized t) + ) + ) + ) +) +(add-hook 'org-agenda-mode-hook 'org-roam-refresh-agenda-list-init) + +(map! :leader + :prefix ("o a") + + :desc "Refresh org agenda from roam dbs" + "r" 'org-roam-refresh-agenda-list) + +(map! :leader + :prefix ("N" . "org-roam notes") + + :desc "Capture new roam node" + "c" 'org-roam-capture + + :desc "Open org roam inbox" + "I o" 'org-roam-open-inbox + + :desc "Capture stuff in inbox" + "I c" 'org-roam-capture-inbox + + :desc "Insert roam node link at point" + "i" 'org-roam-node-insert + + :desc "Find roam node" + "." 'org-roam-node-find + + :desc "Switch org-roam database" + "s" 'org-roam-switch-db + + :desc "Update current org-roam database" + "u" 'org-roam-db-sync + + :desc "Re-zoom on current node in org-roam-ui" + "z" 'org-roam-ui-node-zoom + + :desc "Visualize org-roam database with org-roam-ui" + "O" 'org-roam-default-overview + + :desc "Visualize org-roam database with org-roam-ui" + "o" 'org-roam-open-dashboard) + +(after! org-roam + (setq org-roam-capture-templates + '(("d" "default" plain "%?" :target + (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t)))) + +(setq olivetti-style 'fancy + olivetti-margin-width 100) +(setq-default olivetti-body-width 100) +(defun org-roam-olivetti-mode () + (interactive) + (if (org-roam-file-p) + (olivetti-mode)) + (if (org-roam-file-p) + (doom-disable-line-numbers-h))) + +(add-hook 'org-mode-hook 'org-roam-olivetti-mode) + +(add-load-path! "~/.emacs.d/org-nursery/lisp") +(require 'org-roam-dblocks) +(add-hook 'org-mode-hook 'org-roam-dblocks-autoupdate-mode) + +(setq org-id-extra-files 'org-agenda-text-search-extra-files) + +;(add-to-list 'display-buffer-alist '("^\\ORUI" display-buffer-in-side-window +; '(side . right) +; (window-width . 50) +;)) +;(add-to-list 'display-buffer-alist '("^\\localhost:35901" display-buffer-in-side-window +; '(side . right) +; (window-width . 50) +;)) + +;;(setq org-roam-ui-browser-function 'eaf-open-browser) ; xorg +(setq org-roam-ui-browser-function 'browse-url) ; wayland + +(defun open-org-roam-ui () + (interactive) + (+evil/window-vsplit-and-follow) + (org-roam-ui-open) + (evil-window-left 1)) + +(defun kill-org-roam-ui () + (interactive) +;; (delete-window (get-buffer-window "ORUI" t)) ; xorg +;; (kill-buffer "ORUI") ; xorg + (kill-buffer "*httpd*") +) + +; xorg +;;(map! :leader +;; :prefix ("N" . "org-roam notes") +;; :desc "Visualize org-roam database with org-roam-ui" +;; "v" 'open-org-roam-ui) + +; wayland +(map! :leader + :prefix ("N" . "org-roam notes") + :desc "Visualize org-roam database with org-roam-ui" + "v" 'org-roam-ui-open) + +(map! :leader + :prefix ("N" . "org-roam notes") + :desc "Kill all org roam ui buffers" + "V" 'kill-org-roam-ui) + +;;;------ Org agenda configuration ------;;; +;; Set span for agenda to be just daily +(setq org-agenda-span 1 + org-agenda-start-day "+0d" + org-agenda-skip-timestamp-if-done t + org-agenda-skip-deadline-if-done t + org-agenda-skip-scheduled-if-done t + org-agenda-skip-scheduled-if-deadline-is-shown t + org-agenda-skip-timestamp-if-deadline-is-shown t + org-log-into-drawer t) + +;; Custom styles for dates in agenda +(custom-set-faces! + '(org-agenda-date :inherit outline-1 :height 1.15) + '(org-agenda-date-today :inherit outline-2 :height 1.15) + '(org-agenda-date-weekend :inherit outline-1 :height 1.15) + '(org-agenda-date-weekend-today :inherit outline-2 :height 1.15) + '(org-super-agenda-header :inherit custom-button :weight bold :height 1.05) + `(link :foreground unspecified :underline nil :background ,(nth 1 (nth 7 doom-themes--colors))) + '(org-link :foreground unspecified)) + +;; Toggle completed entries function +(defun org-agenda-toggle-completed () + (interactive) + (setq org-agenda-skip-timestamp-if-done (not org-agenda-skip-timestamp-if-done) + org-agenda-skip-deadline-if-done (not org-agenda-skip-timestamp-if-done) + org-agenda-skip-scheduled-if-done (not org-agenda-skip-timestamp-if-done)) + (org-agenda-redo)) + +(map! + :map evil-org-agenda-mode-map + :after org-agenda + :nvmeg "s d" #'org-agenda-toggle-completed) + +;; Ricing org agenda +(setq org-agenda-current-time-string "") +(setq org-agenda-time-grid '((daily) () "" "")) + +(setq org-agenda-prefix-format '( +(agenda . " %?-2i %t ") + (todo . " %i %-12:c") + (tags . " %i %-12:c") + (search . " %i %-12:c"))) + +(setq org-agenda-hide-tags-regexp ".*") + +(setq org-agenda-category-icon-alist + `(("Teaching.p" ,(list (all-the-icons-faicon "graduation-cap" :height 0.8)) nil nil :ascent center) + ("Family.s" ,(list (all-the-icons-faicon "home" :v-adjust 0.005)) nil nil :ascent center) + ("Producer.p" ,(list (all-the-icons-faicon "youtube-play" :height 0.9)) nil nil :ascent center) + ("Bard.p" ,(list (all-the-icons-faicon "music" :height 0.9)) nil nil :ascent center) + ("Stories.s" ,(list (all-the-icons-faicon "book" :height 0.9)) nil nil :ascent center) + ("Author.p" ,(list (all-the-icons-faicon "pencil" :height 0.9)) nil nil :ascent center) + ("Gamedev.s" ,(list (all-the-icons-faicon "gamepad" :height 0.9)) nil nil :ascent center) + ("Knowledge.p" ,(list (all-the-icons-faicon "database" :height 0.8)) nil nil :ascent center) + ("Personal.p" ,(list (all-the-icons-material "person" :height 0.9)) nil nil :ascent center) +)) + +(defalias 'org-timestamp-down 'org-timestamp-down-day) +(defalias 'org-timestamp-up 'org-timestamp-up-day) + +(defun org-categorize-by-roam-db-on-save () + (interactive) + (when (string= (message "%s" major-mode) "org-mode") + (when + (string-prefix-p (concat "/home/" user-username "/Org") (expand-file-name (buffer-file-name))) + (setq categorizer-old-line (line-number-at-pos)) + (evil-goto-first-line) + (org-set-property "CATEGORY" (substring (string-trim-left (expand-file-name (buffer-file-name)) (concat "/home/" user-username "/Org/")) 0 (string-match "/" (string-trim-left (expand-file-name (buffer-file-name)) (concat "/home/" user-username "/Org/"))))) + (evil-goto-line categorizer-old-line) + ) + ) +) + +(add-hook 'after-save-hook 'org-categorize-by-roam-db-on-save) + +;; Function to be run when org-agenda is opened +(defun org-agenda-open-hook () + "Hook to be run when org-agenda is opened" + (olivetti-mode)) + +;; Adds hook to org agenda mode, making follow mode active in org agenda +(add-hook 'org-agenda-mode-hook 'org-agenda-open-hook) + +;; Easy refreshes on org agenda for syncthing file changes +;; adapted from https://www.reddit.com/r/orgmode/comments/mu6n5b/org_agenda_auto_updating/ +;; and https://lists.gnu.org/archive/html/help-gnu-emacs/2008-12/msg00435.html +(defadvice org-agenda-list (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) +(defadvice org-agenda-redo (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) +(defadvice org-agenda-redo-all (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) + +;; Function to list all my available org agenda files and switch to them +(defun list-and-switch-to-agenda-file () + "Lists all available agenda files and switches to desired one" + (interactive) + (setq full-agenda-file-list nil) + (setq choice (completing-read "Select agenda file:" org-agenda-files nil t)) + (find-file choice)) + +(map! :leader + :desc "Switch to specific org agenda file" + "o a s" 'list-and-switch-to-agenda-file) + +(defun org-agenda-switch-with-roam () + "Switches to org roam node file and database from org agenda view" + (interactive) + (org-agenda-switch-to) + (if (f-exists-p (concat (dir!) "/org-roam.db")) + (org-roam-switch-db (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" (f-parent (dir!))) t)) + (if (f-exists-p (concat (f-parent (dir!)) "/org-roam.db")) + (org-roam-switch-db (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" (f-parent (f-parent (dir!)))) t)) + (org-roam-olivetti-mode) +) + +(map! + :map evil-org-agenda-mode-map + :after org-agenda + :nvmeg "" #'org-agenda-switch-with-roam + :nvmeg "" #'org-agenda-switch-with-roam) +(map! + :map org-agenda-mode-map + :after org-agenda + :nvmeg "" #'org-agenda-switch-with-roam + :nvmeg "" #'org-agenda-switch-with-roam) + +(require 'org-super-agenda) + +(setq org-super-agenda-groups + '(;; Each group has an implicit boolean OR operator between its selectors. + (:name " Overdue " ; Optionally specify section name + :scheduled past + :order 2 + :face 'error) + + (:name "Personal " + :and(:file-path "Personal.p" :not (:tag "event")) + :order 3) + + (:name "Family " + :and(:file-path "Family.s" :not (:tag "event")) + :order 3) + + (:name "Teaching " + :and(:file-path "Teaching.p" :not (:tag "event")) + :order 3) + + (:name "Gamedev " + :and(:file-path "Gamedev.s" :not (:tag "event")) + :order 3) + + (:name "Youtube " + :and(:file-path "Producer.p" :not (:tag "event")) + :order 3) + + (:name "Music " + :and(:file-path "Bard.p" :not (:tag "event")) + :order 3) + + (:name "Storywriting " + :and(:file-path "Stories.s" :not (:tag "event")) + :order 3) + + (:name "Writing " + :and(:file-path "Author.p" :not (:tag "event")) + :order 3) + + (:name "Learning " + :and(:file-path "Knowledge.p" :not (:tag "event")) + :order 3) + + (:name " Today " ; Optionally specify section name + :time-grid t + :date today + :scheduled today + :order 1 + :face 'warning) + +)) + +(org-super-agenda-mode t) + +(map! :desc "Next line" + :map org-super-agenda-header-map + "j" 'org-agenda-next-line) + +(map! :desc "Next line" + :map org-super-agenda-header-map + "k" 'org-agenda-previous-line) + +(require 'calfw) +(require 'calfw-org) +(setq cfw:org-agenda-schedule-args '(:timestamp)) + +(map! :leader :desc "Open org calendar" + "O c" 'cfw:open-org-calendar) + +;;;------ magit configuration ------;;; +;; Need the following two blocks to make magit work with git bare repos +(require 'magit-todos) +(setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG")) +(magit-todos-mode 1) + +(add-load-path! "~/.emacs.d/magit-file-icons") +(require 'magit-file-icons) +(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file) +(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir) +(magit-file-icons-mode 1) + +(require 'all-the-icons-ibuffer) +(add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode) +(setq all-the-icons-ibuffer-color-icon t) +(evil-set-initial-state 'ibuffer-mode 'normal) + +;;;------ dired configuration ------;;; + +(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) +(setq all-the-icons-dired-monochrome nil) + +(map! :desc "Increase font size" + "C-=" 'text-scale-increase + + :desc "Decrease font size" + "C--" 'text-scale-decrease + + :desc "Jump to dired" + "M-f" 'dired-jump +) + +;;;------ ranger configuration ------;;; + +(map! :map ranger-mode-map + :desc "Mark current file" + "m" 'ranger-mark + + :desc "Toggle mark on current file" + "x" 'ranger-toggle-mark +) + +;;;-- hledger-mode configuration ;;;-- + +;;; Basic configuration +(require 'hledger-mode) + +;; To open files with .journal extension in hledger-mode +(add-to-list 'auto-mode-alist '("\\.journal\\'" . hledger-mode)) + +;; The default journal location is too opinionated. +(setq hledger-jfile (concat user-home-directory "/Org/Family.s/Notes/hledger.journal")) + +;;; Auto-completion for account names +;; For company-mode users: +(add-to-list 'company-backends 'hledger-company) + +(evil-define-key* 'normal hledger-view-mode-map "q" 'kill-current-buffer) +(evil-define-key* 'normal hledger-view-mode-map "[" 'hledger-prev-report) +(evil-define-key* 'normal hledger-view-mode-map "]" 'hledger-next-report) + +(map! :leader + :prefix ("l" . "hledger") + :desc "Exec hledger command" + "c" 'hledger-run-command + + :desc "Generate hledger balancesheet" + "b" 'hledger-balancesheet* + + :desc "Generate hledger daily report" + "d" 'hledger-daily-report*) + +(map! :localleader + :map hledger-mode-map + + :desc "Reschedule transaction at point" + "d s" 'hledger-reschedule + + :desc "Edit amount at point" + "t a" 'hledger-edit-amount) + +(require 'focus) + +(map! :leader + :prefix ("F" . "Focus mode") + :desc "Toggle focus mode" + "t" 'focus-mode + + :desc "Pin focused section" + "p" 'focus-pin + + :desc "Unpin focused section" + "u" 'focus-unpin) + +(add-to-list 'focus-mode-to-thing '(org-mode . org-element)) +(add-to-list 'focus-mode-to-thing '(python-mode . paragraph)) +(add-to-list 'focus-mode-to-thing '(lisp-mode . paragraph)) + +;(add-hook 'org-mode-hook #'focus-mode) + +;;;------ helpful configuration ------;;; + +(evil-set-initial-state 'helpful-mode 'normal) +(evil-define-key 'normal helpful-mode-map + "j" 'evil-next-visual-line + "k" 'evil-previous-visual-line + "q" 'helpful-kill-buffers) + +;;;------ helpful configuration ------;;; +(add-load-path! "~/.nix-profile/share/emacs/site-lisp/elpa/mu4e-1.12.2") +(require 'mu4e) +(require 'mu4e-contrib) +(require 'mu4e-actions) + +(after! mu4e + (setq mu4e-modeline-support nil) + (setq mu4e-sent-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Sent"))) + (setq mu4e-drafts-folder (lambda (msg) (concat "/" user-mail-address "/Drafts"))) + (setq mu4e-trash-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Trash"))) + (setq mu4e-refile-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Folders/" (completing-read "Refile msg to: " (directory-files (concat "~/.mail/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Folders")))))) + + (setq mu4e-index-lazy-check t) + (setq mu4e-index-cleanup t) + (setq mu4e-update-interval 120) + (mu4e-alert-enable-notifications) + + (define-key mu4e-main-mode-map (kbd "") #'doom/leader) + (define-key mu4e-headers-mode-map (kbd "") #'doom/leader) + (define-key mu4e-view-mode-map (kbd "") #'doom/leader) + + (define-key mu4e-main-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-main-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-main-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-main-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-main-mode-map (kbd "w") #'evil-forward-word-begin) + + (unbind-key "g" mu4e-headers-mode-map) + (define-key mu4e-headers-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-headers-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-headers-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-headers-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-headers-mode-map (kbd "w") #'evil-forward-word-begin) + + (unbind-key "g" mu4e-view-mode-map) + (define-key mu4e-view-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-view-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-view-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-view-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-view-mode-map (kbd "w") #'evil-forward-word-begin) + + (map! :map 'mu4e-main-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-main-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-main-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + + (map! :map 'mu4e-headers-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-headers-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-headers-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + (map! :map 'mu4e-headers-mode-map :desc "Next char" :ge "l" #'evil-forward-char) + (map! :map 'mu4e-headers-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index) + (map! :map 'mu4e-headers-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply) + (map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-headers-mark-for-refile) + + (map! :map 'mu4e-view-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-view-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-view-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + (map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index) + (map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply) + (map! :map 'mu4e-view-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile) + + (add-to-list 'mu4e-header-info-custom + '(:maildir-folder-no-account . + ( :name "Maildir folder without account" ;; long name, as seen in the message-view + :shortname "Folder" ;; short name, as seen in the headers view + :help "Name of the subfolder without the maildir" ;; tooltip + :function (lambda (msg) (substring (mu4e-message-field msg :maildir) (+ 2 (length (nth 1 (split-string (mu4e-message-field msg :maildir) "/" ))))))))) + (add-to-list 'mu4e-bookmarks + '( :name "Unified inbox" + :query "maildir://.*/INBOX/" + :key ?i)) + (setq mu4e-headers-fields + '((:account-stripe . 1) + (:account . 25) + (:human-date . 12) + (:flags . 6) + (:from-or-to . 20) + (:maildir-folder-no-account . 30) + (:subject))) + + (add-hook 'mu4e-compose-mode-hook #'(lambda () (auto-save-mode -1))) + (setq mu4e-sent-messages-behavior 'delete) + + (setq sendmail-program "~/.nix-profile/bin/msmtp") + (setq send-mail-function 'smtpmail-send-it) + (setq message-sendmail-f-is-evil t) + (setq message-sendmail-extra-arguments '("--read-envelope-from")) + (setq message-send-mail-function 'message-send-mail-with-sendmail) + (if (file-exists-p "~/.emacs.d/mu4e-private.el") (load! "~/.emacs.d/mu4e-private.el")) + + ;; https://emacs.stackexchange.com/questions/3061/how-to-stop-mu4e-from-inserting-line-breaks + (defun no-auto-fill () + "Turn off auto-fill-mode." + (auto-fill-mode -1)) + + (defun no-org-msg-mode () + "Disable org-msg-mode since it doesn't respect multiline emails" + (org-msg-mode 0)) + + (add-hook 'mu4e-compose-mode-hook #'no-auto-fill) + (add-hook 'mu4e-compose-pre-hook #'no-org-msg-mode) + + (mu4e--start) ;; start mu4e silently + +) + +;;;-- Load emacs direnv;;;-- +(require 'direnv) +(direnv-mode) + +;;;-- projectile wrapper commands ;;;-- +(defun projectile-goto-project () + (interactive) + (projectile-switch-project t) + ;;(neotree-dir (projectile-project-root)) +) + +(map! :leader + :desc "Open project" + "p p" #'projectile-goto-project) +(map! :leader + :desc "Projectile commander" + "p @" #'projectile-commander) +(map! :leader + :desc "Projectile grep" + "/" #'projectile-grep) +(after! projectile (put 'projectile-grep 'disabled nil)) + +;;;-- projectile wrapper commands ;;;-- +(require 'sudo-edit) +(setq sudo-edit-local-method "doas") + +(map! :leader + :desc "Open current file as root" + "f U" #'sudo-edit-current-file) +(map! :leader + :desc "Find a file and open as root" + "f u" #'sudo-edit-find-file) + +;;;-- LSP stuff ;;;-- +(require 'lsp-mode) +(require 'nix-mode) +(require 'gdscript-mode) + +(add-hook 'nix-mode-hook 'lsp-deferred) +(add-hook 'gdscript-mode-hook 'lsp-deferred) + +(setq gdscript-godot-executable "godot4") + +(setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace")) + +(setq lsp-treemacs-deps-position-params + '((side . right) + (slot . 1) + (window-width . 35))) + +(setq lsp-treemacs-symbols-position-params +'((side . right) + (slot . 2) + (window-width . 35))) + +(map! :leader :desc "Open treemacs symbol outliner" "o s" #'lsp-treemacs-symbols + :desc "Hide neotree" "o S" #'treemacs-quit) + +(setq +format-on-save-enabled-modes '(not emacs-lisp-mode sql-mode tex-mode latex-mode org-msg-edit-mode nix-mode)) + +(defun lsp-booster--advice-json-parse (old-fn &rest args) + "Try to parse bytecode instead of json." + (or + (when (equal (following-char) ?#) + (let ((bytecode (read (current-buffer)))) + (when (byte-code-function-p bytecode) + (funcall bytecode)))) + (apply old-fn args))) +(advice-add (if (progn (require 'json) + (fboundp 'json-parse-buffer)) + 'json-parse-buffer + 'json-read) + :around + #'lsp-booster--advice-json-parse) + +(defun lsp-booster--advice-final-command (old-fn cmd &optional test?) + "Prepend emacs-lsp-booster command to lsp CMD." + (let ((orig-result (funcall old-fn cmd test?))) + (if (and (not test?) ;; for check lsp-server-present? + (not (file-remote-p default-directory)) ;; see lsp-resolve-final-command, it would add extra shell wrapper + lsp-use-plists + (not (functionp 'json-rpc-connection)) ;; native json-rpc + (executable-find "emacs-lsp-booster")) + (progn + (when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH) + (setcar orig-result command-from-exec-path)) + (message "Using emacs-lsp-booster for %s!" orig-result) + (cons "emacs-lsp-booster" orig-result)) + orig-result))) +(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) + +(map! :leader :desc "Find definition using lsp" "L d" #'lsp-find-definition) + +;; devdocs are cool +(require 'devdocs) + +(map! :leader :desc "Peruse devdocs" "L p" #'devdocs-peruse) + +(add-to-list 'tramp-remote-path 'tramp-own-remote-path) +(after! vterm + (add-to-list 'vterm-tramp-shells '("ssh" "zsh")) ;; I use zsh on all my servers +) + +;; I source my rss from my freshrss instance +;; I login with a private elisp file: ~/.emacs.d/freshrss-elfeed.el +;; freshrss-elfeed.el looks like this: +;;(elfeed-protocol-enable) +;;(setq elfeed-use-curl t) +;;(setq elfeed-set-timeout 36000) +;;(setq elfeed-log-level 'debug) +;;(setq freshrss-hostname "https://freshrss.example.com") +;;(setq elfeed-feeds (list +;; (list "fever+https://user@freshrss.example.com" +;; :api-url "https://user@freshrss.example.com/api/fever.php" +;; :password "mYsUpErCoMpLiCaTeDp@s$w0rD")))) +;;(setq main-elfeed-feed "https://user@freshrss.example.com/api/fever.php") + +(if (file-exists-p "~/.emacs.d/freshrss-elfeed.el") (load! "~/.emacs.d/freshrss-elfeed.el")) +(setq elfeed-search-filter "@6-months-ago +unread") +(setq browse-url-chromium-program "mpv") +(setq browse-url-chrome-program "mpv") +(setq browse-url-handlers '(("youtube.com" . browse-url-chrome) + ("youtu.be" . browse-url-chrome) + ("odcyn.com" . browse-url-chrome) + ("odysee.com" . browse-url-chrome) + ("tilvids.com" . browse-url-chrome))) +(map! :leader :desc "Open elfeed" "O n" #'elfeed) +(map! :map 'elfeed-search-mode-map :desc "Open url" :n "g o" #'elfeed-search-browse-url) + +(defun elfeed-full-update () + (interactive) + (elfeed-search-update--force) + (cl-loop for entry in elfeed-search-entries + do (elfeed-untag-1 entry 'unread)) + (elfeed-protocol-fever-reinit freshrss-hostname) + (elfeed-update)) + +(add-hook 'elfeed-search-mode-hook 'elfeed-full-update) +(add-hook 'elfeed-search-update-hook (lambda () (goto-char (point-min)))) diff --git a/user/app/doom-emacs/doom.nix b/user/app/doom-emacs/doom.nix new file mode 100644 index 0000000..dde3ddf --- /dev/null +++ b/user/app/doom-emacs/doom.nix @@ -0,0 +1,148 @@ +{ config, lib, pkgs, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: +let + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); + dashboardLogo = ./. + "/nix-" + themePolarity + ".webp"; +in +{ + imports = [ + inputs.nix-doom-emacs.hmModule + ../git/git.nix + ../../shell/sh.nix + ../../shell/cli-collection.nix + ]; + + programs.doom-emacs = { + enable = true; + emacsPackage = pkgs-emacs.emacs29-pgtk; + doomPrivateDir = ./.; + # This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34 + # Only init/packages so we only rebuild when those change. + doomPackageDir = let + filteredPath = builtins.path { + path = ./.; + name = "doom-private-dir-filtered"; + filter = path: type: + builtins.elem (baseNameOf path) [ "init.el" "packages.el" ]; + }; + in pkgs-emacs.linkFarm "doom-packages-dir" [ + { + name = "init.el"; + path = "${filteredPath}/init.el"; + } + { + name = "packages.el"; + path = "${filteredPath}/packages.el"; + } + { + name = "config.el"; + path = pkgs-emacs.emptyFile; + } + ]; + # End block + }; + + home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors { + template = builtins.readFile ./themes/doom-stylix-theme.el.mustache; + extension = ".el"; + }; + + home.packages = (with pkgs-emacs; [ + emacs-lsp-booster + file + wmctrl + jshon + aria + hledger + hunspell hunspellDicts.en_US-large + (pkgs-emacs.mu.override { emacs = emacs29-pgtk; }) + (pkgs.callPackage ./pkgs/org-analyzer.nix {}) + emacsPackages.mu4e + isync + msmtp + (python3.withPackages (p: with p; [ + pandas + requests + epc lxml + pysocks + pymupdf + markdown + ])) + ]) ++ (with pkgs-stable; [ + nodejs + nodePackages.mermaid-cli + ]) ++ (with pkgs; [ + openssl + stunnel + ]); + + services.mbsync = { + enable = true; + package = pkgs-stable.isync; + frequency = "*:0/5"; + }; + + home.file.".emacs.d/org-yaap" = { + source = "${inputs.org-yaap}"; + recursive = true; + }; + + home.file.".emacs.d/org-side-tree" = { + source = "${inputs.org-side-tree}"; + recursive = true; + }; + + home.file.".emacs.d/org-timeblock" = { + source = "${inputs.org-timeblock}"; + recursive = true; + }; + + home.file.".emacs.d/org-nursery" = { + source = "${inputs.org-nursery}"; + }; + + home.file.".emacs.d/org-krita" = { + source = "${inputs.org-krita}"; + }; + + home.file.".emacs.d/org-xournalpp" = { + source = "${inputs.org-xournalpp}"; + }; + + home.file.".emacs.d/org-sliced-images" = { + source = "${inputs.org-sliced-images}"; + }; + + home.file.".emacs.d/magit-file-icons" = { + source = "${inputs.magit-file-icons}"; + }; + + home.file.".emacs.d/dashboard-logo.webp".source = dashboardLogo; + home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = { + source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh; + executable = true; + }; + + home.file.".emacs.d/phscroll" = { + source = "${inputs.phscroll}"; + }; + + home.file.".emacs.d/mini-frame" = { + source = "${inputs.mini-frame}"; + }; + + home.file.".emacs.d/system-vars.el".text = '' + ;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*- + + ;; Import relevant variables from flake into emacs + + (setq user-full-name "''+userSettings.name+''") ; name + (setq user-username "''+userSettings.username+''") ; username + (setq user-mail-address "''+userSettings.email+''") ; email + (setq user-home-directory "/home/''+userSettings.username+''") ; absolute path to home directory as string + (setq user-default-roam-dir "''+userSettings.defaultRoamDir+''") ; absolute path to home directory as string + (setq system-nix-profile "''+systemSettings.profile+''") ; what profile am I using? + (setq system-wm-type "''+userSettings.wmType+''") ; wayland or x11? + (setq doom-font (font-spec :family "''+userSettings.font+''" :size 20)) ; import font + (setq dotfiles-dir "''+userSettings.dotfilesDir+''") ; import location of dotfiles directory + ''; +} diff --git a/user/app/doom-emacs/doom.org b/user/app/doom-emacs/doom.org new file mode 100644 index 0000000..3f9087f --- /dev/null +++ b/user/app/doom-emacs/doom.org @@ -0,0 +1,2330 @@ +#+TITLE: Doom Emacs Literate Config +#+AUTHOR: Emmet +# FIXME doom emacs config +* Table of Contents :TOC:QUOTE: +#+BEGIN_QUOTE +- [[#what-is-doom-emacs][What is Doom Emacs?]] +- [[#configuration-for-doom-emacs][Configuration for Doom Emacs]] +- [[#my-configel][My config.el]] + - [[#preamble--user-configuration][Preamble + User Configuration]] + - [[#registers][Registers]] + - [[#org-mode-configuration][Org Mode Configuration]] + - [[#org-roam-configuration][Org Roam Configuration]] + - [[#org-agenda-configuration][Org Agenda Configuration]] + - [[#magit-configuration][Magit Configuration]] + - [[#ibuffer-configuration][Ibuffer Configuration]] + - [[#dired-configuration][Dired Configuration]] + - [[#ranger-configuration][Ranger Configuration]] + - [[#hledger-mode-configuration][hledger-mode Configuration]] + - [[#no-tab-bar-configuration][NO Tab Bar Configuration]] + - [[#focus-mode-configuration][Focus Mode Configuration]] + - [[#helpful-mode-configuration][Helpful Mode Configuration]] + - [[#mu4e-configuration][mu4e Configuration]] + - [[#direnv][Direnv]] + - [[#projectile][Projectile]] + - [[#sudo-edit][sudo-edit]] + - [[#lsp][LSP]] + - [[#devdocs][DevDocs]] + - [[#terminal][Terminal]] + - [[#elfeed][Elfeed]] +- [[#my-initel][My init.el]] +- [[#my-packagesel][My packages.el]] +- [[#nix-integration][Nix Integration]] +#+END_QUOTE + +* What is Doom Emacs? +[[https://github.com/doomemacs/doomemacs][Doom Emacs]] is a distribution of the [[https://www.gnu.org/software/emacs/][Emacs Text Editor]] designed for [[https://www.vim.org/][Vim]] users. I like to use Emacs due to its extensibility and extra features it is capable of (besides text editing). Some of these extra features include: +- [[https://orgmode.org/][Org Mode]] (Hierarchical text-based document format) +- [[https://www.orgroam.com/][Org Roam]] (A second brain / personal wiki) +- [[https://orgmode.org/][Org Agenda]] (Calendar and todo list) +- [[https://magit.vc/][Magit]] (Git Client) + +I have found Emacs to be incredibly efficient, and transferring my workflow to fit inside of Emacs has allowed me to get much more work done. I primarily use Emacs for writing, note-taking, task/project management and organizing information. + +* Configuration for Doom Emacs +Doom Emacs is configured via 3 main files, written in Elisp, a dialect of the Lisp programming language designed for Emacs. These 3 main files are: +- [[./config.el][config.el]] - Stores your main configuration and allows to set user variables. +- [[./init.el][init.el]] - Allows quick downloads of groups of Emacs packages. These groups of Emacs packages are curated by the Doom Emacs developers. +- [[./packages.el][packages.el]] - Allows you to download additional packages from Melpa (Emacs package manager). + +By storing your configuration in these 3 files, it allows for quick reproducible builds of Doom Emacs. + +You can also load separate files inside of [[./config.el][config.el]] via the =load!= function, like so: + +#+BEGIN_SRC emacs-lisp +(load! "~/.doom.d/private.el") +#+END_SRC + +This can be used to load private config file with non-public information, or can be used to create modular configuration. + +Doom Emacs is traditionally installed by cloning the repository ([[https://github.com/doomemacs/doomemacs][https://github.com/doomemacs/doomemacs]]) and running =./bin/doom install=. I instead install Doom Emacs via Nix Doom Emacs ([[https://github.com/nix-community/nix-doom-emacs][https://github.com/nix-community/nix-doom-emacs]]), which packages Doom Emacs as a Nix derivation. The advantage to this is that I get more reproducibility and the ability to rollback updates (if anything breaks), but the downside is that any time Emacs packages are changed/updated, the entire derivation must be rebuilt from scratch (this is often time-consuming). I load this as a Nix derivation in my flake using the [[./doom.nix][doom.nix]] module. + +* My config.el +** Preamble + User Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;;;------ User configuration ------;;; +(setq use-package-always-defer t) + +;; Import relevant system variables from flake (see doom.nix) +;; includes variables like user-full-name, user-username, user-home-directory, user-email-address, doom-font, +;; and a few other custom variables I use later +(load! "~/.emacs.d/system-vars.el") +;; custom variables include: +;; dotfiles-dir, absolute path to home directory +;; user-default-roam-dir, name of default org-roam directory for the machine (relative to ~/Org) +;; system-nix-profile, profile selected from my dotfiles ("personal" "work" "wsl" etc...) +;; system-wm-type, wayland or x11? only should be considered if system-nix-profile is "personal" or "work" + +;; I prefer visual lines +(setq display-line-numbers-type 'visual + line-move-visual t) +(use-package-hook! evil + :pre-init + (setq evil-respect-visual-line-mode t) ;; sane j and k behavior + t) + +;; I also like evil mode visual movement +(map! :map evil-normal-state-map + :desc "Move to next visual line" + "j" 'evil-next-visual-line + :desc "Move to previous visual line" + "k" 'evil-previous-visual-line) + +;; Theme +(setq custom-theme-directory "~/.emacs.d/themes") +(setq doom-theme 'doom-stylix) +;; +unicode-init-fonts-h often errors out +(remove-hook 'doom-init-ui-hook '+unicode-init-fonts-h) + +;; Transparent background +(if (string= system-nix-profile "wsl") + ;; Can't be that tranparent under wsl because no blur + (funcall (lambda () + (set-frame-parameter nil 'alpha-background 98) + (add-to-list 'default-frame-alist '(alpha-background . 98)) + )) + ;; On Linux I can enable blur, however + (funcall (lambda () + (set-frame-parameter nil 'alpha-background 85) + (add-to-list 'default-frame-alist '(alpha-background . 85)) + )) +) + +(add-to-list 'default-frame-alist '(inhibit-double-buffering . t)) + +;; Icons in completion buffers +(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup) +(all-the-icons-completion-mode) + +;; Grammar tasing should be voluntary +(setq writegood-mode nil) + +;; Beacon shows where the cursor is, even when fast scrolling +(setq beacon-mode t) + +(setq company-idle-delay 0.05) + +;; Quicker window management keybindings +(bind-key* "C-j" #'evil-window-down) +(bind-key* "C-k" #'evil-window-up) +(bind-key* "C-h" #'evil-window-left) +(bind-key* "C-l" #'evil-window-right) +(bind-key* "C-q" #'evil-window-delete) +(bind-key* "M-q" #'kill-current-buffer) +(bind-key* "M-w" #'+workspace/close-window-or-workspace) +(bind-key* "M-n" #'next-buffer) +(bind-key* "M-p" #'previous-buffer) +(bind-key* "M-z" #'+vterm/toggle) +(bind-key* "M-e" #'+eshell/toggle) +(bind-key* (kbd "M-") #'+vterm/here) +(bind-key* (kbd "M-E") #'+eshell/here) + +;; Buffer management +(bind-key* "" #'next-buffer) +(bind-key* "" #'previous-buffer) + +;; Disables custom.el +(setq custom-file null-device) + +;; emacs-dashboard setup +(require 'all-the-icons) +(require 'dashboard) +(setq initial-buffer-choice (lambda () (get-buffer-create "*dashboard*")) + doom-fallback-buffer-name "*dashboard*") +(setq image-scaling-factor 1) + +;; emacs-dashboard variables +(setq dashboard-banner-logo-title "Welcome to Nix Doom Emacs") +(setq dashboard-startup-banner "~/.emacs.d/dashboard-logo.webp") +(setq dashboard-icon-type 'all-the-icons) ;; use `all-the-icons' package +(setq dashboard-set-heading-icons t) +(setq dashboard-set-file-icons t) +(setq dashboard-set-navigator t) +(setq dashboard-items '()) +(setq dashboard-center-content t) +(setq dashboard-footer-messages '("Here to do customizing, or actual work?" + "M-x insert-inspiring-message" + "My software never has bugs. It just develops random features." + "Dad, what are clouds made of? Linux servers, mostly." + "There is no place like ~" + "~ sweet ~" + "sudo chown -R us ./allyourbase" + "I’ll tell you a DNS joke but it could take 24 hours for everyone to get it." + "I'd tell you a UDP joke, but you might not get it." + "I'll tell you a TCP joke. Do you want to hear it?")) + +;; Remove basic evil input and cursors from dashboard +(defun disable-cursor() + (setq-local evil-normal-state-cursor '(bar . 0)) + (hl-line-mode -1) +) +(add-hook 'dashboard-mode-hook 'disable-cursor) +(evil-define-key 'normal dashboard-mode-map + "j" 'evil-normal-state + "k" 'evil-normal-state + "h" 'evil-normal-state + "l" 'evil-normal-state) +(setq dashboard-navigator-buttons + `(;; line1 + ( (,"Roam" "" "" (lambda (&rest _)) 'org-formula) + (,(all-the-icons-octicon "globe" :height 1.0 :v-adjust 0.0) + "Notes overview" "" (lambda (&rest _) (org-roam-default-overview)) 'org-formula) + (,(all-the-icons-fileicon "org" :height 1.0 :v-adjust 0.0) + "Switch roam db" "" (lambda (&rest _) (org-roam-switch-db)) 'org-formula) + ) + ;; line 2 + ( (,"Git" "" "" (lambda (&rest _)) 'diredfl-exec-priv) + (,(all-the-icons-octicon "mark-github" :height 1.0 :v-adjust 0.0) + "GitHub" "" (lambda (&rest _) (browse-url "https://github.com/librephoenix")) 'diredfl-exec-priv) + (,(all-the-icons-faicon "gitlab" :height 1.0 :v-adjust 0.0) + "GitLab" "" (lambda (&rest _) (browse-url "https://gitlab.com/librephoenix")) 'diredfl-exec-priv) + (,(all-the-icons-faicon "coffee" :height 1.0 :v-adjust 0.0) + "Gitea" "" (lambda (&rest _) (browse-url my-gitea-domain)) 'diredfl-exec-priv) + (,(all-the-icons-octicon "triangle-up" :height 1.2 :v-adjust -0.1) + "Codeberg" "" (lambda (&rest _) (browse-url "https://codeberg.org/librephoenix")) 'diredfl-exec-priv) + ) + ;; line 3 + ( (,"Agenda" "" "" (lambda (&rest _)) 'dired-warning) + (,(all-the-icons-octicon "checklist" :height 1.0 :v-adjust 0.0) + "Agenda todos" "" (lambda (&rest _) (org-agenda-list)) 'dired-warning) + (,(all-the-icons-octicon "calendar" :height 1.0 :v-adjust 0.0) + "Agenda calendar" "" (lambda (&rest _) (cfw:open-org-calendar)) 'dired-warning) + ) + ;; line 4 + ( (,"Config" "" "" (lambda (&rest _)) 'dired-mark) + (,(all-the-icons-faicon "cogs" :height 1.0 :v-adjust 0.0) + "System config" "" (lambda (&rest _) (projectile-switch-project-by-name "~/.dotfiles" t)) 'dired-mark) + (,(all-the-icons-material "help" :height 1.0 :v-adjust -0.2) + "Doom documentation" "" (lambda (&rest _) (doom/help)) 'dired-mark) + ))) + +(setq dashboard-footer-icon + (all-the-icons-faicon "list-alt" + :height 1.0 + :v-adjust -0.15 + :face 'font-lock-keyword-face)) +(dashboard-setup-startup-hook) + +(map! :leader :desc "Open dashboard" "b b" #'dashboard-refresh-buffer) + +(setq scroll-conservatively 101) + +;; Smooth scrolling +;; requires good-scroll.el +;;(good-scroll-mode 1) +;;(setq good-scroll-duration 0.4 +;; good-scroll-step 270 +;; good-scroll-render-rate 0.03) +;; +;;(global-set-key (kbd "") #'good-scroll-up-full-screen) +;;(global-set-key (kbd "") #'good-scroll-down-full-screen) + +(setq scroll-margin 30) +(setq hscroll-margin 10) + +;; Requires for faster loading +(require 'org-agenda) +(require 'dired) + +;; Garbage collection to speed things up +(add-hook 'after-init-hook + #'(lambda () + (setq gc-cons-threshold (* 100 1024 1024)))) +(add-hook 'focus-out-hook 'garbage-collect) +(run-with-idle-timer 5 t 'garbage-collect) + +;; Enable autorevert globally so that buffers update when files change on disk. +;; Very useful when used with file syncing (i.e. syncthing) +(setq global-auto-revert-mode nil) +(setq auto-revert-use-notify t) + +;; Neotree fun +(defun neotree-snipe-dir () + (interactive) + (if (projectile-project-root) + (neotree-dir (projectile-project-root)) + (neotree-dir (file-name-directory (file-truename (buffer-name)))) + ) +) + +(map! :leader :desc "Open neotree here" "o n" #'neotree-snipe-dir + :desc "Hide neotree" "o N" #'neotree-hide) + +;; For camelCase +(global-subword-mode 1) + +;; ripgrep as grep +(setq grep-command "rg -nS --no-heading " + grep-use-null-device nil) + +;; Mini-frames ;; cool but kinda suboptimal atm +;(add-load-path! "~/.emacs.d/mini-frame") +;(require 'mini-frame) +;(setq mini-frame-ignore-commands '(evil-ex-search-forward helpful-variable helpful-callable)) +;(setq mini-frame-show-parameters +; '((left . 216) +; (top . 240) +; (width . 0.78) +; (height . 20) +; (alpha-background . 90)) +;) +;(setq mini-frame-detach-on-hide nil) +;(setq mini-frame-resize t) +;(setq resize-mini-frames t) +;(setq mini-frame-standalone nil) +;(mini-frame-mode 1) + +#+END_SRC +** Registers +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ Registers ------;;; + +(map! :leader + :desc "Jump to register" + "r" 'jump-to-register) + +(if (string= system-nix-profile "personal") (set-register ?f (cons 'file (concat user-home-directory "/Org/Family.s/Notes/hledger.org")))) +(set-register ?h (cons 'file user-home-directory)) +(set-register ?r (cons 'file (concat dotfiles-dir "/README.org"))) + +#+END_SRC +** Org Mode Configuration +*** Standard Org Mode Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ Org mode configuration ------;;; + +;; Set default org directory +(setq org-directory "~/Org") +(setq org-attach-directory "~/Org/.attach") +(setq org-attach-id-dir "~/Org/.attach") +(setq org-id-locations-file "~/Org/.orgids") +(setq org-cycle-include-plain-lists 'integrate) + +(remove-hook 'after-save-hook #'+literate|recompile-maybe) +(set-company-backend! 'org-mode nil) + +;; Automatically show images but manually control their size +(setq org-startup-with-inline-images t + org-image-actual-width nil) + +(require 'evil-org) +(require 'evil-org-agenda) +(add-hook 'org-mode-hook 'evil-org-mode -100) + +;; Top-level headings should be bigger! +(custom-set-faces! + `(outline-1 :height 1.3 :foreground ,(nth 1 (nth 14 doom-themes--colors))) + `(outline-2 :height 1.25 :foreground ,(nth 1 (nth 15 doom-themes--colors))) + `(outline-3 :height 1.2 :foreground ,(nth 1 (nth 19 doom-themes--colors))) + `(outline-4 :height 1.1 :foreground ,(nth 1 (nth 23 doom-themes--colors))) + `(outline-5 :height 1.1 :foreground ,(nth 1 (nth 24 doom-themes--colors))) + `(outline-6 :height 1.1 :foreground ,(nth 1 (nth 16 doom-themes--colors))) + `(outline-7 :height 1.05 :foreground ,(nth 1 (nth 18 doom-themes--colors))) + `(outline-8 :height 1.05 :foreground ,(nth 1 (nth 11 doom-themes--colors))) + '(variable-pitch :family "Intel One Mono") + `(org-agenda-date :inherit 'unspecified :foreground ,(nth 1 (nth 19 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-today :inherit 'unspecified :foreground ,(nth 1 (nth 15 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-weekend :inherit 'unspecified :foreground ,(nth 1 (nth 24 doom-themes--colors)) :weight bold :height 1.1) + `(org-agenda-date-weekend-today :inherit 'unspecified :foreground ,(nth 1 (nth 15 doom-themes--colors)) :weight bold :height 1.1) +) + +(after! org (org-eldoc-load)) + +(with-eval-after-load 'org (global-org-modern-mode)) + +;; Add frame borders and window dividers +(modify-all-frames-parameters + '((right-divider-width . 5) + (internal-border-width . 5))) +(dolist (face '(window-divider + window-divider-first-pixel + window-divider-last-pixel)) + (face-spec-reset-face face) + (set-face-foreground face (face-attribute 'default :background))) +(set-face-background 'fringe (face-attribute 'default :background)) + +(setq + ;; Edit settings + org-auto-align-tags nil + org-tags-column 0 + org-catch-invisible-edits 'show-and-error + org-special-ctrl-a/e t + org-insert-heading-respect-content t + + ;; Org styling, hide markup etc. + org-hide-emphasis-markers t + org-pretty-entities t + org-ellipsis "…") + +(setq-default line-spacing 0) + +; Automatic table of contents is nice +(if (require 'toc-org nil t) + (progn + (add-hook 'org-mode-hook 'toc-org-mode) + (add-hook 'markdown-mode-hook 'toc-org-mode)) + (warn "toc-org not found")) + +;;---- this block from http://fgiasson.com/blog/index.php/2016/06/21/optimal-emacs-settings-for-org-mode-for-literate-programming/ ----;; +;; Tangle Org files when we save them +(defun tangle-on-save-org-mode-file() + (when (string= (message "%s" major-mode) "org-mode") + (org-babel-tangle))) + +(add-hook 'after-save-hook 'tangle-on-save-org-mode-file) +;; ---- end block ---- ;; + +;; Better org table editing +;; This breaks multiline visual block edits +;;(setq-default evil-insert-state-exit-hook '(org-update-parent-todo-statistics +;; t)) +;;(setq org-table-automatic-realign nil) + +;; Better for org source blocks +(setq electric-indent-mode nil) +(setq org-src-window-setup 'current-window) +(set-popup-rule! "^\\*Org Src" + :side 'top' + :size 0.9) + +;; Horizontal scrolling tables +(add-load-path! "~/.emacs.d/phscroll") +(setq org-startup-truncated nil) +(with-eval-after-load "org" + (require 'org-phscroll)) +(setq phscroll-calculate-in-pixels t) + +;; Org side tree outline +(add-load-path! "~/.emacs.d/org-side-tree") +(require 'org-side-tree) +(setq org-side-tree-persistent nil) +(setq org-side-tree-fontify t) +(setq org-side-tree-enable-folding t) +(defun org-side-tree-create-or-toggle () + (interactive) + (if (or (org-side-tree-has-tree-p) (eq major-mode 'org-side-tree-mode)) + (org-side-tree-toggle) + (org-side-tree))) +(map! :leader + "O t" #'org-side-tree-create-or-toggle) +(map! :map org-side-tree-mode-map + "SPC" nil) + +#+END_SRC + +*** Org Download and Image Capture +#+BEGIN_SRC emacs-lisp :tangle config.el +(require 'org-download) + +;; Drag-and-drop to `dired` +(add-hook 'dired-mode-hook 'org-download-enable) + +;; system-wm-type, wayland or x11? only should be considered if system-nix-profile is "personal" or "work" +(if (string= system-wm-type "wayland") + (setq org-download-screenshot-method "grim -g \"$(slurp)\" %s") + (setq org-download-screenshot-method "flameshot gui -p %s") +) + +(after! org-download + (setq org-download-method 'directory)) + +(after! org + (setq-default org-download-image-dir "img/" + org-download-heading-lvl nil)) + +(add-to-list 'display-buffer-alist '("^*Async Shell Command*" . (display-buffer-no-window))) + +(defun org-download-clipboard-basename () + (interactive) + (setq org-download-path-last-dir org-download-image-dir) + (setq org-download-image-dir (completing-read "directory: " (-filter #'f-directory-p (directory-files-recursively "." "" t)) nil t)) + (org-download-clipboard (completing-read "basename: " '() nil nil)) + (setq org-download-image-dir org-download-path-last-dir) +) + +(map! :leader + :desc "Insert a screenshot" + "i s" 'org-download-screenshot + :desc "Insert image from clipboard" + "i p" 'org-download-clipboard + "i P" 'org-download-clipboard-basename) + +#+END_SRC +*** External Program File Management +#+BEGIN_SRC emacs-lisp :tangle config.el +(defun org-new-file-from-template() + "Copy a template from ~/Templates into a time stamped unique-named file in the +same directory as the org-buffer and insert a link to this file." + (interactive) + (setq template-file (completing-read "Template file:" (directory-files "~/Templates"))) + (setq filename + (concat + (make-temp-name + (concat (file-name-directory (buffer-file-name)) + "files/" + (file-name-nondirectory (buffer-file-name)) + "_" + (format-time-string "%Y%m%d_%H%M%S_")) ) (file-name-extension template-file t))) + (copy-file (concat user-home-directory "/Templates/" template-file) filename) + (setq prettyname (read-from-minibuffer "Pretty name:")) + (insert (concat "[[./files/" (file-name-nondirectory filename) "][" prettyname "]]")) + (org-display-inline-images)) + +(map! :leader + :desc "Create a new file from a template and insert a link at point" + "i t" 'my-org-new-file-from-template) + +(if (not (string= system-nix-profile "wsl")) + (when (require 'openwith nil 'noerror) + (setq openwith-associations + (list + (list (openwith-make-extension-regexp + '("mpg" "mpeg" "mp3" "mp4" + "avi" "wmv" "wav" "mov" "flv" + "ogm" "ogg" "mkv")) + "mpv" + '(file)) + (list (openwith-make-extension-regexp + '("doc" "xls" "ppt" "odt" "ods" "odg" "odp")) + "libreoffice" + '(file)) + '("\\.lyx" "lyx" (file)) + '("\\.chm" "kchmviewer" (file)) + (list (openwith-make-extension-regexp + '("pdf" "ps" "ps.gz" "dvi")) + "atril" + '(file)) + (list (openwith-make-extension-regexp + '("kdenlive")) + "kdenlive-accel" + '(file)) + (list (openwith-make-extension-regexp + '("kra")) + "krita" + '(file)) + (list (openwith-make-extension-regexp + '("blend" "blend1")) + "blender" + '(file)) + (list (openwith-make-extension-regexp + '("helio")) + "helio" + '(file)) + (list (openwith-make-extension-regexp + '("svg")) + "inkscape" + '(file)) + (list (openwith-make-extension-regexp + '("flp")) + "flstudio" + '(file)) + (list (openwith-make-extension-regexp + '("mid")) + "rosegarden" + '(file)) + )) + (openwith-mode 1))) + +(add-load-path! "~/.emacs.d/org-krita") +(require 'org-krita) +(add-hook 'org-mode-hook 'org-krita-mode) +(setq org-krita-extract-filename "preview.png") +(setq org-krita-scale 1) + +(add-load-path! "~/.emacs.d/org-xournalpp") +(require 'org-xournalpp) +(add-hook 'org-mode-hook 'org-xournalpp-mode) +(setq org-xournalpp-template-getter + '(closure + (t) + nil + (file-truename "~/Templates/template.xopp") ; use my own template + ) +) + +;; override width to static 250 for now +;; so I don't have massive images in org mode (scrolling not fun) +(defun org-xournalpp--create-image (link refresh) + "Extract svg/png from given LINK and return image. + +Regenerate the cached inline image, if REFRESH is true. + +If the path from LINK does not exist, nil is returned." + (let ((width 250) + (xopp-path (f-expand (org-element-property :path link)))) + (when (f-exists? xopp-path) + (if width + (create-image (org-xournalpp--get-image xopp-path refresh) + org-xournalpp-image-type + nil + :width width) + (create-image (org-xournalpp--get-image xopp-path refresh) + org-xournalpp-image-type + nil))))) + + +#+END_SRC +*** Copy Links/Files into Clipboard +#+BEGIN_SRC emacs-lisp :tangle config.el +(defun org-copy-link-to-clipboard-at-point () + "Copy current link at point into clipboard (useful for images and links)" + ;; Remember to press C-g to kill this foreground process if it hangs! + (interactive) + (if (eq major-mode #'org-mode) + (link-hint-copy-link-at-point) + ) + (if (eq major-mode #'ranger-mode) + (ranger-copy-absolute-file-paths) + ) + (if (eq major-mode #'image-mode) + (image-mode-copy-file-name-as-kill) + ) + (shell-command "~/.emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh " nil nil) +) + +(if (string= system-nix-profile "wsl") + (map! :leader + :desc "Copy link at point" + "y y" 'link-hint-copy-link-at-point) + (map! :leader + :desc "Copy link/file at point into system clipbord (C-g to escape if copying a file)" + "y y" 'org-copy-link-to-clipboard-at-point)) + +#+END_SRC +**** Copy Link/File to Clipboard Helper Script +Shamelessly stolen from [[https://unix.stackexchange.com/questions/30093/copy-image-from-command-line-to-clipboard][here]] and modified for my use. +#+BEGIN_SRC shell :tangle ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh :tangle-mode (identity #o755) +#!/bin/sh +if [ $(echo $XDG_SESSION_TYPE) == "wayland" ]; then + FILENAME="$(wl-paste)" + FILTEREDFILENAME=$(echo "$FILENAME" | sed "s+file:+./+") + echo "$FILTEREDFILENAME" + if [[ -f "$FILTEREDFILENAME" ]]; then + wl-copy < "$FILTEREDFILENAME" + fi +elif [ $(echo $XDG_SESSION_TYPE) == "x11" ]; then + FILENAME="$(xclip -o)" + FILTEREDFILENAME=$(echo "$FILENAME" | sed "s+file:+./+") + if [[ -f "$FILTEREDFILENAME" ]]; then + TYPE=$(file -b --mime-type "$FILTEREDFILENAME") + xclip -selection clipboard -t "$TYPE" -i "$FILTEREDFILENAME" + exit + fi +else + exit +fi +exit +#+END_SRC +*** NO Org Sliced Images +#+begin_src emacs-lisp +;; this is kinda buggy +(add-load-path! "~/.emacs.d/org-sliced-images") +(require 'org-sliced-images) +(defalias 'org-remove-inline-images #'org-sliced-images-remove-inline-images) +(defalias 'org-toggle-inline-images #'org-sliced-images-toggle-inline-images) +(defalias 'org-display-inline-images #'org-sliced-images-display-inline-images) +#+end_src +*** Org Online Images +#+BEGIN_SRC emacs-lisp :tangle config.el +;; Online images inside of org mode is pretty cool +;; This snippit is from Tobias on Stack Exchange +;; https://emacs.stackexchange.com/questions/42281/org-mode-is-it-possible-to-display-online-images +(require 'org-yt) + +(defun org-image-link (protocol link _description) + "Interpret LINK as base64-encoded image data." + (cl-assert (string-match "\\`img" protocol) nil + "Expected protocol type starting with img") + (let ((buf (url-retrieve-synchronously (concat (substring protocol 3) ":" link)))) + (cl-assert buf nil + "Download of image \"%s\" failed." link) + (with-current-buffer buf + (goto-char (point-min)) + (re-search-forward "\r?\n\r?\n") + (buffer-substring-no-properties (point) (point-max))))) + +(org-link-set-parameters + "imghttp" + :image-data-fun #'org-image-link) + +(org-link-set-parameters + "imghttps" + :image-data-fun #'org-image-link) +#+END_SRC +*** Org Mermaid Diagrams +#+BEGIN_SRC emacs-lisp :tangle config.el +;; Mermaid diagrams +(setq ob-mermaid-cli-path "~/.nix-profile/bin/mmdc") +#+END_SRC +*** Org Simple Printing +#+BEGIN_SRC emacs-lisp :tangle config.el +;; Print org mode +(defun org-simple-print-buffer () + "Open an htmlized form of current buffer and open in a web browser to print" + (interactive) + (htmlize-buffer) + (browse-url-of-buffer (concat (buffer-name) ".html")) + (sleep-for 1) + (kill-buffer (concat (buffer-name) ".html"))) + +;; Doesn't work yet, bc htmlize-region takes arguments BEG and END +;(defun org-simple-print-region() +; "Open an htmlized form of current region and open in a web browser to print" +; (interactive) +; (htmlize-region ) +; (browse-url-of-buffer (concat (buffer-name) ".html")) +; (sleep-for 1) +; (kill-buffer (concat (buffer-name) ".html"))) + +(map! :leader + :prefix ("P" . "Print") + :desc "Simple print buffer in web browser" + "p" 'org-simple-print-buffer) + +(map! :leader + :prefix ("P" . "Print") + :desc "Simple print buffer in web browser" + "b" 'org-simple-print-buffer) + +;(map! :leader +; :prefix ("P" . "Print") +; :desc "Simple print region in web browser" +; "r" 'org-simple-print-region) + +#+END_SRC +*** Org Inline Macros +#+BEGIN_SRC emacs-lisp :tangle config.el +;; Display macros inline in buffers +(add-to-list 'font-lock-extra-managed-props 'display) + +(font-lock-add-keywords + 'org-mode + '(("\\({{{[a-zA-Z#%)(_-+0-9]+}}}\\)" 0 + `(face nil display + ,(format "%s" + (let* ((input-str (match-string 0)) + (el (with-temp-buffer + (insert input-str) + (goto-char (point-min)) + (org-element-context))) + (text (org-macro-expand el org-macro-templates))) + (if text + text + input-str))))))) + +#+END_SRC +*** Org Transclusion +#+BEGIN_SRC emacs-lisp :tangle config.el +;; Org transclusion +(require 'org-transclusion) +(after! org + (map! :map global-map "" #'org-transclusion-add :leader :prefix "n" :desc "Org Transclusion Mode" "t" #'org-transclusion-mode) + (map! :leader :prefix "n" "l" #'org-transclusion-live-sync-start) + (setq org-transclusion-exclude-elements '(property-drawer keyword)) + (add-hook 'org-mode-hook #'org-transclusion-mode) +) + +#+END_SRC +*** Org Jekyll +#+begin_src emacs-lisp :tangle config.el +(defun org-jekyll-new-post () + (interactive) + (setq new-blog-post-title (read-from-minibuffer "Post name: ")) + (setq new-blog-post-date (format-time-string "%Y-%m-%d" (date-to-time (org-read-date)))) + (setq new-blog-post-slug (downcase (replace-regexp-in-string "[^[:alpha:][:digit:]_-]" "" (string-replace " " "-" new-blog-post-title)))) + (setq new-blog-post-file (concat (projectile-project-root) "org/_posts/" new-blog-post-date "-" new-blog-post-slug ".org")) + (let ((org-capture-templates + `(("p" "New Jekyll blog post" plain (file new-blog-post-file) + ,(concat "#+title: " new-blog-post-title "\n#+options: toc:nil num:nil\n#+begin_export html\n---\nlayout: post\ntitle: " new-blog-post-title "\nexcerpt: %?\ntags: \npermalink: " new-blog-post-date "-" new-blog-post-slug "\n---\n#+end_export\n\n#+attr_html: :alt " new-blog-post-title " :align center\n[[../assets/" new-blog-post-date "-" new-blog-post-slug ".png]]"))) + )) (org-capture)) +) + +(defun org-jekyll-rename-post () + (interactive) + (setq new-blog-post-title (read-from-minibuffer "Post name: ")) + (setq new-blog-post-date (format-time-string "%Y-%m-%d" (date-to-time (org-read-date)))) + (setq new-blog-post-slug (downcase (replace-regexp-in-string "[^[:alpha:][:digit:]_-]" "" (string-replace " " "-" new-blog-post-title)))) + (org-roam-set-keyword "title" new-blog-post-title) + (replace-regexp "permalink: .*\n" (concat "permalink: " new-blog-post-date "-" new-blog-post-slug "\n") nil (point-min) (point-max)) + (replace-regexp "title: .*\n" (concat "title: " new-blog-post-title "\n") nil (point-min) (point-max)) + (setq prev-blog-post-filename-base (file-name-base (buffer-file-name))) + (doom/move-this-file (concat new-blog-post-date "-" new-blog-post-slug ".org")) + (shell-command (concat "sed -i s/" prev-blog-post-filename-base "/" (file-name-base (buffer-file-name)) "/g *.org") nil) + (replace-regexp prev-blog-post-filename-base (file-name-base (buffer-file-name)) nil (point-min) (point-max)) + (save-buffer) +) + +(map! :leader + :prefix ("N") + + :desc "New blog post" + "p" #'org-jekyll-new-post + + :desc "Rename or redate blog post and update links accordingly" + "e" #'org-jekyll-rename-post +) + +#+end_src +*** Crdt +#+begin_src emacs-lisp :tangle config.el +(require 'crdt) +(setq crdt-default-tls t) +(setq crdt-use-stunnel t) +(setq crdt-default-name "Emmet") +(if (file-exists-p "~/.emacs.d/crdt-private.el") (load! "~/.emacs.d/crdt-private.el")) +(defun crdt-connect-default () + (interactive) + (crdt-connect crdt-default-server-address crdt-default-name) +) +(map! :leader + :desc "crdt" + :prefix ("C") + + :desc "Connect to a crdt server" + "c" #'crdt-connect-default + + :desc "Connect to default crdt server" + "C" #'crdt-connect-default + + :desc "Disconnect from a crdt server" + "d" #'crdt-disconnect + + :desc "Add buffer to a session" + "a" #'crdt-share-buffer + + :desc "Stop sharing buffer when running a server" + "s" #'crdt-stop-share-buffer + + :desc "Run M-x on the (remote) crdt session" + "x" #'crdt-M-x + + :desc "List crdt buffers in a session" + "l" #'crdt-list-buffers + + :desc "List crdt users in a session" + "u" #'crdt-list-users +) + +#+end_src +*** Org Analyzer +#+begin_src emacs-lisp :tangle config.el +(require 'org-analyzer) +(setq org-analyzer-wrapper-command "org-analyzer") +(setq org-analyzer-jar-file-name "~/.nix-profile/bin/org-analyzer.jar") +(setq org-analyzer-java-program "~/.nix-profile/bin/org-analyzer") ;; Is not actually java, buta wrapper shell script + +(defun org-analyzer-start-process (org-dir) + "Start the org analyzer process . +Argument ORG-DIR is where the org-files are located." + (org-analyzer-cleanup-process-state) + (unless (file-exists-p org-dir) + (warn "org-analyzer was started with org-directory set to + \"%s\"\nbut this directory does not exist. +Please set the variable `org-directory' to the location where you keep your org files." + org-directory)) + (let* ((name (format " *org-analyzer [org-dir:%s]*" org-dir)) + (proc-buffer (generate-new-buffer name)) + (proc nil)) + (setq org-analyzer-process-buffer proc-buffer) + (with-current-buffer proc-buffer + (setq default-directory (if (file-exists-p org-dir) + org-dir default-directory) + proc (condition-case err + (let ((process-connection-type nil) + (process-environment process-environment)) + (start-process name + (current-buffer) + org-analyzer-wrapper-command + "--port" + (format "%d" org-analyzer-http-port) + "--started-from-emacs" + (if (file-exists-p org-dir) org-dir ""))) + (error + (concat "Can't start org-analyzer (%s: %s)" + (car err) (cadr err))))) + (set-process-query-on-exit-flag proc nil) + (set-process-filter proc #'org-analyzer-process-filter)) + proc-buffer)) + +#+end_src +** Org Roam Configuration +*** Standard Org Roam Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ Org roam configuration ------;;; +(require 'org-roam) +(require 'org-roam-dailies) + +(setq org-roam-directory (concat "~/Org/" user-default-roam-dir "/Notes") + org-roam-db-location (concat "~/Org/" user-default-roam-dir "/Notes/org-roam.db")) + +(setq org-roam-node-display-template + "${title:65}📝${tags:*}") + +(org-roam-db-autosync-mode) + +(setq mode-line-misc-info '((which-function-mode + (which-func-mode + ("" which-func-format " "))) + ("" so-long-mode-line-info) + (global-mode-string + ("" global-mode-string)) + " " + org-roam-db-choice) +) + +(setq org-roam-list-files-commands '(rg)) + +#+END_SRC +*** Multi Org Roam Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +(setq full-org-roam-db-list nil) + +(setq full-org-roam-db-list (directory-files "~/Org" t "\\.[p,s]$")) +(dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list + (append (directory-files item t "\\.[p,s]$") full-org-roam-db-list))) + +(setq org-roam-db-choice user-default-roam-dir) +(setq full-org-roam-db-list-pretty (list)) +(dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list-pretty + (append (list + (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" item)) full-org-roam-db-list-pretty))) + +(defun org-roam-open-dashboard () + "Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)" + (interactive) + (if (org-roam-node-from-title-or-alias "Overview") + (org-roam-node-open (org-roam-node-from-title-or-alias "Overview")) + (dired org-roam-directory)) +) + +(defun org-roam-open-inbox () + "Open ${org-roam-directory}/dashboard.org (I use this naming convention to create dashboards for each of my org roam maps)" + (interactive) + (if (org-roam-node-from-title-or-alias "Inbox") + (org-roam-node-open (org-roam-node-from-title-or-alias "Inbox")) + (message "No inbox found, capture something with M-x org-roam-capture-inbox")) +) + +(defun org-roam-capture-inbox () + (interactive) + (org-roam-capture- :node (org-roam-node-from-title-or-alias "Inbox") + :templates '(("i" "inbox" plain "* %?" + :if-new (file+head "%<%Y%m%d%H%M%S>-inbox.org" "#+title: Inbox\n"))))) + +(defun org-roam-switch-db (&optional arg silent) + "Switch to a different org-roam database, arg" + (interactive) + (when (not arg) + (setq full-org-roam-db-list nil) + + (setq full-org-roam-db-list (directory-files "~/Org" t "\\.[p,s]$")) + (dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list + (append (directory-files item t "\\.[p,s]$") full-org-roam-db-list))) + + (setq full-org-roam-db-list-pretty (list)) + (dolist (item full-org-roam-db-list) + (setq full-org-roam-db-list-pretty + (append (list + (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" item)) full-org-roam-db-list-pretty))) + + (setq org-roam-db-choice (completing-read "Select org roam database: " + full-org-roam-db-list-pretty nil t))) + (when arg + (setq org-roam-db-choice arg)) + + (setq org-roam-directory (file-truename (concat "~/Org/" org-roam-db-choice "/Notes")) + org-roam-db-location (file-truename (concat "~/Org/" org-roam-db-choice "/Notes/org-roam.db")) + org-directory (file-truename (concat "~/Org/" org-roam-db-choice "/Notes"))) + (when (not silent) + (org-roam-open-dashboard)) + + (org-roam-db-sync) + + (message (concat "Switched to " org-roam-db-choice " org-roam database!"))) + +(defun org-roam-default-overview () + (interactive) + (org-roam-switch-db user-default-roam-dir)) + +(defun org-roam-switch-db-id-open (arg ID &optional switchpersist) + "Switch to another org-roam db and visit file with id arg" + "If switchpersist is non-nil, stay in the new org-roam db after visiting file" + (interactive) + (setq prev-org-roam-db-choice org-roam-db-choice) + (org-roam-switch-db arg 1) + (org-roam-id-open ID) + (when (not switchpersist) + (org-roam-switch-db prev-org-roam-db-choice 1))) + +#+END_SRC + +#+RESULTS: +: org-roam-switch-db-id-open + +*** Org Roam "todos" Tagging for Org Agenda +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ Org-roam-agenda configuration ------;;; +(defun text-in-buffer-p (TEXT) +(save-excursion (goto-char (point-min)) (search-forward TEXT nil t))) + +(defun apply-old-todos-tag-maybe (&optional FILE) + (interactive) + (if (stringp FILE) + (setq the-daily-node-filename FILE) + (setq the-daily-node-filename buffer-file-name)) + (if (org-roam-dailies--daily-note-p the-daily-node-filename) + (if (<= (nth 2 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 2 org-agenda-current-date)) + (if (<= (nth 1 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 1 org-agenda-current-date)) + (if (<= (nth 0 (org-roam-dailies-calendar--file-to-date the-daily-node-filename)) (nth 0 org-agenda-current-date)) + (funcall (lambda () + (with-current-buffer (get-file-buffer the-daily-node-filename) (org-roam-tag-add '("old-todos"))) + (with-current-buffer (get-file-buffer the-daily-node-filename) (org-roam-tag-remove '("todos"))) + ) + ) + ) + ) + ) + ) +) + +(defun apply-old-todos-tag-maybe-and-save (FILE) + (interactive) + (find-file-noselect FILE) + (apply-old-todos-tag-maybe FILE) + (with-current-buffer (get-file-buffer the-daily-node-filename) (save-buffer)) + (with-current-buffer (get-file-buffer the-daily-node-filename) (kill-buffer)) +) + +(defun org-current-buffer-has-todos () + "Return non-nil if current buffer has any todo entry." + + (org-element-map ; (2) + (org-element-parse-buffer 'headline) ; (1) + 'headline + (lambda (h) + (eq (org-element-property :todo-type h) + 'todo)) + nil 'first-match)) ; (3) + +(defun org-has-recent-timestamps (OLD-DAYS) + "Return non-nil only if current buffer has entries with timestamps + more recent than OLD-DAYS days" + (interactive) + (if (org-element-map (org-element-parse-buffer) 'timestamp + (lambda (h) + (org-element-property :raw-value h))) + (org-element-map ; (2) + (org-element-parse-buffer) ; (1) + 'timestamp + (lambda (h) + (time-less-p (time-subtract (current-time) (* 60 60 24 OLD-DAYS)) (date-to-time (org-element-property :raw-value h)))) + nil 'first-match) nil)) + +(setq org-timestamps-days-for-old 21) + +; This has a bug where it won't sync a new agenda file +; if I'm editing an org roam node file while set to another +; org roam db +(defun add-todos-tag-on-save-org-mode-file() + (interactive) + (when (string= (message "%s" major-mode) "org-mode") + (if (org-roam-node-p (org-roam-node-at-point)) + (funcall (lambda() + (if (or (org-current-buffer-has-todos) (org-has-recent-timestamps org-timestamps-days-for-old)) + (org-roam-tag-add '("todos")) + (org-roam-tag-remove '("todos")) + ) + (apply-old-todos-tag-maybe) + ) + ) + ) + ) +) + +(add-hook 'before-save-hook 'add-todos-tag-on-save-org-mode-file) + +#+END_SRC +*** Setup Org Agenda from Org Roam +#+BEGIN_SRC emacs-lisp :tangle config.el +(defun org-roam-filter-by-tag (tag-name) + (lambda (node) + (member tag-name (org-roam-node-tags node)))) + +(defun org-roam-list-notes-by-tag (tag-name) + (mapcar #'org-roam-node-file + (seq-filter + (org-roam-filter-by-tag tag-name) + (org-roam-node-list)))) + +(defun org-roam-dailies-apply-old-todos-tags-to-all () +; (dolist (daily-node org-roam-dailies-files) +; (apply-old-todos-tag-maybe-and-save daily-node) +; ) + (setq num 0) + (while (< num (list-length (org-roam-list-notes-by-tag "todos"))) + (apply-old-todos-tag-maybe-and-save (nth num (org-roam-list-notes-by-tag "todos"))) + (setq num (1+ num)) + ) +) + +;; Refreshing org roam agenda +(defun org-roam-refresh-agenda-list () + (interactive) + (setq prev-org-roam-db-choice org-roam-db-choice) + (setq org-agenda-files '()) + (setq org-id-files '()) + (setq org-roam-directory (file-truename "~/Org") + org-roam-db-location (file-truename "~/Org/org-roam.db") + org-directory (file-truename "~/Org/")) + (org-roam-db-sync) + (setq org-agenda-files (org-roam-list-notes-by-tag "todos")) + (setq org-id-files (org-roam-list-files)) + (setq org-agenda-files (-uniq org-agenda-files)) + (org-roam-switch-db prev-org-roam-db-choice 1) +) + +;; Build agenda only when org agenda first opened for session +(setq org-roam-agenda-initialized nil) +(defun org-roam-refresh-agenda-list-init () + (if (not org-roam-agenda-initialized) + (funcall + (lambda () + (org-roam-refresh-agenda-list) + (setq org-roam-agenda-initialized t) + ) + ) + ) +) +(add-hook 'org-agenda-mode-hook 'org-roam-refresh-agenda-list-init) + +(map! :leader + :prefix ("o a") + + :desc "Refresh org agenda from roam dbs" + "r" 'org-roam-refresh-agenda-list) + +#+END_SRC +*** Org Roam Keybindings +#+BEGIN_SRC emacs-lisp :tangle config.el +(map! :leader + :prefix ("N" . "org-roam notes") + + :desc "Capture new roam node" + "c" 'org-roam-capture + + :desc "Open org roam inbox" + "I o" 'org-roam-open-inbox + + :desc "Capture stuff in inbox" + "I c" 'org-roam-capture-inbox + + :desc "Insert roam node link at point" + "i" 'org-roam-node-insert + + :desc "Find roam node" + "." 'org-roam-node-find + + :desc "Switch org-roam database" + "s" 'org-roam-switch-db + + :desc "Update current org-roam database" + "u" 'org-roam-db-sync + + :desc "Re-zoom on current node in org-roam-ui" + "z" 'org-roam-ui-node-zoom + + :desc "Visualize org-roam database with org-roam-ui" + "O" 'org-roam-default-overview + + :desc "Visualize org-roam database with org-roam-ui" + "o" 'org-roam-open-dashboard) + +#+END_SRC +*** Org Roam Capture Templates +#+BEGIN_SRC emacs-lisp :tangle config.el +(after! org-roam + (setq org-roam-capture-templates + '(("d" "default" plain "%?" :target + (file+head "%<%Y%m%d%H%M%S>-${slug}.org" "#+title: ${title}\n") + :unnarrowed t)))) + +#+END_SRC +*** Org Roam Olivetti Mode +#+BEGIN_SRC emacs-lisp :tangle config.el +(setq olivetti-style 'fancy + olivetti-margin-width 100) +(setq-default olivetti-body-width 100) +(defun org-roam-olivetti-mode () + (interactive) + (if (org-roam-file-p) + (olivetti-mode)) + (if (org-roam-file-p) + (doom-disable-line-numbers-h))) + +(add-hook 'org-mode-hook 'org-roam-olivetti-mode) + +#+END_SRC +*** Org Roam Dynamic Blocks +#+BEGIN_SRC emacs-lisp :tangle config.el +(add-load-path! "~/.emacs.d/org-nursery/lisp") +(require 'org-roam-dblocks) +(add-hook 'org-mode-hook 'org-roam-dblocks-autoupdate-mode) +#+END_SRC +*** Org Roam Export Setup +#+BEGIN_SRC emacs-lisp :tangle config.el +(setq org-id-extra-files 'org-agenda-text-search-extra-files) + +#+END_SRC +*** Org Roam UI Setup +I want this to be able to automatically open ORUI in EAF Browser in a split to the right. This kinda works now? +On Wayland, EAF doesn't work. +#+BEGIN_SRC emacs-lisp :tangle config.el +;(add-to-list 'display-buffer-alist '("^\\ORUI" display-buffer-in-side-window +; '(side . right) +; (window-width . 50) +;)) +;(add-to-list 'display-buffer-alist '("^\\localhost:35901" display-buffer-in-side-window +; '(side . right) +; (window-width . 50) +;)) + +;;(setq org-roam-ui-browser-function 'eaf-open-browser) ; xorg +(setq org-roam-ui-browser-function 'browse-url) ; wayland + +(defun open-org-roam-ui () + (interactive) + (+evil/window-vsplit-and-follow) + (org-roam-ui-open) + (evil-window-left 1)) + +(defun kill-org-roam-ui () + (interactive) +;; (delete-window (get-buffer-window "ORUI" t)) ; xorg +;; (kill-buffer "ORUI") ; xorg + (kill-buffer "*httpd*") +) + +; xorg +;;(map! :leader +;; :prefix ("N" . "org-roam notes") +;; :desc "Visualize org-roam database with org-roam-ui" +;; "v" 'open-org-roam-ui) + +; wayland +(map! :leader + :prefix ("N" . "org-roam notes") + :desc "Visualize org-roam database with org-roam-ui" + "v" 'org-roam-ui-open) + +(map! :leader + :prefix ("N" . "org-roam notes") + :desc "Kill all org roam ui buffers" + "V" 'kill-org-roam-ui) + +#+END_SRC +** Org Agenda Configuration +*** Standard Org Agenda Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ Org agenda configuration ------;;; +;; Set span for agenda to be just daily +(setq org-agenda-span 1 + org-agenda-start-day "+0d" + org-agenda-skip-timestamp-if-done t + org-agenda-skip-deadline-if-done t + org-agenda-skip-scheduled-if-done t + org-agenda-skip-scheduled-if-deadline-is-shown t + org-agenda-skip-timestamp-if-deadline-is-shown t + org-log-into-drawer t) + +;; Custom styles for dates in agenda +(custom-set-faces! + '(org-agenda-date :inherit outline-1 :height 1.15) + '(org-agenda-date-today :inherit outline-2 :height 1.15) + '(org-agenda-date-weekend :inherit outline-1 :height 1.15) + '(org-agenda-date-weekend-today :inherit outline-2 :height 1.15) + '(org-super-agenda-header :inherit custom-button :weight bold :height 1.05) + `(link :foreground unspecified :underline nil :background ,(nth 1 (nth 7 doom-themes--colors))) + '(org-link :foreground unspecified)) + +;; Toggle completed entries function +(defun org-agenda-toggle-completed () + (interactive) + (setq org-agenda-skip-timestamp-if-done (not org-agenda-skip-timestamp-if-done) + org-agenda-skip-deadline-if-done (not org-agenda-skip-timestamp-if-done) + org-agenda-skip-scheduled-if-done (not org-agenda-skip-timestamp-if-done)) + (org-agenda-redo)) + +(map! + :map evil-org-agenda-mode-map + :after org-agenda + :nvmeg "s d" #'org-agenda-toggle-completed) + +;; Ricing org agenda +(setq org-agenda-current-time-string "") +(setq org-agenda-time-grid '((daily) () "" "")) + +(setq org-agenda-prefix-format '( +(agenda . " %?-2i %t ") + (todo . " %i %-12:c") + (tags . " %i %-12:c") + (search . " %i %-12:c"))) + +(setq org-agenda-hide-tags-regexp ".*") + +(setq org-agenda-category-icon-alist + `(("Teaching.p" ,(list (all-the-icons-faicon "graduation-cap" :height 0.8)) nil nil :ascent center) + ("Family.s" ,(list (all-the-icons-faicon "home" :v-adjust 0.005)) nil nil :ascent center) + ("Producer.p" ,(list (all-the-icons-faicon "youtube-play" :height 0.9)) nil nil :ascent center) + ("Bard.p" ,(list (all-the-icons-faicon "music" :height 0.9)) nil nil :ascent center) + ("Stories.s" ,(list (all-the-icons-faicon "book" :height 0.9)) nil nil :ascent center) + ("Author.p" ,(list (all-the-icons-faicon "pencil" :height 0.9)) nil nil :ascent center) + ("Gamedev.s" ,(list (all-the-icons-faicon "gamepad" :height 0.9)) nil nil :ascent center) + ("Knowledge.p" ,(list (all-the-icons-faicon "database" :height 0.8)) nil nil :ascent center) + ("Personal.p" ,(list (all-the-icons-material "person" :height 0.9)) nil nil :ascent center) +)) + +#+END_SRC + +*** Org Agenda Convenience Functions +#+BEGIN_SRC emacs-lisp :tangle config.el +(defalias 'org-timestamp-down 'org-timestamp-down-day) +(defalias 'org-timestamp-up 'org-timestamp-up-day) + +(defun org-categorize-by-roam-db-on-save () + (interactive) + (when (string= (message "%s" major-mode) "org-mode") + (when + (string-prefix-p (concat "/home/" user-username "/Org") (expand-file-name (buffer-file-name))) + (setq categorizer-old-line (line-number-at-pos)) + (evil-goto-first-line) + (org-set-property "CATEGORY" (substring (string-trim-left (expand-file-name (buffer-file-name)) (concat "/home/" user-username "/Org/")) 0 (string-match "/" (string-trim-left (expand-file-name (buffer-file-name)) (concat "/home/" user-username "/Org/"))))) + (evil-goto-line categorizer-old-line) + ) + ) +) + +(add-hook 'after-save-hook 'org-categorize-by-roam-db-on-save) + +;; Function to be run when org-agenda is opened +(defun org-agenda-open-hook () + "Hook to be run when org-agenda is opened" + (olivetti-mode)) + +;; Adds hook to org agenda mode, making follow mode active in org agenda +(add-hook 'org-agenda-mode-hook 'org-agenda-open-hook) + +;; Easy refreshes on org agenda for syncthing file changes +;; adapted from https://www.reddit.com/r/orgmode/comments/mu6n5b/org_agenda_auto_updating/ +;; and https://lists.gnu.org/archive/html/help-gnu-emacs/2008-12/msg00435.html +(defadvice org-agenda-list (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) +(defadvice org-agenda-redo (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) +(defadvice org-agenda-redo-all (before refresh-org-agenda-on-revert activate) + (mapc (lambda (file) + (unless (verify-visited-file-modtime (get-file-buffer file)) + (with-current-buffer (get-file-buffer file) + (when (eq major-mode 'org-mode) + (revert-buffer nil 'noconfirm))))) + (org-agenda-files))) + +;; Function to list all my available org agenda files and switch to them +(defun list-and-switch-to-agenda-file () + "Lists all available agenda files and switches to desired one" + (interactive) + (setq full-agenda-file-list nil) + (setq choice (completing-read "Select agenda file:" org-agenda-files nil t)) + (find-file choice)) + +(map! :leader + :desc "Switch to specific org agenda file" + "o a s" 'list-and-switch-to-agenda-file) + +(defun org-agenda-switch-with-roam () + "Switches to org roam node file and database from org agenda view" + (interactive) + (org-agenda-switch-to) + (if (f-exists-p (concat (dir!) "/org-roam.db")) + (org-roam-switch-db (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" (f-parent (dir!))) t)) + (if (f-exists-p (concat (f-parent (dir!)) "/org-roam.db")) + (org-roam-switch-db (replace-regexp-in-string (concat "\\/home\\/" user-username "\\/Org\\/") "" (f-parent (f-parent (dir!)))) t)) + (org-roam-olivetti-mode) +) + +(map! + :map evil-org-agenda-mode-map + :after org-agenda + :nvmeg "" #'org-agenda-switch-with-roam + :nvmeg "" #'org-agenda-switch-with-roam) +(map! + :map org-agenda-mode-map + :after org-agenda + :nvmeg "" #'org-agenda-switch-with-roam + :nvmeg "" #'org-agenda-switch-with-roam) + +#+END_SRC +*** Org Super Agenda Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +(require 'org-super-agenda) + +(setq org-super-agenda-groups + '(;; Each group has an implicit boolean OR operator between its selectors. + (:name " Overdue " ; Optionally specify section name + :scheduled past + :order 2 + :face 'error) + + (:name "Personal " + :and(:file-path "Personal.p" :not (:tag "event")) + :order 3) + + (:name "Family " + :and(:file-path "Family.s" :not (:tag "event")) + :order 3) + + (:name "Teaching " + :and(:file-path "Teaching.p" :not (:tag "event")) + :order 3) + + (:name "Gamedev " + :and(:file-path "Gamedev.s" :not (:tag "event")) + :order 3) + + (:name "Youtube " + :and(:file-path "Producer.p" :not (:tag "event")) + :order 3) + + (:name "Music " + :and(:file-path "Bard.p" :not (:tag "event")) + :order 3) + + (:name "Storywriting " + :and(:file-path "Stories.s" :not (:tag "event")) + :order 3) + + (:name "Writing " + :and(:file-path "Author.p" :not (:tag "event")) + :order 3) + + (:name "Learning " + :and(:file-path "Knowledge.p" :not (:tag "event")) + :order 3) + + (:name " Today " ; Optionally specify section name + :time-grid t + :date today + :scheduled today + :order 1 + :face 'warning) + +)) + +(org-super-agenda-mode t) + +(map! :desc "Next line" + :map org-super-agenda-header-map + "j" 'org-agenda-next-line) + +(map! :desc "Next line" + :map org-super-agenda-header-map + "k" 'org-agenda-previous-line) + +#+END_SRC + +*** NO Org Agenda Notifications +#+BEGIN_SRC emacs-lisp +(add-load-path! "~/.emacs.d/org-yaap") +(require 'org-yaap) +(setq org-yaap-alert-title "Org Agenda") +(setq org-yaap-overdue-alerts 20) +(setq org-yaap-alert-before 20) +(setq org-yaap-daily-alert '(7 30)) +(setq org-yaap-daemon-idle-time 30) +(org-yaap-mode 1) +#+END_SRC +*** Calfw +#+begin_src emacs-lisp :tangle config.el +(require 'calfw) +(require 'calfw-org) +(setq cfw:org-agenda-schedule-args '(:timestamp)) + +(map! :leader :desc "Open org calendar" + "O c" 'cfw:open-org-calendar) +#+end_src +*** NO Org Timeblock +#+begin_src emacs-lisp +(add-load-path! "~/.emacs.d/org-timeblock") +(require 'org-timeblock) + +(map! :leader :desc "Open org timeblock" + "O c" 'org-timeblock) + +(map! :desc "Next day" + :map org-timeblock-mode-map + :nvmeg "l" 'org-timeblock-day-later) +(map! :desc "Previous day" + :map org-timeblock-mode-map + :nvmeg "h" 'org-timeblock-day-earlier) +(map! :desc "Schedule event" + :map org-timeblock-mode-map + :nvmeg "m" 'org-timeblock-schedule) +(map! :desc "Event duration" + :map org-timeblock-mode-map + :nvmeg "d" 'org-timeblock-set-duration) + +#+end_src +** Magit Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ magit configuration ------;;; +;; Need the following two blocks to make magit work with git bare repos +(require 'magit-todos) +(setq magit-todos-keywords-list '("TODO" "FIXME" "HACK" "REVIEW" "DEPRECATED" "BUG")) +(magit-todos-mode 1) + +(add-load-path! "~/.emacs.d/magit-file-icons") +(require 'magit-file-icons) +(setq magit-file-icons-icon-for-file-func 'all-the-icons-icon-for-file) +(setq magit-file-icons-icon-for-dir-func 'all-the-icons-icon-for-dir) +(magit-file-icons-mode 1) + +#+END_SRC +** Ibuffer Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +(require 'all-the-icons-ibuffer) +(add-hook 'ibuffer-mode-hook #'all-the-icons-ibuffer-mode) +(setq all-the-icons-ibuffer-color-icon t) +(evil-set-initial-state 'ibuffer-mode 'normal) + +#+END_SRC +** Dired Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ dired configuration ------;;; + +(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) +(setq all-the-icons-dired-monochrome nil) + +(map! :desc "Increase font size" + "C-=" 'text-scale-increase + + :desc "Decrease font size" + "C--" 'text-scale-decrease + + :desc "Jump to dired" + "M-f" 'dired-jump +) + + +#+END_SRC +** Ranger Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ ranger configuration ------;;; + +(map! :map ranger-mode-map + :desc "Mark current file" + "m" 'ranger-mark + + :desc "Toggle mark on current file" + "x" 'ranger-toggle-mark +) + +#+END_SRC +** hledger-mode Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;-- hledger-mode configuration ;;;-- + +;;; Basic configuration +(require 'hledger-mode) + +;; To open files with .journal extension in hledger-mode +(add-to-list 'auto-mode-alist '("\\.journal\\'" . hledger-mode)) + +;; The default journal location is too opinionated. +(setq hledger-jfile (concat user-home-directory "/Org/Family.s/Notes/hledger.journal")) + +;;; Auto-completion for account names +;; For company-mode users: +(add-to-list 'company-backends 'hledger-company) + +(evil-define-key* 'normal hledger-view-mode-map "q" 'kill-current-buffer) +(evil-define-key* 'normal hledger-view-mode-map "[" 'hledger-prev-report) +(evil-define-key* 'normal hledger-view-mode-map "]" 'hledger-next-report) + +(map! :leader + :prefix ("l" . "hledger") + :desc "Exec hledger command" + "c" 'hledger-run-command + + :desc "Generate hledger balancesheet" + "b" 'hledger-balancesheet* + + :desc "Generate hledger daily report" + "d" 'hledger-daily-report*) + +(map! :localleader + :map hledger-mode-map + + :desc "Reschedule transaction at point" + "d s" 'hledger-reschedule + + :desc "Edit amount at point" + "t a" 'hledger-edit-amount) + +#+END_SRC +** NO Tab Bar Configuration +I don't have this active right now since it's kinda weird with pgtk... +#+BEGIN_SRC emacs-lisp +;;;-- tab-bar-mode configuration ;;;-- + +;; Kbd tab navigation +(map! + :map evil-normal-state-map + "H" #'tab-bar-switch-to-prev-tab + "L" #'tab-bar-switch-to-next-tab + "C-" #'tab-bar-switch-to-prev-tab + "C-" #'tab-bar-switch-to-next-tab) + +(evil-global-set-key 'normal (kbd "C-w") 'tab-bar-close-tab) +(evil-global-set-key 'normal (kbd "C-t") 'tab-bar-new-tab) + +(setq tab-bar-new-tab-choice "*dashboard*") + +(tab-bar-mode t) + +#+END_SRC +** Focus Mode Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +(require 'focus) + +(map! :leader + :prefix ("F" . "Focus mode") + :desc "Toggle focus mode" + "t" 'focus-mode + + :desc "Pin focused section" + "p" 'focus-pin + + :desc "Unpin focused section" + "u" 'focus-unpin) + +(add-to-list 'focus-mode-to-thing '(org-mode . org-element)) +(add-to-list 'focus-mode-to-thing '(python-mode . paragraph)) +(add-to-list 'focus-mode-to-thing '(lisp-mode . paragraph)) + +;(add-hook 'org-mode-hook #'focus-mode) + +#+END_SRC +** Helpful Mode Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ helpful configuration ------;;; + +(evil-set-initial-state 'helpful-mode 'normal) +(evil-define-key 'normal helpful-mode-map + "j" 'evil-next-visual-line + "k" 'evil-previous-visual-line + "q" 'helpful-kill-buffers) + +#+END_SRC +** mu4e Configuration +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;------ helpful configuration ------;;; +(add-load-path! "~/.nix-profile/share/emacs/site-lisp/elpa/mu4e-1.12.2") +(require 'mu4e) +(require 'mu4e-contrib) +(require 'mu4e-actions) + +(after! mu4e + (setq mu4e-modeline-support nil) + (setq mu4e-sent-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Sent"))) + (setq mu4e-drafts-folder (lambda (msg) (concat "/" user-mail-address "/Drafts"))) + (setq mu4e-trash-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Trash"))) + (setq mu4e-refile-folder (lambda (msg) (concat "/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Folders/" (completing-read "Refile msg to: " (directory-files (concat "~/.mail/" (nth 1 (split-string (mu4e-message-field msg :maildir) "/" )) "/Folders")))))) + + (setq mu4e-index-lazy-check t) + (setq mu4e-index-cleanup t) + (setq mu4e-update-interval 120) + (mu4e-alert-enable-notifications) + + (define-key mu4e-main-mode-map (kbd "") #'doom/leader) + (define-key mu4e-headers-mode-map (kbd "") #'doom/leader) + (define-key mu4e-view-mode-map (kbd "") #'doom/leader) + + (define-key mu4e-main-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-main-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-main-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-main-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-main-mode-map (kbd "w") #'evil-forward-word-begin) + + (unbind-key "g" mu4e-headers-mode-map) + (define-key mu4e-headers-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-headers-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-headers-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-headers-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-headers-mode-map (kbd "w") #'evil-forward-word-begin) + + (unbind-key "g" mu4e-view-mode-map) + (define-key mu4e-view-mode-map (kbd "g g") #'evil-goto-first-line) + (define-key mu4e-view-mode-map (kbd "G") #'evil-goto-line) + (define-key mu4e-view-mode-map (kbd "h") #'evil-backward-char) + (define-key mu4e-view-mode-map (kbd "l") #'evil-forward-char) + (define-key mu4e-view-mode-map (kbd "w") #'evil-forward-word-begin) + + (map! :map 'mu4e-main-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-main-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-main-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + + (map! :map 'mu4e-headers-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-headers-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-headers-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + (map! :map 'mu4e-headers-mode-map :desc "Next char" :ge "l" #'evil-forward-char) + (map! :map 'mu4e-headers-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index) + (map! :map 'mu4e-headers-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply) + (map! :map 'mu4e-headers-mode-map :desc "Archive message" :ge "e" #'mu4e-headers-mark-for-refile) + + (map! :map 'mu4e-view-mode-map :desc "Jump to maildir" :ge "J" #'mu4e-search-maildir) + (map! :map 'mu4e-view-mode-map :desc "Next line" :ge "j" #'evil-next-visual-line) + (map! :map 'mu4e-view-mode-map :desc "Prev line" :ge "k" #'evil-previous-visual-line) + (map! :map 'mu4e-view-mode-map :desc "Update mail and index" :ge "U" #'mu4e-update-mail-and-index) + (map! :map 'mu4e-view-mode-map :desc "Compose reply" :ge "r" #'mu4e-compose-reply) + (map! :map 'mu4e-view-mode-map :desc "Archive message" :ge "e" #'mu4e-view-mark-for-refile) + + (add-to-list 'mu4e-header-info-custom + '(:maildir-folder-no-account . + ( :name "Maildir folder without account" ;; long name, as seen in the message-view + :shortname "Folder" ;; short name, as seen in the headers view + :help "Name of the subfolder without the maildir" ;; tooltip + :function (lambda (msg) (substring (mu4e-message-field msg :maildir) (+ 2 (length (nth 1 (split-string (mu4e-message-field msg :maildir) "/" ))))))))) + (add-to-list 'mu4e-bookmarks + '( :name "Unified inbox" + :query "maildir://.*/INBOX/" + :key ?i)) + (setq mu4e-headers-fields + '((:account-stripe . 1) + (:account . 25) + (:human-date . 12) + (:flags . 6) + (:from-or-to . 20) + (:maildir-folder-no-account . 30) + (:subject))) + + (add-hook 'mu4e-compose-mode-hook #'(lambda () (auto-save-mode -1))) + (setq mu4e-sent-messages-behavior 'delete) + + (setq sendmail-program "~/.nix-profile/bin/msmtp") + (setq send-mail-function 'smtpmail-send-it) + (setq message-sendmail-f-is-evil t) + (setq message-sendmail-extra-arguments '("--read-envelope-from")) + (setq message-send-mail-function 'message-send-mail-with-sendmail) + (if (file-exists-p "~/.emacs.d/mu4e-private.el") (load! "~/.emacs.d/mu4e-private.el")) + + ;; https://emacs.stackexchange.com/questions/3061/how-to-stop-mu4e-from-inserting-line-breaks + (defun no-auto-fill () + "Turn off auto-fill-mode." + (auto-fill-mode -1)) + + (defun no-org-msg-mode () + "Disable org-msg-mode since it doesn't respect multiline emails" + (org-msg-mode 0)) + + (add-hook 'mu4e-compose-mode-hook #'no-auto-fill) + (add-hook 'mu4e-compose-pre-hook #'no-org-msg-mode) + + (mu4e--start) ;; start mu4e silently + +) + +#+END_SRC +** Direnv +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;-- Load emacs direnv;;;-- +(require 'direnv) +(direnv-mode) +#+END_SRC +** Projectile +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;-- projectile wrapper commands ;;;-- +(defun projectile-goto-project () + (interactive) + (projectile-switch-project t) + ;;(neotree-dir (projectile-project-root)) +) + +(map! :leader + :desc "Open project" + "p p" #'projectile-goto-project) +(map! :leader + :desc "Projectile commander" + "p @" #'projectile-commander) +(map! :leader + :desc "Projectile grep" + "/" #'projectile-grep) +(after! projectile (put 'projectile-grep 'disabled nil)) + +#+END_SRC +** sudo-edit +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;-- projectile wrapper commands ;;;-- +(require 'sudo-edit) +(setq sudo-edit-local-method "doas") + +(map! :leader + :desc "Open current file as root" + "f U" #'sudo-edit-current-file) +(map! :leader + :desc "Find a file and open as root" + "f u" #'sudo-edit-find-file) + +#+END_SRC +** LSP +#+BEGIN_SRC emacs-lisp :tangle config.el +;;;-- LSP stuff ;;;-- +(require 'lsp-mode) +(require 'nix-mode) +(require 'gdscript-mode) + +(add-hook 'nix-mode-hook 'lsp-deferred) +(add-hook 'gdscript-mode-hook 'lsp-deferred) + +(setq gdscript-godot-executable "godot4") + +(setq lsp-java-workspace-dir (concat user-home-directory "/.local/share/doom/java-workspace")) + +(setq lsp-treemacs-deps-position-params + '((side . right) + (slot . 1) + (window-width . 35))) + +(setq lsp-treemacs-symbols-position-params +'((side . right) + (slot . 2) + (window-width . 35))) + +(map! :leader :desc "Open treemacs symbol outliner" "o s" #'lsp-treemacs-symbols + :desc "Hide neotree" "o S" #'treemacs-quit) + +(setq +format-on-save-enabled-modes '(not emacs-lisp-mode sql-mode tex-mode latex-mode org-msg-edit-mode nix-mode)) + +(defun lsp-booster--advice-json-parse (old-fn &rest args) + "Try to parse bytecode instead of json." + (or + (when (equal (following-char) ?#) + (let ((bytecode (read (current-buffer)))) + (when (byte-code-function-p bytecode) + (funcall bytecode)))) + (apply old-fn args))) +(advice-add (if (progn (require 'json) + (fboundp 'json-parse-buffer)) + 'json-parse-buffer + 'json-read) + :around + #'lsp-booster--advice-json-parse) + +(defun lsp-booster--advice-final-command (old-fn cmd &optional test?) + "Prepend emacs-lsp-booster command to lsp CMD." + (let ((orig-result (funcall old-fn cmd test?))) + (if (and (not test?) ;; for check lsp-server-present? + (not (file-remote-p default-directory)) ;; see lsp-resolve-final-command, it would add extra shell wrapper + lsp-use-plists + (not (functionp 'json-rpc-connection)) ;; native json-rpc + (executable-find "emacs-lsp-booster")) + (progn + (when-let ((command-from-exec-path (executable-find (car orig-result)))) ;; resolve command from exec-path (in case not found in $PATH) + (setcar orig-result command-from-exec-path)) + (message "Using emacs-lsp-booster for %s!" orig-result) + (cons "emacs-lsp-booster" orig-result)) + orig-result))) +(advice-add 'lsp-resolve-final-command :around #'lsp-booster--advice-final-command) + +(map! :leader :desc "Find definition using lsp" "L d" #'lsp-find-definition) + +#+END_SRC +** DevDocs +#+BEGIN_SRC emacs-lisp :tangle config.el +;; devdocs are cool +(require 'devdocs) + +(map! :leader :desc "Peruse devdocs" "L p" #'devdocs-peruse) +#+END_SRC + +** Terminal +#+BEGIN_SRC emacs-lisp :tangle config.el +(add-to-list 'tramp-remote-path 'tramp-own-remote-path) +(after! vterm + (add-to-list 'vterm-tramp-shells '("ssh" "zsh")) ;; I use zsh on all my servers +) +#+END_SRC +** Elfeed +#+BEGIN_SRC emacs-lisp :tangle config.el +;; I source my rss from my freshrss instance +;; I login with a private elisp file: ~/.emacs.d/freshrss-elfeed.el +;; freshrss-elfeed.el looks like this: +;;(elfeed-protocol-enable) +;;(setq elfeed-use-curl t) +;;(setq elfeed-set-timeout 36000) +;;(setq elfeed-log-level 'debug) +;;(setq freshrss-hostname "https://freshrss.example.com") +;;(setq elfeed-feeds (list +;; (list "fever+https://user@freshrss.example.com" +;; :api-url "https://user@freshrss.example.com/api/fever.php" +;; :password "mYsUpErCoMpLiCaTeDp@s$w0rD")))) +;;(setq main-elfeed-feed "https://user@freshrss.example.com/api/fever.php") + +(if (file-exists-p "~/.emacs.d/freshrss-elfeed.el") (load! "~/.emacs.d/freshrss-elfeed.el")) +(setq elfeed-search-filter "@6-months-ago +unread") +(setq browse-url-chromium-program "mpv") +(setq browse-url-chrome-program "mpv") +(setq browse-url-handlers '(("youtube.com" . browse-url-chrome) + ("youtu.be" . browse-url-chrome) + ("odcyn.com" . browse-url-chrome) + ("odysee.com" . browse-url-chrome) + ("tilvids.com" . browse-url-chrome))) +(map! :leader :desc "Open elfeed" "O n" #'elfeed) +(map! :map 'elfeed-search-mode-map :desc "Open url" :n "g o" #'elfeed-search-browse-url) + +(defun elfeed-full-update () + (interactive) + (elfeed-search-update--force) + (cl-loop for entry in elfeed-search-entries + do (elfeed-untag-1 entry 'unread)) + (elfeed-protocol-fever-reinit freshrss-hostname) + (elfeed-update)) + +(add-hook 'elfeed-search-mode-hook 'elfeed-full-update) +(add-hook 'elfeed-search-update-hook (lambda () (goto-char (point-min)))) + +#+END_SRC + +* My init.el +This section is the [[./init.el][init.el]] section, which controls which Doom modules are loaded. + +=SPC h d h= (vim) or =C-h d h= (non-vim) can be used to access Doom's documentation (including a "Module Index"). + +=K= (vim) or =C-c c k= (non-vim) can be used to view a module's documentation (this can help you discover module flags as well). + +=gd= (vim) or =C-c c d= (non-vim) will let you browse a module's directory (source code). + +#+BEGIN_SRC emacs-lisp :tangle init.el +(doom! :input + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + ;;doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight todo/fixme/note/deprecated/hack/review + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + nav-flash ; blink cursor line after big motions + neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB + window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + word-wrap ; soft wrapping with language-aware indent + + :emacs + (dired +ranger) ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;debugger ; stepping through code, to help you add bugs + ;;direnv + docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + (lsp) ; M-x vscode + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; managing external services & code builders + rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + ;;(:if IS-MAC macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;cc ; C > C++ == 1 + ;;clojure ; java with a lisp + common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + (gdscript +lsp) ; the language you waited for + ;;(go +lsp) ; the hipster dialect + (haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + json ; At least it ain't XML + (java +lsp) ; the poster child for carpal tunnel syndrome + javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + (kotlin +lsp) ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + (nix +lsp) ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +roam2) ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + web ; the tubes + yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + (mu4e +org) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + rss ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) + +#+END_SRC + +* My packages.el +The [[./packages.el][packages.el]] file allows extra packages to be configured outside of the typical Doom modules from [[./init.el][init.el]]. + +Packages are declared via =(package! some-package)= where =some-package= is from MELPA, ELPA, or emacsmirror. + +There are other ways to install packages outside of Emacs package archives, including directly from git. Installing a package directly from git requires a =:recipe=. Here is [[https://github.com/raxod502/straight.el#the-recipe-format][a full documentation of the recipe format]]. + +Doom's built-in packages can also be modified here: +- =(package! builtin-package :disable t)= to disable +- =(package! builtin-package-2 :recipe (:repo "myfork/package"))= to override the recipe + - Side-note: the full recipe for built-in packages does not need specification, as the override will inherit the unspecified properties directly from Doom + +Any git package can be configured for a particular commit or branch: +- =(package! builtin-package :recipe (:branch "develop")= for a particular branch +- =(package! builtin-package :pin "1a2b3c4d5e")= for a particular commit +- =(unpin! pinned-package another-pinned-package)= to get bleeding edge instead of Doom's stability + +#+BEGIN_SRC emacs-lisp :tangle packages.el +(package! org-analyzer :pin "0908eea") +(package! embark :pin "0908eea") +(package! dashboard) +(package! direnv) +(package! org :pin "5bdfc02c6fa1b9ad4f075ac1ad1e4086ead310db") +(package! org-modern) +(package! org-super-agenda) +(package! emacsql :pin "c1a4407") +(package! org-roam-ui) +(package! org-transclusion) +(package! org-download) +(package! org-yt) +(package! toc-org) +(package! lister) +(package! all-the-icons-ibuffer) +(package! all-the-icons-dired) +(package! all-the-icons-completion) +(package! ox-reveal) +(package! magit-todos) +(package! hledger-mode) +(package! rainbow-mode) +(package! crdt) +(package! ess) +(package! openwith) +(package! ob-mermaid) +(package! focus) +(package! olivetti) +(package! async) +(package! centered-cursor-mode) +(package! elfeed) +(package! elfeed-protocol) +(package! docker-tramp :disable t) +(package! org-ql) +(package! persist) +(package! sudo-edit) +(package! solaire-mode :disable t) +(package! el-patch) +(package! devdocs) +#+END_SRC +* Nix Integration +In order to have Nix load my Doom Emacs configuration [[./doom.nix][doom.nix]], which I source in the =imports= block of my [[../../../profiles/work/home.nix][home.nix]]. +#+BEGIN_SRC nix :tangle doom.nix +{ config, lib, pkgs, pkgs-emacs, pkgs-stable, inputs, userSettings, systemSettings, ... }: +let + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); + dashboardLogo = ./. + "/nix-" + themePolarity + ".webp"; +in +{ + imports = [ + inputs.nix-doom-emacs.hmModule + ../git/git.nix + ../../shell/sh.nix + ../../shell/cli-collection.nix + ]; + + programs.doom-emacs = { + enable = true; + emacsPackage = pkgs-emacs.emacs29-pgtk; + doomPrivateDir = ./.; + # This block from https://github.com/znewman01/dotfiles/blob/be9f3a24c517a4ff345f213bf1cf7633713c9278/emacs/default.nix#L12-L34 + # Only init/packages so we only rebuild when those change. + doomPackageDir = let + filteredPath = builtins.path { + path = ./.; + name = "doom-private-dir-filtered"; + filter = path: type: + builtins.elem (baseNameOf path) [ "init.el" "packages.el" ]; + }; + in pkgs-emacs.linkFarm "doom-packages-dir" [ + { + name = "init.el"; + path = "${filteredPath}/init.el"; + } + { + name = "packages.el"; + path = "${filteredPath}/packages.el"; + } + { + name = "config.el"; + path = pkgs-emacs.emptyFile; + } + ]; + # End block + }; + + home.file.".emacs.d/themes/doom-stylix-theme.el".source = config.lib.stylix.colors { + template = builtins.readFile ./themes/doom-stylix-theme.el.mustache; + extension = ".el"; + }; + + home.packages = (with pkgs-emacs; [ + emacs-lsp-booster + nil + nixfmt + kotlin-language-server + file + wmctrl + jshon + aria + hledger + hunspell hunspellDicts.en_US-large + (pkgs-emacs.mu.override { emacs = emacs29-pgtk; }) + (pkgs.callPackage ./pkgs/org-analyzer.nix {}) + emacsPackages.mu4e + isync + msmtp + (python3.withPackages (p: with p; [ + pandas + requests + epc lxml + pysocks + pymupdf + markdown + ])) + ]) ++ (with pkgs-stable; [ + nodejs + nodePackages.mermaid-cli + ]) ++ (with pkgs; [ + openssl + stunnel + ]); + + services.mbsync = { + enable = true; + package = pkgs-stable.isync; + frequency = "*:0/5"; + }; + + home.file.".emacs.d/org-yaap" = { + source = "${inputs.org-yaap}"; + recursive = true; + }; + + home.file.".emacs.d/org-side-tree" = { + source = "${inputs.org-side-tree}"; + recursive = true; + }; + + home.file.".emacs.d/org-timeblock" = { + source = "${inputs.org-timeblock}"; + recursive = true; + }; + + home.file.".emacs.d/org-nursery" = { + source = "${inputs.org-nursery}"; + }; + + home.file.".emacs.d/org-krita" = { + source = "${inputs.org-krita}"; + }; + + home.file.".emacs.d/org-xournalpp" = { + source = "${inputs.org-xournalpp}"; + }; + + home.file.".emacs.d/org-sliced-images" = { + source = "${inputs.org-sliced-images}"; + }; + + home.file.".emacs.d/magit-file-icons" = { + source = "${inputs.magit-file-icons}"; + }; + + home.file.".emacs.d/dashboard-logo.webp".source = dashboardLogo; + home.file.".emacs.d/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh" = { + source = ./scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh; + executable = true; + }; + + home.file.".emacs.d/phscroll" = { + source = "${inputs.phscroll}"; + }; + + home.file.".emacs.d/mini-frame" = { + source = "${inputs.mini-frame}"; + }; + + home.file.".emacs.d/system-vars.el".text = '' + ;;; ~/.emacs.d/config.el -*- lexical-binding: t; -*- + + ;; Import relevant variables from flake into emacs + + (setq user-full-name "''+userSettings.name+''") ; name + (setq user-username "''+userSettings.username+''") ; username + (setq user-mail-address "''+userSettings.email+''") ; email + (setq user-home-directory "/home/''+userSettings.username+''") ; absolute path to home directory as string + (setq user-default-roam-dir "''+userSettings.defaultRoamDir+''") ; absolute path to home directory as string + (setq system-nix-profile "''+systemSettings.profile+''") ; what profile am I using? + (setq system-wm-type "''+userSettings.wmType+''") ; wayland or x11? + (setq doom-font (font-spec :family "''+userSettings.font+''" :size 20)) ; import font + (setq dotfiles-dir "''+userSettings.dotfilesDir+''") ; import location of dotfiles directory + ''; +} +#+END_SRC diff --git a/user/app/doom-emacs/init.el b/user/app/doom-emacs/init.el new file mode 100644 index 0000000..fc4c77f --- /dev/null +++ b/user/app/doom-emacs/init.el @@ -0,0 +1,175 @@ +(doom! :input + ;;chinese + ;;japanese + ;;layout ; auie,ctsrnm is the superior home row + + :completion + company ; the ultimate code completion backend + ;;helm ; the *other* search engine for love and life + ;;ido ; the other *other* search engine... + ;;ivy ; a search engine for love and life + vertico ; the search engine of the future + + :ui + ;;deft ; notational velocity for Emacs + doom ; what makes DOOM look the way it does + ;;doom-dashboard ; a nifty splash screen for Emacs + doom-quit ; DOOM quit-message prompts when you quit Emacs + (emoji +unicode) ; 🙂 + hl-todo ; highlight todo/fixme/note/deprecated/hack/review + ;;hydra + ;;indent-guides ; highlighted indent columns + ;;ligatures ; ligatures and symbols to make your code pretty again + ;;minimap ; show a map of the code on the side + modeline ; snazzy, Atom-inspired modeline, plus API + nav-flash ; blink cursor line after big motions + neotree ; a project drawer, like NERDTree for vim + ophints ; highlight the region an operation acts on + (popup +defaults) ; tame sudden yet inevitable temporary windows + ;;tabs ; a tab bar for Emacs + treemacs ; a project drawer, like neotree but cooler + unicode ; extended unicode support for various languages + vc-gutter ; vcs diff in the fringe + ;;vi-tilde-fringe ; fringe tildes to mark beyond EOB + window-select ; visually switch windows + workspaces ; tab emulation, persistence & separate workspaces + ;;zen ; distraction-free coding or writing + + :editor + (evil +everywhere); come to the dark side, we have cookies + file-templates ; auto-snippets for empty files + fold ; (nigh) universal code folding + (format +onsave) ; automated prettiness + ;;god ; run Emacs commands without modifier keys + ;;lispy ; vim for lisp, for people who don't like vim + multiple-cursors ; editing in many places at once + ;;objed ; text object editing for the innocent + ;;parinfer ; turn lisp into python, sort of + ;;rotate-text ; cycle region at point between text candidates + snippets ; my elves. They type so I don't have to + word-wrap ; soft wrapping with language-aware indent + + :emacs + (dired +ranger) ; making dired pretty [functional] + electric ; smarter, keyword-based electric-indent + ibuffer ; interactive buffer management + undo ; persistent, smarter undo for your inevitable mistakes + vc ; version-control and Emacs, sitting in a tree + + :term + eshell ; the elisp shell that works everywhere + ;;shell ; simple shell REPL for Emacs + ;;term ; basic terminal emulator for Emacs + vterm ; the best terminal emulation in Emacs + + :checkers + syntax ; tasing you for every semicolon you forget + (spell +flyspell) ; tasing you for misspelling mispelling + ;;grammar ; tasing grammar mistake every you make + + :tools + ;;ansible + ;;biblio ; Writes a PhD for you (citation needed) + ;;debugger ; stepping through code, to help you add bugs + ;;direnv + docker + ;;editorconfig ; let someone else argue about tabs vs spaces + ;;ein ; tame Jupyter notebooks with emacs + (eval +overlay) ; run code, run (also, repls) + ;;gist ; interacting with github gists + lookup ; navigate your code and its documentation + (lsp) ; M-x vscode + magit ; a git porcelain for Emacs + ;;make ; run make tasks from Emacs + ;;pass ; password manager for nerds + ;;pdf ; pdf enhancements + ;;prodigy ; managing external services & code builders + rgb ; creating color strings + ;;taskrunner ; taskrunner for all your projects + ;;terraform ; infrastructure as code + ;;tmux ; an API for interacting with tmux + ;;upload ; map local to remote projects via ssh/ftp + + :os + ;;(:if IS-MAC macos) ; improve compatibility with macOS + tty ; improve the terminal Emacs experience + + :lang + ;;agda ; types of types of types of types... + ;;beancount ; mind the GAAP + ;;cc ; C > C++ == 1 + ;;clojure ; java with a lisp + common-lisp ; if you've seen one lisp, you've seen them all + ;;coq ; proofs-as-programs + ;;crystal ; ruby at the speed of c + ;;csharp ; unity, .NET, and mono shenanigans + data ; config/data formats + ;;(dart +flutter) ; paint ui and not much else + ;;dhall + ;;elixir ; erlang done right + ;;elm ; care for a cup of TEA? + emacs-lisp ; drown in parentheses + ;;erlang ; an elegant language for a more civilized age + ;;ess ; emacs speaks statistics + ;;factor + ;;faust ; dsp, but you get to keep your soul + ;;fortran ; in FORTRAN, GOD is REAL (unless declared INTEGER) + ;;fsharp ; ML stands for Microsoft's Language + ;;fstar ; (dependent) types and (monadic) effects and Z3 + (gdscript +lsp) ; the language you waited for + ;;(go +lsp) ; the hipster dialect + (haskell +lsp) ; a language that's lazier than I am + ;;hy ; readability of scheme w/ speed of python + ;;idris ; a language you can depend on + json ; At least it ain't XML + (java +lsp) ; the poster child for carpal tunnel syndrome + javascript ; all(hope(abandon(ye(who(enter(here)))))) + ;;julia ; a better, faster MATLAB + (kotlin +lsp) ; a better, slicker Java(Script) + latex ; writing papers in Emacs has never been so fun + ;;lean ; for folks with too much to prove + ;;ledger ; be audit you can be + lua ; one-based indices? one-based indices + markdown ; writing docs for people to ignore + ;;nim ; python + lisp at the speed of c + (nix +lsp) ; I hereby declare "nix geht mehr!" + ;;ocaml ; an objective camel + (org +roam2) ; organize your plain life in plain text + ;;php ; perl's insecure younger brother + ;;plantuml ; diagrams for confusing people more + ;;purescript ; javascript, but functional + python ; beautiful is better than ugly + ;;qt ; the 'cutest' gui framework ever + ;;racket ; a DSL for DSLs + ;;raku ; the artist formerly known as perl6 + ;;rest ; Emacs as a REST client + ;;rst ; ReST in peace + ;;(ruby +rails) ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} + ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() + ;;scala ; java, but good + ;;(scheme +guile) ; a fully conniving family of lisps + sh ; she sells {ba,z,fi}sh shells on the C xor + ;;sml + ;;solidity ; do you need a blockchain? No. + ;;swift ; who asked for emoji variables? + ;;terra ; Earth and Moon in alignment for performance. + web ; the tubes + yaml ; JSON, but readable + ;;zig ; C, but simpler + + :email + (mu4e +org) + ;;notmuch + ;;(wanderlust +gmail) + + :app + calendar + ;;emms + ;;everywhere ; *leave* Emacs!? You must be joking + ;;irc ; how neckbeards socialize + rss ; emacs as an RSS reader + ;;twitter ; twitter client https://twitter.com/vnought + + :config + ;;literate + (default +bindings +smartparens)) diff --git a/user/app/doom-emacs/nix-dark.png b/user/app/doom-emacs/nix-dark.png new file mode 100644 index 0000000..f887f3f Binary files /dev/null and b/user/app/doom-emacs/nix-dark.png differ diff --git a/user/app/doom-emacs/nix-dark.webp b/user/app/doom-emacs/nix-dark.webp new file mode 100644 index 0000000..b225ed7 Binary files /dev/null and b/user/app/doom-emacs/nix-dark.webp differ diff --git a/user/app/doom-emacs/nix-light.png b/user/app/doom-emacs/nix-light.png new file mode 100644 index 0000000..429d38b Binary files /dev/null and b/user/app/doom-emacs/nix-light.png differ diff --git a/user/app/doom-emacs/nix-light.webp b/user/app/doom-emacs/nix-light.webp new file mode 100644 index 0000000..92c3aad Binary files /dev/null and b/user/app/doom-emacs/nix-light.webp differ diff --git a/user/app/doom-emacs/packages.el b/user/app/doom-emacs/packages.el new file mode 100644 index 0000000..4d367bf --- /dev/null +++ b/user/app/doom-emacs/packages.el @@ -0,0 +1,38 @@ +(package! org-analyzer :pin "0908eea") +(package! embark :pin "0908eea") +(package! dashboard) +(package! direnv) +(package! org :pin "5bdfc02c6fa1b9ad4f075ac1ad1e4086ead310db") +(package! org-modern) +(package! org-super-agenda) +(package! emacsql :pin "c1a4407") +(package! org-roam-ui) +(package! org-transclusion) +(package! org-download) +(package! org-yt) +(package! toc-org) +(package! lister) +(package! all-the-icons-ibuffer) +(package! all-the-icons-dired) +(package! all-the-icons-completion) +(package! ox-reveal) +(package! magit-todos) +(package! hledger-mode) +(package! rainbow-mode) +(package! crdt) +(package! ess) +(package! openwith) +(package! ob-mermaid) +(package! focus) +(package! olivetti) +(package! async) +(package! centered-cursor-mode) +(package! elfeed) +(package! elfeed-protocol) +(package! docker-tramp :disable t) +(package! org-ql) +(package! persist) +(package! sudo-edit) +(package! solaire-mode :disable t) +(package! el-patch) +(package! devdocs) diff --git a/user/app/doom-emacs/pkgs/org-analyzer.nix b/user/app/doom-emacs/pkgs/org-analyzer.nix new file mode 100644 index 0000000..d3c3974 --- /dev/null +++ b/user/app/doom-emacs/pkgs/org-analyzer.nix @@ -0,0 +1,24 @@ +{ stdenv, fetchFromGitHub, pkgs, ... }: +let name = "clj-org-analyzer"; + version = "1.0.2"; +in stdenv.mkDerivation +{ + inherit name version; + + src = builtins.fetchurl { + url = "https://github.com/rksm/clj-org-analyzer/releases/download/1.0.2/org-analyzer-1.0.2.jar"; + sha256 = "sha256:1j5c688yg6f5y6n86rf6vkwd1csn1y4dc716d5bczmyr2sgi9c67"; + }; + + dontUnpack = true; + + installPhase = '' + mkdir $out $out/bin; + cp $src $out/bin/org-analyzer.jar; + echo "#!/bin/sh + ${pkgs.jdk}/bin/java -jar $out/bin/org-analyzer.jar $@" > $out/bin/org-analyzer + chmod +x $out/bin/org-analyzer.jar + chmod +x $out/bin/org-analyzer + ''; + +} diff --git a/user/app/doom-emacs/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh b/user/app/doom-emacs/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh new file mode 100755 index 0000000..59c147b --- /dev/null +++ b/user/app/doom-emacs/scripts/copy-link-or-file/copy-link-or-file-to-clipboard.sh @@ -0,0 +1,20 @@ +#!/bin/sh +if [ $(echo $XDG_SESSION_TYPE) == "wayland" ]; then + FILENAME="$(wl-paste)" + FILTEREDFILENAME=$(echo "$FILENAME" | sed "s+file:+./+") + echo "$FILTEREDFILENAME" + if [[ -f "$FILTEREDFILENAME" ]]; then + wl-copy < "$FILTEREDFILENAME" + fi +elif [ $(echo $XDG_SESSION_TYPE) == "x11" ]; then + FILENAME="$(xclip -o)" + FILTEREDFILENAME=$(echo "$FILENAME" | sed "s+file:+./+") + if [[ -f "$FILTEREDFILENAME" ]]; then + TYPE=$(file -b --mime-type "$FILTEREDFILENAME") + xclip -selection clipboard -t "$TYPE" -i "$FILTEREDFILENAME" + exit + fi +else + exit +fi +exit diff --git a/modules/user/emacs/lib/doom-stylix-theme.el.mustache b/user/app/doom-emacs/themes/doom-stylix-theme.el.mustache similarity index 99% rename from modules/user/emacs/lib/doom-stylix-theme.el.mustache rename to user/app/doom-emacs/themes/doom-stylix-theme.el.mustache index 4ab05ca..e83b979 100644 --- a/modules/user/emacs/lib/doom-stylix-theme.el.mustache +++ b/user/app/doom-emacs/themes/doom-stylix-theme.el.mustache @@ -174,4 +174,4 @@ Can be an integer to determine the exact padding." ;;;; Base theme variable overrides- ()) -;;; doom-stylix-theme.el ends here \ No newline at end of file +;;; doom-stylix-theme.el ends here diff --git a/user/app/emacsng/default.nix b/user/app/emacsng/default.nix new file mode 100644 index 0000000..e2c4c61 --- /dev/null +++ b/user/app/emacsng/default.nix @@ -0,0 +1,8 @@ +{ config, lib, pkgs, inputs, ... }: + +{ + home.packages = [ + inputs.emacsng.packages.${pkgs.system}.emacsngWRPgtk + pkgs.source-code-pro + ]; +} diff --git a/user/app/flatpak/flatpak.nix b/user/app/flatpak/flatpak.nix new file mode 100644 index 0000000..45d9238 --- /dev/null +++ b/user/app/flatpak/flatpak.nix @@ -0,0 +1,12 @@ +{ pkgs, ... }: + +{ + home.packages = [ pkgs.flatpak ]; + home.sessionVariables = { + XDG_DATA_DIRS = "$XDG_DATA_DIRS:/usr/share:/var/lib/flatpak/exports/share:$HOME/.local/share/flatpak/exports/share"; # lets flatpak work + }; + + #services.flatpak.enable = true; + #services.flatpak.packages = [ { appId = "com.kde.kdenlive"; origin = "flathub"; } ]; + #services.flatpak.update.onActivation = true; +} diff --git a/user/app/games/games.nix b/user/app/games/games.nix new file mode 100644 index 0000000..e512bd0 --- /dev/null +++ b/user/app/games/games.nix @@ -0,0 +1,54 @@ +{ pkgs, pkgs-stable, ... }: +let + myRetroarch = + (pkgs.retroarch.override { + cores = with pkgs.libretro; [ + vba-m + (desmume.overrideAttrs (oldAttrs: { + preConfigure = '' + sed -i 's/0009BF123456/0022AA067857/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[0\] = 0x00/outConfig.MACAddress[0] = 0x00/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[1\] = 0x09/outConfig.MACAddress[1] = 0x22/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[2\] = 0xBF/outConfig.MACAddress[2] = 0xAA/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[3\] = 0x12/outConfig.MACAddress[3] = 0x06/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[4\] = 0x34/outConfig.MACAddress[4] = 0x78/g' desmume/src/firmware.cpp; + sed -i 's/outConfig.MACAddress\[5\] = 0x56/outConfig.MACAddress[5] = 0x57/g' desmume/src/firmware.cpp; + sed -i 's/0x00, 0x09, 0xBF, 0x12, 0x34, 0x56/0x00, 0x22, 0xAA, 0x06, 0x78, 0x57/g' desmume/src/wifi.cpp; + ''; + })) + dolphin + genesis-plus-gx + ]; + }); +in +{ + home.packages = (with pkgs; [ + # Games + pegasus-frontend + myRetroarch + libfaketime + airshipper + qjoypad + superTux + superTuxKart + gamepad-tool + ]) ++ (with pkgs-stable; [ + pokefinder + ]); + + nixpkgs.config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + + # The following 2 declarations allow retroarch to be imported into gamehub + # Set retroarch core directory to ~/.local/bin/libretro + # and retroarch core info directory to ~/.local/share/libretro/info + home.file.".local/bin/libretro".source = "${myRetroarch}/lib/retroarch/cores"; + home.file.".local/bin/libretro-shaders".source = "${myRetroarch}/lib/retroarch/cores"; + home.file.".local/share/libretro/info".source = fetchTarball { + url = "https://github.com/libretro/libretro-core-info/archive/refs/tags/v1.15.0.tar.gz"; + sha256 = "004kgbsgbk7hn1v01jg3vj4b6dfb2cp3kcp5hgjyl030wqg1r22q"; + }; + +} diff --git a/user/app/git/git.nix b/user/app/git/git.nix new file mode 100644 index 0000000..081db59 --- /dev/null +++ b/user/app/git/git.nix @@ -0,0 +1,13 @@ +{ config, pkgs, userSettings, ... }: + +{ + home.packages = [ pkgs.git ]; + programs.git.enable = true; + programs.git.userName = userSettings.name; + programs.git.userEmail = userSettings.email; + programs.git.extraConfig = { + init.defaultBranch = "main"; + safe.directory = [ ("/home/" + userSettings.username + "/.dotfiles") + ("/home/" + userSettings.username + "/.dotfiles/.git") ]; + }; +} diff --git a/user/app/keepass/keepass.nix b/user/app/keepass/keepass.nix new file mode 100644 index 0000000..89358c6 --- /dev/null +++ b/user/app/keepass/keepass.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ +# nixpkgs.overlays = [ +# (self: super: +# { +# keepmenu = super.keepmenu.overrideAttrs (oldAttrs: rec { +# pname = "keepmenu"; +# version = "1.3.1"; +# src = super.python3Packages.fetchPypi { +# inherit pname version; +# sha256 = "sha256-AGuJY7IirzIjcu/nY9CzeOqU1liwcRijYLi8hGN/pRg="; +# }; +# }); +# } +# ) +# ]; + + home.packages = with pkgs; [ + keepassxc + keepmenu + ]; +} diff --git a/user/app/nvim/README.md b/user/app/nvim/README.md new file mode 100644 index 0000000..dc0deaa --- /dev/null +++ b/user/app/nvim/README.md @@ -0,0 +1,9 @@ +**This repo is supposed to used as config by NvChad users!** + +- The main nvchad repo (NvChad/NvChad) is used as a plugin by this repo. +- So you just import its modules , like `require "nvchad.options" , require "nvchad.mappings"` +- So you can delete the .git from this repo ( when you clone it locally ) or fork it :) + +# Credits + +1) Lazyvim starter https://github.com/LazyVim/starter as nvchad's starter was inspired by Lazyvim's . It made a lot of things easier! diff --git a/user/app/nvim/init.lua b/user/app/nvim/init.lua new file mode 100644 index 0000000..59737fc --- /dev/null +++ b/user/app/nvim/init.lua @@ -0,0 +1,98 @@ +vim.g.base46_cache = vim.fn.stdpath "data" .. "/nvchad/base46/" +vim.g.mapleader = " " + +if vim.g.neovide then + -- Helper function for transparency formatting + local alpha = function() + return string.format("%x", math.floor(255 * vim.g.transparency or 0.8)) + end + vim.g.transparency = 0 + vim.g.neovide_background_color = vim.g.neovide_background_color .. alpha() + vim.g.neovide_transparency = 0.8 + vim.g.neovide_floating_blur_amount_x = 8.0 + vim.g.neovide_floating_blur_amount_y = 8.0 + vim.g.neovide_refresh_rate = 120 + vim.g.neovide_cursor_vfx_mode = "pixiedust" + vim.g.neovide_text_gamma = 0.8 + vim.g.neovide_text_contrast = 0.1 + vim.opt.termguicolors = true + vim.g.neovide_scale_factor = 1.0 +end + +vim.o.conceallevel = 2 + +vim.api.nvim_create_user_command('W', 'execute "silent! write !sudo tee % >/dev/null" edit', { nargs = 0}) + + +-- bootstrap lazy and all plugins +local lazypath = vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +if not vim.uv.fs_stat(lazypath) then + local repo = "https://github.com/folke/lazy.nvim.git" + vim.fn.system { "git", "clone", "--filter=blob:none", repo, "--branch=stable", lazypath } +end + +vim.opt.rtp:prepend(lazypath) + +local lazy_config = require "configs.lazy" + +-- load plugins +require("lazy").setup({ + { + "NvChad/NvChad", + lazy = false, + branch = "v2.5", + import = "nvchad.plugins", + }, + + { import = "plugins" }, +}, lazy_config) + +require("workspaces").setup({ + hooks = { + open = { "Telescope find_files" }, + } +}) + +-- You dont need to set any of these options. These are the default ones. Only +-- the loading is important +require('telescope').setup { + defaults = { + winblend = 80, + }, + pickers = { + find_files = { + }, + }, + extensions = { + fzf = { + fuzzy = true, -- false will only do exact matching + override_generic_sorter = true, -- override the generic sorter + override_file_sorter = true, -- override the file sorter + case_mode = "smart_case", -- or "ignore_case" or "respect_case" + -- the default case_mode is "smart_case" + }, + workspaces = { + -- keep insert mode after selection in the picker, default is false + keep_insert = true, + -- Highlight group used for the path in the picker, default is "String" + path_hl = "String" + } + } +} +-- To get fzf loaded and working with telescope, you need to call +-- load_extension, somewhere after setup function: +require('telescope').load_extension('fzf') +require('telescope').load_extension('project') +require('telescope').load_extension('workspaces') + +-- load theme +dofile(vim.g.base46_cache .. "defaults") +dofile(vim.g.base46_cache .. "statusline") + +require "options" +require "nvchad.autocmds" + +vim.schedule(function() + require "mappings" +end) diff --git a/user/app/nvim/lua/chadrc.lua b/user/app/nvim/lua/chadrc.lua new file mode 100644 index 0000000..0a54e69 --- /dev/null +++ b/user/app/nvim/lua/chadrc.lua @@ -0,0 +1,32 @@ +-- This file needs to have same structure as nvconfig.lua +-- https://github.com/NvChad/ui/blob/v2.5/lua/nvconfig.lua +-- Please read that file to know all available options :( + +---@type ChadrcConfig +local M = {} + +M.base46 = { + theme = "stylix", + + -- hl_override = { + -- Comment = { italic = true }, + -- ["@comment"] = { italic = true }, + -- }, +} + +M.ui = { + theme = "stylix", + nvdash = { + load_on_startup = true, + buttons = { + { " Find File", "Spc .", "Telescope find_files" }, + { "󰙅 Nvimtree", "SPC e", "NvimTreeToggle" }, + { " Projects ", "Spc p p", "Telescope workspaces" }, + { "󰯌 Vsplit ", "Spc w v", "vsplit" }, + { "󰯋 Split ", "Spc w s", "split" }, + { "󰋗 Help", "Spc c h", "NvCheatsheet" }, + }, + } +} + +return M diff --git a/user/app/nvim/lua/configs/conform.lua b/user/app/nvim/lua/configs/conform.lua new file mode 100644 index 0000000..35ba6cf --- /dev/null +++ b/user/app/nvim/lua/configs/conform.lua @@ -0,0 +1,15 @@ +local options = { + formatters_by_ft = { + lua = { "stylua" }, + -- css = { "prettier" }, + -- html = { "prettier" }, + }, + + -- format_on_save = { + -- -- These options will be passed to conform.format() + -- timeout_ms = 500, + -- lsp_fallback = true, + -- }, +} + +return options diff --git a/user/app/nvim/lua/configs/lazy.lua b/user/app/nvim/lua/configs/lazy.lua new file mode 100644 index 0000000..cd170bd --- /dev/null +++ b/user/app/nvim/lua/configs/lazy.lua @@ -0,0 +1,47 @@ +return { + defaults = { lazy = true }, + install = { colorscheme = { "nvchad" } }, + + ui = { + icons = { + ft = "", + lazy = "󰂠 ", + loaded = "", + not_loaded = "", + }, + }, + + performance = { + rtp = { + disabled_plugins = { + "2html_plugin", + "tohtml", + "getscript", + "getscriptPlugin", + "gzip", + "logipat", + "netrw", + "netrwPlugin", + "netrwSettings", + "netrwFileHandlers", + "matchit", + "tar", + "tarPlugin", + "rrhelper", + "spellfile_plugin", + "vimball", + "vimballPlugin", + "zip", + "zipPlugin", + "tutor", + "rplugin", + "syntax", + "synmenu", + "optwin", + "compiler", + "bugreport", + "ftplugin", + }, + }, + }, +} diff --git a/user/app/nvim/lua/configs/lspconfig.lua b/user/app/nvim/lua/configs/lspconfig.lua new file mode 100644 index 0000000..ea9e812 --- /dev/null +++ b/user/app/nvim/lua/configs/lspconfig.lua @@ -0,0 +1,27 @@ +-- load defaults i.e lua_lsp +require("nvchad.configs.lspconfig").defaults() + +local lspconfig = require "lspconfig" + +-- EXAMPLE +local servers = { "html", "cssls", "nil_ls", "marksman", "clangd", "pylsp", "ts_ls", "java_language_server", "dockerls", "docker_compose_language_service", "jsonls", "kotlin_language_server", "bashls", "yamlls", "sqls" } +local nvlsp = require "nvchad.configs.lspconfig" + +-- lsps with default config +for _, lsp in ipairs(servers) do + lspconfig[lsp].setup { + on_attach = nvlsp.on_attach, + on_init = nvlsp.on_init, + capabilities = nvlsp.capabilities, + } +end +lspconfig.gdscript.setup { + cmd = { "ncat", "localhost", "6005"} +} + +-- configuring single server, example: typescript +-- lspconfig.ts_ls.setup { +-- on_attach = nvlsp.on_attach, +-- on_init = nvlsp.on_init, +-- capabilities = nvlsp.capabilities, +-- } diff --git a/user/app/nvim/lua/mappings.lua b/user/app/nvim/lua/mappings.lua new file mode 100644 index 0000000..c0f9656 --- /dev/null +++ b/user/app/nvim/lua/mappings.lua @@ -0,0 +1,47 @@ +require "nvchad.mappings" + +-- add yours here + +local map = vim.keymap.set +local builtin = require("telescope.builtin") +local utils = require("telescope.utils") +local change_scale_factor = function(delta) + vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta +end + +vim.keymap.set("n", "", function() + change_scale_factor(1.25) +end) +vim.keymap.set("n", "", function() + change_scale_factor(1/1.25) +end) + +map("n", ";", ":", { desc = "CMD enter command mode" }) +map({"n", "t", "v", "i"}, "", ":", { desc = "CMD enter command mode" }) +map({"n", "t", "v", "i"}, "", "", { desc = "up" }) +map({"n", "t", "v", "i"}, "", "", { desc = "down" }) +map({"n", "t", "v", "i"}, "", "h", { desc = "switch window left" }) +map({"n", "t", "v", "i"}, "", "l", { desc = "switch window right" }) +map({"n", "t", "v", "i"}, "", "j", { desc = "switch window down" }) +map({"n", "t", "v", "i"}, "", "k", { desc = "switch window up" }) +map("n", ".", "Telescope find_files", { desc = "telescope find files" }) +map("n", "/", "Telescope live_grep", { desc = "telescope live grep" }) +map("n", "gg", "Neogit", { desc = "Neogit status buffer" }) +map("n", "c", "gcc", { desc = "Toggle Comment", remap = true }) +map("v", "c", "gc", { desc = "Toggle comment", remap = true }) +map("n", "pp", "Telescope workspaces", { desc = "telescope workspaces" }) +map("n", "pf", "Telescope find_files", { desc = "telescope find files" }) +map("n", "", "q", { desc = "quit" }) +map("n", "wd>", "q", { desc = "quit" }) +map("n", "ws", "split", { desc = "horizontal split" }) +map("n", "wS", "split", { desc = "horizontal split" }) +map("n", "wv", "vsplit", { desc = "vertical split" }) +map("n", "wV", "vsplit", { desc = "vertical split" }) +map("n", "", "edit #", { desc = "edit previous" }) +map({ "n", "t", "i", "v" }, "", "NvimTreeToggle", { desc = "nvimtree toggle window" }) +map({ "n", "t", "i", "v" }, "", function() + require("nvchad.term").toggle { pos = "sp", id = "htoggleTerm" } +end, { desc = "terminal toggleable horizontal term" }) +map("i", "jk", "") + +-- map({ "n", "i", "v" }, "", " w ") diff --git a/user/app/nvim/lua/options.lua b/user/app/nvim/lua/options.lua new file mode 100644 index 0000000..738f20b --- /dev/null +++ b/user/app/nvim/lua/options.lua @@ -0,0 +1,6 @@ +require "nvchad.options" + +-- add yours here! + +-- local o = vim.o +-- o.cursorlineopt ='both' -- to enable cursorline! diff --git a/user/app/nvim/lua/plugins/init.lua b/user/app/nvim/lua/plugins/init.lua new file mode 100644 index 0000000..9af253e --- /dev/null +++ b/user/app/nvim/lua/plugins/init.lua @@ -0,0 +1,52 @@ +return { + { + "stevearc/conform.nvim", + -- event = 'BufWritePre', -- uncomment for format on save + opts = require "configs.conform", + }, + + -- These are some examples, uncomment them if you want to see them work! + { + "neovim/nvim-lspconfig", + config = function() + require "configs.lspconfig" + end, + }, + + { + "nvim-treesitter/nvim-treesitter", + opts = { + ensure_installed = { + "vim", "lua", "vimdoc", + "html", "css", 'gdscript' + }, + }, + }, + + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make', lazy = false, }, + { 'nvim-telescope/telescope-project.nvim', lazy = false, }, + { 'natecraddock/workspaces.nvim', lazy = false, }, + { 'jghauser/follow-md-links.nvim', lazy = false, }, + + { + "NeogitOrg/neogit", + lazy = false, + dependencies = { + "nvim-lua/plenary.nvim", -- required + "sindrets/diffview.nvim", -- optional - Diff integration + + -- Only one of these is needed. + "nvim-telescope/telescope.nvim", -- optional + }, + config = true + }, + { + 'nvim-orgmode/orgmode', + event = 'VeryLazy', + ft = { 'org' }, + config = function() + -- Setup orgmode + require('orgmode').setup({}) + end, + }, +} diff --git a/user/app/nvim/lua/themes/stylix.lua.mustache b/user/app/nvim/lua/themes/stylix.lua.mustache new file mode 100644 index 0000000..585952d --- /dev/null +++ b/user/app/nvim/lua/themes/stylix.lua.mustache @@ -0,0 +1,72 @@ +local M = {} + +M.base_30 = { + white = "#{{base07-hex}}", + darker_black = "#{{base00-hex}}", + black = "#{{base00-hex}}", -- nvim bg + black2 = "#{{base01-hex}}", + one_bg = "#{{base01-hex}}", + one_bg2 = "#{{base02-hex}}", + one_bg3 = "#{{base03-hex}}", + grey = "#{{base04-hex}}", + grey_fg = "#{{base04-hex}}", + grey_fg2 = "#{{base05-hex}}", + light_grey = "#{{base06-hex}}", + red = "#{{base08-hex}}", + baby_pink = "#{{base08-hex}}", + pink = "#{{base08-hex}}", + line = "#{{base02-hex}}", -- for lines like vertsplit + green = "#{{base0B-hex}}", + vibrant_green = "#{{base0B-hex}}", + blue = "#{{base0D-hex}}", + nord_blue = "#{{base0D-hex}}", + yellow = "#{{base0A-hex}}", + sun = "#{{base0A-hex}}", + purple = "#{{base0E-hex}}", + dark_purple = "#{{base0E-hex}}", + teal = "#{{base0C-hex}}", + orange = "#{{base09-hex}}", + cyan = "#{{base0C-hex}}", + statusline_bg = "#{{base02-hex}}", + lightbg = "#{{base03-hex}}", + pmenu_bg = "#{{base0D-hex}}", + folder_bg = "#{{base05-hex}}", +} + +M.base_16 = { + base00 = "#{{base00-hex}}", + base01 = "#{{base01-hex}}", + base02 = "#{{base02-hex}}", + base03 = "#{{base03-hex}}", + base04 = "#{{base04-hex}}", + base05 = "#{{base05-hex}}", + base06 = "#{{base06-hex}}", + base07 = "#{{base07-hex}}", + base08 = "#{{base08-hex}}", + base09 = "#{{base09-hex}}", + base0A = "#{{base0A-hex}}", + base0B = "#{{base0B-hex}}", + base0C = "#{{base0C-hex}}", + base0D = "#{{base0D-hex}}", + base0E = "#{{base0E-hex}}", + base0F = "#{{base0F-hex}}", +} + +M.polish_hl = { + treesitter = { + luaTSField = { fg = M.base_16.base0D }, + ["@tag.delimiter"] = { fg = M.base_30.cyan }, + ["@function"] = { fg = M.base_30.orange }, + ["@string"] = { fg = M.base_16.base0F }, + ["@identifier"] = { fg = M.base_16.base0E }, + ["@variable.parameter"] = { fg = M.base_16.base0F }, + ["@constructor"] = { fg = M.base_16.base0A }, + ["@tag.attribute"] = { fg = M.base_30.orange }, + }, +} + +M = require("base46").override_theme(M, "stylix") + +M.type = "dark" + +return M diff --git a/user/app/nvim/nvim.nix b/user/app/nvim/nvim.nix new file mode 100644 index 0000000..6944c74 --- /dev/null +++ b/user/app/nvim/nvim.nix @@ -0,0 +1,34 @@ +{ config, pkgs, inputs, ... }: + +{ + home.packages = with pkgs; [ + neovim + neovim-remote + neovide + lua-language-server + vscode-langservers-extracted + nil + clang-tools + marksman + python311Packages.python-lsp-server + typescript-language-server + java-language-server + dockerfile-language-server-nodejs + docker-compose-language-service + kotlin-language-server + bash-language-server + yaml-language-server + sqls + nmap + ]; + programs.neovim = { + viAlias = true; + vimAlias = true; + }; + home.file.".config/nvim".source = ./.; + home.file.".config/nvim".recursive = true; + home.file.".config/nvim/lua/themes/stylix.lua".source = config.lib.stylix.colors { + template = builtins.readFile ./lua/themes/stylix.lua.mustache; + extension = ".lua"; + }; +} diff --git a/modules/user/ranger/README.org b/user/app/ranger/README.org similarity index 100% rename from modules/user/ranger/README.org rename to user/app/ranger/README.org diff --git a/modules/user/ranger/colorschemes/hail.py b/user/app/ranger/colorschemes/hail.py similarity index 100% rename from modules/user/ranger/colorschemes/hail.py rename to user/app/ranger/colorschemes/hail.py diff --git a/modules/user/ranger/commands.py b/user/app/ranger/commands.py similarity index 100% rename from modules/user/ranger/commands.py rename to user/app/ranger/commands.py diff --git a/modules/user/ranger/commands_full.py b/user/app/ranger/commands_full.py similarity index 100% rename from modules/user/ranger/commands_full.py rename to user/app/ranger/commands_full.py diff --git a/user/app/ranger/ranger.nix b/user/app/ranger/ranger.nix new file mode 100644 index 0000000..52c4476 --- /dev/null +++ b/user/app/ranger/ranger.nix @@ -0,0 +1,48 @@ +{ config, pkgs, ... }: +let myCbxScript = '' + #!/bin/sh + + # this lets my copy and paste images and/or plaintext of files directly out of ranger + if [ "$#" -le "2" ]; then + if [ "$1" = "copy" -o "$1" = "cut" ]; then + if [ "$XDG_SESSION_TYPE" = "wayland" ]; then + wl-copy < $2; + else + # xclip -selection clipboard -t $(file -b --mime-type $2) -i $2; + xclip -selection clipboard -t image/png -i $2; + fi + fi + fi + ''; +in +{ + imports = [ ../../pkgs/ranger.nix ]; + + home.packages = with pkgs; [ + ranger + ripdrag + highlight + (pkgs.writeScriptBin "cbx" myCbxScript) + ]; + xdg.mimeApps.associations.added = { + "inode/directory" = "ranger.desktop"; + }; + home.file.".config/ranger/rc.conf".source = ./rc.conf; + home.file.".config/ranger/rifle.conf".source = ./rifle.conf; + home.file.".config/ranger/scope.sh" = { + source = ./scope.sh; + executable = true; + }; + home.file.".config/ranger/commands.py" = { + source = ./commands.py; + executable = true; + }; + home.file.".config/ranger/commands_full.py" = { + source = ./commands_full.py; + executable = true; + }; + home.file.".config/ranger/colorschemes/hail.py" = { + source = ./colorschemes/hail.py; + executable = true; + }; +} diff --git a/modules/user/ranger/rc.conf b/user/app/ranger/rc.conf similarity index 100% rename from modules/user/ranger/rc.conf rename to user/app/ranger/rc.conf diff --git a/modules/user/ranger/rifle.conf b/user/app/ranger/rifle.conf similarity index 63% rename from modules/user/ranger/rifle.conf rename to user/app/ranger/rifle.conf index 3fa8c4d..f149862 100644 --- a/modules/user/ranger/rifle.conf +++ b/user/app/ranger/rifle.conf @@ -54,20 +54,20 @@ # Rarely installed browsers get higher priority; It is assumed that if you # install a rare browser, you probably use it. Firefox/konqueror/w3m on the # other hand are often only installed as fallback browsers. -ext x?html?, has librewolf, X, flag f = open-under-ranger librewolf "$@" -ext x?html?, has qutebrowser, X, flag f = open-under-ranger qutebrowser "$@" -ext x?html?, has firefox, X, flag f = open-under-ranger firefox "$@" -ext x?html?, has chromium-browser, X, flag f = open-under-ranger chromium-browser "$@" -ext x?html?, has chromium, X, flag f = open-under-ranger chromium "$@" +ext x?html?, has librewolf, X, flag f = librewolf -- "$@" +ext x?html?, has qutebrowser, X, flag f = qutebrowser -- "$@" +ext x?html?, has firefox, X, flag f = firefox -- "$@" +ext x?html?, has chromium-browser, X, flag f = chromium-browser -- "$@" +ext x?html?, has chromium, X, flag f = chromium -- "$@" ext x?html?, has w3m, terminal = w3m "$@" #------------------------------------------- # Misc #------------------------------------------- # Define the "editor" for text files as first action -mime ^text, has neovide, X, flag f = open-under-ranger neovide "$@" -ext org, has emacsclient, X, flag f = open-under-ranger "emacsclient -c" "$@" -mime ^text, has emacsclient, X, flag f = open-under-ranger "emacsclient -c" "$@" +mime ^text, has neovide, X, flag f = neovide "$@" +ext org, has emacsclient, X, flag f = emacsclient -c "$@" +mime ^text, has emacsclient, X, flag f = emacsclient -c "$@" ext 1 = man "$1" ext s[wmf]c, has zsnes, X = zsnes "$1" @@ -79,18 +79,17 @@ name ^[mM]akefile$ = make #------------------------------------------ # My applications #------------------------------------------ -ext kra, has krita, X, flag f = open-under-ranger krita "$@" &>/dev/null -ext kra~, has krita, X, flag f = open-under-ranger krita "$@" &>/dev/null -ext blend, has blender, X, flag f = open-under-ranger blender "$@" &>/dev/null -ext blend~, has blender, X, flag f = open-under-ranger blender "$@" &>/dev/null -ext xopp, has xournalpp, X, flag f = open-under-ranger xournalpp "$@" &>/dev/null -ext xopp~, has blender, X, flag f = open-under-ranger xournalpp "$@" &>/dev/null -ext helio, has helio, X, flag f = open-under-ranger helio "$@" &>/dev/null -ext kdenlive, has kdenlive, X, flag f = open-under-ranger kdenlive "$@" &>/dev/null -ext flp, has flstudio, X, flag f = open-under-ranger flstudio "$@" &>/dev/null -ext 3mf, has Cura, X, flag f = open-under-ranger Cura "$@" &>/dev/null -ext 3mf, has curax, X, flag f = open-under-ranger curax "$@" &>/dev/null -ext 3mf, has cura, X flag f = open-under-ranger cura "$@" &>/dev/null +ext kra, has krita, X, flag f = krita "$@" &>/dev/null +ext kra~, has krita, X, flag f = krita "$@" &>/dev/null +ext blend, has blender, X, flag f = blender "$@" &>/dev/null +ext blend~, has blender, X, flag f = blender "$@" &>/dev/null +ext xopp, has xournalpp, X, flag f = xournalpp "$@" &>/dev/null +ext xopp~, has blender, X, flag f = xournalpp "$@" &>/dev/null +ext helio, has helio, X, flag f = helio "$@" &>/dev/null +ext kdenlive, has kdenlive-accel, X, flag f = kdenlive-accel "$@" &>/dev/null +ext flp, has flstudio, X, flag f = flstudio "$@" &>/dev/null +ext 3mf, has curax, X, flag f = curax "$@" &>/dev/null +ext 3mf, has cura, X flag f = cura "$@" &>/dev/null #-------------------------------------------- # Scripts @@ -113,10 +112,13 @@ ext midi?, terminal, has wildmidi = wildmidi -- "$@" #-------------------------------------------- # Video/Audio with a GUI #------------------------------------------- -mime ^video, has mpv, X, flag f = open-under-ranger mpv "$@" -mime ^video, has mplayer2, X, flag f = open-under-ranger mplayer2 "$@" -mime ^video, has mplayer, X, flag f = open-under-ranger mplayer "$@" -mime ^video|audio, has vlc, X, flag f = open-under-ranger vlc "$@" +mime ^video, has mpv, X, flag f = mpv -- "$@" +mime ^video, has mpv, X, flag f = mpv --fs -- "$@" +mime ^video, has mplayer2, X, flag f = mplayer2 -- "$@" +mime ^video, has mplayer2, X, flag f = mplayer2 -fs -- "$@" +mime ^video, has mplayer, X, flag f = mplayer -- "$@" +mime ^video, has mplayer, X, flag f = mplayer -fs -- "$@" +mime ^video|audio, has vlc, X, flag f = vlc -- "$@" #-------------------------------------------- # Video without X @@ -128,22 +130,22 @@ mime ^video, terminal, !X, has mplayer = mplayer -- "$@" #------------------------------------------- # Documents #------------------------------------------- -ext pdf, has atril, X, flag f = open-under-ranger atril "$@" -ext djvu, has atril, X, flag f = open-under-ranger atril "$@" -ext epub, has foliate, X, flag f = open-under-ranger foliate "$@" +ext pdf, has atril, X, flag f = atril "$@" +ext djvu, has atril, X, flag f = atril "$@" +ext epub, has foliate, X, flag f = foliate "$@" ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = soffice "$@" -ext cbr, has zathura, X, flag f = open-under-ranger zathura "$@" -ext cbz, has zathura, X, flag f = open-under-ranger zathura "$@" +ext cbr, has zathura, X, flag f = zathura -- "$@" +ext cbz, has zathura, X, flag f = zathura -- "$@" #------------------------------------------- # Images #------------------------------------------- -mime ^image/svg, has inkscape, X, flag f = open-under-ranger inkscape "$@" -mime ^image, has pinta, X, flag f = open-under-ranger pinta "$@" -mime ^image, has krita, X, flag f = open-under-ranger krita "$@" +mime ^image/svg, has inkscape, X, flag f = inkscape "$@" +mime ^image, has pinta, X, flag f = pinta "$@" +mime ^image, has krita, X, flag f = krita "$@" #------------------------------------------- # Archives @@ -171,7 +173,7 @@ ext rar, has unrar = for file in "$@"; do unrar x "$file"; done #------------------------------------------- # Fonts #------------------------------------------- -mime ^font, has fontforge, X, flag f = open-under-ranger fontforge "$@" +mime ^font, has fontforge, X, flag f = fontforge "$@" #------------------------------------------- # Flag t fallback terminals @@ -180,38 +182,38 @@ mime ^font, has fontforge, X, flag f = open-under-ranger fontforge "$@" # if you install a rare terminal emulator, you probably use it. # gnome-terminal/konsole/xterm on the other hand are often installed as part of # a desktop environment or as fallback terminal emulators. -mime ^ranger/x-terminal-emulator, has alacritty = open-under-ranger alacritty -e "$@" -mime ^ranger/x-terminal-emulator, has sakura = open-under-ranger sakura -e "$@" -mime ^ranger/x-terminal-emulator, has lilyterm = open-under-ranger lilyterm -e "$@" +mime ^ranger/x-terminal-emulator, has alacritty = alacritty -e "$@" +mime ^ranger/x-terminal-emulator, has sakura = sakura -e "$@" +mime ^ranger/x-terminal-emulator, has lilyterm = lilyterm -e "$@" #mime ^ranger/x-terminal-emulator, has cool-retro-term = cool-retro-term -e "$@" -mime ^ranger/x-terminal-emulator, has termite = open-under-ranger termite -x '"$@"' +mime ^ranger/x-terminal-emulator, has termite = termite -x '"$@"' #mime ^ranger/x-terminal-emulator, has yakuake = yakuake -e "$@" -mime ^ranger/x-terminal-emulator, has guake = open-under-ranger guake -ne "$@" -mime ^ranger/x-terminal-emulator, has tilda = open-under-ranger tilda -c "$@" -mime ^ranger/x-terminal-emulator, has st = open-under-ranger st -e "$@" -mime ^ranger/x-terminal-emulator, has terminator = open-under-ranger terminator -x "$@" -mime ^ranger/x-terminal-emulator, has urxvt = open-under-ranger urxvt -e "$@" -mime ^ranger/x-terminal-emulator, has pantheon-terminal = open-under-ranger pantheon-terminal -e "$@" -mime ^ranger/x-terminal-emulator, has lxterminal = open-under-ranger lxterminal -e "$@" -mime ^ranger/x-terminal-emulator, has mate-terminal = open-under-ranger mate-terminal -x "$@" -mime ^ranger/x-terminal-emulator, has xfce4-terminal = open-under-ranger xfce4-terminal -x "$@" -mime ^ranger/x-terminal-emulator, has konsole = open-under-ranger konsole -e "$@" -mime ^ranger/x-terminal-emulator, has gnome-terminal = open-under-ranger gnome-terminal -- "$@" -mime ^ranger/x-terminal-emulator, has xterm = open-under-ranger xterm -e "$@" +mime ^ranger/x-terminal-emulator, has guake = guake -ne "$@" +mime ^ranger/x-terminal-emulator, has tilda = tilda -c "$@" +mime ^ranger/x-terminal-emulator, has st = st -e "$@" +mime ^ranger/x-terminal-emulator, has terminator = terminator -x "$@" +mime ^ranger/x-terminal-emulator, has urxvt = urxvt -e "$@" +mime ^ranger/x-terminal-emulator, has pantheon-terminal = pantheon-terminal -e "$@" +mime ^ranger/x-terminal-emulator, has lxterminal = lxterminal -e "$@" +mime ^ranger/x-terminal-emulator, has mate-terminal = mate-terminal -x "$@" +mime ^ranger/x-terminal-emulator, has xfce4-terminal = xfce4-terminal -x "$@" +mime ^ranger/x-terminal-emulator, has konsole = konsole -e "$@" +mime ^ranger/x-terminal-emulator, has gnome-terminal = gnome-terminal -- "$@" +mime ^ranger/x-terminal-emulator, has xterm = xterm -e "$@" #------------------------------------------- # Misc #------------------------------------------- -label wallpaper, number 11, mime ^image, has feh, X = open-under-ranger feh --bg-scale "$1" -label wallpaper, number 12, mime ^image, has feh, X = open-under-ranger feh --bg-tile "$1" -label wallpaper, number 13, mime ^image, has feh, X = open-under-ranger feh --bg-center "$1" -label wallpaper, number 14, mime ^image, has feh, X = open-under-ranger feh --bg-fill "$1" +label wallpaper, number 11, mime ^image, has feh, X = feh --bg-scale "$1" +label wallpaper, number 12, mime ^image, has feh, X = feh --bg-tile "$1" +label wallpaper, number 13, mime ^image, has feh, X = feh --bg-center "$1" +label wallpaper, number 14, mime ^image, has feh, X = feh --bg-fill "$1" #------------------------------------------- # Generic file openers #------------------------------------------- -label open, has xdg-open = open-under-ranger xdg-open -- "$@" -label open, has open = open-under-ranger open -- "$@" +label open, has xdg-open = xdg-open -- "$@" +label open, has open = open -- "$@" # Define the editor for non-text files + pager as last action !mime ^text, !ext xml|json|csv|tex|py|pl|rb|js|sh|php = ask diff --git a/modules/user/ranger/scope.sh b/user/app/ranger/scope.sh similarity index 99% rename from modules/user/ranger/scope.sh rename to user/app/ranger/scope.sh index f4e98a5..005469d 100755 --- a/modules/user/ranger/scope.sh +++ b/user/app/ranger/scope.sh @@ -52,9 +52,6 @@ SQLITE_ROW_LIMIT=5 # Display only the first and the last ( - 1) recor handle_extension() { case "${FILE_EXTENSION_LOWER}" in - gcode) - gcode-stats "${FILE_PATH}" && exit 5 - exit 1;; ## Archive a|ace|alz|arc|arj|bz|bz2|cab|cpio|deb|gz|jar|lha|lz|lzh|lzma|lzo|\ rpm|rz|t7z|tar|tbz|tbz2|tgz|tlz|txz|tZ|tzo|war|xpi|xz|Z|zip) diff --git a/user/app/terminal/alacritty.nix b/user/app/terminal/alacritty.nix new file mode 100644 index 0000000..8dd7a18 --- /dev/null +++ b/user/app/terminal/alacritty.nix @@ -0,0 +1,11 @@ +{ pkgs, lib, ... }: + +{ + home.packages = with pkgs; [ + alacritty + ]; + programs.alacritty.enable = true; + programs.alacritty.settings = { + window.opacity = lib.mkForce 0.85; + }; +} diff --git a/user/app/terminal/kitty.nix b/user/app/terminal/kitty.nix new file mode 100644 index 0000000..a2d0b51 --- /dev/null +++ b/user/app/terminal/kitty.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: + +{ + home.packages = with pkgs; [ + kitty + ]; + programs.kitty.enable = true; + programs.kitty.settings = { + background_opacity = lib.mkForce "0.85"; + modify_font = "cell_width 90%"; + }; +} diff --git a/user/app/virtualization/virtualization.nix b/user/app/virtualization/virtualization.nix new file mode 100644 index 0000000..f1fb7bd --- /dev/null +++ b/user/app/virtualization/virtualization.nix @@ -0,0 +1,23 @@ +{ config, pkgs, ... }: + +{ + # Various packages related to virtualization, compatability and sandboxing + home.packages = with pkgs; [ + # Virtual Machines and wine + libvirt + virt-manager + qemu + uefi-run + lxc + swtpm + bottles + + # Filesystems + dosfstools + ]; + + home.file.".config/libvirt/qemu.conf".text = '' +nvram = ["/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd"] + ''; + +} diff --git a/user/hardware/bluetooth.nix b/user/hardware/bluetooth.nix new file mode 100644 index 0000000..a6b6cd8 --- /dev/null +++ b/user/hardware/bluetooth.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + blueman + ]; + services = { + blueman-applet.enable = true; + }; +} diff --git a/user/lang/android/android.nix b/user/lang/android/android.nix new file mode 100644 index 0000000..9158b97 --- /dev/null +++ b/user/lang/android/android.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Android + android-tools + android-udev-rules + ]; +} diff --git a/user/lang/cc/cc.nix b/user/lang/cc/cc.nix new file mode 100644 index 0000000..12733fa --- /dev/null +++ b/user/lang/cc/cc.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # CC + gcc + gnumake + cmake + autoconf + automake + libtool + ]; +} diff --git a/user/lang/godot/godot.nix b/user/lang/godot/godot.nix new file mode 100644 index 0000000..6cf5426 --- /dev/null +++ b/user/lang/godot/godot.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Gamedev + godot_4 + ]; +} diff --git a/user/lang/haskell/haskell.nix b/user/lang/haskell/haskell.nix new file mode 100644 index 0000000..b903e8c --- /dev/null +++ b/user/lang/haskell/haskell.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Haskell + haskellPackages.haskell-language-server + haskellPackages.stack + ]; +} diff --git a/user/lang/python/python-packages.nix b/user/lang/python/python-packages.nix new file mode 100644 index 0000000..10af8e8 --- /dev/null +++ b/user/lang/python/python-packages.nix @@ -0,0 +1,80 @@ +{ pkgs, ... }: + +{ + # Python packages + home.packages = with pkgs.python3Packages; [ + cffi + dbus-python + wheel + pyyaml + zipp + xlib + libvirt + pybind11 + pyatspi + attrs + autocommand + bcrypt + pycairo + certifi + chardet + click + cryptography + cssselect + python-dateutil + distro + dnspython + evdev + ewmh + fastjsonschema + fido2 + python-gnupg + pygobject3 + idna + importlib-metadata + inflect + isodate + jeepney + keyring + lxml + markdown + markupsafe + more-itertools + numpy + ordered-set + packaging + pillow + pip + platformdirs + ply + prettytable + proton-client + protonvpn-nm-lib + psutil + pulsectl + pycparser + pycups + pycurl + pydantic + pyinotify + pyopenssl + pyparsing + pyqt5 + pyqt5_sip + pyscard + pythondialog + pyxdg + rdflib + requests + secretstorage + setproctitle + setuptools + six + systemd + tomli + urllib3 + wcwidth + websockets + python-zbar + ]; +} diff --git a/user/lang/python/python.nix b/user/lang/python/python.nix new file mode 100644 index 0000000..681c776 --- /dev/null +++ b/user/lang/python/python.nix @@ -0,0 +1,10 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Python setup + python3Full + imath + pystring + ]; +} diff --git a/user/lang/rust/rust.nix b/user/lang/rust/rust.nix new file mode 100644 index 0000000..23bccb1 --- /dev/null +++ b/user/lang/rust/rust.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: + +{ + home.packages = with pkgs; [ + # Rust setup + rustup + ]; +} diff --git a/modules/user/music/flstudio.png b/user/pkgs/flstudio.png similarity index 100% rename from modules/user/music/flstudio.png rename to user/pkgs/flstudio.png diff --git a/user/pkgs/hyprland-logo-stylix.svg.mustache b/user/pkgs/hyprland-logo-stylix.svg.mustache new file mode 100644 index 0000000..93ada5a --- /dev/null +++ b/user/pkgs/hyprland-logo-stylix.svg.mustache @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/user/pkgs/nixos-snowflake-stylix.svg.mustache b/user/pkgs/nixos-snowflake-stylix.svg.mustache new file mode 100644 index 0000000..d014f6e --- /dev/null +++ b/user/pkgs/nixos-snowflake-stylix.svg.mustache @@ -0,0 +1,187 @@ + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + diff --git a/user/pkgs/pokemon-colorscripts.nix b/user/pkgs/pokemon-colorscripts.nix new file mode 100644 index 0000000..ed6f4c3 --- /dev/null +++ b/user/pkgs/pokemon-colorscripts.nix @@ -0,0 +1,30 @@ +{ lib, stdenv, fetchFromGitLab, pkgs, ... }: + +let name = "pokemon-colorscripts"; + version = "unstable"; +in + stdenv.mkDerivation { + inherit name version; + + src = fetchFromGitLab { + owner = "phoneybadger"; + repo = name; + rev = "0483c85b93362637bdd0632056ff986c07f30868"; + sha256 = "sha256-rj0qKYHCu9SyNsj1PZn1g7arjcHuIDGHwubZg/yJt7A="; + }; + + installPhase = '' + mkdir -p $out $out/bin $out/opt + cp -rf $src/colorscripts $out/opt + cp $src/pokemon-colorscripts.py $out/opt + cp $src/pokemon.json $out/opt + ln -s $out/opt/pokemon-colorscripts.py $out/bin/pokemon-colorscripts + ''; + + meta = { + homepage = "https://github.com/Admiral-Fish/PokeFinder"; + description = "CLI utility to print out images of pokemon to terminal"; + license = lib.licenses.mit; + maintainers = []; + }; + } diff --git a/user/pkgs/ranger.nix b/user/pkgs/ranger.nix new file mode 100644 index 0000000..feade74 --- /dev/null +++ b/user/pkgs/ranger.nix @@ -0,0 +1,39 @@ +{ lib, pkgs, ... }: + +{ + nixpkgs.overlays = [ + (self: super: + { + ranger = super.ranger.overrideAttrs (oldAttrs: rec { + preConfigure = '' + substituteInPlace ranger/__init__.py \ + --replace "DEFAULT_PAGER = 'less'" "DEFAULT_PAGER = '${lib.getBin pkgs.bat}/bin/bat'" + + # give image previews out of the box when building with w3m + substituteInPlace ranger/config/rc.conf \ + --replace "set preview_images false" "set preview_images true" + + # adds this patch: https://github.com/ranger/ranger/pull/1758 + # fixes a bug for kitty users that use image previews + substituteInPlace ranger/ext/img_display.py \ + --replace "self.image_id -= 1" "self.image_id = max(0, self.image_id - 1)" + + # fixes the .desktop file + substituteInPlace doc/ranger.desktop \ + --replace "Icon=utilities-terminal" "Icon=user-desktop" + substituteInPlace doc/ranger.desktop \ + --replace "Terminal=true" "Terminal=false" + substituteInPlace doc/ranger.desktop \ + --replace "Exec=ranger" "Exec=kitty -e ranger %U" + ''; + }); + } + ) + ]; + home.packages = with pkgs; [ + poppler_utils + librsvg + ffmpegthumbnailer + ]; + +} diff --git a/user/pkgs/rogauracore.nix b/user/pkgs/rogauracore.nix new file mode 100644 index 0000000..d141753 --- /dev/null +++ b/user/pkgs/rogauracore.nix @@ -0,0 +1,17 @@ +# THIS DOES NOT WORK YET! +{ stdenv, pkgs, ... }: + +let name = "rogauracore"; + owner = "wroberts"; + version = "1.6"; +in + stdenv.mkDerivation { + inherit name owner version; + src = fetchTarball { + url = "https://github.com/"+owner+"/"+name+"/releases/download/"+version+"/rogauracore-"+version+".tar.gz"; + sha256 = "0vpypcq71yv0v8vbgpkn8xy77j22g55aw6i83s30mpbpjjna2lm9"; + }; + buildInputs = [ pkgs.udev + pkgs.libusb + ]; +} diff --git a/user/shell/cli-collection.nix b/user/shell/cli-collection.nix new file mode 100644 index 0000000..f753928 --- /dev/null +++ b/user/shell/cli-collection.nix @@ -0,0 +1,35 @@ +{ pkgs, ... }: +{ + # Collection of useful CLI apps + home.packages = with pkgs; [ + # Command Line + disfetch lolcat cowsay + starfetch + cava + killall + libnotify + timer + brightnessctl + gnugrep + bat eza fd bottom ripgrep + rsync + unzip + w3m + pandoc + hwinfo + pciutils + numbat + (pkgs.callPackage ../pkgs/pokemon-colorscripts.nix { }) + (pkgs.writeShellScriptBin "airplane-mode" '' + #!/bin/sh + connectivity="$(nmcli n connectivity)" + if [ "$connectivity" == "full" ] + then + nmcli n off + else + nmcli n on + fi + '') + vim neovim + ]; +} diff --git a/user/shell/sh.nix b/user/shell/sh.nix new file mode 100644 index 0000000..b612bab --- /dev/null +++ b/user/shell/sh.nix @@ -0,0 +1,50 @@ +{ pkgs, ... }: +let + + # My shell aliases + myAliases = { + ls = "eza --icons -l -T -L=1"; + cat = "bat"; + htop = "btm"; + fd = "fd -Lu"; + w3m = "w3m -no-cookie -v"; + neofetch = "disfetch"; + fetch = "disfetch"; + gitfetch = "onefetch"; + "," = "comma"; + }; +in +{ + programs.zsh = { + enable = true; + enableAutosuggestions = true; + syntaxHighlighting.enable = true; + enableCompletion = true; + shellAliases = myAliases; + initExtra = '' + PROMPT=" ◉ %U%F{magenta}%n%f%u@%U%F{blue}%m%f%u:%F{yellow}%~%f + %F{green}→%f " + RPROMPT="%F{red}▂%f%F{yellow}▄%f%F{green}▆%f%F{cyan}█%f%F{blue}▆%f%F{magenta}▄%f%F{white}▂%f" + [ $TERM = "dumb" ] && unsetopt zle && PS1='$ ' + bindkey '^P' history-beginning-search-backward + bindkey '^N' history-beginning-search-forward + ''; + }; + + programs.bash = { + enable = true; + enableCompletion = true; + shellAliases = myAliases; + }; + + home.packages = with pkgs; [ + disfetch lolcat cowsay onefetch + gnugrep gnused + bat eza bottom fd bc + direnv nix-direnv + ]; + + programs.direnv.enable = true; + programs.direnv.enableZshIntegration = true; + programs.direnv.nix-direnv.enable = true; +} diff --git a/modules/user/stylix/Trolltech.conf.mustache b/user/style/Trolltech.conf.mustache similarity index 100% rename from modules/user/stylix/Trolltech.conf.mustache rename to user/style/Trolltech.conf.mustache diff --git a/modules/user/stylix/oomox-current.conf.mustache b/user/style/oomox-current.conf.mustache similarity index 100% rename from modules/user/stylix/oomox-current.conf.mustache rename to user/style/oomox-current.conf.mustache diff --git a/modules/user/stylix/qt5ct.conf b/user/style/qt5ct.conf similarity index 100% rename from modules/user/stylix/qt5ct.conf rename to user/style/qt5ct.conf diff --git a/user/style/stylix.nix b/user/style/stylix.nix new file mode 100644 index 0000000..2b5d2a7 --- /dev/null +++ b/user/style/stylix.nix @@ -0,0 +1,122 @@ +{ config, lib, pkgs, inputs, userSettings, ... }: + +let + themePath = "../../../themes"+("/"+userSettings.theme+"/"+userSettings.theme)+".yaml"; + themePolarity = lib.removeSuffix "\n" (builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/polarity.txt")); + backgroundUrl = builtins.readFile (./. + "../../../themes"+("/"+userSettings.theme)+"/backgroundurl.txt"); + backgroundSha256 = builtins.readFile (./. + "../../../themes/"+("/"+userSettings.theme)+"/backgroundsha256.txt"); +in +{ + + imports = [ inputs.stylix.homeManagerModules.stylix ]; + + home.file.".currenttheme".text = userSettings.theme; + stylix.autoEnable = false; + stylix.polarity = themePolarity; + stylix.image = pkgs.fetchurl { + url = backgroundUrl; + sha256 = backgroundSha256; + }; + stylix.base16Scheme = ./. + themePath; + + stylix.fonts = { + monospace = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + serif = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + sansSerif = { + name = userSettings.font; + package = userSettings.fontPkg; + }; + emoji = { + name = "Noto Emoji"; + package = pkgs.noto-fonts-monochrome-emoji; + }; + sizes = { + terminal = 18; + applications = 12; + popups = 12; + desktop = 12; + }; + }; + + stylix.targets.alacritty.enable = false; + programs.alacritty.settings = { + colors = { + # TODO revisit these color mappings + # these are just the default provided from stylix + # but declared directly due to alacritty v3.0 breakage + primary.background = "#"+config.lib.stylix.colors.base00; + primary.foreground = "#"+config.lib.stylix.colors.base07; + cursor.text = "#"+config.lib.stylix.colors.base00; + cursor.cursor = "#"+config.lib.stylix.colors.base07; + normal.black = "#"+config.lib.stylix.colors.base00; + normal.red = "#"+config.lib.stylix.colors.base08; + normal.green = "#"+config.lib.stylix.colors.base0B; + normal.yellow = "#"+config.lib.stylix.colors.base0A; + normal.blue = "#"+config.lib.stylix.colors.base0D; + normal.magenta = "#"+config.lib.stylix.colors.base0E; + normal.cyan = "#"+config.lib.stylix.colors.base0B; + normal.white = "#"+config.lib.stylix.colors.base05; + bright.black = "#"+config.lib.stylix.colors.base03; + bright.red = "#"+config.lib.stylix.colors.base09; + bright.green = "#"+config.lib.stylix.colors.base01; + bright.yellow = "#"+config.lib.stylix.colors.base02; + bright.blue = "#"+config.lib.stylix.colors.base04; + bright.magenta = "#"+config.lib.stylix.colors.base06; + bright.cyan = "#"+config.lib.stylix.colors.base0F; + bright.white = "#"+config.lib.stylix.colors.base07; + }; + font.size = config.stylix.fonts.sizes.terminal; + font.normal.family = userSettings.font; + }; + stylix.targets.kitty.enable = true; + stylix.targets.gtk.enable = true; + stylix.targets.rofi.enable = if (userSettings.wmType == "x11") then true else false; + stylix.targets.feh.enable = if (userSettings.wmType == "x11") then true else false; + programs.feh.enable = true; + home.file.".fehbg-stylix".text = '' + #!/bin/sh + feh --no-fehbg --bg-fill ''+config.stylix.image+''; + ''; + home.file.".fehbg-stylix".executable = true; + home.file = { + ".config/qt5ct/colors/oomox-current.conf".source = config.lib.stylix.colors { + template = builtins.readFile ./oomox-current.conf.mustache; + extension = ".conf"; + }; + ".config/Trolltech.conf".source = config.lib.stylix.colors { + template = builtins.readFile ./Trolltech.conf.mustache; + extension = ".conf"; + }; + ".config/kdeglobals".source = config.lib.stylix.colors { + template = builtins.readFile ./Trolltech.conf.mustache; + extension = ""; + }; + ".config/qt5ct/qt5ct.conf".text = pkgs.lib.mkBefore (builtins.readFile ./qt5ct.conf); + }; + home.file.".config/hypr/hyprpaper.conf".text = '' + preload = ''+config.stylix.image+'' + + wallpaper = ,''+config.stylix.image+'' + + ''; + home.packages = with pkgs; [ + libsForQt5.qt5ct pkgs.libsForQt5.breeze-qt5 libsForQt5.breeze-icons pkgs.noto-fonts-monochrome-emoji + ]; + qt = { + enable = true; + style.package = pkgs.libsForQt5.breeze-qt5; + style.name = "breeze-dark"; + platformTheme = "kde"; + }; + fonts.fontconfig.defaultFonts = { + monospace = [ userSettings.font ]; + sansSerif = [ userSettings.font ]; + serif = [ userSettings.font ]; + }; +} diff --git a/user/wm/hyprland/hyprland.nix b/user/wm/hyprland/hyprland.nix new file mode 100644 index 0000000..9198dad --- /dev/null +++ b/user/wm/hyprland/hyprland.nix @@ -0,0 +1,1334 @@ +{ inputs, config, lib, pkgs, userSettings, systemSettings, pkgs-nwg-dock-hyprland, ... }: let + pkgs-hyprland = inputs.hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}; +in +{ + imports = [ + ../../app/terminal/alacritty.nix + ../../app/terminal/kitty.nix + (import ../../app/dmenu-scripts/networkmanager-dmenu.nix { + dmenu_command = "fuzzel -d"; inherit config lib pkgs; + }) + ../input/nihongo.nix + ] ++ + (if (systemSettings.profile == "personal") then + [ (import ./hyprprofiles/hyprprofiles.nix { + dmenuCmd = "fuzzel -d"; inherit config lib pkgs; })] + else + []); + + gtk.cursorTheme = { + package = pkgs.quintom-cursor-theme; + name = if (config.stylix.polarity == "light") then "Quintom_Ink" else "Quintom_Snow"; + size = 36; + }; + + wayland.windowManager.hyprland = { + enable = true; + package = inputs.hyprland.packages.${pkgs.system}.hyprland; + plugins = [ ]; + settings = { }; + extraConfig = '' + exec-once = dbus-update-activation-environment --systemd DISPLAY XAUTHORITY WAYLAND_DISPLAY XDG_SESSION_DESKTOP=Hyprland XDG_CURRENT_DESKTOP=Hyprland XDG_SESSION_TYPE=wayland + exec-once = hyprctl setcursor '' + config.gtk.cursorTheme.name + " " + builtins.toString config.gtk.cursorTheme.size + '' + + env = XDG_CURRENT_DESKTOP,Hyprland + env = XDG_SESSION_DESKTOP,Hyprland + env = XDG_SESSION_TYPE,wayland + env = WLR_DRM_DEVICES,/dev/dri/card2:/dev/dri/card1 + env = GDK_BACKEND,wayland,x11,* + env = QT_QPA_PLATFORM,wayland;xcb + env = QT_QPA_PLATFORMTHEME,qt5ct + env = QT_AUTO_SCREEN_SCALE_FACTOR,1 + env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1 + env = CLUTTER_BACKEND,wayland + env = GDK_PIXBUF_MODULE_FILE,${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache + + exec-once = hyprprofile Default + + exec-once = ydotoold + #exec-once = STEAM_FRAME_FORCE_CLOSE=1 steam -silent + exec-once = nm-applet + exec-once = blueman-applet + exec-once = GOMAXPROCS=1 syncthing --no-browser + exec-once = protonmail-bridge --noninteractive + exec-once = waybar + exec-once = emacs --daemon + + exec-once = hypridle + exec-once = sleep 5 && libinput-gestures + exec-once = obs-notification-mute-daemon + + exec-once = hyprpaper + + bezier = wind, 0.05, 0.9, 0.1, 1.05 + bezier = winIn, 0.1, 1.1, 0.1, 1.0 + bezier = winOut, 0.3, -0.3, 0, 1 + bezier = liner, 1, 1, 1, 1 + bezier = linear, 0.0, 0.0, 1.0, 1.0 + + animations { + enabled = yes + animation = windowsIn, 1, 6, winIn, popin + animation = windowsOut, 1, 5, winOut, popin + animation = windowsMove, 1, 5, wind, slide + animation = border, 1, 10, default + animation = borderangle, 1, 100, linear, loop + animation = fade, 1, 10, default + animation = workspaces, 1, 5, wind + animation = windows, 1, 6, wind, slide + animation = specialWorkspace, 1, 6, default, slidefadevert -50% + } + + general { + layout = master + border_size = 5 + col.active_border = 0xff'' + config.lib.stylix.colors.base08 + " " + ''0xff'' + config.lib.stylix.colors.base09 + " " + ''0xff'' + config.lib.stylix.colors.base0A + " " + ''0xff'' + config.lib.stylix.colors.base0B + " " + ''0xff'' + config.lib.stylix.colors.base0C + " " + ''0xff'' + config.lib.stylix.colors.base0D + " " + ''0xff'' + config.lib.stylix.colors.base0E + " " + ''0xff'' + config.lib.stylix.colors.base0F + " " + ''270deg + + col.inactive_border = 0xaa'' + config.lib.stylix.colors.base02 + '' + + resize_on_border = true + gaps_in = 7 + gaps_out = 7 + } + + cursor { + no_warps = false + inactive_timeout = 30 + } + + bind=SUPER,code:9,exec,nwggrid-wrapper + bind=SUPER,code:66,exec,nwggrid-wrapper + bind=SUPER,SPACE,fullscreen,1 + bind=SUPERSHIFT,F,fullscreen,0 + bind=SUPER,Y,workspaceopt,allfloat + bind=ALT,TAB,cyclenext + bind=ALT,TAB,bringactivetotop + bind=ALTSHIFT,TAB,cyclenext,prev + bind=ALTSHIFT,TAB,bringactivetotop + bind=SUPER,V,exec,wl-copy $(wl-paste | tr '\n' ' ') + bind=SUPERSHIFT,T,exec,screenshot-ocr + bind=CTRLALT,Delete,exec,hyprctl kill + bind=SUPERSHIFT,K,exec,hyprctl kill + bind=SUPER,W,exec,nwg-dock-wrapper + + bind=,code:172,exec,lollypop -t + bind=,code:208,exec,lollypop -t + bind=,code:209,exec,lollypop -t + bind=,code:174,exec,lollypop -s + bind=,code:171,exec,lollypop -n + bind=,code:173,exec,lollypop -p + + bind = SUPER,R,pass,^(com\.obsproject\.Studio)$ + bind = SUPERSHIFT,R,pass,^(com\.obsproject\.Studio)$ + + bind=SUPER,RETURN,exec,'' + userSettings.term + '' + + bind=SUPERSHIFT,RETURN,exec,'' + userSettings.term + " " + '' --class float_term + + bind=SUPER,A,exec,'' + userSettings.spawnEditor + '' + + bind=SUPER,S,exec,'' + userSettings.spawnBrowser + '' + + bind=SUPERCTRL,S,exec,container-open # qutebrowser only + + bind=SUPERCTRL,P,pin + + bind=SUPER,code:47,exec,fuzzel + bind=SUPER,X,exec,fnottctl dismiss + bind=SUPERSHIFT,X,exec,fnottctl dismiss all + bind=SUPER,Q,killactive + bind=SUPERSHIFT,Q,exit + bindm=SUPER,mouse:272,movewindow + bindm=SUPER,mouse:273,resizewindow + bind=SUPER,T,togglefloating + bind=SUPER,G,exec,hyprctl dispatch focusworkspaceoncurrentmonitor 9 && pegasus-fe; + bind=,code:148,exec,''+ userSettings.term + " "+''-e numbat + + bind=,code:107,exec,grim -g "$(slurp)" + bind=SHIFT,code:107,exec,grim -g "$(slurp -o)" + bind=SUPER,code:107,exec,grim + bind=CTRL,code:107,exec,grim -g "$(slurp)" - | wl-copy + bind=SHIFTCTRL,code:107,exec,grim -g "$(slurp -o)" - | wl-copy + bind=SUPERCTRL,code:107,exec,grim - | wl-copy + + bind=,code:122,exec,swayosd-client --output-volume lower + bind=,code:123,exec,swayosd-client --output-volume raise + bind=,code:121,exec,swayosd-client --output-volume mute-toggle + bind=,code:256,exec,swayosd-client --output-volume mute-toggle + bind=SHIFT,code:122,exec,swayosd-client --output-volume lower + bind=SHIFT,code:123,exec,swayosd-client --output-volume raise + bind=,code:232,exec,swayosd-client --brightness lower + bind=,code:233,exec,swayosd-client --brightness raise + bind=,code:237,exec,brightnessctl --device='asus::kbd_backlight' set 1- + bind=,code:238,exec,brightnessctl --device='asus::kbd_backlight' set +1 + bind=,code:255,exec,airplane-mode + bind=SUPER,C,exec,wl-copy $(hyprpicker) + + bind=SUPERSHIFT,S,exec,systemctl suspend + bindl=,switch:on:Lid Switch,exec,loginctl lock-session + bind=SUPERCTRL,L,exec,loginctl lock-session + + bind=SUPER,H,movefocus,l + bind=SUPER,J,movefocus,d + bind=SUPER,K,movefocus,u + bind=SUPER,L,movefocus,r + + bind=SUPERSHIFT,H,movewindow,l + bind=SUPERSHIFT,J,movewindow,d + bind=SUPERSHIFT,K,movewindow,u + bind=SUPERSHIFT,L,movewindow,r + + bind=SUPER,1,focusworkspaceoncurrentmonitor,1 + bind=SUPER,2,focusworkspaceoncurrentmonitor,2 + bind=SUPER,3,focusworkspaceoncurrentmonitor,3 + bind=SUPER,4,focusworkspaceoncurrentmonitor,4 + bind=SUPER,5,focusworkspaceoncurrentmonitor,5 + bind=SUPER,6,focusworkspaceoncurrentmonitor,6 + bind=SUPER,7,focusworkspaceoncurrentmonitor,7 + bind=SUPER,8,focusworkspaceoncurrentmonitor,8 + bind=SUPER,9,focusworkspaceoncurrentmonitor,9 + + bind=SUPERCTRL,right,exec,hyprnome + bind=SUPERCTRL,left,exec,hyprnome --previous + bind=SUPERSHIFT,right,exec,hyprnome --move + bind=SUPERSHIFT,left,exec,hyprnome --previous --move + + bind=SUPERSHIFT,1,movetoworkspace,1 + bind=SUPERSHIFT,2,movetoworkspace,2 + bind=SUPERSHIFT,3,movetoworkspace,3 + bind=SUPERSHIFT,4,movetoworkspace,4 + bind=SUPERSHIFT,5,movetoworkspace,5 + bind=SUPERSHIFT,6,movetoworkspace,6 + bind=SUPERSHIFT,7,movetoworkspace,7 + bind=SUPERSHIFT,8,movetoworkspace,8 + bind=SUPERSHIFT,9,movetoworkspace,9 + + bind=SUPER,Z,exec,if hyprctl clients | grep scratch_term; then echo "scratch_term respawn not needed"; else alacritty --class scratch_term; fi + bind=SUPER,Z,togglespecialworkspace,scratch_term + bind=SUPER,F,exec,if hyprctl clients | grep scratch_ranger; then echo "scratch_ranger respawn not needed"; else kitty --class scratch_ranger -e ranger; fi + bind=SUPER,F,togglespecialworkspace,scratch_ranger + bind=SUPER,N,exec,if hyprctl clients | grep scratch_numbat; then echo "scratch_ranger respawn not needed"; else alacritty --class scratch_numbat -e numbat; fi + bind=SUPER,N,togglespecialworkspace,scratch_numbat + bind=SUPER,M,exec,if hyprctl clients | grep lollypop; then echo "scratch_ranger respawn not needed"; else lollypop; fi + bind=SUPER,M,togglespecialworkspace,scratch_music + bind=SUPER,B,exec,if hyprctl clients | grep scratch_btm; then echo "scratch_ranger respawn not needed"; else alacritty --class scratch_btm -e btm; fi + bind=SUPER,B,togglespecialworkspace,scratch_btm + bind=SUPER,D,exec,if hyprctl clients | grep Element; then echo "scratch_ranger respawn not needed"; else element-desktop; fi + bind=SUPER,D,togglespecialworkspace,scratch_element + bind=SUPER,code:172,exec,togglespecialworkspace,scratch_pavucontrol + bind=SUPER,code:172,exec,if hyprctl clients | grep pavucontrol; then echo "scratch_ranger respawn not needed"; else pavucontrol; fi + + $scratchpadsize = size 80% 85% + + $scratch_term = class:^(scratch_term)$ + windowrulev2 = float,$scratch_term + windowrulev2 = $scratchpadsize,$scratch_term + windowrulev2 = workspace special:scratch_term ,$scratch_term + windowrulev2 = center,$scratch_term + + $float_term = class:^(float_term)$ + windowrulev2 = float,$float_term + windowrulev2 = center,$float_term + + $scratch_ranger = class:^(scratch_ranger)$ + windowrulev2 = float,$scratch_ranger + windowrulev2 = $scratchpadsize,$scratch_ranger + windowrulev2 = workspace special:scratch_ranger silent,$scratch_ranger + windowrulev2 = center,$scratch_ranger + + $scratch_numbat = class:^(scratch_numbat)$ + windowrulev2 = float,$scratch_numbat + windowrulev2 = $scratchpadsize,$scratch_numbat + windowrulev2 = workspace special:scratch_numbat silent,$scratch_numbat + windowrulev2 = center,$scratch_numbat + + $scratch_btm = class:^(scratch_btm)$ + windowrulev2 = float,$scratch_btm + windowrulev2 = $scratchpadsize,$scratch_btm + windowrulev2 = workspace special:scratch_btm silent,$scratch_btm + windowrulev2 = center,$scratch_btm + + windowrulev2 = float,class:^(Element)$ + windowrulev2 = size 85% 90%,class:^(Element)$ + windowrulev2 = workspace special:scratch_element silent,class:^(Element)$ + windowrulev2 = center,class:^(Element)$ + + windowrulev2 = float,class:^(lollypop)$ + windowrulev2 = size 85% 90%,class:^(lollypop)$ + windowrulev2 = workspace special:scratch_music silent,class:^(lollypop)$ + windowrulev2 = center,class:^(lollypop)$ + + $savetodisk = title:^(Save to Disk)$ + windowrulev2 = float,$savetodisk + windowrulev2 = size 70% 75%,$savetodisk + windowrulev2 = center,$savetodisk + + $pavucontrol = class:^(org.pulseaudio.pavucontrol)$ + windowrulev2 = float,$pavucontrol + windowrulev2 = size 86% 40%,$pavucontrol + windowrulev2 = move 50% 6%,$pavucontrol + windowrulev2 = workspace special silent,$pavucontrol + windowrulev2 = opacity 0.80,$pavucontrol + + $miniframe = title:\*Minibuf.* + windowrulev2 = float,$miniframe + windowrulev2 = size 64% 50%,$miniframe + windowrulev2 = move 18% 25%,$miniframe + windowrulev2 = animation popin 1 20,$miniframe + + windowrulev2 = float,class:^(pokefinder)$ + windowrulev2 = float,class:^(Waydroid)$ + + windowrulev2 = float,title:^(Blender Render)$ + windowrulev2 = size 86% 85%,title:^(Blender Render)$ + windowrulev2 = center,title:^(Blender Render)$ + windowrulev2 = float,class:^(org.inkscape.Inkscape)$ + windowrulev2 = float,class:^(pinta)$ + windowrulev2 = float,class:^(krita)$ + windowrulev2 = float,class:^(Gimp) + windowrulev2 = float,class:^(Gimp) + windowrulev2 = float,class:^(libresprite)$ + + windowrulev2 = opacity 0.80,title:ORUI + + windowrulev2 = opacity 1.0,class:^(org.qutebrowser.qutebrowser),fullscreen:1 + windowrulev2 = opacity 0.85,class:^(Element)$ + windowrulev2 = opacity 0.85,class:^(Logseq)$ + windowrulev2 = opacity 0.85,class:^(lollypop)$ + windowrulev2 = opacity 1.0,class:^(Brave-browser),fullscreen:1 + windowrulev2 = opacity 1.0,class:^(librewolf),fullscreen:1 + windowrulev2 = opacity 0.85,title:^(My Local Dashboard Awesome Homepage - qutebrowser)$ + windowrulev2 = opacity 0.85,title:\[.*\] - My Local Dashboard Awesome Homepage + windowrulev2 = opacity 0.85,class:^(org.keepassxc.KeePassXC)$ + windowrulev2 = opacity 0.85,class:^(org.gnome.Nautilus)$ + windowrulev2 = opacity 0.85,class:^(org.gnome.Nautilus)$ + + windowrulev2 = opacity 0.85,initialTitle:^(Notes)$,initialClass:^(Brave-browser)$ + + layerrule = blur,waybar + layerrule = xray,waybar + blurls = waybar + layerrule = blur,launcher # fuzzel + blurls = launcher # fuzzel + layerrule = blur,gtk-layer-shell + layerrule = xray,gtk-layer-shell + blurls = gtk-layer-shell + layerrule = blur,~nwggrid + layerrule = xray 1,~nwggrid + layerrule = animation fade,~nwggrid + blurls = ~nwggrid + + bind=SUPER,equal, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 + 0.5}')" + bind=SUPER,minus, exec, hyprctl keyword cursor:zoom_factor "$(hyprctl getoption cursor:zoom_factor | grep float | awk '{print $2 - 0.5}')" + + bind=SUPER,I,exec,networkmanager_dmenu + bind=SUPER,P,exec,keepmenu + bind=SUPERSHIFT,P,exec,hyprprofile-dmenu + bind=SUPERCTRL,R,exec,phoenix refresh + + # 3 monitor setup + monitor=eDP-1,1920x1080@300,900x1080,1 + monitor=HDMI-A-1,1920x1080,1920x0,1 + monitor=DP-1,1920x1080,0x0,1 + + # hdmi tv + #monitor=eDP-1,1920x1080,1920x0,1 + #monitor=HDMI-A-1,1920x1080,0x0,1 + + # hdmi work projector + #monitor=eDP-1,1920x1080,1920x0,1 + #monitor=HDMI-A-1,1920x1200,0x0,1 + + xwayland { + force_zero_scaling = true + } + + binds { + movefocus_cycles_fullscreen = false + } + + input { + kb_layout = us + kb_options = caps:escape + repeat_delay = 350 + repeat_rate = 50 + accel_profile = adaptive + follow_mouse = 2 + float_switch_override_focus = 0 + } + + misc { + disable_hyprland_logo = true + mouse_move_enables_dpms = true + enable_swallow = true + swallow_regex = (scratch_term)|(Alacritty)|(kitty) + font_family = '' + userSettings.font + '' + + } + decoration { + rounding = 8 + dim_special = 0.0 + blur { + enabled = true + size = 5 + passes = 2 + ignore_opacity = true + contrast = 1.17 + brightness = '' + (if (config.stylix.polarity == "dark") then "0.8" else "1.25") + '' + + xray = true + special = true + popups = true + } + } + + ''; + xwayland = { enable = true; }; + systemd.enable = true; + }; + + home.packages = (with pkgs; [ + alacritty + kitty + feh + killall + polkit_gnome + nwg-launchers + papirus-icon-theme + (pkgs.writeScriptBin "nwggrid-wrapper" '' + #!/bin/sh + if pgrep -x "nwggrid-server" > /dev/null + then + nwggrid -client + else + GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache nwggrid-server -layer-shell-exclusive-zone -1 -g adw-gtk3 -o 0.55 -b ${config.lib.stylix.colors.base00} + fi + '') + libva-utils + libinput-gestures + gsettings-desktop-schemas + (pkgs.makeDesktopItem { + name = "nwggrid"; + desktopName = "Application Launcher"; + exec = "nwggrid-wrapper"; + terminal = false; + type = "Application"; + noDisplay = true; + icon = "/home/"+userSettings.username+"/.local/share/pixmaps/hyprland-logo-stylix.svg"; + }) + (hyprnome.override (oldAttrs: { + rustPlatform = oldAttrs.rustPlatform // { + buildRustPackage = args: oldAttrs.rustPlatform.buildRustPackage (args // { + pname = "hyprnome"; + version = "unstable-2024-05-06"; + src = fetchFromGitHub { + owner = "donovanglover"; + repo = "hyprnome"; + rev = "f185e6dbd7cfcb3ecc11471fab7d2be374bd5b28"; + hash = "sha256-tmko/bnGdYOMTIGljJ6T8d76NPLkHAfae6P6G2Aa2Qo="; + }; + cargoDeps = oldAttrs.cargoDeps.overrideAttrs (oldAttrs: rec { + name = "${pname}-vendor.tar.gz"; + inherit src; + outputHash = "sha256-cQwAGNKTfJTnXDI3IMJQ2583NEIZE7GScW7TsgnKrKs="; + }); + cargoHash = "sha256-cQwAGNKTfJTnXDI3IMJQ2583NEIZE7GScW7TsgnKrKs="; + }); + }; + }) + ) + gnome.zenity + wlr-randr + wtype + ydotool + wl-clipboard + hyprland-protocols + hyprpicker + inputs.hyprlock.packages.${pkgs.system}.default + hypridle + hyprpaper + fnott + keepmenu + pinentry-gnome3 + wev + grim + slurp + libsForQt5.qt5.qtwayland + qt6.qtwayland + xdg-utils + xdg-desktop-portal + xdg-desktop-portal-gtk + xdg-desktop-portal-hyprland + wlsunset + pavucontrol + pamixer + tesseract4 + (pkgs.writeScriptBin "screenshot-ocr" '' + #!/bin/sh + imgname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S).png" + txtname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S)" + txtfname=$txtname.txt + grim -g "$(slurp)" $imgname; + tesseract $imgname $txtname; + wl-copy -n < $txtfname + '') + (pkgs.writeScriptBin "nwg-dock-wrapper" '' + #!/bin/sh + if pgrep -x ".nwg-dock-hyprl" > /dev/null + then + nwg-dock-hyprland + else + nwg-dock-hyprland -f -x -i 64 -nolauncher -a start -ml 8 -mr 8 -mb 8 + fi + '') + (pkgs.writeScriptBin "sct" '' + #!/bin/sh + killall wlsunset &> /dev/null; + if [ $# -eq 1 ]; then + temphigh=$(( $1 + 1 )) + templow=$1 + wlsunset -t $templow -T $temphigh &> /dev/null & + else + killall wlsunset &> /dev/null; + fi + '') + (pkgs.writeScriptBin "obs-notification-mute-daemon" '' + #!/bin/sh + while true; do + if pgrep -x .obs-wrapped > /dev/null; + then + pkill -STOP fnott; + else + pkill -CONT fnott; + fi + sleep 10; + done + '') + (pkgs.writeScriptBin "suspend-unless-render" '' + #!/bin/sh + if pgrep -x nixos-rebuild > /dev/null || pgrep -x home-manager > /dev/null || pgrep -x kdenlive > /dev/null || pgrep -x FL64.exe > /dev/null || pgrep -x blender > /dev/null || pgrep -x flatpak > /dev/null; + then echo "Shouldn't suspend"; sleep 10; else echo "Should suspend"; systemctl suspend; fi + '') + ]) + ++ + (with pkgs-hyprland; [ ]) + ++ (with pkgs-nwg-dock-hyprland; [ + (nwg-dock-hyprland.overrideAttrs (oldAttrs: { + patches = ./patches/noactiveclients.patch; + })) + ]); + home.file.".local/share/pixmaps/hyprland-logo-stylix.svg".source = + config.lib.stylix.colors { + template = builtins.readFile ../../pkgs/hyprland-logo-stylix.svg.mustache; + extension = "svg"; + }; + home.file.".config/nwg-dock-hyprland/style.css".text = '' + window { + background: rgba(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'',''+config.lib.stylix.colors.base00-rgb-b+'',0.0); + border-radius: 20px; + padding: 4px; + margin-left: 4px; + margin-right: 4px; + border-style: none; + } + + #box { + /* Define attributes of the box surrounding icons here */ + padding: 10px; + background: rgba(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'',''+config.lib.stylix.colors.base00-rgb-b+'',0.55); + border-radius: 20px; + padding: 4px; + margin-left: 4px; + margin-right: 4px; + border-style: none; + } + button { + border-radius: 10px; + padding: 4px; + margin-left: 4px; + margin-right: 4px; + background: rgba(''+config.lib.stylix.colors.base03-rgb-r+'',''+config.lib.stylix.colors.base03-rgb-g+'',''+config.lib.stylix.colors.base03-rgb-b+'',0.55); + color: #''+config.lib.stylix.colors.base07+''; + font-size: 12px + } + + button:hover { + background: rgba(''+config.lib.stylix.colors.base04-rgb-r+'',''+config.lib.stylix.colors.base04-rgb-g+'',''+config.lib.stylix.colors.base04-rgb-b+'',0.55); + } + + ''; + home.file.".config/nwg-dock-pinned".text = '' + nwggrid + Alacritty + neovide + qutebrowser + brave-browser + writer + impress + calc + draw + krita + xournalpp + obs + kdenlive + flstudio + blender + openscad + Cura + virt-manager + ''; + home.file.".config/hypr/hypridle.conf".text = '' + general { + lock_cmd = pgrep hyprlock || hyprlock + before_sleep_cmd = loginctl lock-session + ignore_dbus_inhibit = false + } + + # FIXME memory leak fries computer inbetween dpms off and suspend + #listener { + # timeout = 150 # in seconds + # on-timeout = hyprctl dispatch dpms off + # on-resume = hyprctl dispatch dpms on + #} + listener { + timeout = 165 # in seconds + on-timeout = loginctl lock-session + } + listener { + timeout = 180 # in seconds + #timeout = 5400 # in seconds + on-timeout = systemctl suspend + on-resume = hyprctl dispatch dpms on + } + ''; + home.file.".config/hypr/hyprlock.conf".text = '' + background { + monitor = + path = screenshot + + # all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations + blur_passes = 4 + blur_size = 5 + noise = 0.0117 + contrast = 0.8916 + brightness = 0.8172 + vibrancy = 0.1696 + vibrancy_darkness = 0.0 + } + + # doesn't work yet + image { + monitor = + path = /home/emmet/.dotfiles/user/wm/hyprland/nix-dark.png + size = 150 # lesser side if not 1:1 ratio + rounding = -1 # negative values mean circle + border_size = 0 + rotate = 0 # degrees, counter-clockwise + + position = 0, 200 + halign = center + valign = center + } + + input-field { + monitor = + size = 200, 50 + outline_thickness = 3 + dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 + dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 + dots_center = false + dots_rounding = -1 # -1 default circle, -2 follow input-field rounding + outer_color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'') + inner_color = rgb(''+config.lib.stylix.colors.base00-rgb-r+'',''+config.lib.stylix.colors.base00-rgb-g+'', ''+config.lib.stylix.colors.base00-rgb-b+'') + font_color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'') + fade_on_empty = true + fade_timeout = 1000 # Milliseconds before fade_on_empty is triggered. + placeholder_text = Input Password... # Text rendered in the input box when it's empty. + hide_input = false + rounding = -1 # -1 means complete rounding (circle/oval) + check_color = rgb(''+config.lib.stylix.colors.base0A-rgb-r+'',''+config.lib.stylix.colors.base0A-rgb-g+'', ''+config.lib.stylix.colors.base0A-rgb-b+'') + fail_color = rgb(''+config.lib.stylix.colors.base08-rgb-r+'',''+config.lib.stylix.colors.base08-rgb-g+'', ''+config.lib.stylix.colors.base08-rgb-b+'') + fail_text = $FAIL ($ATTEMPTS) # can be set to empty + fail_transition = 300 # transition time in ms between normal outer_color and fail_color + capslock_color = -1 + numlock_color = -1 + bothlock_color = -1 # when both locks are active. -1 means don't change outer color (same for above) + invert_numlock = false # change color if numlock is off + swap_font_color = false # see below + + position = 0, -20 + halign = center + valign = center + } + + label { + monitor = + text = Hello, Emmet + color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'') + font_size = 25 + font_family = ''+userSettings.font+'' + + rotate = 0 # degrees, counter-clockwise + + position = 0, 160 + halign = center + valign = center + } + + label { + monitor = + text = $TIME + color = rgb(''+config.lib.stylix.colors.base07-rgb-r+'',''+config.lib.stylix.colors.base07-rgb-g+'', ''+config.lib.stylix.colors.base07-rgb-b+'') + font_size = 20 + font_family = Intel One Mono + rotate = 0 # degrees, counter-clockwise + + position = 0, 80 + halign = center + valign = center + } + ''; + services.swayosd.enable = true; + services.swayosd.topMargin = 0.5; + programs.waybar = { + enable = true; + package = pkgs.waybar.overrideAttrs (oldAttrs: { + postPatch = '' + # use hyprctl to switch workspaces + sed -i 's/zext_workspace_handle_v1_activate(workspace_handle_);/const std::string command = "hyprctl dispatch focusworkspaceoncurrentmonitor " + std::to_string(id());\n\tsystem(command.c_str());/g' src/modules/wlr/workspace_manager.cpp + sed -i 's/gIPC->getSocket1Reply("dispatch workspace " + std::to_string(id()));/gIPC->getSocket1Reply("dispatch focusworkspaceoncurrentmonitor " + std::to_string(id()));/g' src/modules/hyprland/workspaces.cpp + ''; + patches = [./patches/waybarpaupdate.patch ./patches/waybarbatupdate.patch]; + }); + settings = { + mainBar = { + layer = "top"; + position = "top"; + height = 35; + margin = "7 7 3 7"; + spacing = 2; + + modules-left = [ "group/power" "group/battery" "group/backlight" "group/cpu" "group/memory" "group/pulseaudio" "keyboard-state" ]; + modules-center = [ "custom/hyprprofile" "hyprland/workspaces" ]; + modules-right = [ "group/time" "idle_inhibitor" "tray" ]; + + "custom/os" = { + "format" = " {} "; + "exec" = ''echo "" ''; + "interval" = "once"; + "on-click" = "nwggrid-wrapper"; + "tooltip" = false; + }; + "group/power" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "children-class" = "not-power"; + "transition-left-to-right" = true; + }; + "modules" = [ + "custom/os" + "custom/hyprprofileicon" + "custom/lock" + "custom/quit" + "custom/power" + "custom/reboot" + ]; + }; + "custom/quit" = { + "format" = "󰍃"; + "tooltip" = false; + "on-click" = "hyprctl dispatch exit"; + }; + "custom/lock" = { + "format" = "󰍁"; + "tooltip" = false; + "on-click" = "hyprlock"; + }; + "custom/reboot" = { + "format" = "󰜉"; + "tooltip" = false; + "on-click" = "reboot"; + }; + "custom/power" = { + "format" = "󰐥"; + "tooltip" = false; + "on-click" = "shutdown now"; + }; + "custom/hyprprofileicon" = { + "format" = "󱙋"; + "on-click" = "hyprprofile-dmenu"; + "tooltip" = false; + }; + "custom/hyprprofile" = { + "format" = " {}"; + "exec" = ''cat ~/.hyprprofile''; + "interval" = 3; + "on-click" = "hyprprofile-dmenu"; + }; + "keyboard-state" = { + "numlock" = true; + "format" = "{icon}"; + "format-icons" = { + "locked" = "󰎠 "; + "unlocked" = "󱧓 "; + }; + }; + "hyprland/workspaces" = { + "format" = "{icon}"; + "format-icons" = { + "1" = "󱚌"; + "2" = "󰖟"; + "3" = ""; + "4" = "󰎄"; + "5" = "󰋩"; + "6" = ""; + "7" = "󰄖"; + "8" = "󰑴"; + "9" = "󱎓"; + "scratch_term" = "_"; + "scratch_ranger" = "_󰴉"; + "scratch_music" = "_"; + "scratch_btm" = "_"; + "scratch_pavucontrol" = "_󰍰"; + }; + "on-click" = "activate"; + "on-scroll-up" = "hyprnome"; + "on-scroll-down" = "hyprnome --previous"; + "all-outputs" = false; + "active-only" = false; + "ignore-workspaces" = ["scratch" "-"]; + "show-special" = false; + }; + + "idle_inhibitor" = { + format = "{icon}"; + format-icons = { + activated = "󰅶"; + deactivated = "󰾪"; + }; + }; + tray = { + #"icon-size" = 21; + "spacing" = 10; + }; + "clock#time" = { + "interval" = 1; + "format" = "{:%I:%M:%S %p}"; + "timezone" = "America/Chicago"; + "tooltip-format" = '' + {:%Y %B} + {calendar}''; + }; + "clock#date" = { + "interval" = 1; + "format" = "{:%a %Y-%m-%d}"; + "timezone" = "America/Chicago"; + "tooltip-format" = '' + {:%Y %B} + {calendar}''; + }; + "group/time" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = false; + }; + "modules" = [ "clock#time" "clock#date" ]; + }; + + cpu = { "format" = "󰍛"; }; + "cpu#text" = { "format" = "{usage}%"; }; + "group/cpu" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = true; + }; + "modules" = [ "cpu" "cpu#text" ]; + }; + + memory = { "format" = ""; }; + "memory#text" = { "format" = "{}%"; }; + "group/memory" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = true; + }; + "modules" = [ "memory" "memory#text" ]; + }; + + backlight = { + "format" = "{icon}"; + "format-icons" = [ "" "" "" "" "" "" "" "" "" ]; + }; + "backlight#text" = { "format" = "{percent}%"; }; + "group/backlight" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = true; + }; + "modules" = [ "backlight" "backlight#text" ]; + }; + + battery = { + "states" = { + "good" = 75; + "warning" = 30; + "critical" = 15; + }; + "fullat" = 80; + "format" = "{icon}"; + "format-charging" = "󰂄"; + "format-plugged" = "󰂄"; + "format-full" = "󰁹"; + "format-icons" = [ "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + "interval" = 10; + }; + "battery#text" = { + "states" = { + "good" = 75; + "warning" = 30; + "critical" = 15; + }; + "fullat" = 80; + "format" = "{capacity}%"; + }; + "group/battery" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = true; + }; + "modules" = [ "battery" "battery#text" ]; + }; + pulseaudio = { + "scroll-step" = 1; + "format" = "{icon}"; + "format-bluetooth" = "{icon}"; + "format-bluetooth-muted" = "󰸈"; + "format-muted" = "󰸈"; + "format-source" = ""; + "format-source-muted" = ""; + "format-icons" = { + "headphone" = ""; + "hands-free" = ""; + "headset" = ""; + "phone" = ""; + "portable" = ""; + "car" = ""; + "default" = [ "" "" "" ]; + }; + "on-click" = "hyprctl dispatch togglespecialworkspace scratch_pavucontrol; if hyprctl clients | grep pavucontrol; then echo 'scratch_ranger respawn not needed'; else pavucontrol; fi"; + }; + "pulseaudio#text" = { + "scroll-step" = 1; + "format" = "{volume}%"; + "format-bluetooth" = "{volume}%"; + "format-bluetooth-muted" = ""; + "format-muted" = ""; + "format-source" = "{volume}%"; + "format-source-muted" = ""; + "on-click" = "hyprctl dispatch togglespecialworkspace scratch_pavucontrol; if hyprctl clients | grep pavucontrol; then echo 'scratch_ranger respawn not needed'; else pavucontrol; fi"; + }; + "group/pulseaudio" = { + "orientation" = "horizontal"; + "drawer" = { + "transition-duration" = 500; + "transition-left-to-right" = true; + }; + "modules" = [ "pulseaudio" "pulseaudio#text" ]; + }; + }; + }; + style = '' + * { + /* `otf-font-awesome` is required to be installed for icons */ + font-family: FontAwesome, ''+userSettings.font+''; + + font-size: 20px; + } + + window#waybar { + background-color: rgba('' + config.lib.stylix.colors.base00-rgb-r + "," + config.lib.stylix.colors.base00-rgb-g + "," + config.lib.stylix.colors.base00-rgb-b + "," + ''0.55); + border-radius: 8px; + color: #'' + config.lib.stylix.colors.base07 + ''; + transition-property: background-color; + transition-duration: .2s; + } + + tooltip { + color: #'' + config.lib.stylix.colors.base07 + ''; + background-color: rgba('' + config.lib.stylix.colors.base00-rgb-r + "," + config.lib.stylix.colors.base00-rgb-g + "," + config.lib.stylix.colors.base00-rgb-b + "," + ''0.9); + border-style: solid; + border-width: 3px; + border-radius: 8px; + border-color: #'' + config.lib.stylix.colors.base08 + ''; + } + + tooltip * { + color: #'' + config.lib.stylix.colors.base07 + ''; + background-color: rgba('' + config.lib.stylix.colors.base00-rgb-r + "," + config.lib.stylix.colors.base00-rgb-g + "," + config.lib.stylix.colors.base00-rgb-b + "," + ''0.0); + } + + window > box { + border-radius: 8px; + opacity: 0.94; + } + + window#waybar.hidden { + opacity: 0.2; + } + + button { + border: none; + } + + #custom-hyprprofile { + color: #'' + config.lib.stylix.colors.base0D + ''; + } + + /* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */ + button:hover { + background: inherit; + } + + #workspaces button { + padding: 0px 6px; + background-color: transparent; + color: #'' + config.lib.stylix.colors.base04 + ''; + } + + #workspaces button:hover { + color: #'' + config.lib.stylix.colors.base07 + ''; + } + + #workspaces button.active { + color: #'' + config.lib.stylix.colors.base08 + ''; + } + + #workspaces button.focused { + color: #'' + config.lib.stylix.colors.base0A + ''; + } + + #workspaces button.visible { + color: #'' + config.lib.stylix.colors.base05 + ''; + } + + #workspaces button.urgent { + color: #'' + config.lib.stylix.colors.base09 + ''; + } + + #battery, + #cpu, + #memory, + #disk, + #temperature, + #backlight, + #network, + #pulseaudio, + #wireplumber, + #custom-media, + #tray, + #mode, + #idle_inhibitor, + #scratchpad, + #custom-hyprprofileicon, + #custom-quit, + #custom-lock, + #custom-reboot, + #custom-power, + #mpd { + padding: 0 3px; + color: #'' + config.lib.stylix.colors.base07 + ''; + border: none; + border-radius: 8px; + } + + #custom-hyprprofileicon, + #custom-quit, + #custom-lock, + #custom-reboot, + #custom-power, + #idle_inhibitor { + background-color: transparent; + color: #'' + config.lib.stylix.colors.base04 + ''; + } + + #custom-hyprprofileicon:hover, + #custom-quit:hover, + #custom-lock:hover, + #custom-reboot:hover, + #custom-power:hover, + #idle_inhibitor:hover { + color: #'' + config.lib.stylix.colors.base07 + ''; + } + + #clock, #tray, #idle_inhibitor { + padding: 0 5px; + } + + #window, + #workspaces { + margin: 0 6px; + } + + /* If workspaces is the leftmost module, omit left margin */ + .modules-left > widget:first-child > #workspaces { + margin-left: 0; + } + + /* If workspaces is the rightmost module, omit right margin */ + .modules-right > widget:last-child > #workspaces { + margin-right: 0; + } + + #clock { + color: #'' + config.lib.stylix.colors.base0D + ''; + } + + #battery { + color: #'' + config.lib.stylix.colors.base0B + ''; + } + + #battery.charging, #battery.plugged { + color: #'' + config.lib.stylix.colors.base0C + ''; + } + + @keyframes blink { + to { + background-color: #'' + config.lib.stylix.colors.base07 + ''; + color: #'' + config.lib.stylix.colors.base00 + ''; + } + } + + #battery.critical:not(.charging) { + background-color: #'' + config.lib.stylix.colors.base08 + ''; + color: #'' + config.lib.stylix.colors.base07 + ''; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; + } + + label:focus { + background-color: #'' + config.lib.stylix.colors.base00 + ''; + } + + #cpu { + color: #'' + config.lib.stylix.colors.base0D + ''; + } + + #memory { + color: #'' + config.lib.stylix.colors.base0E + ''; + } + + #disk { + color: #'' + config.lib.stylix.colors.base0F + ''; + } + + #backlight { + color: #'' + config.lib.stylix.colors.base0A + ''; + } + + label.numlock { + color: #'' + config.lib.stylix.colors.base04 + ''; + } + + label.numlock.locked { + color: #'' + config.lib.stylix.colors.base0F + ''; + } + + #pulseaudio { + color: #'' + config.lib.stylix.colors.base0C + ''; + } + + #pulseaudio.muted { + color: #'' + config.lib.stylix.colors.base04 + ''; + } + + #tray > .passive { + -gtk-icon-effect: dim; + } + + #tray > .needs-attention { + -gtk-icon-effect: highlight; + } + + #idle_inhibitor { + color: #'' + config.lib.stylix.colors.base04 + ''; + } + + #idle_inhibitor.activated { + color: #'' + config.lib.stylix.colors.base0F + ''; + } + ''; + }; + home.file.".config/gtklock/style.css".text = '' + window { + background-image: url("''+config.stylix.image+''"); + background-size: auto 100%; + } + ''; + home.file.".config/nwg-launchers/nwggrid/style.css".text = '' + button, label, image { + background: none; + border-style: none; + box-shadow: none; + color: #'' + config.lib.stylix.colors.base07 + ''; + + font-size: 20px; + } + + button { + padding: 5px; + margin: 5px; + text-shadow: none; + } + + button:hover { + background-color: rgba('' + config.lib.stylix.colors.base07-rgb-r + "," + config.lib.stylix.colors.base07-rgb-g + "," + config.lib.stylix.colors.base07-rgb-b + "," + ''0.15); + } + + button:focus { + box-shadow: 0 0 10px; + } + + button:checked { + background-color: rgba('' + config.lib.stylix.colors.base07-rgb-r + "," + config.lib.stylix.colors.base07-rgb-g + "," + config.lib.stylix.colors.base07-rgb-b + "," + ''0.15); + } + + #searchbox { + background: none; + border-color: #'' + config.lib.stylix.colors.base07 + ''; + + color: #'' + config.lib.stylix.colors.base07 + ''; + + margin-top: 20px; + margin-bottom: 20px; + + font-size: 20px; + } + + #separator { + background-color: rgba('' + config.lib.stylix.colors.base00-rgb-r + "," + config.lib.stylix.colors.base00-rgb-g + "," + config.lib.stylix.colors.base00-rgb-b + "," + ''0.55); + + color: #'' + config.lib.stylix.colors.base07 + ''; + margin-left: 500px; + margin-right: 500px; + margin-top: 10px; + margin-bottom: 10px + } + + #description { + margin-bottom: 20px + } + ''; + home.file.".config/nwg-launchers/nwggrid/terminal".text = "alacritty -e"; + home.file.".config/nwg-drawer/drawer.css".text = '' + window { + background-color: rgba('' + config.lib.stylix.colors.base00-rgb-r + "," + config.lib.stylix.colors.base00-rgb-g + "," + config.lib.stylix.colors.base00-rgb-b + "," + ''0.55); + color: #'' + config.lib.stylix.colors.base07 + '' + } + + /* search entry */ + entry { + background-color: rgba('' + config.lib.stylix.colors.base01-rgb-r + "," + config.lib.stylix.colors.base01-rgb-g + "," + config.lib.stylix.colors.base01-rgb-b + "," + ''0.45); + } + + button, image { + background: none; + border: none + } + + button:hover { + background-color: rgba('' + config.lib.stylix.colors.base02-rgb-r + "," + config.lib.stylix.colors.base02-rgb-g + "," + config.lib.stylix.colors.base02-rgb-b + "," + ''0.45); + } + + /* in case you wanted to give category buttons a different look */ + #category-button { + margin: 0 10px 0 10px + } + + #pinned-box { + padding-bottom: 5px; + border-bottom: 1px dotted; + border-color: #'' + config.lib.stylix.colors.base07 + ''; + } + + #files-box { + padding: 5px; + border: 1px dotted gray; + border-radius: 15px + border-color: #'' + config.lib.stylix.colors.base07 + ''; + } + ''; + + services.udiskie.enable = true; + services.udiskie.tray = "always"; + programs.fuzzel.enable = true; + programs.fuzzel.package = pkgs.fuzzel; + programs.fuzzel.settings = { + main = { + font = userSettings.font + ":size=20"; + dpi-aware = "no"; + show-actions = "yes"; + terminal = "${pkgs.alacritty}/bin/alacritty"; + }; + colors = { + background = config.lib.stylix.colors.base00 + "bf"; + text = config.lib.stylix.colors.base07 + "ff"; + match = config.lib.stylix.colors.base05 + "ff"; + selection = config.lib.stylix.colors.base08 + "ff"; + selection-text = config.lib.stylix.colors.base00 + "ff"; + selection-match = config.lib.stylix.colors.base05 + "ff"; + border = config.lib.stylix.colors.base08 + "ff"; + }; + border = { + width = 3; + radius = 7; + }; + }; + services.fnott.enable = true; + services.fnott.settings = { + main = { + anchor = "bottom-right"; + stacking-order = "top-down"; + min-width = 400; + title-font = userSettings.font + ":size=14"; + summary-font = userSettings.font + ":size=12"; + body-font = userSettings.font + ":size=11"; + border-size = 0; + }; + low = { + background = config.lib.stylix.colors.base00 + "e6"; + title-color = config.lib.stylix.colors.base03 + "ff"; + summary-color = config.lib.stylix.colors.base03 + "ff"; + body-color = config.lib.stylix.colors.base03 + "ff"; + idle-timeout = 150; + max-timeout = 30; + default-timeout = 8; + }; + normal = { + background = config.lib.stylix.colors.base00 + "e6"; + title-color = config.lib.stylix.colors.base07 + "ff"; + summary-color = config.lib.stylix.colors.base07 + "ff"; + body-color = config.lib.stylix.colors.base07 + "ff"; + idle-timeout = 150; + max-timeout = 30; + default-timeout = 8; + }; + critical = { + background = config.lib.stylix.colors.base00 + "e6"; + title-color = config.lib.stylix.colors.base08 + "ff"; + summary-color = config.lib.stylix.colors.base08 + "ff"; + body-color = config.lib.stylix.colors.base08 + "ff"; + idle-timeout = 0; + max-timeout = 0; + default-timeout = 0; + }; + }; +} diff --git a/user/wm/hyprland/hyprprofiles/hyprprofiles.nix b/user/wm/hyprland/hyprprofiles/hyprprofiles.nix new file mode 100644 index 0000000..adad903 --- /dev/null +++ b/user/wm/hyprland/hyprprofiles/hyprprofiles.nix @@ -0,0 +1,63 @@ +{ config, lib, pkgs, dmenuCmd ? "rofi -dmenu", ... }: +let + dmenuScript = '' + #!/bin/sh + choice="$(\ls ~/.config/hyprprofiles | ''+dmenuCmd+'')"; + hyprprofile $choice; + ''; +in +{ + home.packages = [ + (pkgs.writeScriptBin "hyprprofile" '' + #!/bin/sh + prevprofile="$(cat ~/.hyprprofile)" + newprofile="$1" + if [ $# -eq 1 ]; then + if [ $newprofile = "Default" ]; then + echo "" > ~/.hyprprofile; + else + echo $newprofile > ~/.hyprprofile; + fi + if [ -f ~/.config/hyprprofiles/$prevprofile/exit-hook.sh ]; then + ~/.config/hyprprofiles/$prevprofile/exit-hook.sh; + fi + if [ -f ~/.config/hyprprofiles/$newprofile/start-hook.sh ]; then + ~/.config/hyprprofiles/$newprofile/start-hook.sh; + fi + fi + '') + (pkgs.writeScriptBin "qutebrowser-hyprprofile" '' + #!/bin/sh + profile="$(cat ~/.hyprprofile)" + if [[ $profile ]]; then + container-open $profile $1; + else + qutebrowser --qt-flag enable-gpu-rasterization --qt-flag enable-native-gpu-memory-buffers --qt-flag num-raster-threads=4 $1; + fi + '') + (pkgs.makeDesktopItem { + name = "qutebrowser-hyprprofile"; + desktopName = "Qutebrowser Hyprprofile"; + exec = "qutebrowser-hyprprofile %u"; + categories = ["Network" "WebBrowser"]; + keywords = ["Browser"]; + terminal = false; + type = "Application"; + noDisplay = false; + icon = "qutebrowser"; + }) + (pkgs.writeScriptBin "hyprprofile-dmenu" dmenuScript) + ]; + xdg.mimeApps.defaultApplications = lib.mkForce { + "text/html" = "qutebrowser-hyprprofile.desktop"; + "x-scheme-handler/http" = "qutebrowser-hyprprofile.desktop"; + "x-scheme-handler/https" = "qutebrowser-hyprprofile.desktop"; + "x-scheme-handler/about" = "qutebrowser-hyprprofile.desktop"; + "x-scheme-handler/unknown" = "qutebrowser-hyprprofile.desktop"; + }; + home.file.".config/hyprprofiles/" = { + source = ./profiles; + recursive = true; + executable = true; + }; +} diff --git a/user/wm/hyprland/hyprprofiles/profiles/Bard/start-hook.sh b/user/wm/hyprland/hyprprofiles/profiles/Bard/start-hook.sh new file mode 100755 index 0000000..5af5b69 --- /dev/null +++ b/user/wm/hyprland/hyprprofiles/profiles/Bard/start-hook.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +hyprctl keyword unbind SUPER,S; +hyprctl keyword bind SUPER,S,exec,qutebrowser-hyprprofile; +emacsclient --eval '(org-roam-switch-db "Bard.p" t)' diff --git a/modules/user/hyprland/hyprprofiles/profiles/Default/start-hook.sh b/user/wm/hyprland/hyprprofiles/profiles/Default/start-hook.sh similarity index 100% rename from modules/user/hyprland/hyprprofiles/profiles/Default/start-hook.sh rename to user/wm/hyprland/hyprprofiles/profiles/Default/start-hook.sh diff --git a/modules/user/hyprland/hyprprofiles/profiles/Gamdev/start-hook.sh b/user/wm/hyprland/hyprprofiles/profiles/Gamdev/start-hook.sh similarity index 100% rename from modules/user/hyprland/hyprprofiles/profiles/Gamdev/start-hook.sh rename to user/wm/hyprland/hyprprofiles/profiles/Gamdev/start-hook.sh diff --git a/modules/user/hyprland/hyprprofiles/profiles/Teaching/start-hook.sh b/user/wm/hyprland/hyprprofiles/profiles/Teaching/start-hook.sh similarity index 100% rename from modules/user/hyprland/hyprprofiles/profiles/Teaching/start-hook.sh rename to user/wm/hyprland/hyprprofiles/profiles/Teaching/start-hook.sh diff --git a/modules/user/hyprland/hyprprofiles/profiles/Tech/start-hook.sh b/user/wm/hyprland/hyprprofiles/profiles/Tech/start-hook.sh similarity index 100% rename from modules/user/hyprland/hyprprofiles/profiles/Tech/start-hook.sh rename to user/wm/hyprland/hyprprofiles/profiles/Tech/start-hook.sh diff --git a/user/wm/hyprland/patches/noactiveclients.patch b/user/wm/hyprland/patches/noactiveclients.patch new file mode 100644 index 0000000..8f8c458 --- /dev/null +++ b/user/wm/hyprland/patches/noactiveclients.patch @@ -0,0 +1,51 @@ +diff --git a/main.go b/main.go +index 0c980c9..4e6dfbf 100644 +--- a/main.go ++++ b/main.go +@@ -103,11 +103,6 @@ func buildMainBox(vbox *gtk.Box) { + allItems = append(allItems, cntPin) + } + } +- for _, cntTask := range clients { +- if !isIn(allItems, cntTask.Class) && !strings.Contains(*launcherCmd, cntTask.Class) && cntTask.Class != "" { +- allItems = append(allItems, cntTask.Class) +- } +- } + + divider := 1 + if len(allItems) > 0 { +@@ -155,34 +150,6 @@ func buildMainBox(vbox *gtk.Box) { + } + + alreadyAdded = nil +- for _, t := range clients { +- // For some time after killing a client, it's still being returned by 'j/clients', however w/o the Class value. +- // Let's filter the ghosts out. +- if !inPinned(t.Class) && t.Class != "" { +- instances := taskInstances(t.Class) +- if len(instances) == 1 { +- button := taskButton(t, instances) +- mainBox.PackStart(button, false, false, 0) +- if t.Class == activeClient.Class && !*autohide { +- button.SetProperty("name", "active") +- } else { +- button.SetProperty("name", "") +- } +- } else if !isIn(alreadyAdded, t.Class) { +- button := taskButton(t, instances) +- mainBox.PackStart(button, false, false, 0) +- if t.Class == activeClient.Class && !*autohide { +- button.SetProperty("name", "active") +- } else { +- button.SetProperty("name", "") +- } +- alreadyAdded = append(alreadyAdded, t.Class) +- clientMenu(t.Class, instances) +- } else { +- continue +- } +- } +- } + + if !*noLauncher && *launcherCmd != "" { + button, _ := gtk.ButtonNew() diff --git a/user/wm/hyprland/patches/waybarbatupdate.patch b/user/wm/hyprland/patches/waybarbatupdate.patch new file mode 100644 index 0000000..364c92e --- /dev/null +++ b/user/wm/hyprland/patches/waybarbatupdate.patch @@ -0,0 +1,192 @@ +From f4608b3e312448b37a8f9d6351154026e67c680a Mon Sep 17 00:00:00 2001 +From: schmop +Date: Thu, 25 Jul 2024 01:40:49 +0200 +Subject: [PATCH] Fix battery status changes not being detected + +Historically we listened to /sys/class/poewr_supply inotify events, +which does not seem to work anymore. +We switched now to udev netlink kernel events. +--- + include/modules/battery.hpp | 8 +++++-- + include/util/udev_deleter.hpp | 21 ++++++++++++++++++ + src/modules/battery.cpp | 40 +++++++++++++++++++--------------- + src/util/backlight_backend.cpp | 17 +-------------- + 4 files changed, 51 insertions(+), 35 deletions(-) + create mode 100644 include/util/udev_deleter.hpp + +diff --git a/include/modules/battery.hpp b/include/modules/battery.hpp +index 8e1a2ad2b..fc403be05 100644 +--- a/include/modules/battery.hpp ++++ b/include/modules/battery.hpp +@@ -5,8 +5,11 @@ + #include + #if defined(__linux__) + #include ++#include "util/udev_deleter.hpp" + #endif + ++#include ++ + #include + #include + #include +@@ -36,11 +39,12 @@ class Battery : public ALabel { + const std::string formatTimeRemaining(float hoursRemaining); + void setBarClass(std::string&); + +- int global_watch; + std::map batteries_; ++ std::unique_ptr udev_; ++ std::array poll_fds_; ++ std::unique_ptr mon_; + fs::path adapter_; + int battery_watch_fd_; +- int global_watch_fd_; + std::mutex battery_list_mutex_; + std::string old_status_; + bool warnFirstTime_{true}; +diff --git a/include/util/udev_deleter.hpp b/include/util/udev_deleter.hpp +new file mode 100644 +index 000000000..b2f1e538b +--- /dev/null ++++ b/include/util/udev_deleter.hpp +@@ -0,0 +1,21 @@ ++#pragma once ++ ++#include ++ ++namespace waybar::util { ++struct UdevDeleter { ++ void operator()(udev *ptr) const { udev_unref(ptr); } ++}; ++ ++struct UdevDeviceDeleter { ++ void operator()(udev_device *ptr) const { udev_device_unref(ptr); } ++}; ++ ++struct UdevEnumerateDeleter { ++ void operator()(udev_enumerate *ptr) const { udev_enumerate_unref(ptr); } ++}; ++ ++struct UdevMonitorDeleter { ++ void operator()(udev_monitor *ptr) const { udev_monitor_unref(ptr); } ++}; ++} // namespace waybar::util +\ No newline at end of file +diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp +index d87cc6129..bad72e6b0 100644 +--- a/src/modules/battery.cpp ++++ b/src/modules/battery.cpp +@@ -5,6 +5,9 @@ + #include + #endif + #include ++#include ++#include ++#include + + #include + waybar::modules::Battery::Battery(const std::string& id, const Bar& bar, const Json::Value& config) +@@ -14,17 +17,18 @@ waybar::modules::Battery::Battery(const std::string& id, const Bar& bar, const J + if (battery_watch_fd_ == -1) { + throw std::runtime_error("Unable to listen batteries."); + } +- +- global_watch_fd_ = inotify_init1(IN_CLOEXEC); +- if (global_watch_fd_ == -1) { +- throw std::runtime_error("Unable to listen batteries."); ++ udev_ = std::unique_ptr(udev_new()); ++ if (udev_ == nullptr) { ++ throw std::runtime_error("udev_new failed"); + } +- +- // Watch the directory for any added or removed batteries +- global_watch = inotify_add_watch(global_watch_fd_, data_dir_.c_str(), IN_CREATE | IN_DELETE); +- if (global_watch < 0) { +- throw std::runtime_error("Could not watch for battery plug/unplug"); ++ mon_ = std::unique_ptr(udev_monitor_new_from_netlink(udev_.get(), "kernel")); ++ if (mon_ == nullptr) { ++ throw std::runtime_error("udev monitor new failed"); + } ++ if (udev_monitor_filter_add_match_subsystem_devtype(mon_.get(), "power_supply", nullptr) < 0) { ++ throw std::runtime_error("udev failed to add monitor filter"); ++ } ++ udev_monitor_enable_receiving(mon_.get()); + #endif + worker(); + } +@@ -33,11 +37,6 @@ waybar::modules::Battery::~Battery() { + #if defined(__linux__) + std::lock_guard guard(battery_list_mutex_); + +- if (global_watch >= 0) { +- inotify_rm_watch(global_watch_fd_, global_watch); +- } +- close(global_watch_fd_); +- + for (auto it = batteries_.cbegin(), next_it = it; it != batteries_.cend(); it = next_it) { + ++next_it; + auto watch_id = (*it).second; +@@ -74,12 +73,18 @@ void waybar::modules::Battery::worker() { + dp.emit(); + }; + thread_battery_update_ = [this] { +- struct inotify_event event = {0}; +- int nbytes = read(global_watch_fd_, &event, sizeof(event)); +- if (nbytes != sizeof(event) || event.mask & IN_IGNORED) { ++ poll_fds_[0].revents = 0; ++ poll_fds_[0].events = POLLIN; ++ poll_fds_[0].fd = udev_monitor_get_fd(mon_.get()); ++ int ret = poll(poll_fds_.data(), poll_fds_.size(), -1); ++ if (ret < 0) { + thread_.stop(); + return; + } ++ if ((poll_fds_[0].revents & POLLIN) != 0) { ++ signalfd_siginfo signal_info; ++ read(poll_fds_[0].fd, &signal_info, sizeof(signal_info)); ++ } + refreshBatteries(); + dp.emit(); + }; +@@ -668,6 +673,7 @@ auto waybar::modules::Battery::update() -> void { + status = getAdapterStatus(capacity); + } + auto status_pretty = status; ++ puts(status.c_str()); + // Transform to lowercase and replace space with dash + std::transform(status.begin(), status.end(), status.begin(), + [](char ch) { return ch == ' ' ? '-' : std::tolower(ch); }); +diff --git a/src/util/backlight_backend.cpp b/src/util/backlight_backend.cpp +index bb102cd93..df6afd564 100644 +--- a/src/util/backlight_backend.cpp ++++ b/src/util/backlight_backend.cpp +@@ -1,4 +1,5 @@ + #include "util/backlight_backend.hpp" ++#include "util/udev_deleter.hpp" + + #include + #include +@@ -29,22 +30,6 @@ class FileDescriptor { + int fd_; + }; + +-struct UdevDeleter { +- void operator()(udev *ptr) { udev_unref(ptr); } +-}; +- +-struct UdevDeviceDeleter { +- void operator()(udev_device *ptr) { udev_device_unref(ptr); } +-}; +- +-struct UdevEnumerateDeleter { +- void operator()(udev_enumerate *ptr) { udev_enumerate_unref(ptr); } +-}; +- +-struct UdevMonitorDeleter { +- void operator()(udev_monitor *ptr) { udev_monitor_unref(ptr); } +-}; +- + void check_eq(int rc, int expected, const char *message = "eq, rc was: ") { + if (rc != expected) { + throw std::runtime_error(fmt::format(fmt::runtime(message), rc)); diff --git a/user/wm/hyprland/patches/waybarpaupdate.patch b/user/wm/hyprland/patches/waybarpaupdate.patch new file mode 100644 index 0000000..f1c22cd --- /dev/null +++ b/user/wm/hyprland/patches/waybarpaupdate.patch @@ -0,0 +1,71 @@ +diff --git a/include/util/audio_backend.hpp b/include/util/audio_backend.hpp +index 2f53103e5..3737ae264 100644 +--- a/include/util/audio_backend.hpp ++++ b/include/util/audio_backend.hpp +@@ -38,6 +38,8 @@ class AudioBackend { + std::string desc_; + std::string monitor_; + std::string current_sink_name_; ++ std::string default_sink_name; ++ bool default_sink_running_; + bool current_sink_running_; + // SOURCE + uint32_t source_idx_{0}; +diff --git a/src/util/audio_backend.cpp b/src/util/audio_backend.cpp +index 3d90b6d5a..73aac148b 100644 +--- a/src/util/audio_backend.cpp ++++ b/src/util/audio_backend.cpp +@@ -1,9 +1,12 @@ + #include "util/audio_backend.hpp" + + #include ++#include + #include ++#include + #include + #include ++#include + + #include + #include +@@ -139,6 +142,10 @@ void AudioBackend::sinkInfoCb(pa_context * /*context*/, const pa_sink_info *i, i + void *data) { + if (i == nullptr) return; + ++ auto running = i->state == PA_SINK_RUNNING; ++ auto idle = i->state == PA_SINK_IDLE; ++ spdlog::trace("Sink name {} Running:[{}] Idle:[{}]", i->name, running, idle); ++ + auto *backend = static_cast(data); + + if (!backend->ignored_sinks_.empty()) { +@@ -155,11 +162,19 @@ void AudioBackend::sinkInfoCb(pa_context * /*context*/, const pa_sink_info *i, i + } + } + ++ backend->default_sink_running_ = backend->default_sink_name == i->name && ++ (i->state == PA_SINK_RUNNING || i->state == PA_SINK_IDLE); ++ ++ if (i->name != backend->default_sink_name && !backend->default_sink_running_) { ++ return; ++ } ++ + if (backend->current_sink_name_ == i->name) { +- backend->current_sink_running_ = i->state == PA_SINK_RUNNING; ++ backend->current_sink_running_ = (i->state == PA_SINK_RUNNING || i->state == PA_SINK_IDLE); + } + +- if (!backend->current_sink_running_ && i->state == PA_SINK_RUNNING) { ++ if (!backend->current_sink_running_ && ++ (i->state == PA_SINK_RUNNING || i->state == PA_SINK_IDLE)) { + backend->current_sink_name_ = i->name; + backend->current_sink_running_ = true; + } +@@ -207,5 +222,6 @@ void AudioBackend::sourceInfoCb(pa_context * /*context*/, const pa_source_info * + void AudioBackend::serverInfoCb(pa_context *context, const pa_server_info *i, void *data) { + auto *backend = static_cast(data); + backend->current_sink_name_ = i->default_sink_name; ++ backend->default_sink_name = i->default_sink_name; + backend->default_source_name_ = i->default_source_name; + + pa_context_get_sink_info_list(context, sinkInfoCb, data); diff --git a/user/wm/input/nihongo.nix b/user/wm/input/nihongo.nix new file mode 100644 index 0000000..9c6c017 --- /dev/null +++ b/user/wm/input/nihongo.nix @@ -0,0 +1,87 @@ +{ pkgs, ... }: + +{ + i18n.inputMethod = { + enabled = "fcitx5"; + fcitx5.addons = with pkgs; [ + fcitx5-mozc + fcitx5-gtk + ]; + }; + home.file.".config/fcitx5/config".text = '' + [Hotkey] + # Enumerate when press trigger key repeatedly + EnumerateWithTriggerKeys=True + # Temporally switch between first and current Input Method + AltTriggerKeys= + # Enumerate Input Method Forward + EnumerateForwardKeys= + # Enumerate Input Method Backward + EnumerateBackwardKeys= + # Skip first input method while enumerating + EnumerateSkipFirst=False + # Toggle embedded preedit + TogglePreedit= + + [Hotkey/TriggerKeys] + 0=Super+comma + + [Hotkey/EnumerateGroupForwardKeys] + 0=Super+space + + [Hotkey/EnumerateGroupBackwardKeys] + 0=Shift+Super+space + + [Hotkey/ActivateKeys] + 0=Hangul_Hanja + + [Hotkey/DeactivateKeys] + 0=Hangul_Romaja + + [Hotkey/PrevPage] + 0=Up + + [Hotkey/NextPage] + 0=Down + + [Hotkey/PrevCandidate] + 0=Shift+Tab + + [Hotkey/NextCandidate] + 0=Tab + + [Behavior] + # Active By Default + ActiveByDefault=False + # Share Input State + ShareInputState=No + # Show preedit in application + PreeditEnabledByDefault=True + # Show Input Method Information when switch input method + ShowInputMethodInformation=True + # Show Input Method Information when changing focus + showInputMethodInformationWhenFocusIn=False + # Show compact input method information + CompactInputMethodInformation=True + # Show first input method information + ShowFirstInputMethodInformation=True + # Default page size + DefaultPageSize=5 + # Override Xkb Option + OverrideXkbOption=False + # Custom Xkb Option + CustomXkbOption= + # Force Enabled Addons + EnabledAddons= + # Force Disabled Addons + DisabledAddons= + # Preload input method to be used by default + PreloadInputMethod=True + # Allow input method in the password field + AllowInputMethodForPassword=False + # Show preedit text when typing password + ShowPreeditForPassword=False + # Interval of saving user data in minutes + AutoSavePeriod=30 + ''; +}