diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..b2be92b7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +result diff --git a/.gitmodules b/.gitmodules deleted file mode 100755 index b4a2fbbf..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "config"] - path = config - url = https://github.com/foo-dogsquared/dotfiles diff --git a/Makefile b/Makefile deleted file mode 100755 index 67a4d39a..00000000 --- a/Makefile +++ /dev/null @@ -1,50 +0,0 @@ -USER := foo-dogsquared -HOST := zilch -HOME := /home/$(USER) -DOTS := /etc/dotfiles - -NIXOS_VERSION := 20.09 -NIXOS_PREFIX := $(PREFIX)/etc/nixos -FLAGS := -I "config=$$(pwd)/config" \ - -I "modules=$$(pwd)/modules" \ - -I "bin=$$(pwd)/bin" \ - $(FLAGS) - -# The channels will be used on certain modules like in `packages/default.nix` where it will be referred to install certain packages from the unstable channel. -channels: - @sudo nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos - @sudo nix-channel --add "https://github.com/rycee/home-manager/archive/master.tar.gz" home-manager - @sudo nix-channel --add "https://nixos.org/channels/nixpkgs-unstable" nixpkgs - -update: - @sudo nix-channel --update - -switch: - @sudo nixos-rebuild $(FLAGS) switch - -# 'boot' and 'switch' are somewhat the same except 'boot' takes care of setting the kernel so use this if you've changed the kernel settings. -boot: - @sudo nixos-rebuild $(FLAGS) boot - -# A little bootstrapping script. -install: channels update - @sudo nixos-generate-config --root "$(PREFIX)" - @echo "import \"$$(pwd)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix" - @sudo nixos-install --root "$(PREFIX)" $(FLAGS) - @sudo cp -r "$(DOTS)" "$(PREFIX)/$(DOTS)" - @echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix" - @sudo nixos-enter --root "$(PREFIX)" --command "chown $(USER):users $(DOTS) --recursive" - @sudo nixos-enter --root "$(PREFIX)" --command "make -C $(DOTS) channels" - @echo "Set password for $(USER)" && sudo nixos-enter --root "$(PREFIX)" --command "passwd $(USER)" - -clean: - @nix-collect-garbage -d - -upgrade: update switch - -rollback: - @sudo nixos-rebuild switch $(FLAGS) --rollback - -test: - @nixos-rebuild $(FLAGS) test - diff --git a/README.adoc b/README.adoc old mode 100755 new mode 100644 index 54b41686..037cf654 --- a/README.adoc +++ b/README.adoc @@ -1,284 +1,57 @@ = foo-dogsquared's NixOS config -:toc: +:todo: -This is the configuration setup for my https://nixos.org[NixOS] instance. -This setup is stolen from https://github.com/hlissner/dotfiles[hlissner's NixOS config] footnote:[The author and one-man maintainer of Doom Emacs.]. -The whole setup is mostly intended for single-user systems but you can easily configure it for multi-user systems. +This is my NixOS config as a link:https://www.tweag.io/blog/2020-05-25-flakes/[Nix flake]. + +I finally have some time trying to grok flakes and redo my NixOS config from scratch after leaving NixOs (because I have work and have to quickly set things up without me trying to debug how NixOS works). +Here is the result. -== Getting started +== Installation -You can replace your NixOS configuration with this bad boi. - -To install, you have to do the following first: - -- Set up your partitions. -- Copy this setup (either with `git` or what-have-you) in whatever location you prefer. -- Install GNU Make (i.e., `nix-env -i gnumake`). - -Then simply run `make install`. -It is equivalent to the following command: +This primarily uses Nix flakes so you can have a preview of what's available in my config. [source, shell] ---- -USER=foo-dogsquared HOST=zilch make --directory /etc/dotfiles install +nix flake show github:foo-dogsquared/nixos-config ---- -As of 2020-08-28, it wouldn't work since it assumes the installation root is at `/` rather than `/mnt`. -To correct this behavior, simply configure the `PREFIX` variable (e.g., `PREFIX=/mnt make install`). +It should only export my NixOS configurations of my different hosts (of only one so far excluding VMs and VPSs ;p). -For more information, simply inspect the link:./Makefile[`./Makefile`]. -Assuming you did install, your NixOS setup will have the following stuff. -- Uses the NixOS unstable channel (https://nixos.org/channels/nixos-unstable) for its package set. -- Have the https://github.com/rycee/home-manager[home-manager] installed with the unstable release. -- You start with the TTY and nothing else is installed (i.e., bare installation similar in spirit to Arch Linux). -To setup your graphical installation, see the <> section. -=== Precautions +== TODO -There are some things you need to keep in mind when using this setup. +In order of priority: -* This setup is not meant to be fully reproducible. -It is a personal setup for a person who wants to live on the bleeding edge, personally. -Despite being a NixOS setup which should be reproducible on paper, it mainly uses the unstable versions of the channels and packages meaning you would have a different installation each time (unless you do something like https://nixos.org/guides/towards-reproducibility-pinning-nixpkgs.html[pinning the nixpkgs repo] or using https://www.tweag.io/blog/2020-05-25-flakes/[the flakes feature]). -footnote:[I'm most likely using the Nix flakes some time in the future.] +* Create custom modules. +** Create a themes system similar to link:https://github.com/hlissner/dotfiles[this NixOS config]. -* It may use third-party channels for certain versions of the packages, hammering the first precaution even further regarding reproducibility. +* Manage secrets with agenix. -* The main user configuration is tightly integrated with the system configuration. -In other words, all upgrades would have to affect the entire system. -If you want separate user profiles (just like how Nix intended to be) with each user having its own pace of upgrading their local system, you're missing out with this config setup. -That said, it is still possible to create user profiles by just declaring the user in `./hosts/$HOST/default.nix` (e.g., `users.users.$USERNAME`), leaving it blank, and configure it at your own pace in `$HOME`. +* Automate backups with NixOS config. +* Create custom packages and export it to flakes. (Maybe consider making it to upstream) +* Create cluser-wide configs. +* Create host-wide configs. -== Project structure +* Create user-specific configs with home-manager. -The project structure should look like the following: +* ~Steal~ Get some ideas from link:https://github.com/divnix/devos[this overengineered template]. -[source, tree] ----- -nixos-config -├── config/ -├── hosts/ -├── lib/ -├── modules/ -├── packages/ -├── templates/ -├── default.nix* -├── Makefile* -└── README.adoc* ----- +* Make use of other established utilities such as link:https://github.com/divnix/digga/[digga], link:https://github.com/gytis-ivaskevicius/flake-utils-plus[flake-utils-plus], and link:https://github.com/nix-community/home-manager[home-manager] once I'm familiar to create my own Nix programs. -* The entrypoint of this setup is link:./default.nix[`./default.nix`] (which is like `index.html` for webpages). -It contains a function that accepts two arguments: the name of the host and the username of the main user. -The host should exist at `./hosts/$HOST/` (see <> for more info). -Meanwhile, the main user is primarily referred with the `my` attribute defined at link:./modules/default.nix[`./modules/default.nix`]. +Out of scope: -* The directory paid with the most attention would most likely be the `modules/` folder which contains cluster-wide footnote:[Whenever I say 'cluster-wide', I really mean my laptop (which I have none at the moment) and desktop (which I have only one at the moment).] modules intended to be used in each device. +* Text editor configurations. +They are often updated. I don't want to rebuild it every time I change it. -** Another folder worthy of attention is the `modules/themes` which sets up a complete desktop environment for you so you don't have to. -For more information, see the <> section. +* Migration of my link:https://github.com/foo-dogsquared/dotfiles[dotfiles]. +I still use it on other non-NixOS systems. -* The `config/` directory is simply the all-seeing cluster-wide ad hoc configuration of several programs. -In this case, it is my https://github.com/foo-dogsquared/dotflies[dotfiles] directory. - -* The `hosts/` contains the machine-specific configurations of the machine (I've only one but I plan to install NixOS for my new ones). -It is also used on the installation phase (from `make install`) by setting the `HOST` variable (i.e., `HOST=zilch make -C /etc/install`) with the folder name as the argument. -See the <> section for more details. - -* A little library in link:./lib[`./lib`] based from https://github.com/hlissner/dotfiles[original source] which being used for various uses (e.g., limiting certain modules). - -* Though my custom packages are now placed in my https://github.com/foo-dogsquared/nur-packages[NUR repo], the `packages/` folder still exists here intended for "private" packages. -Also contains third-party package repositories and overlays such as the https://github.com/nix-community/NUR[NUR], https://github.com/nix-community/emacs-overlay[unstable branch of Emacs], or the unstable branch of https://github.com/NixOS/nixpkgs/[nixpkgs]. -See the <> section for more information. - -* The `templates/` directory is a bunch of https://github.com/cookiecutter/cookiecutter/[Cookiecutter] templates intended for easy creation/deployment of customized systems (e.g., graphical desktop environments, customized modules). - - - - -== Hosts - -Each machine is represented with a directory in link:./hosts/[`./hosts`] with the name of the directory as the name of the machine. -footnote:[It is basically using the pets approach (from pets versus cattle thing).] - -Each host should have an entrypoint at `./hosts/$HOST/default.nix` which is then used from the entrypoint of this setup at link:./default.nix[`./default.nix`] (i.e., `import /etc/dotfiles "$HOST" "$USER"`). -It may contain machine-specific configurations (e.g., specific systemd units, Recoll index building, GNU Nano configurations), other Nix modules for modularity, and other sorts of knick-knacks (e.g., other wallpapers, machine-specific scripts). - -For best practice, you may want to follow the following project structure: - -[source, tree] ----- -./hosts/$HOST -├── config/ -├── modules/ -├── default.nix* -└── README.adoc ----- - -* `config/` contains the specific config files. - -* `modules/` stores the other Nix modules to be used in `default.nix`. - -* `default.nix` is the entrypoint for our host module. -It contains configuration of our link:./modules[`./modules`], NixOS (i.e., `man configuration.nix`), https://github.com/rycee/home-manager[home-manager] (i.e., `man home-configuration.nix`), and other things you might want to include in the host-specific `$HOST/modules/` folder. - -* A README file in whatever format you prefer. -(I just choose https://asciidoctor.org/[Asciidoctor] with the `.adoc` file extension since it's my go-to document format.) - - - - -== Themes - -My setup feature themes as a NixOS module (in link:./modules/themes[`modules/themes`]) which sets up a complete graphical environment. -This lets me easily switch my graphical setup with a simple toggle (i.e., `theme.$THEME_NAME.enable = true;`) in my machine configuration (i.e., `./hosts/$HOST/default.nix`). -For safety from conflicting modules and configuration, you should have a bare installation ala-Arch Linux. - -For best practice, the general project structure of a theme should look like the following: - -[source, tree] ----- -$THEME_NAME -├── config/ -│   ├── PROGRAM_1/ -│   ├── PROGRAM_2/ -│   ├── PROGRAM_3/ -│   └── wallpaper* -├── default.nix* -└── README.adoc* ----- - -* The `config/` folder is where all of the specific configurations will go. -Each program to be configured is stored in its own folder (e.g., polybar, bspwm, sxhkd). -A wallpaper can be placed at `config/wallpaper` for convenience. - -* `default.nix` is simply the entry point for our theme module. -This is where you can add certain packages, enable certain settings, setup your files to the home directory, and pass the theme metadata. - -* For convenience, you should make the NixOS theme module as a https://github.com/cookiecutter/cookiecutter[Cookiecutter template] to easily replace the color schemes, fonts, and what-have-you. -Then, edit `modules/themes/default.nix` to add the theme to the selection. -I have my theme templates stored in link:./templates[`./templates`] as an example. - - - - -== Packages - -The link:./packages/[`./packages/`] directory contains cluster-wide https://nixos.wiki/wiki/Overlays[overlays], https://nixos.wiki/wiki/Nix_Channels[channels], and custom packages. -The overlays should be put in a separate folder in `./packages/overlays/`. -For any other packages, it should be put on the same level as `./packages/default.nix`. - -Even though I have https://github.com/foo-dogsquared/nur-packages[a separate repo] for my packages, the packages defined here is only applicable to the setup. - -To make this section longer, here is the workflow summary in creating a package: - -- Create a test file (i.e., `./packages/$PACKAGE.nix`). -Either as an initial draft or a final prototype that you'll never check once it successfully built. - -- Fetch the to-be package. -In case you want to know the SHA256 hash of the to-be package from fetching (e.g., `fetchTarball`, `fetchFromGitHub`), you can use `lib.fakeSha256` and wait for the error to appear. -It should give you the expected hash. -footnote:[Don't forget to visit the nixpkgs repo and look at the source code for the nth time.] - -- Give the build inputs and the instructions for individual phases (e.g., `unpackPhase`, `preInstallPhase`, `buildPhase`). - - - - -== Why NixOS? - -It'll be a full-time geeky story if I have to explain so I'll put it in a bullet list. - -* You can configure your system from the system-wide packages, user-specific packages, boot loader settings, graphical environments, and what-have-you stored in text files. -That fact alone blew my mind ever since I saw @hlissner's NixOS and the temptation just keeps growing ever since I see more NixOS-related posts. -This is where the real power of NixOS (and also https://guix.gnu.org/[GuixSD]) really made it worth the try: declarative system and local configuration. - -* A https://github.com/NixOS/nixpkgs/[gigantic package set] featuring \~65000 packages (similar number to AUR) as of 2020-10-29. -While NixOS is technically a source distribution (e.g., Gentoo, KISS Linux), with the reproducibility features of Nix, its https://hydra.nixos.org/[build farm], and its https://cache.nixos.org/[very large cache], you get the binary artifacts for most of its packages for free. -footnote:[If you want NixOS to be "truly a source distro", you can disable it by setting no binary caches in `nix.binaryCaches`.] - -** With https://nixos.org/nixpkgs/manual/[overlays], you can change how the package is built from its source to its build instructions. - -* It is reproducible (in a way, anyway). -Compared to other distros I've used in the past before discovering NixOS (which is only Arch and Fedora), it is very easy to reproduce the config. -In my first day of using NixOS, I just enabled hlissner's default config and I was able to boot in just fine. -(Though, changing my config into something that I want to takes the most time.) - -* Rollbacks. -Rollbacks are good. -In system state, life with a time machine, and fighting games. -You can just `nixos-rebuild switch --rollback` and you'll be back into your previous config. -It's like Windows Restore on steroids. - -* The packaging process is straightforward. -Furthermore, it is secure since it is sandboxed (if you enabled it with `nix.useSandbox`). - -* Hipster points. -https://www.archlinux.org/[Arch?] -https://k1ss.org/[KISS Linux?] -https://www.gentoo.org/[Gentoo?] -http://www.linuxfromscratch.org/[Linux From Scratch?] -Forget that! -NixOS-influenced distros are the future and I'll continue to shill it for the rest of my computing shtick. - - -=== Want to learn NixOS? - -I was able to get up and running with NixOS in a day (which is impressive for the smoothbrain that I am) thanks to these resources: - -* https://nixos.org/manual/nixos/[The NixOS manual] is your starting point. -Personally, I find it a bit confusing but it is still good to get an installation working. - -* https://www.youtube.com/watch?v=NYyImy-lqaA&list=PLRGI9KQ3_HP_OFRG6R-p4iFgMSK1t5BHs[The Nixology video series by Burke Libbey] which gives a practical insight on Nix and NixOS, in general. -I give it a wholehearted recommendation to check it out. - -* I learn a whole lot from tinkering with https://github.com/hlissner/dotfiles[@hlissner's dotfiles]. -It's like the practical application of the things I've learned for the day. -Though, it did cost me to spend a week debugging footnote:[Which mostly compose of trial-and-erroring the hardcore way.] the config from the never-ending tinkering (which is a stupid decision on my part). -It could've been resolved in a day or two if I had joined the https://discord.gg/qvGgnVx[Doom Emacs Discord server]. - -* Speaking of the Doom Emacs Discord server, the https://discord.gg/qvGgnVx[Doom Emacs Discord server] is pretty cool. -Despite it is a Discord server on Doom Emacs, it is welcoming on non-Doom Emacs stuff and you can find a lot of NixOS (and Guix) geeks over there. - -* With the https://stephank.nl/p/2020-06-01-a-nix-primer-by-a-newcomer.html[help of the newcomers documented their learnings], I was able to quickly pick the terminologies surrounding the system. - -If you want to look out for some go-to resources, the https://nixos.org/learn.html[official manuals] will never fade in the list. -It may be horrible for a newcomer (in my opinion) but it is great for someone who's already familiar with Nix. -The https://nixos.wiki/[unofficial NixOS wiki] is one of the more reliable sources especially with its practical example. - -For more learning on the Nix conventions, ecosystem, and practices, I recommend https://nix.dev/[nix.dev] to look out for. -It provides some information that the official (and unofficial) sources misses. - - -=== Problems encountered along the way - -NixOS is a wildly different beast compared to other distros. -I did go through some rocky road to learning it; -my time learning NixOS is not composed of 100% absorbing the information efficiently. - -* One of the biggest problem I've encountered is the hidden conventions on the code. -The biggest example I can think of is the parameters of a nixpkgs module (i.e., `{ config, options, lib, pkgs, ... }`). -For an acquintance with Nix, it may not be that much of a problem. -However, for a newcomer, it is pretty hard to find those information with those https://nixos.org/learn.html[three manuals]. - -* The filesystem hierarchy standard is completely thrown out of the window. -This means prebuilt binaries (including https://appimage.org/[AppImages]) will not work since the libraries needed are not in the intended locations. -If you want to use them inside Nix (or NixOS), you have https://nixos.wiki/wiki/Packaging/Binaries[to package them]. -Thankfully, `/usr/bin/env` is kept for your user scripts. - -* While the Nix language is nice and all, the https://github.com/NixOS/nixpkgs/tree/master/lib[standard library] which is essential if you want to go far with Nix, is pretty hard to navigate for a newcomer. - -* Fully going into the "Nix way" is sometimes painful with the effort required to package a certain program compared to. -On the other hand, it is "write once, build everywhere". - -* The error messages are horrible (when it's horrible)! -There is a https://opencollective.com/nix-errors-enhancement/updates/revising-our-road-map-phase-3[recent push on improving Nix in that aspect] but it focuses on the formatting. -The interpreter sometimes points at the opposite way (at least to me). diff --git a/config b/config deleted file mode 160000 index 00ff59a0..00000000 --- a/config +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 00ff59a0ed36438f39b9b0d784708d8aa14761c7 diff --git a/default.nix b/default.nix deleted file mode 100755 index 6c354df2..00000000 --- a/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -# Author: Henrik Lissner -# Modified by: Gabriel Arazas -# URL: https://github.com/foo-dogsquared/nixos-config -# License: MIT -# -# This is ground zero, where the absolute essentials go, to be present on all systems I use nixos on. -# Contains cluser-wide configurations shared between all of the systems (located in `hosts/`). -# TODO: Convert into a flake-based configuration so it'll make my life easier. - -device: username: -{ pkgs, options, lib, config, ... }: - -{ - networking.hostName = lib.mkDefault device; - my.username = username; - - imports = [ ./modules "${./hosts}/${device}" ] - ++ (if builtins.pathExists (/etc/nixos/cachix.nix) then - [ /etc/nixos/cachix.nix ] - else - [ ]) - ++ (if builtins.pathExists (/etc/nixos/hardware-configuration.nix) then - [ /etc/nixos/hardware-configuration.nix ] - else - [ ]) - ++ (if builtins.pathExists (/mnt/etc/nixos/hardware-configuration.nix) then - [ /mnt/etc/nixos/hardware-configuration.nix ] - else - [ ]); - - # GARBAGE DAY! - nix.gc = { - automatic = true; - dates = "daily"; - options = "--delete-older-than 3d"; - }; - nix.autoOptimiseStore = true; - nix.nixPath = options.nix.nixPath.default ++ [ - # So we can use absolute import paths - "bin=/etc/dotfiles/config/bin" - "config=/etc/dotfiles/config" - ]; - - # Add custom packages & unstable channel, so they can be accessed via pkgs.* - nixpkgs.overlays = import ./packages; - nixpkgs.config.allowUnfree = true; # forgive me Stallman senpai - - # These are the things I want installed on all my systems. - environment.systemPackages = with pkgs; [ - # Just the bear necessities~ - coreutils - exfat - git - hfsprogs - killall - ntfs3g - sshfs - udiskie - unzip - vim - wget - - gnumake # for our own makefile - cachix # less time buildin' mo time nixin' - - # nix-shell with the modified Nix path. - (writeScriptBin "nix-shell" '' - #!${stdenv.shell} - NIX_PATH="nixpkgs-overlays=/etc/dotfiles/packages/default.nix:$NIX_PATH" ${nix}/bin/nix-shell "$@" - '') - ]; - - # Default settings for primary user account. - # `my` is defined in 'modules/default.nix'. - my.user = { - isNormalUser = true; - uid = 1000; - extraGroups = [ "wheel" "video" "libvirtd" ]; - shell = pkgs.zsh; - }; -} diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..8ee6076f --- /dev/null +++ b/flake.lock @@ -0,0 +1,69 @@ +{ + "nodes": { + "agenix": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1637625975, + "narHash": "sha256-ByDgmhpLykhAVeaFggjqoSRdl2OzTDODnxjPuu97fL4=", + "owner": "ryantm", + "repo": "agenix", + "rev": "a0e9ca505c82e762d39e9477a428b537a0aab022", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1637721183, + "narHash": "sha256-4CAKKxrt9l0Hbl57Uypo7ol93Ko+5Yn+7xWWCMUyHQ8=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "df931a59a5864d6ff0c5d83598135816f8593647", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1637593665, + "narHash": "sha256-R7jKS7A+0tZS8qD5pBr1UFcMiTdsw5bfoxgXbYsoWhM=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "98747f27ecfee70c8c97b195cbb94df80a074dda", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "agenix": "agenix", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..b20deb29 --- /dev/null +++ b/flake.nix @@ -0,0 +1,51 @@ +{ + description = "foo-dogsquared's NixOS config as a flake"; + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + agenix.url = "github:ryantm/agenix"; + agenix.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ self, nixpkgs, ... }: + let + lib = nixpkgs.lib.extend + (final: prev: (import ./lib { inherit inputs; lib = final; })); + + hostDefaultConfig = { + # Stallman-senpai will be disappointed. + nixpkgs.config.allowUnfree = true; + + # We live in a Unicode world and dominantly English in technical fields so we'll + # have to go with it. + i18n.defaultLocale = "en_US.UTF-8"; + + # Sane config for the package manager. + nix.gc = { + automatic = true; + dates = "monthly"; + options = "--delete-older-than 2w"; + }; + + # TODO: Remove this after nix-command and flakes has been considered stable. + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + }; + in { + inherit lib; + + # A list of NixOS configurations from the `./hosts` folder. + # It also has some sensible default configurations. + nixosConfigurations = + lib.mapAttrs (host: path: lib.mkHost path hostDefaultConfig) (lib.filesToAttr ./hosts); + + # We're going to make our custom modules available for our flake. Whether + # or not this is a good thing is debatable, I just want to test it. + nixosModules = + lib.mapAttrs (_: path: import path) (lib.filesToAttr ./modules); + }; +} diff --git a/hosts/ni/default.nix b/hosts/ni/default.nix new file mode 100644 index 00000000..328b0f0b --- /dev/null +++ b/hosts/ni/default.nix @@ -0,0 +1,141 @@ +# 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’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # My custom configuration with my custom modules starts here. + modules = { + agenix.enable = true; + archiving.enable = true; + desktop = { + enable = true; + audio.enable = true; + }; + dev = { + enable = true; + shell.enable = true; + }; + editors = { + emacs.enable = true; + neovim.enable = true; + }; + themes.a-happy-gnome.enable = true; + }; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Set your time zone. + time.timeZone = "Asia/Manila"; + + # Doxxing myself. + location = { + latitude = 15.0; + longitude = 121.0; + }; + + # The global useDHCP flag is deprecated, therefore explicitly set to false here. + # Per-interface useDHCP will be mandatory in the future, so this generated config + # replicates the default behaviour. + networking.useDHCP = false; + networking.interfaces.enp1s0.useDHCP = true; + networking.interfaces.wlp2s0.useDHCP = true; + + # Enable CUPS to print documents. + services.printing.enable = true; + + # Enable touchpad support (enabled default in most desktopManager). + hardware.opentabletdriver.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.foo-dogsquared = { + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + git + wget + brave + lf + fd + ripgrep + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + programs.mtr.enable = true; + security.doas.enable = true; + + # List services that you want to enable: + #services.borgmatic.enable = true; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "21.11"; # Did you read the comment? + + # This is my external hard disk so it has to be non-blocking. + fileSystems."/archive" = + { device = "/dev/disk/by-uuid/665A391C5A38EB07"; + fsType = "ntfs"; + noCheck = true; + options = [ "nofail" "noauto" "user" "x.systemd.automount" "x.systemd.device.timeout=1ms" ]; + }; + + # Automated backup for my external storage. + services.borgbackup.jobs = { + personal_archive = { + exclude = [ + "/home/*/.cache" + + # The usual NodeJS shenanigans. + "*/node_modules" + "*/.next" + + # Rust-related files. + "projects/software/*/result" + "projects/software/*/build" + "projects/software/*/target" + ]; + doInit = false; + removableDevice = true; + repo = "/archive/backups"; + paths = [ + "~/dotfiles" + "~/library" + "~/writings" + ]; + encryption = { + mode = "repokey"; + passCommand = "${pkgs.gopass}/bin/gopass show misc/BorgBackup_pass" + }; + compression = "auto,lzma"; + startAt = "daily"; + prune = { + prefix = "{hostname}-"; + keep = { + within = "1d"; + daily = 30; + weekly = 4; + monthly = 6; + yearly = 4; + }; + }; + }; + }; +} + diff --git a/hosts/ni/hardware-configuration.nix b/hosts/ni/hardware-configuration.nix new file mode 100644 index 00000000..ade25094 --- /dev/null +++ b/hosts/ni/hardware-configuration.nix @@ -0,0 +1,29 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/f52c2729-2036-4bdf-8d54-21f929f3447b"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AB3A-34BC"; + fsType = "vfat"; + }; + + swapDevices = [ { label = "swap"; } ]; + + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/hosts/zilch/README.adoc b/hosts/zilch/README.adoc deleted file mode 100755 index 01425196..00000000 --- a/hosts/zilch/README.adoc +++ /dev/null @@ -1,19 +0,0 @@ -= Zilch, the main workstation - -This is Zilch, the main machine (and only desktop as of 2020-08-16). -As such, it contains muh games and other stuff I attempt to bring over to Linux such as my music production workflow (I'm also learning how to compose music __properly__) and computer-aided designing with computers. - -One of the main points to keep in mind is the `dots` alias attached to the main user. -It provides a convenient way to upgrade the whole system in one fell swoop. -You can use https://nixos.org/nix/manual/#sec-profiles[user profiles] and run local upgrades (e.g., `nix-env -i all`, `home-manager switch upgrade`) for your other accounts. - -Just to make this note seem more important, I'll just list the games I'm currently into: - -- https://play0ad.com/[0 A.D.] -- https://wesnoth.org/[Battle for Wesnoth] -- http://www.bay12games.com/dwarves/[Dwarf Fortress] -- https://endless-sky.github.io/[Endless Sky] -- https://www.minetest.net/[Minetest] -- https://openmw.org/en/[OpenMW] -- https://veloren.net/[Veloren] - diff --git a/hosts/zilch/config/recoll/recoll.conf b/hosts/zilch/config/recoll/recoll.conf deleted file mode 100755 index 8d521cbe..00000000 --- a/hosts/zilch/config/recoll/recoll.conf +++ /dev/null @@ -1,28 +0,0 @@ -# My desktop search settings. - -# The main directories to create an index. -topdirs = ~/writings - ~/projects - ~/library - ~/Documents - ~/Videos - ~/Pictures - -# A list of wildcards to be ignored during index scanning. -skippedNames = #* CVS Cache cache* .cache caughtspam tmp \ - .thumbnails .svn \ - *~ .beagle .git .hg .bzr loop.ps .xsession-errors \ - .recoll* xapiandb recollrc recoll.conf - -noContentSuffixes = .md5 .map \ - .o .lib .dll .a .sys .exe .com \ - .mpp .mpt .vsd \ - .img .img.gz .img.bz2 .img.xz .image .image.gz .image.bz2 .image.xz \ - .dat .bak .rdf .log.gz .log .db .msf .pid \ - ,v ~ # - -skippedPaths = /media -indexallfilenames = 1 -usesystemfilecommand = 1 -systemfilecommand = xdg-mime query filetype - diff --git a/hosts/zilch/config/unison/default.prf b/hosts/zilch/config/unison/default.prf deleted file mode 100755 index 07845500..00000000 --- a/hosts/zilch/config/unison/default.prf +++ /dev/null @@ -1,47 +0,0 @@ -# Paths to synchronize -path = library -path = phone -path = projects -path = writings - -# My GnuPG keys -path = .gnupg - -# The password store of gopass -path = .password-store - -# My SSH keys -path = .ssh - -# My Cachix signing key -path = .config/cachix - -# My Cookiecutter templates -path = templates - -# My encrypted files -path = secrets - -# Some regexps specifying names and paths to ignore -ignore = Name temp.* -ignore = Name *~ -ignore = Name .*~ -ignore = Name *.o -ignore = Name *.tmp -ignore = Name *.qcow2 - -# Node cache -ignore = Name node_modules - -# Rust build caches -ignore = Name target - -# Nix build result -ignore = Name result - -# The diff command with the unified style (the same style Git uses for showing diffs) -diff = diff --unified - -# Log actions to the terminal -log = true - diff --git a/hosts/zilch/default.nix b/hosts/zilch/default.nix deleted file mode 100755 index d9ea3cce..00000000 --- a/hosts/zilch/default.nix +++ /dev/null @@ -1,349 +0,0 @@ -# My NixOS config... -# This is where the specific setup go from setting environment variables, specific aliases, installing specific packages (e.g., muh games), and so forth. -{ config, pkgs, lib, ... }: - -{ - nixpkgs.config.permittedInsecurePackages = [ "spidermonkey-38.8.0" ]; - - # Set the Nix package manager to use the unstable version for flakes. - nix = { - package = pkgs.nixUnstable; - extraOptions = '' - experimental-features = nix-command flakes - ''; - }; - - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Change the Linux kernel version. - boot.kernelPackages = pkgs.linuxPackages_5_10; - boot.extraModulePackages = [ pkgs.linuxPackages_5_10.nvidia_x11 ]; - - # Clean up the /tmp directory. - boot.cleanTmpDir = true; - - # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. - - # The global useDHCP flag is deprecated, therefore explicitly set to false here. - # Per-interface useDHCP will be mandatory in the future, so this generated config - # replicates the default behaviour. - networking.useDHCP = false; - networking.interfaces.enp4s0.useDHCP = true; - - # Enable XDG conventions. - my.home.xdg.enable = true; - environment.variables = { - XDG_CONFIG_HOME = "$HOME/.config"; - XDG_CACHE_HOME = "$HOME/.cache"; - XDG_DATA_HOME = "$HOME/.local/share"; - XDG_BIN_HOME = "$HOME/.local/bin"; - PATH = "$PATH:$XDG_BIN_HOME"; - }; - - # Moving all of the host-specific configurations into its appropriate place. - my.home.xdg.dataFile = let - insertXDGDataFolder = name: { - source = ./config + "/${name}"; - recursive = true; - }; - in { - "recoll" = insertXDGDataFolder "recoll"; - "unison" = insertXDGDataFolder "unison"; - }; - - # Install documentations for tools and whatnot. - documentation = { - enable = true; - dev.enable = true; - man.enable = true; - }; - - # Enable virutialization. - virtualisation = { - docker = { enable = true; }; - - libvirtd = { enable = true; }; - }; - - # Enable some font configs. - fonts = { - enableDefaultFonts = true; - fontconfig.enable = true; - }; - - location = { - latitude = 15.0; - longitude = 121.0; - }; - - # Module configurations. - modules = { - desktop = { - audio = { - enable = true; - composition.enable = true; - production.enable = true; - }; - browsers = { - brave.enable = true; - firefox.enable = true; - nyxt.enable = true; - }; - #cad.enable = true; - fonts.enable = true; - files.enable = true; - graphics = { - enable = true; - raster.enable = true; - vector.enable = true; - _3d.enable = true; - }; - multimedia.enable = true; - research.enable = true; - wine.enable = true; - }; - - dev = { - android.enable = true; - base.enable = true; - cc.enable = true; - data = { - enable = true; - #dhall.enable = true; - }; - documentation = { - enable = true; - latex.enable = true; - }; - game-dev = { - godot.enable = true; - unity3d.enable = true; - }; - go.enable = true; - java.enable = true; - lisp = { - clojure.enable = true; - guile.enable = true; - racket.enable = true; - }; - math.enable = true; - perl = { - enable = true; - raku.enable = true; - }; - python = { - enable = true; - math.enable = true; - }; - rust.enable = true; - vcs.enable = true; - web = { - enable = true; - javascript = { - deno.enable = true; - node.enable = true; - }; - php.enable = true; - }; - }; - - hardware = { - audio.enable = true; - veikk.enable = true; - }; - - editors = { - default = "nvim"; - emacs.enable = true; - neovim.enable = true; - vscode.enable = true; - }; - - services = { recoll.enable = true; }; - - shell = { - archiving.enable = true; - base.enable = true; - lf.enable = true; - zsh.enable = true; - }; - - themes.fair-and-square.enable = true; - }; - - # Additional programs that doesn't need much configuration (or at least personally configured). - # It is pointless to create modules for it, anyways. - environment.systemPackages = with pkgs; [ - nim # Jack the nimble, jack jumped over the nightstick, and got over not being the best pick. - python # *insert Monty Python quote here* - ruby # Gems, lots of gems. - ]; - - my.packages = with pkgs; - [ - # Muh games. - dwarf-fortress # Losing is fun! - endless-sky # Losing is meh! - minetest # Losing?! What's that? - the-powder-toy # Losing? The only thing losing is your time! - wesnoth # Losing is frustrating! - #zeroad # Losing is fun and frustrating! - - # Installing some of the dependencies required for my scripts. - ffcast - giflib - imageworsener - leptonica - libpng - libwebp - maim - (tesseract.override { enableLanguages = [ "eng" ]; }) - slop - virt-manager - xclip - xdg-user-dirs - xorg.xwininfo - zbar - - # Some other packages. - leocad - screenkey - ] - - # My custom packages. - ++ (with pkgs.nur.foo-dogsquared; [ - flavours - julia-bin - hantemcli - license-cli - segno - ]); - - # Setting up the shell environment. - my.env = { - BROWSER = "firefox"; - FILE = "lf"; - READ = "zathura"; - SUDO_ASKPASS = ; - }; - - # foo-dogsquared is my only alias. - my.alias = { - # Convenience alias for my NixOS config. - dots = "USER=${config.my.username} make -C /etc/dotfiles"; - - # Assume you've installed Doom Emacs. - org-capture = "$XDG_CONFIG_HOME/emacs/bin/org-capture"; - }; - - # Set your time zone. - time.timeZone = "Asia/Manila"; - - # Setup GnuPG. - programs.gnupg.agent = { - enable = true; - enableSSHSupport = true; - pinentryFlavor = "gnome3"; - }; - - # Install a proprietary Nvidia graphics driver. - services = { - xserver = { - digimend.enable = true; - libinput = { - enable = true; - middleEmulation = true; - }; - }; - lorri.enable = true; - nfs = { - server = { - enable = true; - exports = '' - /home 192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check) - ''; - }; - }; - openssh = { - enable = true; - permitRootLogin = "yes"; - extraConfig = '' - PasswordAuthentication yes - ''; - ports = [ 22664 ]; - }; - redshift.enable = true; - # videoDrivers = [ "nvidiaLegacy390" ]; - }; - - # Enable sound. - sound.enable = true; - hardware.pulseaudio.enable = true; - - # Enable OpenGL. - hardware = { opengl.enable = true; }; - - # Additional host-specific program configurations. - my.home = { - programs = { - # My personal Git config. - git = { - enable = true; - - # Enable Large File Storage. - lfs.enable = true; - - # Use the entire suite. - package = pkgs.gitAndTools.gitFull; - - # Enable Delta syntax highlighter. - delta.enable = true; - - userName = "Gabriel Arazas"; - userEmail = "${config.my.email}"; - }; - - # Enable this to make your prompt out of this world. - starship = { - enableBashIntegration = true; - enableFishIntegration = true; - enableZshIntegration = true; - enable = true; - }; - }; - - services = { - unison = let - homeDirectory = "/home/${config.my.username}"; - backupDrive = - "/run/media/${config.my.username}/Seagate Backup Plus Drive"; - in { - enable = true; - pairs.mainBackup = { - roots = [ homeDirectory backupDrive ]; - commandOptions = { - auto = "true"; - batch = "true"; - dontchmod = "true"; - fat = "true"; - force = "${homeDirectory}"; - group = "true"; - links = "false"; - rsrc = "true"; - ui = "text"; - }; - }; - }; - }; - }; - - my.user.extraGroups = [ "docker" ]; - - # This value determines the NixOS release with which your system is to be - # compatible, in order to avoid breaking some software such as database - # servers. You should change this only after NixOS release notes say you - # should. - system.stateVersion = "20.09"; # Did you read the comment? -} diff --git a/lib/attrs.nix b/lib/attrs.nix deleted file mode 100755 index 473f6e04..00000000 --- a/lib/attrs.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ lib, ... }: - -with builtins; -with lib; rec { - # attrsToList - attrsToList = attrs: - mapAttrsToList (name: value: { inherit name value; }) attrs; - - # mapFilterAttrs :: - # (name -> value -> bool) - # (name -> value -> { name = any; value = any; }) - # attrs - mapFilterAttrs = pred: f: attrs: filterAttrs pred (mapAttrs' f attrs); - - # Generate an attribute set by mapping a function over a list of values. - genAttrs' = values: f: listToAttrs (map f values); - - # anyAttrs :: (name -> value -> bool) attrs - anyAttrs = pred: attrs: - any (attr: pred attr.name attr.value) (attrsToList attrs); - - # countAttrs :: (name -> value -> bool) attrs - countAttrs = pred: attrs: - count (attr: pred attr.name attr.value) (attrsToList attrs); -} diff --git a/lib/default.nix b/lib/default.nix old mode 100755 new mode 100644 index e66f9a26..1ebe379e --- a/lib/default.nix +++ b/lib/default.nix @@ -1,18 +1,119 @@ -{ lib, pkgs, ... }: +{ lib, inputs, ... }: let - inherit (lib) makeExtensible attrValues foldr; - inherit (modules) mapModules; + # Default system for our host configuration. + sys = "x86_64-linux"; +in +rec { + /* Create an attribute set that represents the structure of the modules + inside of a directory. While it can recurse into directories, it will + stop once it detects `default.nix` inside. - modules = import ./modules.nix { - inherit lib; - self.attrs = import ./attrs.nix { - inherit lib; - self = { }; + !!! Implementation detail is based from + https://github.com/divnix/digga/blob/main/src/importers.nix looking at it + multiple times for the purpose of familiarizing myself to coding in Nix + and functional programming shtick. + + Example: + filesToAttr ./hosts + => { ni = ./hosts/ni/default.nix; zilch = ./hosts/zilch/default.nix } + */ + filesToAttr = dirPath: + let + isModule = file: type: + (type == "regular" && lib.hasSuffix ".nix" file) || (type == "directory"); + + collect = file: type: { + name = lib.removeSuffix ".nix" file; + value = + let + path = dirPath + "/${file}"; + in + if (type == "regular") || (type == "directory" && lib.pathExists (path + "/default.nix")) + then path + else filesToAttr path; + }; + + files = lib.filterAttrs isModule (builtins.readDir dirPath); + in + lib.filterAttrs (name: value: value != { }) (lib.mapAttrs' collect files); + + + /* Like `filesToAttr` but does it recursively. Those modules with + `default.nix` are ignored and gives the full module directory this time. + This is only suitable if you intend to use all of the modules in a given + directory. + + Examples: + filesToAttrRec ./modules + => { agenix = /home/foo-dogsquared/nixos-config/modules/agenix.nix; archiving = /home/foo-dogsquared/nixos-config/modules/archiving.nix; desktop = /home/foo-dogsquared/nixos-config/modules/desktop.nix; dev = /home/foo-dogsquared/nixos-config/modules/dev.nix; editors = /home/foo-dogsquared/nixos-config/modules/editors.nix; themes = { a-happy-gnome = /home/foo-dogsquared/nixos-config/modules/themes/a-happy-gnome; default = /home/foo-dogsquared/nixos-config/modules/themes/default.nix; }; } + */ + filesToAttrRec = dir: + let + files = lib.filterAttrs (n: v: n != "default") (filesToAttr dir); + + collect = name: file: { + inherit name; + + # Since `filesToAttr` has already filtered the files, we can be assured + # it is only either a Nix file or a directory containing a + # `default.nix`. + value = if (lib.pathIsDirectory file) then filesToAttr file else file; + }; + in + lib.listToAttrs (lib.mapAttrsToList collect files); + + /* Create a NixOS system through a given host folder. + It will automate some of the things such as making the last component + of the path as the hostname. + + Example: + mkHost ./hosts/june {} + => { ... } # NixOS configuration attrset + */ + mkHost = file: attrs@{ system ? sys, ... }: + lib.nixosSystem { + inherit system; + specialArgs = { inherit lib system inputs; }; + + # We also set the following in order for priority. + # Later modules will override previously imported modules. + modules = [ + # Set the hostname. + { networking.hostName = builtins.baseNameOf file; } + + # Put the given attribute set (except for the system). + (lib.filterAttrs (n: v: !lib.elem n [ "system" ]) attrs) + + # The entry point of the module. + file + ] + # Append with our custom modules from the modules folder. + ++ (lib.mapAttrsToList (n: v: import v) (filesToAttr ../modules)); }; - }; - mylib = makeExtensible (self: - with self; - mapModules (toString ./.) (file: import file { inherit self lib pkgs; })); -in mylib.extend (self: super: foldr (a: b: a // b) { } (attrValues super)) + /* Create an attribute set from two lists (or a zip). + + Examples: + zipToAttrs [ "tails" "breed" ] [ 1 "Doggo" ] + => { tails = 1; breed = "Doggo" } + + zipToAttrs [ "hello" "d" ] [ { r = 5; f = "dogs"; } { r = 532; f = "dogsso"; } ] + => { d = { ... }; hello = { ... }; } + */ + zipToAttrs = keys: values: + lib.listToAttrs ( + lib.zipListsWith (name: value: { inherit name value; }) + keys + values + ); + + /* Count the attributes with the given predicate. + + Examples: + countAttrs (name: value: value) { d = true; f = true; a = false; } + => 2 + */ + countAttrs = pred: attrs: + lib.count (attr: pred attr.name attr.value) (lib.mapAttrsToList lib.nameValuePair attrs); +} diff --git a/lib/modules.nix b/lib/modules.nix deleted file mode 100755 index 55794bf0..00000000 --- a/lib/modules.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ self, lib, ... }: - -let - inherit (builtins) attrValues readDir pathExists concatLists; - inherit (lib) - id mapAttrsToList filterAttrs hasPrefix hasSuffix nameValuePair - removeSuffix; - inherit (self.attrs) mapFilterAttrs; -in rec { - mapModules = dir: fn: - mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: - let path = "${toString dir}/${n}"; - in if v == "directory" && pathExists "${path}/default.nix" then - nameValuePair n (fn path) - else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n then - nameValuePair (removeSuffix ".nix" n) (fn path) - else - nameValuePair "" null) (readDir dir); - - mapModules' = dir: fn: attrValues (mapModules dir fn); - - mapModulesRec = dir: fn: - mapFilterAttrs (n: v: v != null && !(hasPrefix "_" n)) (n: v: - let path = "${toString dir}/${n}"; - in if v == "directory" then - nameValuePair n (mapModulesRec path fn) - else if v == "regular" && n != "default.nix" && hasSuffix ".nix" n then - nameValuePair (removeSuffix ".nix" n) (fn path) - else - nameValuePair "" null) (readDir dir); - - mapModulesRec' = dir: fn: - let - dirs = mapAttrsToList (k: _: "${dir}/${k}") - (filterAttrs (n: v: v == "directory" && !(hasPrefix "_" n)) - (readDir dir)); - files = attrValues (mapModules dir id); - paths = files ++ concatLists (map (d: mapModulesRec' d id) dirs); - in map fn paths; -} diff --git a/lib/options.nix b/lib/options.nix deleted file mode 100755 index f659189d..00000000 --- a/lib/options.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ lib, ... }: - -let inherit (lib) mkOption types; -in rec { - mkOpt = type: default: mkOption { inherit type default; }; - - mkOpt' = type: default: description: - mkOption { inherit type default description; }; - - mkBoolOpt = default: - mkOption { - inherit default; - type = types.bool; - example = true; - }; -} diff --git a/modules/agenix.nix b/modules/agenix.nix new file mode 100644 index 00000000..e86d9869 --- /dev/null +++ b/modules/agenix.nix @@ -0,0 +1,19 @@ +# A module that automates setting up agenix for your system. +{ inputs, lib, options, config, ... }: + +let + cfg = config.modules.agenix; +in { + options.modules.agenix.enable = lib.mkEnableOption "Enable agenix on your system"; + + imports = [ inputs.agenix.nixosModules.age ]; + config = lib.mkIf cfg.enable { + # Enable all relevant services. + programs.gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + services.sshd.enable = true; + services.openssh.enable = true; + }; +} diff --git a/modules/archiving.nix b/modules/archiving.nix new file mode 100644 index 00000000..4df2ac49 --- /dev/null +++ b/modules/archiving.nix @@ -0,0 +1,21 @@ +# All of your embarrassing moments, marked here forever. +{ config, options, lib, pkgs, ... }: + +let + cfg = config.modules.archiving; +in +{ + options.modules.archiving.enable = lib.mkEnableOption "Install and configure archiving tools."; + + # This is not going to set BorgBackup NixOS services for you. + # Please do it for host-specific configs instead. + config = lib.mkIf cfg.enable { + environment.systemPackages = with pkgs; [ + archivebox # Create by ye' old pirate. + borgbackup # I'm pretty sure this is named after some thing from a franchise somewhere but I'm not omnipresent. + borgmatic # For those insisting on configurations for BorgBackup. + fanficfare # Your fanfics in my hard drive? Pay me rent first. + yt-dlp # More active fork after youtube-dl has been striked. + ]; + }; +} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100755 index da287b52..00000000 --- a/modules/default.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ config, options, lib, ... }: - -with lib; - -let - mkOptionStr = value: - mkOption { - type = types.str; - default = value; - }; -in { - imports = [ - - - ./desktop - ./dev - ./hardware - ./editors - ./shell - ./services - ./themes - ]; - - options = { - my = { - # Personal details - username = mkOptionStr "foo-dogsquared"; - email = mkOptionStr "foo.dogsquared@gmail.com"; - - # Convenience aliases - home = - mkOption { type = options.home-manager.users.type.functor.wrapped; }; - user = mkOption { type = options.users.users.type; }; - packages = mkOption { type = with types; listOf package; }; - - # Environment - env = mkOption { - type = with types; - attrsOf (either (either str path) (listOf (either str path))); - apply = mapAttrs (n: v: - if isList v then - concatMapStringsSep ":" (x: toString x) v - else - (toString v)); - }; - - alias = mkOption { - type = with types; nullOr (attrsOf (nullOr (either str path))); - }; - }; - }; - - config = { - # Convenience aliases - home-manager.users.${config.my.username} = - mkAliasDefinitions options.my.home; - home-manager.useGlobalPkgs = true; - users.users.${config.my.username} = mkAliasDefinitions options.my.user; - my.user.packages = config.my.packages; - - # PATH should always start with its old value - my.env.PATH = [ "$PATH" ]; - - # Put the configured custom environment variables (config.my.env) into initialization phase. - environment.extraInit = let - exportLines = - mapAttrsToList (key: value: ''export ${key}="${value}"'') config.my.env; - in '' - export XAUTHORITY=/tmp/XAUTHORITY - [ -e ~/.Xauthority ] && mv -f ~/.Xauthority "$XAUTHORITY" - - ${concatStringsSep "\n" exportLines} - ''; - - my.home = { - programs = { - bash.shellAliases = config.my.alias; - zsh.shellAliases = config.my.alias; - fish.shellAliases = config.my.alias; - }; - }; - }; -} diff --git a/modules/desktop.nix b/modules/desktop.nix new file mode 100644 index 00000000..12363c55 --- /dev/null +++ b/modules/desktop.nix @@ -0,0 +1,51 @@ +# This is where extra desktop goodies can be found. +# As a note, this is not where you set the aesthetics of your graphical sessions. +# That can be found in the `themes` module. +{ config, options, lib, pkgs, ... }: + +let + cfg = config.modules.desktop; +in +{ + options.modules.desktop = { + enable = lib.mkEnableOption "Enables all desktop-related services and default programs."; + audio.enable = lib.mkEnableOption "Enables all desktop audio-related services such as Pipewire."; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + ({ + # Enable Flatpak for additional options for installing desktop applications. + services.flatpak.enable = true; + xdg.portal = { + enable = true; + gtkUsePortal = true; + wlr.enable = true; + }; + + # Enable font-related options for more smoother and consistent experience. + fonts.enableDefaultFonts = true; + }) + + (lib.mkIf cfg.audio.enable { + # Enable the preferred audio workflow. + hardware.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + # Enable running GNOME apps outside GNOME. + programs.dconf.enable = true; + + # Enable MPD-related services. + services.mpd.enable = true; + environment.systemPackages = with pkgs; [ + ncmpcpp # Has the worst name for a music client WTF? + ]; + }) + ]); +} diff --git a/modules/desktop/audio.nix b/modules/desktop/audio.nix deleted file mode 100755 index 61ef5360..00000000 --- a/modules/desktop/audio.nix +++ /dev/null @@ -1,54 +0,0 @@ -# My audio tools... -# I create "music" (with no experience whatsoever) so here's my "music" workflow. -# TODO: I may have to switch to Pipewire for the FUTURE. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.audio; -in { - options.modules.desktop.audio = let - mkBoolDefault = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - enable = mkBoolDefault false; - composition.enable = mkBoolDefault false; - production.enable = mkBoolDefault false; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - cadence # A JACK interface for newbs. - ] ++ - - (if cfg.composition.enable then [ - lilypond # Prevent your compositions to be forever lost when you're in grave by engraving them now (or whenever you feel like it). - musescore # A music composer for creating musical cheatsheets. - soundfont-fluid # A soundfont for it or something. - sonic-pi # A pie made up of them supersonic sounds created from electricity. - supercollider # Programming platform for synthesizing them 'zics. - ] else - [ ]) ++ - - (if cfg.production.enable then [ - ardour # A DAW focuses on hardware recording but it can be used for something else. - audacity # Belongs in the great city of "Simple tools for short audio samples". - carla # A plugin host useful for a consistent hub for them soundfonts and SFZs. - fluidsynth # Synth for fluid sounds. - geonkick # Create them percussions. - giada # A hardcore loop machine for wannabe musicians like me. - helm # A great synthesizer plugin. - hydrogen # Them drum beats composition will get good. - lmms # A decent libre FL Studio clone. - polyphone # Edit your fonts for sound. - #sunvox # A modular sequencer... ooh... - #zrythm # An up-and-coming DAW in Linux town. - zynaddsubfx # Ze most advanced synthesizer I've seen so far (aside from the upcoming Vital syntehsizer). - ] else - [ ]); - }; -} diff --git a/modules/desktop/browsers.nix b/modules/desktop/browsers.nix deleted file mode 100755 index d6022dd2..00000000 --- a/modules/desktop/browsers.nix +++ /dev/null @@ -1,28 +0,0 @@ -# My browsers are my buddies on surfing the web. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.browsers; -in { - options.modules.desktop.browsers = let - mkBoolDefault = bool: - mkOption { - type = types.bool; - default = false; - }; - in { - brave.enable = mkBoolDefault false; - firefox.enable = mkBoolDefault false; - chromium.enable = mkBoolDefault false; - nyxt.enable = mkBoolDefault false; - }; - - config = { - my.packages = with pkgs; - (if cfg.brave.enable then [ brave ] else [ ]) - ++ (if cfg.firefox.enable then [ firefox-bin ] else [ ]) - ++ (if cfg.chromium.enable then [ chromium ] else [ ]) - ++ (if cfg.nyxt.enable then [ nyxt ] else [ ]); - }; -} diff --git a/modules/desktop/cad.nix b/modules/desktop/cad.nix deleted file mode 100755 index 51a5f4e8..00000000 --- a/modules/desktop/cad.nix +++ /dev/null @@ -1,23 +0,0 @@ -# Even if my designs are computer-aided, it's still horrible. :( -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.cad; -in { - options.modules.desktop.cad = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - freecad # FREE AS A BIRD, FREE AS A ALL-YOU-CAN-EAT BUFFER! - kicad # The CAD for ki which is a form of energy found everywhere. - leocad # A CAD for leos, a well-known brand of toys. - openscad # A programmable CAD for programmers. - ]; - }; -} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix deleted file mode 100755 index 5a93a7ea..00000000 --- a/modules/desktop/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -# My apps on my natural desktop environment. -{ config, options, lib, pkgs, ... }: - -{ - imports = [ - ./audio.nix - ./browsers.nix - ./cad.nix - ./files.nix - ./fonts.nix - ./graphics.nix - ./multimedia.nix - ./research.nix - ./wine.nix - ]; -} diff --git a/modules/desktop/files.nix b/modules/desktop/files.nix deleted file mode 100755 index a84756fa..00000000 --- a/modules/desktop/files.nix +++ /dev/null @@ -1,48 +0,0 @@ -# A set of tools related to files: managing metadata, backing them up, filesystems, and whatnot. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.files; -in { - options.modules.desktop.files = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - croc # Despite the name, it is a good and tame tool to send your files over. - exiftool # A file metadata reader/writer/manager/helicopter. - recoll # Bring the search engine to the desktop! - unison # Back those files up, son. - oneshot # Basically `python -m http.server` that can deliver files to various devices. - qbittorrent # Free version of uBittorrent. - xfce.thunar # A graphical file manager. - xfce.thunar-volman # A Thunar plugin on volume management for external devices. - udiskie # An automounter for external devices with authentication. - ]; - - my.home = { - services = { - # Enable Syncthing for them cross-device syncing. - syncthing = { - enable = true; - }; - }; - }; - - services = { - # Argh! Open t' gateweh t' th' high seas! - transmission.enable = true; - }; - - # Clean 'yer home! - my.env = { - RECOLL_CONFDIR = "$XDG_DATA_HOME/recoll"; - UNISON = "$XDG_DATA_HOME/unison"; - }; - }; -} diff --git a/modules/desktop/fonts.nix b/modules/desktop/fonts.nix deleted file mode 100755 index 9f7d05b5..00000000 --- a/modules/desktop/fonts.nix +++ /dev/null @@ -1,46 +0,0 @@ -# My selection of fonts for this setup. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.fonts; -in { - options.modules.desktop.fonts = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - # Enable fontconfig to easily discover fonts installed from home-manager. - fonts = { - fontDir.enable = true; - enableDefaultFonts = true; - fontconfig = { - enable = true; - defaultFonts = { - sansSerif = [ "Source Sans Pro" "IBM Plex Sans" "Noto Sans" ]; - serif = [ "Source Serif Pro" "IBM Plex Serif" "Noto Serif" ]; - monospace = [ "Source Code Pro" "IBM Plex Mono" "Noto Mono" ]; - }; - }; - - fonts = with pkgs; [ - dejavu_fonts # Makes you feel like you've seen them before. - fira-code # The programming font with fancy symbols. - ibm-plex # IBM's face, is it professional? - iosevka # The fancy monofont with fancy ligatures. - jetbrains-mono # Jet to the face, land on the brains. - latinmodern-math # The ol' mathematical typeface. - nerdfonts # Fonts for NEEEEEEEEEEEEEEEEEEEEEEEEERDS! - noto-fonts # It's all about family and that's what so powerful about it. - noto-fonts-cjk # I don't condone anime. - source-code-pro # The Adobe pro code. - source-serif-pro # The Adobe serif code. - source-sans-pro # The above descriptions doesn't make much sense. - stix-otf # The font you need for them math moonrunes. - ]; - }; - }; -} diff --git a/modules/desktop/graphics.nix b/modules/desktop/graphics.nix deleted file mode 100755 index 8bb326f2..00000000 --- a/modules/desktop/graphics.nix +++ /dev/null @@ -1,59 +0,0 @@ -# Being a hack fraud in "jack of all trades, master of none" thing, I also create "graphics". -# This includes tools for raster, vector, and 3D modelling. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.graphics; -in { - options.modules.desktop.graphics = let - mkBoolDefault = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - enable = mkBoolDefault false; - programmable.enable = mkBoolDefault false; - raster.enable = mkBoolDefault false; - vector.enable = mkBoolDefault false; - _3d.enable = mkBoolDefault false; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - font-manager # Self-explanatory name is self-explanatory. - imagemagick7 # A command-line tool for manipulating images. - graphviz # The biz central for graphical flowcharts. - ] ++ - - (if cfg.programmable.enable then - [ - processing # A visually-oriented language with an energertic train conductor as the mascot. - ] - else - [ ]) ++ - - (if cfg.raster.enable then [ - gimp # Adobe Photoshop replacement. - krita # A good painting program useful for "pure" digital arts. - aseprite-unfree # A pixel art editor. - rawtherapee # A therapy session for improving your photos. - ] else - [ ]) ++ - - (if cfg.vector.enable then - [ - inkscape # Adobe Illustrator (or Affinity Designer) replacement. - ] - else - [ ]) ++ - - (if cfg._3d.enable then [ - blender # It's a great 3D model editor. - goxel # It's a great voxel editor. - ] else - [ ]); - }; -} diff --git a/modules/desktop/multimedia.nix b/modules/desktop/multimedia.nix deleted file mode 100755 index 0067a683..00000000 --- a/modules/desktop/multimedia.nix +++ /dev/null @@ -1,27 +0,0 @@ -# Muh consumer applications... -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.multimedia; -in { - options.modules.desktop.multimedia = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - ffmpeg # The ultimate multimedia toolkit for everybody! - hexchat # The ultimate IRC client for neckbeards. - kdenlive # A decent free and open source video editor. - mpv # The ultimate media player for hipsters. - newsboat # The ultimate RSS aggregator for some person. - obs-studio # Open Broadcasting Studio Studio, the reliable recording workflow. - thunderbird # The ultimate email client for dumbasses like me. - zathura # The ultimate PDF viewer for run-of-the-mill ricing. - ]; - }; -} diff --git a/modules/desktop/research.nix b/modules/desktop/research.nix deleted file mode 100755 index abe6bb10..00000000 --- a/modules/desktop/research.nix +++ /dev/null @@ -1,21 +0,0 @@ -# I'm not in academia but I like managing my library resources. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.research; -in { - options.modules.desktop.research = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - exiftool # A file metadata reader/writer/helicopter. - zotero # An academic's best friend. - ]; - }; -} diff --git a/modules/desktop/wine.nix b/modules/desktop/wine.nix deleted file mode 100644 index 37157473..00000000 --- a/modules/desktop/wine.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.desktop.wine; -in { - options.modules.desktop.wine = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - #airwave - wine - winetricks - ]; - }; -} diff --git a/modules/dev.nix b/modules/dev.nix new file mode 100644 index 00000000..f2321746 --- /dev/null +++ b/modules/dev.nix @@ -0,0 +1,72 @@ +# The module for anything dev-related. +# If you want to see editor-specific modules, see `modules/editors.nix`. +{ config, options, lib, pkgs, ... }: + +let + cfg = config.modules.dev; +in { + options.modules.dev = { + enable = lib.mkEnableOption "Configures my barebones requirement for a development environment."; + shell.enable = lib.mkEnableOption "Installs of the shell utilities I rely on."; + virtualization.enable = lib.mkEnableOption "Configures my virtualization-related stuff for my development. (I sometimes have to use these.)"; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + ({ + # I want to include documentations for my own sanity, OK? + documentation = { + enable = true; + dev.enable = true; + nixos.enable = true; + }; + + # Configure all of the development-related configuration in the system. + programs.git.enable = true; + programs.gnupg = { + agent.enable = true; + }; + + # Convenience! + environment.localBinInPath = true; + + # This is set as our system packages for the sake of convenience. + services.lorri.enable = true; + environment.systemPackages = with pkgs; [ + cachix # Compile no more by using someone's binary cache! + curl # Our favorite network client. + cmake # The poster boy for the hated build system. + direnv # The power of local development environment. + gnumake # Make your life easier with GNU Make. + ]; + }) + + (lib.mkIf cfg.shell.enable { + environment.systemPackages = with pkgs; [ + alacritty # The terminal emu that can run fast. + lazygit # Git interface for the lazy. + fd # Oh nice, a more reliable `find`. + ripgrep # On nice, a more reliable `grep`. + exa # Oh nice, a shinier `ls`. + bat # dog > bat > cat + fzf # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception. + gopass # An improved version of the password manager for hipsters. + zoxide # Gain teleportation abilities! + ]; + }) + + # !!! Please add your user to the "libvirtd" group. + (lib.mkIf cfg.virtualization.enable { + # Enable podman just as my main container runtime or something. + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; + + # Enable libvirt for muh qemu. + virtualisation.libvirtd = { + enable = true; + qemu.ovmf.enable = true; + }; + }) + ]); +} diff --git a/modules/dev/android.nix b/modules/dev/android.nix deleted file mode 100755 index 92864413..00000000 --- a/modules/dev/android.nix +++ /dev/null @@ -1,37 +0,0 @@ -# Android is the mobile version of Linux. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.android; -in { - options.modules.dev.android = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - android-studio # The apartment for Android development. - dart # It's JavaScript except saner and slimmer. - flutter # It's Electron except saner and slimmer. - kotlin # It's Java except saner and slimmer. - scrcpy # Cast your phone over TCP/IP! - termshark # Know where those files from your Android app in command line. - wireshark # Know where those files from your Android app. - ]; - - # Enable Android Debug Bridge for some device debugging. - programs.adb.enable = true; - - # Enable Wireshark for them data-mining... I mean, analyzing and debugging HTTP requests. - programs.wireshark.enable = true; - - # Install Anbox emulation. - #virtualisation.anbox.enable = true; - - my.user.extraGroups = [ "adbusers" "wireshark" ]; - }; -} diff --git a/modules/dev/base.nix b/modules/dev/base.nix deleted file mode 100755 index b4ae20bc..00000000 --- a/modules/dev/base.nix +++ /dev/null @@ -1,46 +0,0 @@ -# The utmost requirements for a development workflow. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.base; -in { - options.modules.dev.base = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - caddy # THE ULTIMATE HTTPS/2 SERVER FOR 'YER GOLFIN' SESSIONS!!! - cmake # Yo, I heard you like Makefiles. - cookiecutter # A project scaffolding tool. - gnumake # Make your life easier with GNU Make. - gitAndTools.hub # I wish Gitlab has something called lab. - hyperfine # You shouldn't be feel just fine with your programs... - kmon # A Linux kernel monitoring tool, right... - nixfmt # Formatter for uniform Nix code. - radare2-cutter # Rev-eng tools to feel like a hacker. - stow # Build your symlink farm on the other side of the country, er, filesystem. - tealdeer # What manuals should include. - universal-ctags # Enable fast traveling to your code (assuming written in a supported language). - ]; - - # Augment your shell with automatic environment variables loading and unloading. - my.home.programs = { - direnv = { - enable = true; - enableBashIntegration = true; - enableFishIntegration = true; - enableZshIntegration = true; - }; - - # Enabling all of the shells for cross-testing purposes. - fish.enable = true; - bash.enable = true; - zsh.enable = true; - }; - }; -} diff --git a/modules/dev/cc.nix b/modules/dev/cc.nix deleted file mode 100755 index 18863e3b..00000000 --- a/modules/dev/cc.nix +++ /dev/null @@ -1,24 +0,0 @@ -# My stuff for C and C++. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.cc; -in { - options.modules.dev.cc = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - cmake # Yo dawg, I heard you like Make. - # clang # A C compiler frontend for LLVM. - gcc # A compiler toolchain. - gdb # GNU Debugger. - llvmPackages.libcxx # When GCC has become too bloated for someone's taste. - ]; - }; -} diff --git a/modules/dev/data.nix b/modules/dev/data.nix deleted file mode 100755 index ee85e992..00000000 --- a/modules/dev/data.nix +++ /dev/null @@ -1,48 +0,0 @@ -# A bunch of data-related tools and libraries. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.data; -in { - options.modules.dev.data = { - enable = mkOption { - type = types.bool; - default = false; - }; - - dhall.enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - cfitsio # A data library for FITS images which is an image used for analyzing your fitness level. - hdf5 # A binary data format with hierarchy and metadata. - #hdfview # HDF4 and HDF5 viewer. - jq # A JSON parser on the command-line (with the horrible syntax, in my opinion). - pup # A cute little puppy that can understand HTML. - sqlite # A cute little battle-tested library for your data abominations. - sqlitebrowser # Skim the DB and create a quick scraping script for it. - yq-go # A YAML parser on the command-line. - ] ++ - - (if cfg.dhall.enable then [ - dhall # A dull programmable configuration Turing-incomplete language for your guaranteed termination, neat. - dhall-nix - dhall-bash - dhall-json - dhall-text - dhall-lsp-server - ] else - [ ]); - - my.alias = { - yaml2json = "${pkgs.yq-go}/bin/yq r --prettyPrint --tojson"; - json2yaml = "${pkgs.yq-go}/bin/yq r --prettyPrint"; - }; - }; -} diff --git a/modules/dev/default.nix b/modules/dev/default.nix deleted file mode 100755 index 8521365e..00000000 --- a/modules/dev/default.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, lib, ... }: - -{ - imports = [ - ./android.nix - ./base.nix - ./cc.nix - ./data.nix - ./documentation.nix - ./gamedev.nix - ./go.nix - ./java.nix - ./lisp.nix - ./math.nix - ./perl.nix - ./python.nix - ./rust.nix - ./vcs.nix - ./web.nix - ]; -} diff --git a/modules/dev/documentation.nix b/modules/dev/documentation.nix deleted file mode 100755 index 22452a97..00000000 --- a/modules/dev/documentation.nix +++ /dev/null @@ -1,63 +0,0 @@ -# My stuff for documentation workflows. -# I mean, documentation is part of the development life, right? -# Mainly includes markup languages and whatnot. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.documentation; -in { - options.modules.dev.documentation = let - mkBoolOption = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - enable = mkBoolOption false; - - # Jupyter does need a bit of setup so separate option. - jupyter.enable = mkBoolOption false; - - # Since my usual LaTeX needs are somewhat big, I'm keeping it as a separate option. - latex.enable = mkBoolOption false; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - asciidoctor # An Asciidoctor document keeps a handful of few frustrated users a day. - aspell # The not-opinionated spell checker. - aspellDicts.en - aspellDicts.en-computers - #aspellDicts.en-science - editorconfig-core-c # A library just for formatting files? - editorconfig-checker # Check yer formatting. - hugo # An SSG for your DDD (documentation-driven development) workflow. - languagetool # A grammar checker with a HUGE data set. - pandoc # The Swiss army knife for document conversion. - R # Rated G for accessibility. - vale # The customizable linter for your intended writings. - - # TODO: Make Neuron its own package. - (let - neuronRev = "e7568ca5f51609bb406a48527b5ba52d31d11f9c"; - neuronSrc = builtins.fetchTarball - "https://github.com/srid/neuron/archive/${neuronRev}.tar.gz"; - in import neuronSrc { }) # Neurons and zettels are good for the brain. - ] ++ - - (if cfg.jupyter.enable then [ - jupyter # The interactive notebook. - iruby # The Ruby kernel for Jupyter. - ] else - [ ]) ++ - - (if cfg.latex.enable then - [ - texlive.combined.scheme-medium # The all-in-one LaTeX distribution for your offline typesetting needs. - ] - else - [ ]); - }; -} diff --git a/modules/dev/gamedev.nix b/modules/dev/gamedev.nix deleted file mode 100755 index 423d63f9..00000000 --- a/modules/dev/gamedev.nix +++ /dev/null @@ -1,38 +0,0 @@ -# I've yet to delve into game development but here we are. -# This contains several toolchains such as Unity, Godot Engine, and Love. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.game-dev; -in { - options.modules.dev.game-dev = let - mkBoolOption = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - defold.enable = mkBoolOption false; - godot.enable = mkBoolOption false; - unity3d.enable = mkBoolOption false; - }; - - config = { - my.packages = with pkgs; - (if cfg.godot.enable then - [ - godot # The Godot, not to be confused with a certain prosecutor. - ] - else - [ ]) ++ - - (if cfg.defold.enable then [ defold ] else [ ]) ++ - - (if cfg.unity3d.enable then [ - unity3d # The Unity, not to be confused with a certain ideal. - unityhub # The ideal hub for your Unity projects. - ] else - [ ]); - }; -} diff --git a/modules/dev/go.nix b/modules/dev/go.nix deleted file mode 100755 index e2e81b1e..00000000 --- a/modules/dev/go.nix +++ /dev/null @@ -1,21 +0,0 @@ -# Go, go, Golang coders! -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.go; -in { - options.modules.dev.go = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - delve # Wait, Go doesn't have a proper debugger? - go # The other zoomer proglang (READ: proglang is a zoomer term for programming language). - ]; - }; -} diff --git a/modules/dev/java.nix b/modules/dev/java.nix deleted file mode 100755 index a654a731..00000000 --- a/modules/dev/java.nix +++ /dev/null @@ -1,22 +0,0 @@ -# Java is a rice variant, a coffee blend, an island, and a programming language. -# It sure is a flexible thing. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.java; -in { - options.modules.dev.java = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - jdk # The Java Development Kit. - jre # The Java Runtime Environment for running Java apps. - ]; - }; -} diff --git a/modules/dev/lisp.nix b/modules/dev/lisp.nix deleted file mode 100755 index 773222cc..00000000 --- a/modules/dev/lisp.nix +++ /dev/null @@ -1,44 +0,0 @@ -# Lisp is great, easy to learn, and weird. -# I've been using it to study creating languages and the famous SICP book. -# FUN FACT: Lisp is a family of languages with those parenthesis representing the mouth lisp, demonstrating how genetics work. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.lisp; -in { - options.modules.dev.lisp = let - mkBoolDefault = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - clojure.enable = mkBoolDefault false; - guile.enable = mkBoolDefault false; - racket.enable = mkBoolDefault false; - }; - - config = { - my.packages = with pkgs; - (if cfg.clojure.enable then [ - clojure # Improved Java version. - leiningen # Install Clojure projects without pulling your hair. - ] else - [ ]) ++ - - (if cfg.guile.enable then - [ - guile # A general-purpose language for stuff, named after a certain pop culture icon from an iconic fighting game. - ] - else - [ ]) ++ - - (if cfg.racket.enable then - [ - racket # A DSL for DSLs. - ] - else - [ ]); - }; -} diff --git a/modules/dev/math.nix b/modules/dev/math.nix deleted file mode 100755 index 63af244c..00000000 --- a/modules/dev/math.nix +++ /dev/null @@ -1,33 +0,0 @@ -# Eh... I don't really do math but hey, I occasionally create visual aids sometimes. -{ config, options, lib, pkgs, ... }: - -with lib; - -let - cfg = config.modules.dev.math; -in { - options.modules.dev.math = let - mkEnableOption = mkOption { - type = types.bool; - default = false; - }; - in { - enable = mkEnableOption; - r.enable = mkEnableOption; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - gnuplot # I came for the plots. - #julia # A statistics-focused languaged named after a character in an iconic fighting game. - octaveFull # Matlab's hipster brother. - ] ++ - - (if cfg.r.enable then [ - R # Rated G for accessibility. - rstudio # It's not that kind of studio. - ] else - [ ]); - }; -} diff --git a/modules/dev/perl.nix b/modules/dev/perl.nix deleted file mode 100755 index 5c5d9de2..00000000 --- a/modules/dev/perl.nix +++ /dev/null @@ -1,31 +0,0 @@ -# The language for portable shell scripting. -{ config, options, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.dev.perl; - perlWithPackages = pkgs.perl.withPackages (p: - with pkgs.perlPackages; [ - ModuleBuild - ModuleInfo - ModuleInstall - ModernPerl - ]); -in { - options.modules.dev.perl = { - enable = mkOption { - type = types.bool; - default = false; - }; - - raku.enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = [ perlWithPackages ] - ++ (if cfg.raku.enable then [ pkgs.rakudo ] else [ ]); - }; -} diff --git a/modules/dev/python.nix b/modules/dev/python.nix deleted file mode 100755 index 187fd574..00000000 --- a/modules/dev/python.nix +++ /dev/null @@ -1,52 +0,0 @@ -# Another language for portable shell scripting. -# This installs Python 3 with my usual packages. -# For projects with other libraries (e.g., Django, Pytorch), you can just have a `default.nix` (and a `shell.nix` for more convenience). -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.python; -in { - options.modules.dev.python = let - mkBoolOption = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - enable = mkBoolOption false; - math.enable = mkBoolOption false; - pkg = mkOption { - type = types.package; - default = pkgs.python37; - }; - }; - - config = mkIf cfg.enable { - assertions = [{ - assertion = versionAtLeast cfg.pkg.version "3"; - message = "Python version should be only 3 and above."; - }]; - my.packages = with pkgs; [ - (cfg.pkg.withPackages (p: - with python3Packages; - [ - beautifulsoup4 # How soups are beautiful again? - requests # The requests for your often-asked questions. - pytools # It's the little things that counts. - pytest # Try to make a good grade or else. - poetry # It rhymes... - scrapy # Create an extractor from a box of scraps. - setuptools # Setup your stuff. - ] - - ++ (if cfg.math.enable then [ - numpy # Numbers are also good, right? - sympy # When will you notice that math is good? - ] else - [ ]))) - python3Packages.pip # Named after a certain animal that lives in a barnyard. - ]; - }; -} - diff --git a/modules/dev/rust.nix b/modules/dev/rust.nix deleted file mode 100755 index f8884caa..00000000 --- a/modules/dev/rust.nix +++ /dev/null @@ -1,25 +0,0 @@ -# Ah yes, Rust... -# The programming language that made me appreciate/tolerate C++ even more. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.rust; -in { - options.modules.dev.rust = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ rustup ]; - - my.env = { - CARGO_HOME = "$XDG_DATA_HOME/cargo"; - RUSTUP_HOME = "$XDG_DATA_HOME/rustup"; - PATH = [ "$CARGO_HOME/bin" ]; - }; - }; -} diff --git a/modules/dev/vcs.nix b/modules/dev/vcs.nix deleted file mode 100755 index 4dfed03d..00000000 --- a/modules/dev/vcs.nix +++ /dev/null @@ -1,18 +0,0 @@ -# All of the version control systems are here! -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.vcs; -in { - options.modules.dev.vcs = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ gitAndTools.gitFull mercurial subversion ]; - }; -} diff --git a/modules/dev/web.nix b/modules/dev/web.nix deleted file mode 100755 index 338e2b3c..00000000 --- a/modules/dev/web.nix +++ /dev/null @@ -1,51 +0,0 @@ -# Web development, the poster boy of hated programming subsets... -# I think it's pretty great, when it works. -# Otherwise, it is a disaster from the massive ecosystem among others. -# Since I use/experiment with the ecosystem so stuff like Node and Deno are combined into one module file. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.dev.web; -in { - options.modules.dev.web = let - mkBoolOption = bool: - mkOption { - type = types.bool; - default = bool; - }; - in { - enable = mkBoolOption false; - javascript = { - enable = mkBoolOption false; - deno.enable = mkBoolOption false; - node.enable = mkBoolOption false; - }; - php.enable = mkBoolOption false; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ caddy ] ++ (if cfg.javascript.deno.enable then - [ - deno # The Deltarune of Node. - ] - else - [ ]) ++ - - (if cfg.javascript.node.enable then - [ - nodejs # The JavaScript framework/runtime where you don't have to kill someone for bad code. :) - ] - else - [ ]) ++ - - (if cfg.php.enable then [ - php # Behold, the most hated language (at least in my experience). - phpPackages.composer # Composes PHP projects prematurely. - phpPackages.phpcs # Quality control tool. - phpPackages.php-cs-fixer # Fixes your incorrectly formatted dirt. - ] else - [ ]); - }; -} diff --git a/modules/editors.nix b/modules/editors.nix new file mode 100644 index 00000000..a2aeecfe --- /dev/null +++ b/modules/editors.nix @@ -0,0 +1,65 @@ +{ config, options, lib, pkgs, ... }: + +let + cfg = config.modules.editors; +in +{ + options.modules.editors = { + neovim.enable = lib.mkEnableOption "Enable Neovim and its components"; + emacs = { + enable = lib.mkEnableOption "Enable Emacs and all of its components"; + doom.enable = lib.mkEnableOption "Enable Doom Emacs-related dependencies."; + }; + vscode.enable = lib.mkEnableOption "Enable Visual Studio Code"; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.emacs.enable { + environment.systemPackages = with pkgs; [ + emacs + ] ++ (if cfg.emacs.doom.enable then [ + # The required depdencies. + git + ripgrep + gnutls + + # Optional dependencies. + fd + imagemagick + zstd + + # Module dependencies + # :checkers spell + aspell + aspellDicts.en + aspellDicts.en-computer + + # :tools lookup + wordnet + + # :lang org +roam2 + sqlite + ] else []); + }) + + (lib.mkIf cfg.neovim.enable { + programs.neovim = { + enable = true; + defaultEditor = true; + withNodeJs = true; + withRuby = true; + }; + + environment.systemPackages = with pkgs; [ + editorconfig-core-c + ]; + }) + + (lib.mkIf cfg.vscode.enable { + environment.systemPackages = with pkgs; [ + vscode + editorconfig-core-c + ]; + }) + ]; +} diff --git a/modules/editors/default.nix b/modules/editors/default.nix deleted file mode 100755 index b87ba36b..00000000 --- a/modules/editors/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -# All of my text editors (and IDEs) modules are to be put here. -# From Visual Studio Code, Emacs, Neovim, and whatnot. -# The entryway to all of your text editors and IDEs. -{ config, options, lib, pkgs, ... }: - -with lib; { - imports = [ ./emacs.nix ./neovim.nix ./vscode.nix ]; - - options.modules.editors = { - default = mkOption { - type = types.str; - default = "vim"; - }; - }; - - config = { my.env.EDITOR = config.modules.editors.default; }; -} diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix deleted file mode 100755 index 3ff63dc7..00000000 --- a/modules/editors/emacs.nix +++ /dev/null @@ -1,71 +0,0 @@ -# Ah yes, the bane of my endless configuration hell (or heaven, whichever your personal preferences). -# Or specifically, Org-mode... -# Doom Emacs saved me from being a configuration demon. -{ config, options, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.editors.emacs; - emacsOrgProtocolDesktopEntry = pkgs.makeDesktopItem { - name = "org-protocol"; - desktopName = "Org-Protocol"; - exec = "emacsclient %u"; - icon = "emacs-icon"; - type = "Application"; - mimeType = "x-scheme-handler/org-protocol"; - }; -in { - options.modules.editors.emacs = { - enable = mkOption { - type = types.bool; - default = false; - }; - - # Just make sure the unstable version of Emacs is available as a package by creating an overlay. - pkg = mkOption { - type = types.package; - default = pkgs.emacs; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - ((emacsPackagesNgGen cfg.pkg).emacsWithPackages (epkgs: [ epkgs.vterm ])) - - emacsOrgProtocolDesktopEntry - - # Doom dependencies - git - (ripgrep.override { withPCRE2 = true; }) - gnutls - - # Optional depedencies - fd # faster projectile - imagemagick # image-dired - (lib.mkIf (config.programs.gnupg.agent.enable) - pinentry_emacs) # gnupg-emacs - zstd # for undo-fu-sessions - - # Module dependencies - ## :checkers spell - aspell - aspellDicts.en - aspellDicts.en-computers - #aspellDicts.en-science - - ## :checkers grammar - languagetool - - ## :tools editorconfig - editorconfig-core-c - - ## :tools lookup - wordnet - - ## :tools lookup & :lang org+roam - sqlite - ]; - - fonts.fonts = with pkgs; [ emacs-all-the-icons-fonts ]; - }; -} diff --git a/modules/editors/neovim.nix b/modules/editors/neovim.nix deleted file mode 100755 index b23df92f..00000000 --- a/modules/editors/neovim.nix +++ /dev/null @@ -1,22 +0,0 @@ -# (Neo)Vim is love, (Neo)Vim is life. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.editors.neovim; -in { - options.modules.editors.neovim = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; - [ - neovim - editorconfig-core-c # Editorconfig is a MUST, you feel me?! - ]; - }; -} diff --git a/modules/editors/vscode.nix b/modules/editors/vscode.nix deleted file mode 100755 index f8f72f80..00000000 --- a/modules/editors/vscode.nix +++ /dev/null @@ -1,135 +0,0 @@ -# Visual Studio but for codes... -# The code is really stolen from the NixOS wiki at https://nixos.wiki/wiki/Vscode. -{ config, options, lib, pkgs, ... }: - -with lib; -let - extensions = (with pkgs.vscode-extensions; [ - bbenoist.Nix - ms-python.python - ms-azuretools.vscode-docker - ms-vscode-remote.remote-ssh - ]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - # Edit muh readable text documents that can convert into multiple formats. - { - name = "asciidoctor-vscode"; - publisher = "asciidoctor"; - version = "2.8.3"; - sha256 = "1jh28qqa0qcycmj3h69dxg49l6zka5yb1vsdqyzc9cqnf8m6ps2a"; - } - - # Make VS Code more practical with style! - { - name = "bracket-pair-colorizer-2"; - publisher = "CoenraadS"; - version = "0.2.0"; - sha256 = "0nppgfbmw0d089rka9cqs3sbd5260dhhiipmjfga3nar9vp87slh"; - } - - # Your favorite programming language for a game of barnyard darts. - { - name = "dart-code"; - publisher = "Dart-Code"; - version = "3.13.2"; - sha256 = "05pyqijwkqby4q9izkddkrhlfd0jhdc1xqdf6342l1r7p8bwyqyr"; - } - - { - name = "vscode-eslint"; - publisher = "dbaeumer"; - version = "2.1.8"; - sha256 = "18yw1c2yylwbvg5cfqfw8h1r2nk9vlixh0im2px8lr7lw0airl28"; - } - - # RULES RULE, INCONSISTENCY DROOLS! - { - name = "EditorConfig"; - publisher = "EditorConfig"; - version = "0.15.1"; - sha256 = "18r19dn1an81l2nw1h8iwh9x3sy71d4ab0s5fvng5y7dcg32zajd"; - } - - # Flutter like a butter, dart like a bee. - { - name = "flutter"; - publisher = "Dart-Code"; - version = "3.13.2"; - sha256 = "1jpb01a3fazwi89b2f59sm8sbzbfaawdxaais53dsay1wbg5hncz"; - } - - # Git those lens with a magnifying glass, son. - { - name = "gitlens"; - publisher = "eamodio"; - version = "10.2.2"; - sha256 = "00fp6pz9jqcr6j6zwr2wpvqazh1ssa48jnk1282gnj5k560vh8mb"; - } - - # Muh consistent theming. - { - name = "nord-visual-studio-code"; - publisher = "arcticicestudio"; - version = "0.14.0"; - sha256 = "0ni924bm62awk9p39cf297kximy6xldhjjjycswx4qg2w89b505x"; - } - - # Will that make me pretty? - { - name = "prettier-vscode"; - publisher = "esbenp"; - version = "5.5.0"; - sha256 = "0hw68s85w3aqaslzfcbsfskng8i0bvfnmbwk11ldrpdmafk693nc"; - } - - # Edit the remote daemon in you. - { - name = "remote-ssh-edit"; - publisher = "ms-vscode-remote"; - version = "0.47.2"; - sha256 = "1hp6gjh4xp2m1xlm1jsdzxw9d8frkiidhph6nvl24d0h8z34w49g"; - } - - # Muh consistent icons. - { - name = "material-icon-theme"; - publisher = "PKief"; - version = "4.2.0"; - sha256 = "1in8lj5gim3jdy33harib9z8qayp5jn8pz6j0zpicbzxx87g2hm1"; - } - - # Creating a Rust mini-IDE. - { - name = "rust"; - publisher = "rust-lang"; - version = "0.7.8"; - sha256 = "039ns854v1k4jb9xqknrjkj8lf62nfcpfn0716ancmjc4f0xlzb3"; - } - ]; -in { - options.modules.editors.vscode = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf config.modules.editors.vscode.enable { - my.home = { - programs.vscode = { - enable = true; - extensions = extensions; - userSettings = { - "diffEditor.codeLens" = true; - "editor.fontFamily" = - "'Iosevka', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'"; - "editor.fontLigatures" = true; - "eslint.alwaysShowStatus" = true; - "git.alwaysShowStagedChangesResourceGroup" = true; - "update.mode" = "none"; - "workbench.colorTheme" = "Nord"; - "workbench.iconTheme" = "material-icon-theme"; - }; - }; - }; - }; -} diff --git a/modules/hardware/audio.nix b/modules/hardware/audio.nix deleted file mode 100644 index 263f4e11..00000000 --- a/modules/hardware/audio.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; -let cfg = config.modules.hardware.audio; -in { - options.modules.hardware.audio = let - mkBoolDefault = bool: - mkOption { - type = types.bool; - default = false; - }; - in { - enable = mkBoolDefault false; - jack.enable = mkBoolDefault false; - }; - - config = mkIf cfg.enable { - # Enable JACK for the most serious audio applications. - # services.jack = { - # jackd.enable = true; - # alsa.enable = false; - # loopback = { enable = true; }; - # }; - - hardware.pulseaudio.package = - pkgs.pulseaudio.override { jackaudioSupport = true; }; - - # Required when enabling JACK daemon. - # USERADD: When the other users also want to take advantage of the audio systems. - my.user.extraGroups = [ "audio" "jackaudio" ]; - - # Add the sequencer and the MIDI kernel module. - boot.kernelModules = [ "snd-seq" "snd-rawmidi" ]; - }; -} diff --git a/modules/hardware/default.nix b/modules/hardware/default.nix deleted file mode 100755 index 505818e8..00000000 --- a/modules/hardware/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ config, lib, ... }: - -{ - imports = [ ./veikk.nix ./audio.nix ]; -} diff --git a/modules/hardware/veikk.nix b/modules/hardware/veikk.nix deleted file mode 100755 index d0a25a4f..00000000 --- a/modules/hardware/veikk.nix +++ /dev/null @@ -1,16 +0,0 @@ -# Installs the VEIKK Linux driver at https://github.com/jlam55555/veikk-linux-driver. -{ config, options, lib, pkgs, ... }: - -with lib; -let cfg = config.modules.hardware.veikk; -in { - options.modules.hardware.veikk = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = - mkIf cfg.enable { boot.extraModulePackages = [ pkgs.veikk-linux-driver ]; }; -} diff --git a/modules/services/default.nix b/modules/services/default.nix deleted file mode 100755 index e0fe6510..00000000 --- a/modules/services/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -# Seeing systemd as a great software is my guilty pleasure. -# Here's where services are declared. -{ config, options, lib, pkgs, ... }: - -{ - imports = [ ./recoll.nix ]; -} diff --git a/modules/services/recoll.nix b/modules/services/recoll.nix deleted file mode 100755 index bacd2c61..00000000 --- a/modules/services/recoll.nix +++ /dev/null @@ -1,61 +0,0 @@ -# When enabled, this will create a systemd service that creates a periodical Recoll index. -# For customization, you should write the config file at "$XDG_CONFIG_HOME/recoll". -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.services.recoll; -in { - options.modules.services.recoll = { - enable = mkOption { - type = types.bool; - default = false; - }; - - flags = mkOption { - type = types.str; - default = ""; - }; - }; - - config = mkIf cfg.enable { - my.home = { - systemd.user.services.recoll = { - Unit = { - Description = "Recoll periodic index update"; - Documentation = [ - "man:recollindex.1" - "https://www.lesbonscomptes.com/recoll/pages/documentation.html" - ]; - }; - - Service = { - Environment = [ ''RECOLL_CONFDIR="$XDG_DATA_HOME/recoll"'' ]; - ExecStart = "${ - (pkgs.recoll.override { withGui = false; }) - }/bin/recollindex ${cfg.flags}"; - }; - - Install = { WantedBy = [ "default.target" ]; }; - }; - - # Make the service run every 4 hours (and still activate if it misses the interval). - systemd.user.timers.recoll = { - Unit = { - Description = "Recoll periodic index update"; - Documentation = [ - "man:recollindex.1" - "https://www.lesbonscomptes.com/recoll/pages/documentation.html" - ]; - }; - - Timer = { - OnCalendar = "*-*-* 0/4:00:00"; - Persistent = true; - }; - - Install = { WantedBy = [ "default.target" ]; }; - }; - }; - }; -} diff --git a/modules/shell/archiving.nix b/modules/shell/archiving.nix deleted file mode 100644 index a32c7dd3..00000000 --- a/modules/shell/archiving.nix +++ /dev/null @@ -1,21 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.shell.archiving; -in { - options.modules.shell.archiving = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - aria2 # The sequel to aria(1). - fanficfare # youtube-dl for fanfics. Not that I read fanfics. - youtube-dl # A program that can be sued for false advertisement as you can download from other video sources. - ]; - }; -} diff --git a/modules/shell/base.nix b/modules/shell/base.nix deleted file mode 100755 index b480f930..00000000 --- a/modules/shell/base.nix +++ /dev/null @@ -1,57 +0,0 @@ -# Here are the base packages for my shell workflow. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.shell.base; -in { - options.modules.shell.base = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ - aspell # Hunt down a spelling bee champion to come to your shell. - bat # cat(1) with wings. - buku # A developer-oriented browser-independent bookmark manager. - exa # ls(1) after an exodus. - fd # find(1) after a cognitive behavioral therapy. - fzf # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception. - gopass # The improved version of Password Store which is a password manager for hipsters. - gotop # A sysadmin's best friend that just happens to be a dashboard. - graphviz # The biz central for graphical flowcharts. - hexyl # Binary viewer with a cool name on the command-line. - hledger # Do your accountancy thing ON THE COMMAND LINE, sure why not! - httpie # Want a piece of the humble pie to humbly HTTP requests? - jq # A command-line interface for parsing JSON. - lazygit # For the lazy gits who cannot get good at Git. - lazydocker # For the lazy gits who cannot get good at Docker. - maim # A command-line interface for parsing screenshots. - pup # A command-line interface for parsing HTML. - (ripgrep.override { withPCRE2 = true; }) # Super-fast full-text searcher. - (recoll.override { - withGui = false; - }) # Bring the search engine to the desktop! - shellcheck # Check your shell if it's broken. - sqlite # Battle-tested cute little database that can grow into an abomination of a data spaghetti. - tree # I'm not a scammer, I swear. - unzip # Unzip what? The world may never know. - youtube-dl # A program that can be sued for false advertisement as you can download from other video sources. - zoxide # Navigate the filesystem at the speed of sound. - ]; - - my.home = { - programs = { - bat = { - enable = true; - config = { theme = "base16"; }; - }; - - zoxide.enable = true; - }; - }; - }; -} diff --git a/modules/shell/default.nix b/modules/shell/default.nix deleted file mode 100755 index 477d65f6..00000000 --- a/modules/shell/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -# All of the command-line tools will be put here. -{ config, options, lib, pkgs, ... }: - -with lib; { - imports = [ ./archiving.nix ./base.nix ./lf.nix ./zsh.nix ]; -} diff --git a/modules/shell/lf.nix b/modules/shell/lf.nix deleted file mode 100755 index 119310f5..00000000 --- a/modules/shell/lf.nix +++ /dev/null @@ -1,23 +0,0 @@ -# A file manager for hipsters. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.shell.lf; -in { - options.modules.shell.lf = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - my.packages = with pkgs; [ lf ]; - - my.home.xdg.configFile."lf" = { - source = ../../config/lf; - recursive = true; - }; - }; -} diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix deleted file mode 100755 index 11101c53..00000000 --- a/modules/shell/zsh.nix +++ /dev/null @@ -1,41 +0,0 @@ -# The Zoomer shell is cool for them prompts. -{ config, options, lib, pkgs, ... }: - -with lib; - -let cfg = config.modules.shell.zsh; -in { - options.modules.shell.zsh = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - # Going to use the home-manager module for zsh since it is cool. - config = mkIf cfg.enable { - programs.zsh = { - enable = true; - enableCompletion = true; - autosuggestions.enable = true; - histFile = "$XDG_DATA_HOME/zsh/history"; - - interactiveShellInit = '' - # Use lf to switch directories and bind it to ctrl-o - lfcd () { - tmp="$(mktemp)" - lf -last-dir-path="$tmp" "$@" - if [ -f "$tmp" ]; then - dir="$(cat "$tmp")" - rm -f "$tmp" >/dev/null - [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" - fi - } - bindkey -s '^o' 'lfcd\n' - ''; - - ohMyZsh.plugins = [ "history-substring-search" ]; - syntaxHighlighting.enable = true; - }; - }; -} diff --git a/modules/themes/a-happy-gnome/README.adoc b/modules/themes/a-happy-gnome/README.adoc new file mode 100644 index 00000000..2191911a --- /dev/null +++ b/modules/themes/a-happy-gnome/README.adoc @@ -0,0 +1,8 @@ += A happy GNOME +:toc: + +Yes, it's a theme that configures GNOME. +I mostly want a usable GNOME environment out-of-the-box (with my modifications and whatnot). + +Among others, it has `chrome-gnome-shell` out of convenience provided you have a browser installed. +A couple of extensions such as ArcMenu and what not. diff --git a/modules/themes/a-happy-gnome/default.nix b/modules/themes/a-happy-gnome/default.nix new file mode 100644 index 00000000..a084db45 --- /dev/null +++ b/modules/themes/a-happy-gnome/default.nix @@ -0,0 +1,22 @@ +{ config, options, lib, pkgs, ... }: + +let + cfg = config.modules.themes.a-happy-gnome; +in +{ + options.modules.theme.a-happy-gnome.enable = lib.mkEnableOption "Enables my configuration of GNOME Shell."; + + config = lib.mkIf cfg.enable { + services.xserver.enable = true; + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + environment.systemPackages = with pkgs; [ + chrome-gnome-shell + + gnomeExtensions.arcmenu + gnomeExtensions.x11-gestures + gnomeExtensions.gsconnect + ]; + }; +} diff --git a/modules/themes/default.nix b/modules/themes/default.nix old mode 100755 new mode 100644 index cfa30f35..49ea8c84 --- a/modules/themes/default.nix +++ b/modules/themes/default.nix @@ -1,18 +1,16 @@ +# Themes are your graphical sessions. +# It also contains your aesthetics even specific workflow and whatnots. +# You can also show your desktop being modularized like this. { config, options, lib, pkgs, ... }: -with lib; - let cfg = config.modules.themes; - my = import ../../lib { - inherit pkgs; - lib = lib; - }; -in { +in +{ assertions = [{ - assertion = my.countAttrs (_: x: x.enable) cfg < 2; - message = "Can't have more than one theme enabled at a time"; + assertion = (lib.countAttrs (_: theme: theme.enable) cfg) < 2; + message = "Can't have more than one theme enabled at any given time."; }]; - imports = [ ./fair-and-square ]; + imports = lib.mapAttrsToList (n: v: import v) (lib.filterAttrs (n: v: n != "default") (lib.filesToAttr ./.)); } diff --git a/modules/themes/fair-and-square/README.adoc b/modules/themes/fair-and-square/README.adoc deleted file mode 100755 index 1d732afe..00000000 --- a/modules/themes/fair-and-square/README.adoc +++ /dev/null @@ -1,20 +0,0 @@ -= Fair and square - -A theme featuring fairly simple graphics with not much bells and whistles. -Thus, it focuses on snapiness and efficient use of keyboard shortcuts. -Intended to be used for potatoes (READ: cheap low-end computers) like mine. - -This theme is mainly composed of the following components that are already configured: - -- bspwm as the window manager -- polybar for the bars -- rofi for the application laucher and the generic interface -- dunst (and libnotify) for desktop notifications -- feh (for setting the background) with the wallpaper to be used at `./config/wallpaper`. -- Arc is the chosen GTK theme - -Here are the miscellaneous programs that are being used. -The theme provides no configuration so you have to make sure the configuration is in the already placed. - -- sxhkd (since you're using bspwm, anyways) - diff --git a/modules/themes/fair-and-square/config/alacritty/alacritty.yml b/modules/themes/fair-and-square/config/alacritty/alacritty.yml deleted file mode 100755 index ce30d5d2..00000000 --- a/modules/themes/fair-and-square/config/alacritty/alacritty.yml +++ /dev/null @@ -1,465 +0,0 @@ -# Configuration for Alacritty, the GPU enhanced terminal emulator. - -window: - # Window dimensions (changes require restart) - # - # Specified in number of columns/lines, not pixels. - # If both are `0`, this setting is ignored. - dimensions: - columns: 0 - lines: 0 - - # Window position (changes require restart) - # - # Specified in number of pixels. - # If the position is not set, the window manager will handle the placement. - #position: - # x: 0 - # y: 0 - - # Window padding (changes require restart) - # - # Blank space added around the window in pixels. This padding is scaled - # by DPI and the specified value is always added at both opposing sides. - padding: - x: 0 - y: 0 - - # Spread additional padding evenly around the terminal content. - dynamic_padding: false - - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - # Values for `decorations` (macOS only): - # - transparent: Title bar, transparent background and title bar buttons - # - buttonless: Title bar, transparent background, but no title bar buttons - decorations: full - - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - # Values for `startup_mode` (macOS only): - # - SimpleFullscreen - startup_mode: Windowed - - # Allow terminal applications to change Alacritty's window title. - dynamic_title: true - - -colors: - primary: - background: "#2b221f" - foreground: "#fefefe" - - normal: - black: "#2b221f" - red: "#d03e68" - green: "#afa644" - yellow: "#dbbc48" - blue: "#a15c40" - magenta: "#8b7ab9" - cyan: "#df937a" - white: "#e9d3ce" - - bright: - black: "#8d5c4c" - red: "#d03e68" - green: "#afa644" - yellow: "#dbbc48" - blue: "#a15c40" - magenta: "#8b7ab9" - cyan: "#df937a" - white: "#fefefe" - - -scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - history: 10000 - - # Number of lines the viewport will move for every line scrolled when - # scroll back is enabled (history > 0). - multiplier: 3 - - -# Font configuration (changes require restart) -font: - normal: - family: monospace - family: Iosevka Nerd Font - - # Point size - size: 13.0 - - # Offset is the extra space around each character. `offset.y` can be thought of - # as modifying the line spacing, and `offset.x` as modifying the letter spacing. - offset: - x: 0 - y: 0 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increasing `x` moves the glyph to the right, - # increasing `y` moves the glyph upwards. - glyph_offset: - x: 0 - y: 0 - - # Thin stroke font rendering (macOS only) - # - # Thin strokes are suitable for retina displays, but for non-retina screens - # it is recommended to set `use_thin_strokes` to `false` - # - # macOS >= 10.14.x: - # - # If the font quality on non-retina display looks bad then set - # `use_thin_strokes` to `true` and enable font smoothing by running the - # following command: - # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` - # - # This is a global setting and will require a log out or restart to take - # effect. - use_thin_strokes: true - -# If `true`, bold text is drawn using the bright color variants. -draw_bold_text_with_bright_colors: true - -# Visual Bell -# -# Any time the BEL code is received, Alacritty "rings" the visual bell. Once -# rung, the terminal background will be set to white and transition back to the -# default background color. You can control the rate of this transition by -# setting the `duration` property (represented in milliseconds). You can also -# configure the transition function by setting the `animation` property. -# -# Values for `animation`: -# - Ease -# - EaseOut -# - EaseOutSine -# - EaseOutQuad -# - EaseOutCubic -# - EaseOutQuart -# - EaseOutQuint -# - EaseOutExpo -# - EaseOutCirc -# - Linear -# -# Specifying a `duration` of `0` will disable the visual bell. -bell: - animation: EaseOutExpo - duration: 0 - color: '0xffffff' - -# Background opacity -# -# Window opacity as a floating point number from `0.0` to `1.0`. -# The value `0.0` is completely transparent and `1.0` is opaque. -background_opacity: 1 - -# Mouse bindings -# -# Available fields: -# - mouse -# - action -# - mods (optional) -# -# Values for `mouse`: -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# All available `mods` and `action` values are documented in the key binding -# section. -mouse_bindings: - - { mouse: Middle, action: PasteSelection } - -mouse: - # Click settings - # - # The `double_click` and `triple_click` settings control the time - # alacritty should wait for accepting multiple clicks as one double - # or triple click. - double_click: { threshold: 300 } - triple_click: { threshold: 300 } - - # If this is `true`, the cursor is temporarily hidden when typing. - hide_when_typing: false - - url: - modifiers: None - - - -selection: - semantic_escape_chars: ",│`|:\"' ()[]{}<>" - - # When set to `true`, selected text will be copied to the primary clipboard. - save_to_clipboard: false - - -cursor: - # Cursor style - # - # Values for `style`: - # - ▇ Block - # - _ Underline - # - | Beam - style: Block - - # If this is `true`, the cursor will be rendered as a hollow box when the - # window is not focused. - unfocused_hollow: true - - -# Live config reload (changes require restart) -live_config_reload: true - - -# Windows 10 ConPTY backend (Windows only) -# -# This will enable better color support and may resolve other issues, -# however this API and its implementation is still young and so is -# disabled by default, as stability may not be as good as the winpty -# backend. -# -# Alacritty will fall back to the WinPTY automatically if the ConPTY -# backend cannot be initialized. -enable_experimental_conpty_backend: false - - -# Send ESC (\x1b) before characters when alt is pressed. -alt_send_esc: true - - -debug: - # Display the time it takes to redraw each frame. - render_timer: false - - # Keep the log file after quitting Alacritty. - persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - None - # - Error - # - Warn - # - Info - # - Debug - # - Trace - log_level: Warn - - # Print all received window events. - print_events: false - - # Record all characters and escape sequences as test data. - ref_test: false - - -# Key bindings -# -# Key bindings are specified as a list of objects. Each binding will specify a -# key and modifiers required to trigger it, terminal modes where the binding is -# applicable, and what should be done when the key binding fires. It can either -# send a byte sequence to the running application (`chars`), execute a -# predefined action (`action`) or fork and execute a specified command plus -# arguments (`command`). -# -# Bindings are always filled by default, but will be replaced when a new binding -# with the same triggers is defined. To unset a default binding, it can be -# mapped to the `None` action. -# -# Example: -# `- { key: V, mods: Control|Shift, action: Paste }` -# -# Available fields: -# - key -# - mods (optional) -# - chars | action | command (exactly one required) -# - mode (optional) -# -# Values for `key`: -# - `A` -> `Z` -# - `F1` -> `F12` -# - `Key1` -> `Key0` -# -# A full list with available key codes can be found here: -# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants -# -# Instead of using the name of the keys, the `key` field also supports using -# the scancode of the desired key. Scancodes have to be specified as a -# decimal number. -# This command will allow you to display the hex scancodes for certain keys: -# `showkey --scancodes` -# -# Values for `mods`: -# - Command -# - Control -# - Option -# - Super -# - Shift -# - Alt -# -# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. -# Whitespace and capitalization is relevant and must match the example. -# -# Values for `chars`: -# The `chars` field writes the specified string to the terminal. This makes -# it possible to pass escape sequences. -# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run -# the command `showkey -a` outside of tmux. -# Note that applications use terminfo to map escape sequences back to -# keys. It is therefore required to update the terminfo when -# changing an escape sequence. -# -# Values for `action`: -# - Paste -# - PasteSelection -# - Copy -# - IncreaseFontSize -# - DecreaseFontSize -# - ResetFontSize -# - ScrollPageUp -# - ScrollPageDown -# - ScrollLineUp -# - ScrollLineDown -# - ScrollToTop -# - ScrollToBottom -# - ClearHistory -# - Hide -# - Quit -# - ClearLogNotice -# - SpawnNewInstance -# - ToggleFullscreen -# - None -# -# Values for `action` (macOS only): -# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space -# -# Values for `command`: -# The `command` field must be a map containing a `program` string and -# an `args` array of command line parameter strings. -# -# Example: -# `command: { program: "alacritty", args: ["-e", "vttest"] }` -# -# Values for `mode`: -# - ~AppCursor -# - AppCursor -# - ~AppKeypad -# - AppKeypad -key_bindings: - - { key: Paste, action: Paste } - - { key: Copy, action: Copy } - - { key: L, mods: Control, action: ClearLogNotice } - - { key: L, mods: Control, chars: "\x0c" } - - { key: Home, mods: Alt, chars: "\x1b[1;3H" } - - { key: Home, chars: "\x1bOH", mode: AppCursor } - - { key: Home, chars: "\x1b[H", mode: ~AppCursor } - - { key: End, mods: Alt, chars: "\x1b[1;3F" } - - { key: End, chars: "\x1bOF", mode: AppCursor } - - { key: End, chars: "\x1b[F", mode: ~AppCursor } - - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } - - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt } - - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } - - { key: PageUp, mods: Alt, chars: "\x1b[5;3~" } - - { key: PageUp, chars: "\x1b[5~" } - - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } - - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt } - - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } - - { key: PageDown, mods: Alt, chars: "\x1b[6;3~" } - - { key: PageDown, chars: "\x1b[6~" } - - { key: Tab, mods: Shift, chars: "\x1b[Z" } - - { key: Back, chars: "\x7f" } - - { key: Back, mods: Alt, chars: "\x1b\x7f" } - - { key: Insert, chars: "\x1b[2~" } - - { key: Delete, chars: "\x1b[3~" } - - { key: Left, mods: Shift, chars: "\x1b[1;2D" } - - { key: Left, mods: Control, chars: "\x1b[1;5D" } - - { key: Left, mods: Alt, chars: "\x1b[1;3D" } - - { key: Left, chars: "\x1b[D", mode: ~AppCursor } - - { key: Left, chars: "\x1bOD", mode: AppCursor } - - { key: Right, mods: Shift, chars: "\x1b[1;2C" } - - { key: Right, mods: Control, chars: "\x1b[1;5C" } - - { key: Right, mods: Alt, chars: "\x1b[1;3C" } - - { key: Right, chars: "\x1b[C", mode: ~AppCursor } - - { key: Right, chars: "\x1bOC", mode: AppCursor } - - { key: Up, mods: Shift, chars: "\x1b[1;2A" } - - { key: Up, mods: Control, chars: "\x1b[1;5A" } - - { key: Up, mods: Alt, chars: "\x1b[1;3A" } - - { key: Up, chars: "\x1b[A", mode: ~AppCursor } - - { key: Up, chars: "\x1bOA", mode: AppCursor } - - { key: Down, mods: Shift, chars: "\x1b[1;2B" } - - { key: Down, mods: Control, chars: "\x1b[1;5B" } - - { key: Down, mods: Alt, chars: "\x1b[1;3B" } - - { key: Down, chars: "\x1b[B", mode: ~AppCursor } - - { key: Down, chars: "\x1bOB", mode: AppCursor } - - { key: F1, chars: "\x1bOP" } - - { key: F2, chars: "\x1bOQ" } - - { key: F3, chars: "\x1bOR" } - - { key: F4, chars: "\x1bOS" } - - { key: F5, chars: "\x1b[15~" } - - { key: F6, chars: "\x1b[17~" } - - { key: F7, chars: "\x1b[18~" } - - { key: F8, chars: "\x1b[19~" } - - { key: F9, chars: "\x1b[20~" } - - { key: F10, chars: "\x1b[21~" } - - { key: F11, chars: "\x1b[23~" } - - { key: F12, chars: "\x1b[24~" } - - { key: F1, mods: Shift, chars: "\x1b[1;2P" } - - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } - - { key: F3, mods: Shift, chars: "\x1b[1;2R" } - - { key: F4, mods: Shift, chars: "\x1b[1;2S" } - - { key: F5, mods: Shift, chars: "\x1b[15;2~" } - - { key: F6, mods: Shift, chars: "\x1b[17;2~" } - - { key: F7, mods: Shift, chars: "\x1b[18;2~" } - - { key: F8, mods: Shift, chars: "\x1b[19;2~" } - - { key: F9, mods: Shift, chars: "\x1b[20;2~" } - - { key: F10, mods: Shift, chars: "\x1b[21;2~" } - - { key: F11, mods: Shift, chars: "\x1b[23;2~" } - - { key: F12, mods: Shift, chars: "\x1b[24;2~" } - - { key: F1, mods: Control, chars: "\x1b[1;5P" } - - { key: F2, mods: Control, chars: "\x1b[1;5Q" } - - { key: F3, mods: Control, chars: "\x1b[1;5R" } - - { key: F4, mods: Control, chars: "\x1b[1;5S" } - - { key: F5, mods: Control, chars: "\x1b[15;5~" } - - { key: F6, mods: Control, chars: "\x1b[17;5~" } - - { key: F7, mods: Control, chars: "\x1b[18;5~" } - - { key: F8, mods: Control, chars: "\x1b[19;5~" } - - { key: F9, mods: Control, chars: "\x1b[20;5~" } - - { key: F10, mods: Control, chars: "\x1b[21;5~" } - - { key: F11, mods: Control, chars: "\x1b[23;5~" } - - { key: F12, mods: Control, chars: "\x1b[24;5~" } - - { key: F1, mods: Alt, chars: "\x1b[1;6P" } - - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } - - { key: F3, mods: Alt, chars: "\x1b[1;6R" } - - { key: F4, mods: Alt, chars: "\x1b[1;6S" } - - { key: F5, mods: Alt, chars: "\x1b[15;6~" } - - { key: F6, mods: Alt, chars: "\x1b[17;6~" } - - { key: F7, mods: Alt, chars: "\x1b[18;6~" } - - { key: F8, mods: Alt, chars: "\x1b[19;6~" } - - { key: F9, mods: Alt, chars: "\x1b[20;6~" } - - { key: F10, mods: Alt, chars: "\x1b[21;6~" } - - { key: F11, mods: Alt, chars: "\x1b[23;6~" } - - { key: F12, mods: Alt, chars: "\x1b[24;6~" } - - { key: F1, mods: Super, chars: "\x1b[1;3P" } - - { key: F2, mods: Super, chars: "\x1b[1;3Q" } - - { key: F3, mods: Super, chars: "\x1b[1;3R" } - - { key: F4, mods: Super, chars: "\x1b[1;3S" } - - { key: F5, mods: Super, chars: "\x1b[15;3~" } - - { key: F6, mods: Super, chars: "\x1b[17;3~" } - - { key: F7, mods: Super, chars: "\x1b[18;3~" } - - { key: F8, mods: Super, chars: "\x1b[19;3~" } - - { key: F9, mods: Super, chars: "\x1b[20;3~" } - - { key: F10, mods: Super, chars: "\x1b[21;3~" } - - { key: F11, mods: Super, chars: "\x1b[23;3~" } - - { key: F12, mods: Super, chars: "\x1b[24;3~" } - - { key: NumpadEnter, chars: "\n" } diff --git a/modules/themes/fair-and-square/config/bspwm/bspwmrc b/modules/themes/fair-and-square/config/bspwm/bspwmrc deleted file mode 100755 index b2a6055e..00000000 --- a/modules/themes/fair-and-square/config/bspwm/bspwmrc +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -# Open all of the programs needed. -pkill polybar; polybar "fds-bar" & -pkill feh; feh --bg-fill $HOME/.background-image -pkill dunst; dunst & - -# Removing all rules at startup to prevent duplicating rules. -bspc rule -r "*" - -# Set up the desktops (workspaces) for the monitor -bspc monitor -d web text dev graphics 3d mail music vm - -bspc config border_width 2 -bspc config window_gap 5 - -bspc config split_ratio 0.50 -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config focused_border_color "#e9d3ce" -bspc config focus_follows_pointer true - -# Set the default cursor to pointer -xsetroot -cursor_name left_ptr - -# Rules -bspc rule -a code-oss desktop=^2 -bspc rule -a firefox desktop=^1 -bspc rule -a emacs state=tiled - diff --git a/modules/themes/fair-and-square/config/dunst/dunstrc b/modules/themes/fair-and-square/config/dunst/dunstrc deleted file mode 100755 index cbfd2554..00000000 --- a/modules/themes/fair-and-square/config/dunst/dunstrc +++ /dev/null @@ -1,429 +0,0 @@ -[global] - ### Display ### - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a window manager that exports the - # _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern window managers. - # - # If this option is set to mouse or keyboard, the monitor option - # will be ignored. - follow = mouse - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "350x50-10-10" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 10 - - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 - - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. - frame_width = 1 - - # Defines color of the frame around the notification window. - frame_color = "#eb8a65" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # A client can set the 'transient' hint to bypass this. See the rules - # section for how to disable this if necessary - idle_threshold = 120 - - - - ### Text ### - font = Iosevka Nerd Font 12 - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - format = "%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to make an ellipsis in long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Stack together notifications with the same content - stack_duplicates = true - - # Hide the count of stacked notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - - - ### Icons ### - # Align icons left/right/off - icon_position = left - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 32 - - - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - ### Misc/Advanced ### - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Dunst - - # Define the class of the windows spawned by dunst - class = Dunst - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Manage dunst's desire for talking - # Can be one of the following values: - # crit: Critical features. Dunst aborts - # warn: Only non-fatal warnings - # mesg: Important Messages - # info: all unimportant stuff - # debug: all less than unimportant stuff - verbosity = mesg - - # Define the corner radius of the notification window - # in pixel size. If the radius is 0, you have no rounded - # corners. - # The radius will be automatically lowered if it exceeds half of the - # notification height to avoid clipping text and/or icons. - corner_radius = 0 - - - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - - ### mouse - - # Defines action of mouse event - # Possible values are: - # * none: Don't do anything. - # * do_action: If the notification has exactly one action, or one is marked as default, - # invoke it. If there are multiple and no default, open the context menu. - # * close_current: Close current notification. - # * close_all: Close all notifications. - mouse_left_click = close_current - mouse_middle_click = do_action - mouse_right_click = close_all - - - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - per_monitor_dpi = false - - - -[shortcuts] - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - - - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#412c26" - foreground = "#e9d3ce" - timeout = 10 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon - - - -[urgency_normal] - background = "#2b221f" - foreground = "#fefefe" - timeout = 10 - # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon - - - -[urgency_critical] - background = "#2b221f" - foreground = "#d03e68" - frame_color = "#d03e68" - timeout = 0 - # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon - - - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# -# Messages can be matched by -# appname (discouraged, see desktop_entry) -# body -# category -# desktop_entry -# icon -# match_transient -# msg_urgency -# stack_tag -# summary -# -# and you can override the -# background -# foreground -# format -# frame_color -# fullscreen -# new_icon -# set_stack_tag -# set_transient -# timeout -# urgency -# -# Shell-like globbing will get expanded. -# -# Instead of the appname filter, it's recommended to use the desktop_entry filter. -# GLib based applications export their desktop-entry name. In comparison to the appname, -# the desktop-entry won't get localized. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -# Disable the transient hint so that idle_threshold cannot be bypassed from the -# client -#[transient_disable] -# match_transient = yes -# set_transient = no -# -# Make the handling of transient notifications more strict by making them not -# be placed in history. -#[transient_history_ignore] -# match_transient = yes -# history_ignore = yes - -# fullscreen values -# show: show the notifications, regardless if there is a fullscreen window opened -# delay: displays the new notification, if there is no fullscreen window active -# If the notification is already drawn, it won't get undrawn. -# pushback: same as delay, but when switching into fullscreen, the notification will get -# withdrawn from screen again and will get delayed like a new notification -#[fullscreen_delay_everything] -# fullscreen = delay -#[fullscreen_show_critical] -# msg_urgency = critical -# fullscreen = show - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[skip-display] -# # This notification will not be displayed, but will be included in the history -# summary = "foobar" -# skip_display = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -#[stack-volumes] -# appname = "some_volume_notifiers" -# set_stack_tag = "volume" -# - -# vim: ft=cfg diff --git a/modules/themes/fair-and-square/config/polybar/config b/modules/themes/fair-and-square/config/polybar/config deleted file mode 100755 index 10fb5c86..00000000 --- a/modules/themes/fair-and-square/config/polybar/config +++ /dev/null @@ -1,184 +0,0 @@ -; Main color format is in ARGB. -; However, formats in RGB is fine. -; This is where all of the colors should be placed for those who are lazy to scroll down (like me). -[colors] - background = "#2b221f" - background-light = "#412c26" - foreground = "#e9d3ce" - foreground-light = "#fefefe" - accent = "#df937a" - - -; The common style between bars. -[bar-common-style] - width = 100% - height = 32 - wm-restack = bspwm - fixed-center = false - - line-size = 3 - line-color = ${colors.accent} - - padding = 1 - - module-margin = 1 - module-padding = 1 - - font-0 = "Iosevka Nerd Font;2" - font-1 = "Iosevka;2" - - ; Our fallback fonts are mostly used as icon fonts. - ; For future references, the version of Font Awesome used here is at v5.13.0. - ; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/). - font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid;2" - - ; This creates the illusion as if the modules are in the center. - __border-size = 5 - border-top-size = ${self.__border-size} - border-top-color = ${colors.background} - border-bottom-size = ${self.__border-size} - border-bottom-color = ${colors.background} - - tray-position = right - tray-padding = 1 - cursor-click = pointer - - -; Common style between modules. -[module-common-style] - label-padding = 1 - - -; The main bar. -[bar/fds-bar] - background = ${colors.background} - foreground = ${colors.foreground} - - inherit = bar-common-style - enable-ipc = true - - modules-left = bspwm - modules-center = date - modules-right = pulseaudio eth memory root-fs home-fs - - -[module/root-fs] - type = internal/fs - mount-0 = / - format-mounted-prefix = "" - format-mounted-prefix-margin-right = 1 - format-unmounted-prefix = "" - format-unmounted-prefix-margin-right = 1 - label-mounted = %free% - label-unmounted = N/A - - -[module/home-fs] - type = internal/fs - mount-0 = /home - format-mounted-prefix = "" - format-mounted-prefix-margin-right = 1 - format-unmounted-prefix = "" - format-unmounted-prefix-margin-right = 1 - label-mounted = %free% - label-unmounted = N/A - - -[module/bspwm] - type = internal/bspwm - wrapping-scroll = false - pin-workspaces = true - label-focused = %index% - label-focused-background = ${colors.accent} - label-focused-foreground = ${colors.background} - label-focused-padding = 1 - - label-occupied = %index% - label-occupied-padding = 1 - - label-urgent = %index%! - label-urgent-foreground = ${colors.background} - label-urgent-background = ${colors.foreground-light} - label-urgent-padding = 1 - - label-empty = %index% - label-empty-foreground = ${colors.foreground} - label-empty-padding = 1 - - -[module/memory] - inherit = module-common-style - type = internal/memory - interval = 2 - format-prefix = "" - label = %gb_used% - - -[module/wlan] - inherit = module-common-style - type = internal/network - interface = wlp0s18f2u4 - interval = 3.0 - - format-connected = - format-connected-underline = ${colors.accent} - format-prefix = "NET" - label-connected = %essid% - - format-disconnected = - label-disconnected = disconnected - - -[module/eth] - type = internal/network - interface = enp4s0 - interval = 3 - - format-connected-prefix = "" - label-connected = "OK" - label-connected-padding = 1 - - format-disconnected-prefix = "" - label-disconnected-padding = 1 - label-disconnected = "N/A" - - -[module/date] - inherit = module-common-style - type = internal/date - interval = 5 - - ; We've formatted the time string to alter between the time and the date instead. - ; Although, I feel it's a hacky workaround, it still is functional as a date module. - date = "%A, %F" - date-alt = "%B %d, %Y (%F)" - time = %T - time-alt = - - format-prefix = "" - label = %date% %time% - - -[module/pulseaudio] - inherit = module-common-style - type = internal/pulseaudio - - format-volume-prefix = "" - format-volume = - label-volume = %percentage%% - label-volume-padding = 1 - - format-muted-prefix = "" - label-muted = muted - label-muted-padding = 1 - - -[settings] - screenchange-reload = true - - -[global/wm] - margin = 1 - padding = 1 - -; vim:ft=dosini diff --git a/modules/themes/fair-and-square/config/rofi/config.rasi b/modules/themes/fair-and-square/config/rofi/config.rasi deleted file mode 100755 index 56812031..00000000 --- a/modules/themes/fair-and-square/config/rofi/config.rasi +++ /dev/null @@ -1,9 +0,0 @@ -configuration { - display-drun: "Application"; - display-run: "Execute"; - display-window: "Window"; - display-ssh: "SSH"; - font: "Iosevka Nerd Font 12"; - show-icons: true; - theme: "themes/fds-mini-sidebar"; -} diff --git a/modules/themes/fair-and-square/config/rofi/themes/dmenu.rasi b/modules/themes/fair-and-square/config/rofi/themes/dmenu.rasi deleted file mode 100755 index 7587ab1c..00000000 --- a/modules/themes/fair-and-square/config/rofi/themes/dmenu.rasi +++ /dev/null @@ -1,66 +0,0 @@ -/** - * ROFI Color theme - * User: Qball - * Copyright: Dave Davenport - * Modified by: Gabriel Arazas (foo-dogsquared) - */ - -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #2b221f; - foreground: #e9d3ce; - color0: #2b221f; - color1: #412c26; - color2: #54352c; - color3: #8d5c4c; - color4: #e1bcb2; - color5: #e9d3ce; - color6: #fefefe; - color7: #eb8a65; - color8: #d03e68; - color9: #eb914a; - color10: #dbbc48; - color11: #afa644; - color12: #df937a; - color13: #a15c40; - color14: #8b7ab9; - color15: #6f3920; - - background-color: @background; - border-color: @foreground; - text-color: @foreground; - font: "Iosevka Nerd Font 12"; -} - -window { - anchor: north; - location: north; - width: 100%; - padding: 7px; - children: [ horibox ]; -} - -horibox { - orientation: horizontal; - children: [ prompt, entry, listview ]; -} - -listview { - layout: horizontal; - spacing: 5px; - lines: 100; -} - -entry { - expand: false; - width: 10em; -} - -element { - padding: 0px 2px; -} - -element.selected { - background-color: @color6; -} diff --git a/modules/themes/fair-and-square/config/rofi/themes/fds-center-menu.rasi b/modules/themes/fair-and-square/config/rofi/themes/fds-center-menu.rasi deleted file mode 100755 index 94579f0c..00000000 --- a/modules/themes/fair-and-square/config/rofi/themes/fds-center-menu.rasi +++ /dev/null @@ -1,93 +0,0 @@ -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #2b221f; - foreground: #e9d3ce; - color0: #2b221f; - color1: #412c26; - color2: #54352c; - color3: #8d5c4c; - color4: #e1bcb2; - color5: #e9d3ce; - color6: #fefefe; - color7: #eb8a65; - color8: #d03e68; - color9: #eb914a; - color10: #dbbc48; - color11: #afa644; - color12: #df937a; - color13: #a15c40; - color14: #8b7ab9; - color15: #6f3920; - - /* Theme settings */ - highlight: bold italic; - scrollbar: true; - - /* Style */ - text-color: @foreground; - background-color: @background; - font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14"; - font: "Iosevka Nerd Font 12"; -} - -window { - background-color: transparent; - - height: 65%; - width: 55%; - position: center; - location: center; - text-color: @foreground; -} - -mainbox { - background-color: @background; - border: 2; - border-color: @color6; - children: [ inputbar, listview, mode-switcher ]; -} - -inputbar, -listview { - background: @background; -} - -inputbar { - orientation: vertical; - children: [ prompt, entry ]; - background-color: @color0; -} - -entry, -prompt { - background-color: @color0; -} - -listview { - cyclic: true; -} - -element selected.normal { - background-color: @color6; - text-color: @background; -} - -scrollbar { - background-color: @color0; - handle-color: @color6; - handle-width: 10px; - height: 100%; -} - -button, -case-indicator, -inputbar, -element { - padding: 5; -} - -button.selected { - background-color: @color6; - text-color: @background; -} diff --git a/modules/themes/fair-and-square/config/rofi/themes/fds-mini-sidebar.rasi b/modules/themes/fair-and-square/config/rofi/themes/fds-mini-sidebar.rasi deleted file mode 100755 index b8f45a68..00000000 --- a/modules/themes/fair-and-square/config/rofi/themes/fds-mini-sidebar.rasi +++ /dev/null @@ -1,122 +0,0 @@ -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #2b221f; - foreground: #e9d3ce; - color0: #2b221f; - color1: #412c26; - color2: #54352c; - color3: #8d5c4c; - color4: #e1bcb2; - color5: #e9d3ce; - color6: #fefefe; - color7: #eb8a65; - color8: #d03e68; - color9: #eb914a; - color10: #dbbc48; - color11: #afa644; - color12: #df937a; - color13: #a15c40; - color14: #8b7ab9; - color15: #6f3920; - - /* General theme settings */ - highlight: bold italic; - scrollbar: true; - - /* Font settings */ - text-color: @foreground; - background-color: @background; - font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14"; - font: "Iosevka Nerd Font 12"; - -} - -window { - background-color: transparent; - - height: 65%; - width: 35%; - position: center; - location: center; - text-color: @foreground; -} - -mainbox { - background-color: @background; - border: 2; - border-color: @color6; - children: [ inputbar, listview, mode-switcher ]; - padding: 0.5em; -} - -inputbar, -listview { - background: @background; - margin: 0 0 0.5em 0; -} - -inputbar { - orientation: vertical; - children: [ prompt, entry ]; -} - -prompt { - text-style: underline; - width: 100%; -} - -entry { - background-color: @color1; - margin: 0 1em 0 0; -} - -element { - background-color: @color1; - padding: 5; -} - -element selected.normal { - background-color: @color6; - text-color: @background; -} - -scrollbar { - background-color: @color0; - border-radius: 30%; - handle-color: @color6; - handle-width: 15px; - height: 100%; - text-color: @background; - width: 10px; -} - -listview { - cyclic: true; - spacing: 0.6em; -} - -element, button { - border-radius: 30%; -} - -button, -case-indicator, -entry, -inputbar { - padding: 5; -} - -sidebar { - padding: 5; - margin: 5; -} - -button { - margin: 0.25em; -} - -button.selected { - background-color: @color6; - text-color: @background; -} diff --git a/modules/themes/fair-and-square/config/wallpaper b/modules/themes/fair-and-square/config/wallpaper deleted file mode 100755 index 7c9b9a2e..00000000 Binary files a/modules/themes/fair-and-square/config/wallpaper and /dev/null differ diff --git a/modules/themes/fair-and-square/default.nix b/modules/themes/fair-and-square/default.nix deleted file mode 100755 index 99c3ebdb..00000000 --- a/modules/themes/fair-and-square/default.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; { - options.modules.themes."fair-and-square" = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf config.modules.themes."fair-and-square".enable { - services = { - # Enable picom compositor. - picom = { - enable = true; - fade = false; - shadow = false; - }; - - # Enable certain Xorg-related services. - xserver = { - displayManager = { - lightdm.enable = true; - defaultSession = "none+bspwm"; - }; - enable = true; - libinput.enable = true; - windowManager.bspwm.enable = true; - }; - }; - - my.env.TERMINAL = "alacritty"; - - my.home = { - # Enable GTK configuration. - gtk.enable = true; - - # Set the wallpaper. - home.file.".background-image".source = ./config/wallpaper; - - # Enable QT configuration and set it to the same GTK config. - qt.enable = true; - qt.platformTheme = "gtk"; - - # Install all of the configurations in the XDG config home. - xdg.configFile = mkMerge [ - (let - recursiveXdgConfig = name: { - source = ./config + "/${name}"; - recursive = true; - }; - in { - "alacritty" = recursiveXdgConfig "alacritty"; - "bspwm" = recursiveXdgConfig "bspwm"; - "dunst" = recursiveXdgConfig "dunst"; - "polybar" = recursiveXdgConfig "polybar"; - "rofi" = recursiveXdgConfig "rofi"; - - "sxhkd" = { - source = ; - recursive = true; - }; - }) - - # Applying the theme for GTK. - ({ - "gtk-3.0/settings.ini".text = '' - [Settings] - gtk-theme-name=Arc - gtk-icon-theme-name=Arc - gtk-fallback-icon-theme=gnome - gtk-application-prefer-dark-theme=true - gtk-cursor-theme-name=Adwaita - gtk-xft-hinting=1 - gtk-xft-hintstyle=hintfull - gtk-xft-rgba=none - ''; - - "gtk-2.0/gtkrc".text = '' - gtk-theme-name="Arc" - gtk-icon-theme-name="Arc" - gtk-font-name="Sans 10" - gtk-cursor-theme-name="Adwaita" - ''; - }) - ]; - - # Set the cursor theme. - xdg.dataFile = { - "icons/default/index.theme".text = '' - [icon theme] - Inherits=Adwaita - ''; - }; - }; - - my.packages = with pkgs; [ - alacritty # Muh GPU-accelerated terminal emulator. - dunst # Add more annoying pop-ups on your screen! - feh # Meh, it's a image viewer that can set desktop background, what gives? - gnome3.adwaita-icon-theme - libnotify # Library for yer notifications. - (polybar.override { - pulseSupport = true; - nlSupport = true; - }) # Add some bars to your magnum opus. - rofi # A ricer's best friend (one of them at least). - - # The Arc theme - arc-icon-theme - arc-theme - ]; - - fonts.fonts = with pkgs; [ iosevka nerdfonts font-awesome-ttf ]; - }; -} diff --git a/packages/default.nix b/packages/default.nix deleted file mode 100755 index 7e8c90ec..00000000 --- a/packages/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -[ - (self: super: - with super; { - veikk-linux-driver = - (callPackage ./veikk-driver.nix { kernel = pkgs.linux_5_10; }); - nur.foo-dogsquared = import (fetchTarball - "https://github.com/foo-dogsquared/nur-packages/archive/master.tar.gz") { - inherit pkgs; - }; - }) -] diff --git a/packages/veikk-driver.nix b/packages/veikk-driver.nix deleted file mode 100755 index cb0490be..00000000 --- a/packages/veikk-driver.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ stdenv, fetchFromGitHub, kernel }: - -stdenv.mkDerivation rec { - name = "veikk-linux-driver"; - version = "2.0.0"; - - src = fetchFromGitHub { - owner = "jlam55555"; - repo = "veikk-linux-driver"; - rev = "v2.0"; - sha256 = "11mg74ds58jwvdmi3i7c4chxs6v9g09r9ll22pc2kbxjdnrp8zrn"; - }; - - nativeBuildInputs = kernel.moduleBuildDependencies; - - patchPhase = '' - sed -i Makefile -e 's/modprobe veikk/#modprobe veikk/' -e 's/depmod/#depmod/' - ''; - - INSTALL_MOD_PATH = "\${out}"; - - makeFlags = - [ "BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build" ]; - - meta = with stdenv.lib; { - description = - "Linux device driver for supported VEIKK tablets (e.g., S640, A50, A30)."; - homepage = "https://github.com/jlam55555/veikk-linux-driver"; - licenses = licenses.free; - maintainers = with maintainers; [ foo-dogsquared ]; - platforms = platforms.linux; - }; -} diff --git a/templates/themes/README.adoc b/templates/themes/README.adoc deleted file mode 100755 index 30c7b08e..00000000 --- a/templates/themes/README.adoc +++ /dev/null @@ -1,5 +0,0 @@ -= NixOS desktop themes - -These are some of my themes om NixOS as a module ala-link:https://github.com/hlissner/dotfiles[hlissner NixOS modules] as a https://github.com/cookiecutter/cookiecutter[Cookiecutter template]. -Most of them just need a Base16 color scheme in the appropriate config file and generate the module with the given color scheme as a result. - diff --git a/templates/themes/fair-and-square/README.adoc b/templates/themes/fair-and-square/README.adoc deleted file mode 100755 index 1d732afe..00000000 --- a/templates/themes/fair-and-square/README.adoc +++ /dev/null @@ -1,20 +0,0 @@ -= Fair and square - -A theme featuring fairly simple graphics with not much bells and whistles. -Thus, it focuses on snapiness and efficient use of keyboard shortcuts. -Intended to be used for potatoes (READ: cheap low-end computers) like mine. - -This theme is mainly composed of the following components that are already configured: - -- bspwm as the window manager -- polybar for the bars -- rofi for the application laucher and the generic interface -- dunst (and libnotify) for desktop notifications -- feh (for setting the background) with the wallpaper to be used at `./config/wallpaper`. -- Arc is the chosen GTK theme - -Here are the miscellaneous programs that are being used. -The theme provides no configuration so you have to make sure the configuration is in the already placed. - -- sxhkd (since you're using bspwm, anyways) - diff --git a/templates/themes/fair-and-square/cookiecutter.json b/templates/themes/fair-and-square/cookiecutter.json deleted file mode 100755 index b41f9327..00000000 --- a/templates/themes/fair-and-square/cookiecutter.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "Fair and square", - "slug": "{{ cookiecutter.name | slugify }}", - "version": "0.1.0", - "base00": "3B4252", - "base01": "BF616A", - "base02": "A3BE8C", - "base03": "EBCB8B", - "base04": "81A1C1", - "base05": "B48EAD", - "base06": "88C0D0", - "base07": "E5E9F0", - "base08": "727B8A", - "base09": "BF616A", - "base0A": "A3BE8C", - "base0B": "EBCB8B", - "base0C": "81A1C1", - "base0D": "B48EAD", - "base0E": "8FBCBB", - "base0F": "ECEFF4", - "font": { - "mono": { - "name": "Iosevka Nerd Font", - "baseSize": 12 - }, - "sansSerif": { - "name": "Source Sans Pro", - "baseSize": 14 - }, - "serif": { - "name": "Source Serif Pro", - "baseSize": 14 - } - } -} diff --git a/templates/themes/fair-and-square/default.nix b/templates/themes/fair-and-square/default.nix deleted file mode 100755 index 8925d949..00000000 --- a/templates/themes/fair-and-square/default.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; { - options.modules.themes."fair-and-square" = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf config.modules.themes."fair-and-square".enable { - services = { - # Enable picom compositor. - picom = { - enable = true; - fade = false; - shadow = false; - }; - - # Enable certain Xorg-related services. - xserver = { - displayManager = { - lightdm.enable = true; - defaultSession = "none+bspwm"; - }; - enable = true; - libinput.enable = true; - windowManager.bspwm.enable = true; - }; - }; - - my.env.TERMINAL = "alacritty"; - - my.home = { - # Enable GTK configuration. - gtk.enable = true; - - # Set the wallpaper. - home.file.".background-image".source = ./config/wallpaper; - - # Enable QT configuration and set it to the same GTK config. - qt.enable = true; - qt.platformTheme = "gtk"; - - # Install all of the configurations in the XDG config home. - xdg.configFile = mkMerge [ - (let - recursiveXdgConfig = name: { - source = ./config + "/${name}"; - recursive = true; - }; - in { - "alacritty" = recursiveXdgConfig "alacritty"; - "bspwm" = recursiveXdgConfig "bspwm"; - "dunst" = recursiveXdgConfig "dunst"; - "polybar" = recursiveXdgConfig "polybar"; - "rofi" = recursiveXdgConfig "rofi"; - - "sxhkd" = { - source = ; - recursive = true; - }; - }) - - # Applying the theme for GTK. - ({ - "gtk-3.0/settings.ini".text = '' - [Settings] - gtk-theme-name=Arc - gtk-icon-theme-name=Arc - gtk-fallback-icon-theme=gnome - gtk-application-prefer-dark-theme=true - gtk-cursor-theme-name=Adwaita - gtk-xft-hinting=1 - gtk-xft-hintstyle=hintfull - gtk-xft-rgba=none - ''; - - "gtk-2.0/gtkrc".text = '' - gtk-theme-name="Arc" - gtk-icon-theme-name="Arc" - gtk-font-name="Sans 10" - gtk-cursor-theme-name="Adwaita" - ''; - }) - ]; - - # Set the cursor theme. - xdg.dataFile = { - "icons/default/index.theme".text = '' - [icon theme] - Inherits=Adwaita - ''; - }; - }; - - my.packages = with pkgs; [ - alacritty # Muh GPU-accelerated terminal emulator. - dunst # Add more annoying pop-ups on your screen! - feh # Meh, it's a image viewer that can set desktop background, what gives? - gnome3.adwaita-icon-theme - libnotify # Library for yer notifications. - (polybar.override { - pulseSupport = true; - nlSupport = true; - }) # Add some bars to your magnum opus. - rofi # A ricer's best friend (one of them at least). - - # The Arc theme - arc-icon-theme - arc-theme - ]; - - fonts.fonts = with pkgs; [ nerdfonts iosevka font-awesome-ttf ]; - }; -} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/README.adoc b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/README.adoc deleted file mode 100755 index 9a8dc2df..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/README.adoc +++ /dev/null @@ -1,20 +0,0 @@ -= {{ cookiecutter.name }} - -A theme featuring fairly simple graphics with not much bells and whistles. -Thus, it focuses on snapiness and efficient use of keyboard shortcuts. -Intended to be used for potatoes (READ: cheap low-end computers) like mine. - -This theme is mainly composed of the following components that are already configured: - -- bspwm as the window manager -- polybar for the bars -- rofi for the application laucher and the generic interface -- dunst (and libnotify) for desktop notifications -- feh (for setting the background) with the wallpaper to be used at `./config/wallpaper`. -- Arc is the chosen GTK theme - -Here are the miscellaneous programs that are being used. -The theme provides no configuration so you have to make sure the configuration is in the already placed. - -- sxhkd (since you're using bspwm, anyways) - diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml deleted file mode 100755 index 3b30cb7f..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/alacritty/alacritty.yml +++ /dev/null @@ -1,465 +0,0 @@ -# Configuration for Alacritty, the GPU enhanced terminal emulator. - -window: - # Window dimensions (changes require restart) - # - # Specified in number of columns/lines, not pixels. - # If both are `0`, this setting is ignored. - dimensions: - columns: 0 - lines: 0 - - # Window position (changes require restart) - # - # Specified in number of pixels. - # If the position is not set, the window manager will handle the placement. - #position: - # x: 0 - # y: 0 - - # Window padding (changes require restart) - # - # Blank space added around the window in pixels. This padding is scaled - # by DPI and the specified value is always added at both opposing sides. - padding: - x: 0 - y: 0 - - # Spread additional padding evenly around the terminal content. - dynamic_padding: false - - # Window decorations - # - # Values for `decorations`: - # - full: Borders and title bar - # - none: Neither borders nor title bar - # - # Values for `decorations` (macOS only): - # - transparent: Title bar, transparent background and title bar buttons - # - buttonless: Title bar, transparent background, but no title bar buttons - decorations: full - - # Startup Mode (changes require restart) - # - # Values for `startup_mode`: - # - Windowed - # - Maximized - # - Fullscreen - # - # Values for `startup_mode` (macOS only): - # - SimpleFullscreen - startup_mode: Windowed - - # Allow terminal applications to change Alacritty's window title. - dynamic_title: true - - -colors: - primary: - background: "#{{ cookiecutter.base00 }}" - foreground: "#{{ cookiecutter.base06 }}" - - normal: - black: "#{{ cookiecutter.base00 }}" - red: "#{{ cookiecutter.base08 }}" - green: "#{{ cookiecutter.base0B }}" - yellow: "#{{ cookiecutter.base0A }}" - blue: "#{{ cookiecutter.base0D }}" - magenta: "#{{ cookiecutter.base0E }}" - cyan: "#{{ cookiecutter.base0C }}" - white: "#{{ cookiecutter.base05 }}" - - bright: - black: "#{{ cookiecutter.base03 }}" - red: "#{{ cookiecutter.base08 }}" - green: "#{{ cookiecutter.base0B }}" - yellow: "#{{ cookiecutter.base0A }}" - blue: "#{{ cookiecutter.base0D }}" - magenta: "#{{ cookiecutter.base0E }}" - cyan: "#{{ cookiecutter.base0C }}" - white: "#{{ cookiecutter.base06 }}" - - -scrolling: - # Maximum number of lines in the scrollback buffer. - # Specifying '0' will disable scrolling. - history: 10000 - - # Number of lines the viewport will move for every line scrolled when - # scroll back is enabled (history > 0). - multiplier: 3 - - -# Font configuration (changes require restart) -font: - normal: - family: monospace - family: {{ cookiecutter.font.mono.name }} - - # Point size - size: 13.0 - - # Offset is the extra space around each character. `offset.y` can be thought of - # as modifying the line spacing, and `offset.x` as modifying the letter spacing. - offset: - x: 0 - y: 0 - - # Glyph offset determines the locations of the glyphs within their cells with - # the default being at the bottom. Increasing `x` moves the glyph to the right, - # increasing `y` moves the glyph upwards. - glyph_offset: - x: 0 - y: 0 - - # Thin stroke font rendering (macOS only) - # - # Thin strokes are suitable for retina displays, but for non-retina screens - # it is recommended to set `use_thin_strokes` to `false` - # - # macOS >= 10.14.x: - # - # If the font quality on non-retina display looks bad then set - # `use_thin_strokes` to `true` and enable font smoothing by running the - # following command: - # `defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO` - # - # This is a global setting and will require a log out or restart to take - # effect. - use_thin_strokes: true - -# If `true`, bold text is drawn using the bright color variants. -draw_bold_text_with_bright_colors: true - -# Visual Bell -# -# Any time the BEL code is received, Alacritty "rings" the visual bell. Once -# rung, the terminal background will be set to white and transition back to the -# default background color. You can control the rate of this transition by -# setting the `duration` property (represented in milliseconds). You can also -# configure the transition function by setting the `animation` property. -# -# Values for `animation`: -# - Ease -# - EaseOut -# - EaseOutSine -# - EaseOutQuad -# - EaseOutCubic -# - EaseOutQuart -# - EaseOutQuint -# - EaseOutExpo -# - EaseOutCirc -# - Linear -# -# Specifying a `duration` of `0` will disable the visual bell. -bell: - animation: EaseOutExpo - duration: 0 - color: '0xffffff' - -# Background opacity -# -# Window opacity as a floating point number from `0.0` to `1.0`. -# The value `0.0` is completely transparent and `1.0` is opaque. -background_opacity: 1 - -# Mouse bindings -# -# Available fields: -# - mouse -# - action -# - mods (optional) -# -# Values for `mouse`: -# - Middle -# - Left -# - Right -# - Numeric identifier such as `5` -# -# All available `mods` and `action` values are documented in the key binding -# section. -mouse_bindings: - - { mouse: Middle, action: PasteSelection } - -mouse: - # Click settings - # - # The `double_click` and `triple_click` settings control the time - # alacritty should wait for accepting multiple clicks as one double - # or triple click. - double_click: { threshold: 300 } - triple_click: { threshold: 300 } - - # If this is `true`, the cursor is temporarily hidden when typing. - hide_when_typing: false - - url: - modifiers: None - - - -selection: - semantic_escape_chars: ",│`|:\"' ()[]{}<>" - - # When set to `true`, selected text will be copied to the primary clipboard. - save_to_clipboard: false - - -cursor: - # Cursor style - # - # Values for `style`: - # - ▇ Block - # - _ Underline - # - | Beam - style: Block - - # If this is `true`, the cursor will be rendered as a hollow box when the - # window is not focused. - unfocused_hollow: true - - -# Live config reload (changes require restart) -live_config_reload: true - - -# Windows 10 ConPTY backend (Windows only) -# -# This will enable better color support and may resolve other issues, -# however this API and its implementation is still young and so is -# disabled by default, as stability may not be as good as the winpty -# backend. -# -# Alacritty will fall back to the WinPTY automatically if the ConPTY -# backend cannot be initialized. -enable_experimental_conpty_backend: false - - -# Send ESC (\x1b) before characters when alt is pressed. -alt_send_esc: true - - -debug: - # Display the time it takes to redraw each frame. - render_timer: false - - # Keep the log file after quitting Alacritty. - persistent_logging: false - - # Log level - # - # Values for `log_level`: - # - None - # - Error - # - Warn - # - Info - # - Debug - # - Trace - log_level: Warn - - # Print all received window events. - print_events: false - - # Record all characters and escape sequences as test data. - ref_test: false - - -# Key bindings -# -# Key bindings are specified as a list of objects. Each binding will specify a -# key and modifiers required to trigger it, terminal modes where the binding is -# applicable, and what should be done when the key binding fires. It can either -# send a byte sequence to the running application (`chars`), execute a -# predefined action (`action`) or fork and execute a specified command plus -# arguments (`command`). -# -# Bindings are always filled by default, but will be replaced when a new binding -# with the same triggers is defined. To unset a default binding, it can be -# mapped to the `None` action. -# -# Example: -# `- { key: V, mods: Control|Shift, action: Paste }` -# -# Available fields: -# - key -# - mods (optional) -# - chars | action | command (exactly one required) -# - mode (optional) -# -# Values for `key`: -# - `A` -> `Z` -# - `F1` -> `F12` -# - `Key1` -> `Key0` -# -# A full list with available key codes can be found here: -# https://docs.rs/glutin/*/glutin/enum.VirtualKeyCode.html#variants -# -# Instead of using the name of the keys, the `key` field also supports using -# the scancode of the desired key. Scancodes have to be specified as a -# decimal number. -# This command will allow you to display the hex scancodes for certain keys: -# `showkey --scancodes` -# -# Values for `mods`: -# - Command -# - Control -# - Option -# - Super -# - Shift -# - Alt -# -# Multiple `mods` can be combined using `|` like this: `mods: Control|Shift`. -# Whitespace and capitalization is relevant and must match the example. -# -# Values for `chars`: -# The `chars` field writes the specified string to the terminal. This makes -# it possible to pass escape sequences. -# To find escape codes for bindings like `PageUp` ("\x1b[5~"), you can run -# the command `showkey -a` outside of tmux. -# Note that applications use terminfo to map escape sequences back to -# keys. It is therefore required to update the terminfo when -# changing an escape sequence. -# -# Values for `action`: -# - Paste -# - PasteSelection -# - Copy -# - IncreaseFontSize -# - DecreaseFontSize -# - ResetFontSize -# - ScrollPageUp -# - ScrollPageDown -# - ScrollLineUp -# - ScrollLineDown -# - ScrollToTop -# - ScrollToBottom -# - ClearHistory -# - Hide -# - Quit -# - ClearLogNotice -# - SpawnNewInstance -# - ToggleFullscreen -# - None -# -# Values for `action` (macOS only): -# - ToggleSimpleFullscreen: Enters fullscreen without occupying another space -# -# Values for `command`: -# The `command` field must be a map containing a `program` string and -# an `args` array of command line parameter strings. -# -# Example: -# `command: { program: "alacritty", args: ["-e", "vttest"] }` -# -# Values for `mode`: -# - ~AppCursor -# - AppCursor -# - ~AppKeypad -# - AppKeypad -key_bindings: - - { key: Paste, action: Paste } - - { key: Copy, action: Copy } - - { key: L, mods: Control, action: ClearLogNotice } - - { key: L, mods: Control, chars: "\x0c" } - - { key: Home, mods: Alt, chars: "\x1b[1;3H" } - - { key: Home, chars: "\x1bOH", mode: AppCursor } - - { key: Home, chars: "\x1b[H", mode: ~AppCursor } - - { key: End, mods: Alt, chars: "\x1b[1;3F" } - - { key: End, chars: "\x1bOF", mode: AppCursor } - - { key: End, chars: "\x1b[F", mode: ~AppCursor } - - { key: PageUp, mods: Shift, action: ScrollPageUp, mode: ~Alt } - - { key: PageUp, mods: Shift, chars: "\x1b[5;2~", mode: Alt } - - { key: PageUp, mods: Control, chars: "\x1b[5;5~" } - - { key: PageUp, mods: Alt, chars: "\x1b[5;3~" } - - { key: PageUp, chars: "\x1b[5~" } - - { key: PageDown, mods: Shift, action: ScrollPageDown, mode: ~Alt } - - { key: PageDown, mods: Shift, chars: "\x1b[6;2~", mode: Alt } - - { key: PageDown, mods: Control, chars: "\x1b[6;5~" } - - { key: PageDown, mods: Alt, chars: "\x1b[6;3~" } - - { key: PageDown, chars: "\x1b[6~" } - - { key: Tab, mods: Shift, chars: "\x1b[Z" } - - { key: Back, chars: "\x7f" } - - { key: Back, mods: Alt, chars: "\x1b\x7f" } - - { key: Insert, chars: "\x1b[2~" } - - { key: Delete, chars: "\x1b[3~" } - - { key: Left, mods: Shift, chars: "\x1b[1;2D" } - - { key: Left, mods: Control, chars: "\x1b[1;5D" } - - { key: Left, mods: Alt, chars: "\x1b[1;3D" } - - { key: Left, chars: "\x1b[D", mode: ~AppCursor } - - { key: Left, chars: "\x1bOD", mode: AppCursor } - - { key: Right, mods: Shift, chars: "\x1b[1;2C" } - - { key: Right, mods: Control, chars: "\x1b[1;5C" } - - { key: Right, mods: Alt, chars: "\x1b[1;3C" } - - { key: Right, chars: "\x1b[C", mode: ~AppCursor } - - { key: Right, chars: "\x1bOC", mode: AppCursor } - - { key: Up, mods: Shift, chars: "\x1b[1;2A" } - - { key: Up, mods: Control, chars: "\x1b[1;5A" } - - { key: Up, mods: Alt, chars: "\x1b[1;3A" } - - { key: Up, chars: "\x1b[A", mode: ~AppCursor } - - { key: Up, chars: "\x1bOA", mode: AppCursor } - - { key: Down, mods: Shift, chars: "\x1b[1;2B" } - - { key: Down, mods: Control, chars: "\x1b[1;5B" } - - { key: Down, mods: Alt, chars: "\x1b[1;3B" } - - { key: Down, chars: "\x1b[B", mode: ~AppCursor } - - { key: Down, chars: "\x1bOB", mode: AppCursor } - - { key: F1, chars: "\x1bOP" } - - { key: F2, chars: "\x1bOQ" } - - { key: F3, chars: "\x1bOR" } - - { key: F4, chars: "\x1bOS" } - - { key: F5, chars: "\x1b[15~" } - - { key: F6, chars: "\x1b[17~" } - - { key: F7, chars: "\x1b[18~" } - - { key: F8, chars: "\x1b[19~" } - - { key: F9, chars: "\x1b[20~" } - - { key: F10, chars: "\x1b[21~" } - - { key: F11, chars: "\x1b[23~" } - - { key: F12, chars: "\x1b[24~" } - - { key: F1, mods: Shift, chars: "\x1b[1;2P" } - - { key: F2, mods: Shift, chars: "\x1b[1;2Q" } - - { key: F3, mods: Shift, chars: "\x1b[1;2R" } - - { key: F4, mods: Shift, chars: "\x1b[1;2S" } - - { key: F5, mods: Shift, chars: "\x1b[15;2~" } - - { key: F6, mods: Shift, chars: "\x1b[17;2~" } - - { key: F7, mods: Shift, chars: "\x1b[18;2~" } - - { key: F8, mods: Shift, chars: "\x1b[19;2~" } - - { key: F9, mods: Shift, chars: "\x1b[20;2~" } - - { key: F10, mods: Shift, chars: "\x1b[21;2~" } - - { key: F11, mods: Shift, chars: "\x1b[23;2~" } - - { key: F12, mods: Shift, chars: "\x1b[24;2~" } - - { key: F1, mods: Control, chars: "\x1b[1;5P" } - - { key: F2, mods: Control, chars: "\x1b[1;5Q" } - - { key: F3, mods: Control, chars: "\x1b[1;5R" } - - { key: F4, mods: Control, chars: "\x1b[1;5S" } - - { key: F5, mods: Control, chars: "\x1b[15;5~" } - - { key: F6, mods: Control, chars: "\x1b[17;5~" } - - { key: F7, mods: Control, chars: "\x1b[18;5~" } - - { key: F8, mods: Control, chars: "\x1b[19;5~" } - - { key: F9, mods: Control, chars: "\x1b[20;5~" } - - { key: F10, mods: Control, chars: "\x1b[21;5~" } - - { key: F11, mods: Control, chars: "\x1b[23;5~" } - - { key: F12, mods: Control, chars: "\x1b[24;5~" } - - { key: F1, mods: Alt, chars: "\x1b[1;6P" } - - { key: F2, mods: Alt, chars: "\x1b[1;6Q" } - - { key: F3, mods: Alt, chars: "\x1b[1;6R" } - - { key: F4, mods: Alt, chars: "\x1b[1;6S" } - - { key: F5, mods: Alt, chars: "\x1b[15;6~" } - - { key: F6, mods: Alt, chars: "\x1b[17;6~" } - - { key: F7, mods: Alt, chars: "\x1b[18;6~" } - - { key: F8, mods: Alt, chars: "\x1b[19;6~" } - - { key: F9, mods: Alt, chars: "\x1b[20;6~" } - - { key: F10, mods: Alt, chars: "\x1b[21;6~" } - - { key: F11, mods: Alt, chars: "\x1b[23;6~" } - - { key: F12, mods: Alt, chars: "\x1b[24;6~" } - - { key: F1, mods: Super, chars: "\x1b[1;3P" } - - { key: F2, mods: Super, chars: "\x1b[1;3Q" } - - { key: F3, mods: Super, chars: "\x1b[1;3R" } - - { key: F4, mods: Super, chars: "\x1b[1;3S" } - - { key: F5, mods: Super, chars: "\x1b[15;3~" } - - { key: F6, mods: Super, chars: "\x1b[17;3~" } - - { key: F7, mods: Super, chars: "\x1b[18;3~" } - - { key: F8, mods: Super, chars: "\x1b[19;3~" } - - { key: F9, mods: Super, chars: "\x1b[20;3~" } - - { key: F10, mods: Super, chars: "\x1b[21;3~" } - - { key: F11, mods: Super, chars: "\x1b[23;3~" } - - { key: F12, mods: Super, chars: "\x1b[24;3~" } - - { key: NumpadEnter, chars: "\n" } diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc deleted file mode 100755 index faaab419..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/bspwm/bspwmrc +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env sh - -# Open all of the programs needed. -pkill polybar; polybar "fds-bar" & -pkill feh; feh --bg-fill $HOME/.background-image -pkill dunst; dunst & - -# Removing all rules at startup to prevent duplicating rules. -bspc rule -r "*" - -# Set up the desktops (workspaces) for the monitor -bspc monitor -d web text dev graphics 3d mail music vm - -bspc config border_width 2 -bspc config window_gap 5 - -bspc config split_ratio 0.50 -bspc config borderless_monocle true -bspc config gapless_monocle true -bspc config focused_border_color "#{{ cookiecutter.base05 }}" -bspc config focus_follows_pointer true - -# Set the default cursor to pointer -xsetroot -cursor_name left_ptr - -# Rules -bspc rule -a code-oss desktop=^2 -bspc rule -a firefox desktop=^1 -bspc rule -a emacs state=tiled - diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc deleted file mode 100755 index cc73aa60..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/dunst/dunstrc +++ /dev/null @@ -1,429 +0,0 @@ -[global] - ### Display ### - - # Which monitor should the notifications be displayed on. - monitor = 0 - - # Display notification on focused monitor. Possible modes are: - # mouse: follow mouse pointer - # keyboard: follow window with keyboard focus - # none: don't follow anything - # - # "keyboard" needs a window manager that exports the - # _NET_ACTIVE_WINDOW property. - # This should be the case for almost all modern window managers. - # - # If this option is set to mouse or keyboard, the monitor option - # will be ignored. - follow = mouse - - # The geometry of the window: - # [{width}]x{height}[+/-{x}+/-{y}] - # The geometry of the message window. - # The height is measured in number of notifications everything else - # in pixels. If the width is omitted but the height is given - # ("-geometry x2"), the message window expands over the whole screen - # (dmenu-like). If width is 0, the window expands to the longest - # message displayed. A positive x is measured from the left, a - # negative from the right side of the screen. Y is measured from - # the top and down respectively. - # The width can be negative. In this case the actual width is the - # screen width minus the width defined in within the geometry option. - geometry = "350x50-10-10" - - # Show how many messages are currently hidden (because of geometry). - indicate_hidden = yes - - # Shrink window if it's smaller than the width. Will be ignored if - # width is 0. - shrink = no - - # The transparency of the window. Range: [0; 100]. - # This option will only work if a compositing window manager is - # present (e.g. xcompmgr, compiz, etc.). - transparency = 10 - - # The height of the entire notification. If the height is smaller - # than the font height and padding combined, it will be raised - # to the font height and padding. - notification_height = 0 - - # Draw a line of "separator_height" pixel height between two - # notifications. - # Set to 0 to disable. - separator_height = 2 - - # Padding between text and separator. - padding = 8 - - # Horizontal padding. - horizontal_padding = 8 - - # Defines width in pixels of frame around the notification window. - # Set to 0 to disable. - frame_width = 1 - - # Defines color of the frame around the notification window. - frame_color = "#{{ cookiecutter.base07 }}" - - # Define a color for the separator. - # possible values are: - # * auto: dunst tries to find a color fitting to the background; - # * foreground: use the same color as the foreground; - # * frame: use the same color as the frame; - # * anything else will be interpreted as a X color. - separator_color = frame - - # Sort messages by urgency. - sort = yes - - # Don't remove messages, if the user is idle (no mouse or keyboard input) - # for longer than idle_threshold seconds. - # Set to 0 to disable. - # A client can set the 'transient' hint to bypass this. See the rules - # section for how to disable this if necessary - idle_threshold = 120 - - - - ### Text ### - font = {{ cookiecutter.font.mono.name }} {{ cookiecutter.font.mono.baseSize }} - - # The spacing between lines. If the height is smaller than the - # font height, it will get raised to the font height. - line_height = 0 - - # Possible values are: - # full: Allow a small subset of html markup in notifications: - # bold - # italic - # strikethrough - # underline - # - # For a complete reference see - # . - # - # strip: This setting is provided for compatibility with some broken - # clients that send markup even though it's not enabled on the - # server. Dunst will try to strip the markup but the parsing is - # simplistic so using this option outside of matching rules for - # specific applications *IS GREATLY DISCOURAGED*. - # - # no: Disable markup parsing, incoming notifications will be treated as - # plain text. Dunst will not advertise that it has the body-markup - # capability if this is set as a global setting. - # - # It's important to note that markup inside the format option will be parsed - # regardless of what this is set to. - markup = full - - # The format of the message. Possible variables are: - # %a appname - # %s summary - # %b body - # %i iconname (including its path) - # %I iconname (without its path) - # %p progress value if set ([ 0%] to [100%]) or nothing - # %n progress value if set without any extra characters - # %% Literal % - # Markup is allowed - format = "%s\n%b" - - # Alignment of message text. - # Possible values are "left", "center" and "right". - alignment = left - - # Show age of message if message is older than show_age_threshold - # seconds. - # Set to -1 to disable. - show_age_threshold = 60 - - # Split notifications into multiple lines if they don't fit into - # geometry. - word_wrap = yes - - # When word_wrap is set to no, specify where to make an ellipsis in long lines. - # Possible values are "start", "middle" and "end". - ellipsize = middle - - # Ignore newlines '\n' in notifications. - ignore_newline = no - - # Stack together notifications with the same content - stack_duplicates = true - - # Hide the count of stacked notifications with the same content - hide_duplicate_count = false - - # Display indicators for URLs (U) and actions (A). - show_indicators = yes - - - - ### Icons ### - # Align icons left/right/off - icon_position = left - - # Scale larger icons down to this size, set to 0 to disable - max_icon_size = 32 - - - - ### History ### - - # Should a notification popped up from history be sticky or timeout - # as if it would normally do. - sticky_history = yes - - # Maximum amount of notifications kept in history - history_length = 20 - - ### Misc/Advanced ### - - # dmenu path. - dmenu = /usr/bin/dmenu -p dunst: - - # Browser for opening urls in context menu. - browser = /usr/bin/firefox -new-tab - - # Always run rule-defined scripts, even if the notification is suppressed - always_run_script = true - - # Define the title of the windows spawned by dunst - title = Dunst - - # Define the class of the windows spawned by dunst - class = Dunst - - # Print a notification on startup. - # This is mainly for error detection, since dbus (re-)starts dunst - # automatically after a crash. - startup_notification = false - - # Manage dunst's desire for talking - # Can be one of the following values: - # crit: Critical features. Dunst aborts - # warn: Only non-fatal warnings - # mesg: Important Messages - # info: all unimportant stuff - # debug: all less than unimportant stuff - verbosity = mesg - - # Define the corner radius of the notification window - # in pixel size. If the radius is 0, you have no rounded - # corners. - # The radius will be automatically lowered if it exceeds half of the - # notification height to avoid clipping text and/or icons. - corner_radius = 0 - - - - ### Legacy - - # Use the Xinerama extension instead of RandR for multi-monitor support. - # This setting is provided for compatibility with older nVidia drivers that - # do not support RandR and using it on systems that support RandR is highly - # discouraged. - # - # By enabling this setting dunst will not be able to detect when a monitor - # is connected or disconnected which might break follow mode if the screen - # layout changes. - force_xinerama = false - - ### mouse - - # Defines action of mouse event - # Possible values are: - # * none: Don't do anything. - # * do_action: If the notification has exactly one action, or one is marked as default, - # invoke it. If there are multiple and no default, open the context menu. - # * close_current: Close current notification. - # * close_all: Close all notifications. - mouse_left_click = close_current - mouse_middle_click = do_action - mouse_right_click = close_all - - - -# Experimental features that may or may not work correctly. Do not expect them -# to have a consistent behaviour across releases. -[experimental] - # Calculate the dpi to use on a per-monitor basis. - # If this setting is enabled the Xft.dpi value will be ignored and instead - # dunst will attempt to calculate an appropriate dpi value for each monitor - # using the resolution and physical size. This might be useful in setups - # where there are multiple screens with very different dpi values. - per_monitor_dpi = false - - - -[shortcuts] - # Shortcuts are specified as [modifier+][modifier+]...key - # Available modifiers are "ctrl", "mod1" (the alt-key), "mod2", - # "mod3" and "mod4" (windows-key). - # Xev might be helpful to find names for keys. - - # Close notification. - close = ctrl+space - - # Close all notifications. - close_all = ctrl+shift+space - - # Redisplay last message(s). - # On the US keyboard layout "grave" is normally above TAB and left - # of "1". Make sure this key actually exists on your keyboard layout, - # e.g. check output of 'xmodmap -pke' - history = ctrl+grave - - # Context menu. - context = ctrl+shift+period - - - -[urgency_low] - # IMPORTANT: colors have to be defined in quotation marks. - # Otherwise the "#" and following would be interpreted as a comment. - background = "#{{ cookiecutter.base01 }}" - foreground = "#{{ cookiecutter.base05 }}" - timeout = 10 - # Icon for notifications with low urgency, uncomment to enable - #icon = /path/to/icon - - - -[urgency_normal] - background = "#{{ cookiecutter.base00 }}" - foreground = "#{{ cookiecutter.base06 }}" - timeout = 10 - # Icon for notifications with normal urgency, uncomment to enable - #icon = /path/to/icon - - - -[urgency_critical] - background = "#{{ cookiecutter.base00 }}" - foreground = "#{{ cookiecutter.base08 }}" - frame_color = "#{{ cookiecutter.base08 }}" - timeout = 0 - # Icon for notifications with critical urgency, uncomment to enable - #icon = /path/to/icon - - - -# Every section that isn't one of the above is interpreted as a rules to -# override settings for certain messages. -# -# Messages can be matched by -# appname (discouraged, see desktop_entry) -# body -# category -# desktop_entry -# icon -# match_transient -# msg_urgency -# stack_tag -# summary -# -# and you can override the -# background -# foreground -# format -# frame_color -# fullscreen -# new_icon -# set_stack_tag -# set_transient -# timeout -# urgency -# -# Shell-like globbing will get expanded. -# -# Instead of the appname filter, it's recommended to use the desktop_entry filter. -# GLib based applications export their desktop-entry name. In comparison to the appname, -# the desktop-entry won't get localized. -# -# SCRIPTING -# You can specify a script that gets run when the rule matches by -# setting the "script" option. -# The script will be called as follows: -# script appname summary body icon urgency -# where urgency can be "LOW", "NORMAL" or "CRITICAL". -# -# NOTE: if you don't want a notification to be displayed, set the format -# to "". -# NOTE: It might be helpful to run dunst -print in a terminal in order -# to find fitting options for rules. - -# Disable the transient hint so that idle_threshold cannot be bypassed from the -# client -#[transient_disable] -# match_transient = yes -# set_transient = no -# -# Make the handling of transient notifications more strict by making them not -# be placed in history. -#[transient_history_ignore] -# match_transient = yes -# history_ignore = yes - -# fullscreen values -# show: show the notifications, regardless if there is a fullscreen window opened -# delay: displays the new notification, if there is no fullscreen window active -# If the notification is already drawn, it won't get undrawn. -# pushback: same as delay, but when switching into fullscreen, the notification will get -# withdrawn from screen again and will get delayed like a new notification -#[fullscreen_delay_everything] -# fullscreen = delay -#[fullscreen_show_critical] -# msg_urgency = critical -# fullscreen = show - -#[espeak] -# summary = "*" -# script = dunst_espeak.sh - -#[script-test] -# summary = "*script*" -# script = dunst_test.sh - -#[ignore] -# # This notification will not be displayed -# summary = "foobar" -# format = "" - -#[history-ignore] -# # This notification will not be saved in history -# summary = "foobar" -# history_ignore = yes - -#[skip-display] -# # This notification will not be displayed, but will be included in the history -# summary = "foobar" -# skip_display = yes - -#[signed_on] -# appname = Pidgin -# summary = "*signed on*" -# urgency = low -# -#[signed_off] -# appname = Pidgin -# summary = *signed off* -# urgency = low -# -#[says] -# appname = Pidgin -# summary = *says* -# urgency = critical -# -#[twitter] -# appname = Pidgin -# summary = *twitter.com* -# urgency = normal -# -#[stack-volumes] -# appname = "some_volume_notifiers" -# set_stack_tag = "volume" -# - -# vim: ft=cfg diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config deleted file mode 100755 index 257c6bd6..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/polybar/config +++ /dev/null @@ -1,184 +0,0 @@ -; Main color format is in ARGB. -; However, formats in RGB is fine. -; This is where all of the colors should be placed for those who are lazy to scroll down (like me). -[colors] - background = "#{{ cookiecutter.base00 }}" - background-light = "#{{ cookiecutter.base01 }}" - foreground = "#{{ cookiecutter.base05 }}" - foreground-light = "#{{ cookiecutter.base06 }}" - accent = "#{{ cookiecutter.base0C }}" - - -; The common style between bars. -[bar-common-style] - width = 100% - height = 32 - wm-restack = bspwm - fixed-center = false - - line-size = 3 - line-color = ${colors.accent} - - padding = 1 - - module-margin = 1 - module-padding = 1 - - font-0 = "{{ cookiecutter.font.mono.name }};2" - font-1 = "Iosevka;2" - - ; Our fallback fonts are mostly used as icon fonts. - ; For future references, the version of Font Awesome used here is at v5.13.0. - ; I also installed the font myself that I downloaded from the official website (https://fontawesome.com/). - font-2 = "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid;2" - - ; This creates the illusion as if the modules are in the center. - __border-size = 5 - border-top-size = ${self.__border-size} - border-top-color = ${colors.background} - border-bottom-size = ${self.__border-size} - border-bottom-color = ${colors.background} - - tray-position = right - tray-padding = 1 - cursor-click = pointer - - -; Common style between modules. -[module-common-style] - label-padding = 1 - - -; The main bar. -[bar/fds-bar] - background = ${colors.background} - foreground = ${colors.foreground} - - inherit = bar-common-style - enable-ipc = true - - modules-left = bspwm - modules-center = date - modules-right = pulseaudio eth memory root-fs home-fs - - -[module/root-fs] - type = internal/fs - mount-0 = / - format-mounted-prefix = "" - format-mounted-prefix-margin-right = 1 - format-unmounted-prefix = "" - format-unmounted-prefix-margin-right = 1 - label-mounted = %free% - label-unmounted = N/A - - -[module/home-fs] - type = internal/fs - mount-0 = /home - format-mounted-prefix = "" - format-mounted-prefix-margin-right = 1 - format-unmounted-prefix = "" - format-unmounted-prefix-margin-right = 1 - label-mounted = %free% - label-unmounted = N/A - - -[module/bspwm] - type = internal/bspwm - wrapping-scroll = false - pin-workspaces = true - label-focused = %index% - label-focused-background = ${colors.accent} - label-focused-foreground = ${colors.background} - label-focused-padding = 1 - - label-occupied = %index% - label-occupied-padding = 1 - - label-urgent = %index%! - label-urgent-foreground = ${colors.background} - label-urgent-background = ${colors.foreground-light} - label-urgent-padding = 1 - - label-empty = %index% - label-empty-foreground = ${colors.foreground} - label-empty-padding = 1 - - -[module/memory] - inherit = module-common-style - type = internal/memory - interval = 2 - format-prefix = "" - label = %gb_used% - - -[module/wlan] - inherit = module-common-style - type = internal/network - interface = wlp0s18f2u4 - interval = 3.0 - - format-connected = - format-connected-underline = ${colors.accent} - format-prefix = "NET" - label-connected = %essid% - - format-disconnected = - label-disconnected = disconnected - - -[module/eth] - type = internal/network - interface = enp4s0 - interval = 3 - - format-connected-prefix = "" - label-connected = "OK" - label-connected-padding = 1 - - format-disconnected-prefix = "" - label-disconnected-padding = 1 - label-disconnected = "N/A" - - -[module/date] - inherit = module-common-style - type = internal/date - interval = 5 - - ; We've formatted the time string to alter between the time and the date instead. - ; Although, I feel it's a hacky workaround, it still is functional as a date module. - date = "%A, %F" - date-alt = "%B %d, %Y (%F)" - time = %T - time-alt = - - format-prefix = "" - label = %date% %time% - - -[module/pulseaudio] - inherit = module-common-style - type = internal/pulseaudio - - format-volume-prefix = "" - format-volume = - label-volume = %percentage%% - label-volume-padding = 1 - - format-muted-prefix = "" - label-muted = muted - label-muted-padding = 1 - - -[settings] - screenchange-reload = true - - -[global/wm] - margin = 1 - padding = 1 - -; vim:ft=dosini diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/config.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/config.rasi deleted file mode 100755 index 437fc71a..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/config.rasi +++ /dev/null @@ -1,9 +0,0 @@ -configuration { - display-drun: "Application"; - display-run: "Execute"; - display-window: "Window"; - display-ssh: "SSH"; - font: "{{ cookiecutter.font.mono.name }} {{ cookiecutter.font.mono.baseSize }}"; - show-icons: true; - theme: "themes/fds-mini-sidebar"; -} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi deleted file mode 100755 index f76d22ef..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/dmenu.rasi +++ /dev/null @@ -1,66 +0,0 @@ -/** - * ROFI Color theme - * User: Qball - * Copyright: Dave Davenport - * Modified by: Gabriel Arazas (foo-dogsquared) - */ - -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #{{ cookiecutter.base00 }}; - foreground: #{{ cookiecutter.base05 }}; - color0: #{{ cookiecutter.base00 }}; - color1: #{{ cookiecutter.base01 }}; - color2: #{{ cookiecutter.base02 }}; - color3: #{{ cookiecutter.base03 }}; - color4: #{{ cookiecutter.base04 }}; - color5: #{{ cookiecutter.base05 }}; - color6: #{{ cookiecutter.base06 }}; - color7: #{{ cookiecutter.base07 }}; - color8: #{{ cookiecutter.base08 }}; - color9: #{{ cookiecutter.base09 }}; - color10: #{{ cookiecutter.base0A }}; - color11: #{{ cookiecutter.base0B }}; - color12: #{{ cookiecutter.base0C }}; - color13: #{{ cookiecutter.base0D }}; - color14: #{{ cookiecutter.base0E }}; - color15: #{{ cookiecutter.base0F }}; - - background-color: @background; - border-color: @foreground; - text-color: @foreground; - font: "{{ cookiecutter.font.mono.name }} {{ cookiecutter.font.mono.baseSize }}"; -} - -window { - anchor: north; - location: north; - width: 100%; - padding: 7px; - children: [ horibox ]; -} - -horibox { - orientation: horizontal; - children: [ prompt, entry, listview ]; -} - -listview { - layout: horizontal; - spacing: 5px; - lines: 100; -} - -entry { - expand: false; - width: 10em; -} - -element { - padding: 0px 2px; -} - -element.selected { - background-color: @color6; -} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi deleted file mode 100755 index 5736da62..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-center-menu.rasi +++ /dev/null @@ -1,93 +0,0 @@ -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #{{ cookiecutter.base00 }}; - foreground: #{{ cookiecutter.base05 }}; - color0: #{{ cookiecutter.base00 }}; - color1: #{{ cookiecutter.base01 }}; - color2: #{{ cookiecutter.base02 }}; - color3: #{{ cookiecutter.base03 }}; - color4: #{{ cookiecutter.base04 }}; - color5: #{{ cookiecutter.base05 }}; - color6: #{{ cookiecutter.base06 }}; - color7: #{{ cookiecutter.base07 }}; - color8: #{{ cookiecutter.base08 }}; - color9: #{{ cookiecutter.base09 }}; - color10: #{{ cookiecutter.base0A }}; - color11: #{{ cookiecutter.base0B }}; - color12: #{{ cookiecutter.base0C }}; - color13: #{{ cookiecutter.base0D }}; - color14: #{{ cookiecutter.base0E }}; - color15: #{{ cookiecutter.base0F }}; - - /* Theme settings */ - highlight: bold italic; - scrollbar: true; - - /* Style */ - text-color: @foreground; - background-color: @background; - font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14"; - font: "{{ cookiecutter.font.mono.name }} {{ cookiecutter.font.mono.baseSize }}"; -} - -window { - background-color: transparent; - - height: 65%; - width: 55%; - position: center; - location: center; - text-color: @foreground; -} - -mainbox { - background-color: @background; - border: 2; - border-color: @color6; - children: [ inputbar, listview, mode-switcher ]; -} - -inputbar, -listview { - background: @background; -} - -inputbar { - orientation: vertical; - children: [ prompt, entry ]; - background-color: @color0; -} - -entry, -prompt { - background-color: @color0; -} - -listview { - cyclic: true; -} - -element selected.normal { - background-color: @color6; - text-color: @background; -} - -scrollbar { - background-color: @color0; - handle-color: @color6; - handle-width: 10px; - height: 100%; -} - -button, -case-indicator, -inputbar, -element { - padding: 5; -} - -button.selected { - background-color: @color6; - text-color: @background; -} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi deleted file mode 100755 index daff99b5..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/rofi/themes/fds-mini-sidebar.rasi +++ /dev/null @@ -1,122 +0,0 @@ -* { - /* The color swatch */ - /* Useful for quick editing of the colors */ - background: #{{ cookiecutter.base00 }}; - foreground: #{{ cookiecutter.base05 }}; - color0: #{{ cookiecutter.base00 }}; - color1: #{{ cookiecutter.base01 }}; - color2: #{{ cookiecutter.base02 }}; - color3: #{{ cookiecutter.base03 }}; - color4: #{{ cookiecutter.base04 }}; - color5: #{{ cookiecutter.base05 }}; - color6: #{{ cookiecutter.base06 }}; - color7: #{{ cookiecutter.base07 }}; - color8: #{{ cookiecutter.base08 }}; - color9: #{{ cookiecutter.base09 }}; - color10: #{{ cookiecutter.base0A }}; - color11: #{{ cookiecutter.base0B }}; - color12: #{{ cookiecutter.base0C }}; - color13: #{{ cookiecutter.base0D }}; - color14: #{{ cookiecutter.base0E }}; - color15: #{{ cookiecutter.base0F }}; - - /* General theme settings */ - highlight: bold italic; - scrollbar: true; - - /* Font settings */ - text-color: @foreground; - background-color: @background; - font: "Font Awesome 5 Free,Font Awesome 5 Free Solid:style=Solid 14"; - font: "{{ cookiecutter.font.mono.name }} {{ cookiecutter.font.mono.baseSize }}"; - -} - -window { - background-color: transparent; - - height: 65%; - width: 35%; - position: center; - location: center; - text-color: @foreground; -} - -mainbox { - background-color: @background; - border: 2; - border-color: @color6; - children: [ inputbar, listview, mode-switcher ]; - padding: 0.5em; -} - -inputbar, -listview { - background: @background; - margin: 0 0 0.5em 0; -} - -inputbar { - orientation: vertical; - children: [ prompt, entry ]; -} - -prompt { - text-style: underline; - width: 100%; -} - -entry { - background-color: @color1; - margin: 0 1em 0 0; -} - -element { - background-color: @color1; - padding: 5; -} - -element selected.normal { - background-color: @color6; - text-color: @background; -} - -scrollbar { - background-color: @color0; - border-radius: 30%; - handle-color: @color6; - handle-width: 15px; - height: 100%; - text-color: @background; - width: 10px; -} - -listview { - cyclic: true; - spacing: 0.6em; -} - -element, button { - border-radius: 30%; -} - -button, -case-indicator, -entry, -inputbar { - padding: 5; -} - -sidebar { - padding: 5; - margin: 5; -} - -button { - margin: 0.25em; -} - -button.selected { - background-color: @color6; - text-color: @background; -} diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/wallpaper b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/wallpaper deleted file mode 100755 index 7c9b9a2e..00000000 Binary files a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/config/wallpaper and /dev/null differ diff --git a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix b/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix deleted file mode 100755 index 85cb006d..00000000 --- a/templates/themes/fair-and-square/{{ cookiecutter.slug }}/default.nix +++ /dev/null @@ -1,116 +0,0 @@ -{ config, options, lib, pkgs, ... }: - -with lib; { - options.modules.themes."{{ cookiecutter.slug }}" = { - enable = mkOption { - type = types.bool; - default = false; - }; - }; - - config = mkIf config.modules.themes."{{ cookiecutter.slug }}".enable { - services = { - # Enable picom compositor. - picom = { - enable = true; - fade = false; - shadow = false; - }; - - # Enable certain Xorg-related services. - xserver = { - displayManager = { - lightdm.enable = true; - defaultSession = "none+bspwm"; - }; - enable = true; - libinput.enable = true; - windowManager.bspwm.enable = true; - }; - }; - - my.env.TERMINAL = "alacritty"; - - my.home = { - # Enable GTK configuration. - gtk.enable = true; - - # Set the wallpaper. - home.file.".background-image".source = ./config/wallpaper; - - # Enable QT configuration and set it to the same GTK config. - qt.enable = true; - qt.platformTheme = "gtk"; - - # Install all of the configurations in the XDG config home. - xdg.configFile = mkMerge [ - (let - recursiveXdgConfig = name: { - source = ./config + "/${name}"; - recursive = true; - }; - in { - "alacritty" = recursiveXdgConfig "alacritty"; - "bspwm" = recursiveXdgConfig "bspwm"; - "dunst" = recursiveXdgConfig "dunst"; - "polybar" = recursiveXdgConfig "polybar"; - "rofi" = recursiveXdgConfig "rofi"; - - "sxhkd" = { - source = ; - recursive = true; - }; - }) - - # Applying the theme for GTK. - ({ - "gtk-3.0/settings.ini".text = '' - [Settings] - gtk-theme-name=Arc - gtk-icon-theme-name=Arc - gtk-fallback-icon-theme=gnome - gtk-application-prefer-dark-theme=true - gtk-cursor-theme-name=Adwaita - gtk-xft-hinting=1 - gtk-xft-hintstyle=hintfull - gtk-xft-rgba=none - ''; - - "gtk-2.0/gtkrc".text = '' - gtk-theme-name="Arc" - gtk-icon-theme-name="Arc" - gtk-font-name="Sans 10" - gtk-cursor-theme-name="Adwaita" - ''; - }) - ]; - - # Set the cursor theme. - xdg.dataFile = { - "icons/default/index.theme".text = '' - [icon theme] - Inherits=Adwaita - ''; - }; - }; - - my.packages = with pkgs; [ - alacritty # Muh GPU-accelerated terminal emulator. - dunst # Add more annoying pop-ups on your screen! - feh # Meh, it's a image viewer that can set desktop background, what gives? - gnome3.adwaita-icon-theme - libnotify # Library for yer notifications. - (polybar.override { - pulseSupport = true; - nlSupport = true; - }) # Add some bars to your magnum opus. - rofi # A ricer's best friend (one of them at least). - - # The Arc theme - arc-icon-theme - arc-theme - ]; - - fonts.fonts = with pkgs; [ iosevka nerdfonts font-awesome-ttf ]; - }; -}