IT'S FINALLY WORKING!

This commit is contained in:
Gabriel Arazas 2020-08-16 16:33:44 +08:00
parent 175e4366e6
commit 3d9f5436d8
55 changed files with 2564 additions and 205 deletions

0
.editorconfig Normal file → Executable file
View File

0
.gitmodules vendored Normal file → Executable file
View File

33
Makefile Executable file
View File

@ -0,0 +1,33 @@
USER := foo-dogsquared
HOST := zilch
HOME := /home/$(USER)
DOTS := /etc/dotfiles
NIXOS_VERSION := 20.03
NIXOS_PREFIX := $(PREFIX)/etc/nixos
FLAGS := -I "config=$$(pwd)/config" \
-I "modules=$$(pwd)/modules" \
-I "bin=$$(pwd)/bin" \
$(FLAGS)
config: $(NIXOS_PREFIX)/configuration.nix
home: $(HOME)/dotfiles
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
update:
@sudo nix-channel --update
switch:
@sudo nixos-rebuild $(FLAGS) switch
install: channels update
@echo "import "$(DOTS)" \"$${HOST:-$$(hostname)}\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix"
@sudo nixos-install --root "$(PREFIX)" $(FLAGS)
@sudo rm -r "$(PREFIX)/etc/dotfiles" && sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles"
@sudo nixos-enter --root "$(PREFIX)" -c chown $(USER):users $(DOTS)
upgrade: update switch

105
README.adoc Normal file → Executable file
View File

@ -1,26 +1,50 @@
= foo-dogsquared's NixOS config
This is the configuration setup for my https://nixos.org[NixOS] instance.
A major part of this setup is inspired (or stolen, whichever you prefer) from https://github.com/hlissner/dotfiles[hlissner's NixOS config].
The difference is https://github.com/rycee/home-manager[home-manager] is a big requirement and uses it a whole lot.
This setup is stolen from https://github.com/hlissner/dotfiles[hlissner's NixOS config] foot:[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.
== Getting started
Before installing this setup, be sure to install NixOS and logged in as a user.
This project setup also assumes the operating system has the following configurations:
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) to `/etc/dotfiles`.
- Install GNU Make.
Then simply run `make install`.
The default behavior of the installation installs my default setup.
It is equivalent to the following command:
[source, shell]
----
PREFIX=/mnt USER=foo-dogsquared HOST=zilch make --directory /etc/dotfiles install
----
For more information, simply inspect the Makefile.
Assuming you did install, your project will have the following stuff.
- Uses the nixpkgs unstable channel as `nixos` (i.e., `nix-channels --update https://nixos.org/channels/nixos-unstable`).
- 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).
[source, shell]
----
git clone <GIT_URL_OF_THIS_REPO>
make
----
=== Precautions
There are some things you need to keep in mind when using this setup.
* 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.
If we're to install this setup at separate times, the full list of installed packages with their depedencies and versions wouldn't be the same.
* It may use third-party channels for certain versions of the packages, hammering the first precaution even further regarding reproducibility.
@ -33,18 +57,73 @@ The project structure should look like the following:
----
nixos-config
├── config/
├── home.nix
├── hosts/
├── modules/
└── README.adoc
├── packages/
├── default.nix*
├── Makefile*
└── README.adoc*
----
* The directory paid with the most attention would most likely be the `modules/` folder.
Each module (and submodule) can contain multiple modules for multiple programs (i.e., `modules/shell/git`, `modules/desktop/bspwm`).
It could also contain a `base.nix` file where Nix packages with no configurations are placed similar to Arch package groups (i.e., `base`, `base-devel`, `xfce`).
It could also contain a `base.nix` file where Nix packages with no configurations are placed similar to Arch package groups.
** 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 safety, you should have a bare installation ala-Arch Linux.
For more information, see the <<Themes>> section.
* The `config/` directory is simply the ad hoc configuration of several programs.
In this case, it is my https://github.com/foo-dogsquared/dotflies[dotfiles] directory.
* The `hosts/` contains the individual system configuration of my machine (I've only one but I plan to NixOS for my new ones).
Each folder inside of this directory represents one machine.
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.
* The `packages/` folder is my custom packages either the new ones that haven't made into nixpkgs yet or packages with overrides.
Also contains third-party package repositories and overlays such as the NUR or the unstable branch of Emacs.
== Themes
My setup feature themes as a NixOS modules (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;`).
For safety, you should have a bare installation ala-Arch Linux.
As you can see in the `default.nix` of the `modules/theme` directory, a theme should also pass in certain data to `modules.theme` as if it's enabled.
The following is an example metadata object of a theme.
[source, nix]
----
{
name = "Fair and square";
version = "0.1.0";
path = ./.;
wallpaper = "${config.modules.theme.path}/config/wallpaper";
}
----
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 (i.e., 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.

69
default.nix Executable file
View File

@ -0,0 +1,69 @@
# Author: Henrik Lissner <henrik@lissner.net>
# Modified by: Gabriel Arazas <foo.dogsquared@gmail.com>
# 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.
# Most of which are single user systems (the ones that aren't are configured from their hosts/*/default.nix).
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 []);
### NixOS
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'
];
# Default settings for primary user account. `my` is defined in
# modules/default.nix
my.user = {
isNormalUser = true;
uid = 1000;
extraGroups = [ "wheel" "video" "networkmanager" "libvirtd" ];
shell = pkgs.zsh;
};
# 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.03"; # Did you read the comment?
}

View File

@ -1,70 +0,0 @@
{ config, pkgs, lib, ... }:
{
imports = [
./modules
];
nixpkgs.config = {
allowUnfree = true;
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# Module configurations.
modules = {
desktop = {
files.enable = true;
};
dev = {
base.enable = true;
cc.enable = true;
documentation.enable = true;
rust.enable = true;
};
editors = {
default = "nvim";
emacs.enable = true;
neovim.enable = true;
};
shell = {
base.enable = true;
lf.enable = true;
git = {
enable = true;
config = {
userName = "Gabriel Arazas";
userEmail = "foo.dogsquared@gmail.com";
};
};
zsh.enable = true;
};
};
programs.git = {
};
# Additional programs that doesn't need much configuration (or at least personally configured).
# It is pointless to create modules for it, anyways.
# home.packages = with pkgs; [
# cookiecutter # A generic project scaffolding tool.
# ];
# Home Manager needs a bit of information about you and the paths it should manage.
home.username = "foo-dogsquared";
home.homeDirectory = "/home/foo-dogsquared";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
home.stateVersion = "20.09";
}

View File

@ -0,0 +1,28 @@
# My desktop search settings.
# The main directories to create an index.
topdirs = ~/writings # My writings on stuff.
~/projects # My projects on stuff.
~/library # Personal library which contains my references, documents, and movies.
~/Documents # The ol' hangout for gamesaves.
~/Videos # XDG Video directory.
~/Pictures # Muh screenshots.
# 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

View File

@ -0,0 +1,24 @@
# Paths to synchronize
path = writings
path = projects
path = library
# My GnuPG keys
path = .gnupg
# The password store of gopass
path = .password-store
# Some regexps specifying names and paths to ignore
ignore = Name temp.*
ignore = Name *~
ignore = Name .*~
ignore = Name *.o
ignore = Name *.tmp
# Use this command for displaying diffs
diff = diff -y -W 79 --suppress-common-lines
# Log actions to the terminal
log = true

188
hosts/zilch/default.nix Executable file
View File

@ -0,0 +1,188 @@
{ config, pkgs, lib, ... }:
{
imports = [
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# 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";
};
# Install documentations for tools and whatnot.
documentation = {
enable = true;
dev.enable = true;
man.enable = true;
};
# Enable virutialization.
virtualisation = {
docker = {
enable = true;
};
libvirtd = {
enable = true;
};
};
# Module configurations.
modules = {
desktop = {
browsers = {
brave.enable = true;
firefox.enable = true;
};
fonts.enable = true;
files.enable = true;
graphics = {
raster.enable = true;
vector.enable = true;
_3d.enable = true;
};
multimedia.enable = true;
music = {
composition.enable = true;
production.enable = true;
};
};
dev = {
android.enable = true;
base.enable = true;
documentation = {
enable = true;
latex.enable = true;
};
java.enable = true;
javascript = {
deno.enable = true;
node.enable = true;
};
lisp = {
guile.enable = true;
racket.enable = true;
};
rust.enable = true;
};
editors = {
default = "nvim";
emacs.enable = true;
neovim.enable = true;
};
services = {
recoll.enable = true;
unison.enable = true;
};
shell = {
base.enable = true;
git.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; [
# defold
nim # Jack the nimble, jack jumped over the nightstick, and got over not being the best pick.
python # *insert Monty Python quote here*
# Muh games.
zeroad
wesnoth
];
my.env = {
BROWSER = "firefox";
FILE = "lf";
READ = "zathura";
SUDO_ASKPASS = <config/bin/askpass>;
};
my.alias.dots = "USER=${config.my.username} make -C /etc/install";
# Set your time zone.
time.timeZone = "Asia/Manila";
services.openssh.enable = true;
services.lorri.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "gnome3";
};
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
my.home.programs = {
# My personal Git config.
git = {
enable = true;
# Enable the syntax highlighter with Delta.
# https://github.com/dandavison/delta
delta.enable = true;
# Enable Large File Storage.
lfs.enable = true;
# Use the entire suite.
package = pkgs.gitAndTools.gitFull;
userName = "Gabriel Arazas";
userEmail = "${config.my.email}";
};
};
my.home.services = {
# Unison backup strat.
unison = {
enable = true;
pairs.mainbackup =
let
homeDirectory = "/home/${config.my.username}";
backupDrive = "/run/media/${config.my.username}/Seagate Backup Plus Drive";
in {
roots = [
homeDirectory
backupDrive
];
commandOptions = {
# Unison may delete the entire stuff so indicate that the other is a mount point.
mountpoint = backupDrive;
force = homeDirectory;
# My GnuPG keys.
path = ".gnupg .password-store";
};
};
};
};
}

View File

@ -0,0 +1,31 @@
# 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, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "uas" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5a99c954-92ae-4368-af6d-3e4b1d464474";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F3B1-E4AC";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4b2a4a00-f705-45b9-a014-e60acce2ae2a"; }
];
nix.maxJobs = lib.mkDefault 2;
}

92
modules/default.nix Normal file → Executable file
View File

@ -1,10 +1,96 @@
{ config, options, lib, pkgs, ... }:
{
{ config, options, lib, ... }:
with lib;
let mkOptionStr = value: mkOption
{ type = types.str;
default = value; };
in {
imports = [
<home-manager/nixos>
./desktop
./dev
./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 = types.submodule; };
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)));
};
zsh = {
rc = mkOption {
type = types.lines;
default = "";
description = ''
Zsh lines to be written to $XDG_CONFIG_HOME/zsh/extra.zshrc and
sourced by $XDG_CONFIG_HOME/zsh/.zshrc
'';
};
env = mkOption {
type = types.lines;
default = "";
description = ''
Zsh lines to be written to $XDG_CONFIG_HOME/zsh/extra.zshenv and
sourced by $XDG_CONFIG_HOME/zsh/.zshenv
'';
};
};
};
};
config = {
# Convenience aliases
home-manager.users.${config.my.username} = mkAliasDefinitions options.my.home;
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 = [ <config/bin> "$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.xdg.configFile = {
"zsh/extra.zshrc".text =
let aliasLines = mapAttrsToList (key: value: "alias ${key}=\"${value}\"") config.my.alias;
in ''
# This file is autogenerated, do not edit it!
${concatStringsSep "\n" aliasLines}
${config.my.zsh.rc}
'';
"zsh/extra.zshenv".text = ''
# This file is autogenerated, please do not edit it!
${config.my.zsh.env}
'';
};
};
}

28
modules/desktop/browsers.nix Executable file
View File

@ -0,0 +1,28 @@
# 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 [ next ] else []);
};
}

2
modules/desktop/default.nix Normal file → Executable file
View File

@ -3,9 +3,11 @@
{
imports = [
./browsers.nix
./files.nix
./fonts.nix
./graphics.nix
./multimedia.nix
./music.nix
];
}

19
modules/desktop/files.nix Normal file → Executable file
View File

@ -14,15 +14,26 @@ in {
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
exfat # A filesystem usually found on external hard drives.
my.packages = with pkgs; [
exiftool # A file metadata reader/writer/manager/helicopter.
hfsprogs # Some programs for HFS/NFS-based filesystems.
ntfs3g # A filesystem for Windows-based systems.
(recoll.override {
withGui = false;
}) # Bring the search engine to the desktop!
(unison.override {
enableX11 = false;
}) # Bridge the gap between your storage.
magic-wormhole # Magically transfer stuff between your wormholes!
transmission # One of the components for sailing the high seas.
syncthing # A peer-to-peer synchro summoning.
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.
];
# Clean 'yer home!
my.env = {
RECOLL_CONFDIR = "$XDG_DATA_HOME/recoll";
UNISON = "$XDG_DATA_HOME/unison";
};
};
}

27
modules/desktop/fonts.nix Normal file → Executable file
View File

@ -11,12 +11,25 @@ with lib;
};
config = mkIf config.modules.desktop.fonts.enable {
home.packages = with pkgs; [
fira-code # The programming font with fancy symbols.
ibm-plex # IBM's face.
noto-fonts # It's all about family and that's what so powerful about it.
noto-fonts-cjk # The universal font, Japanese-Chinese-Korean version.
stix-otf # The font you need for them math moonrunes.
];
# Enable fontconfig to easily discover fonts installed from home-manager.
fonts = {
enableFontDir = true;
enableGhostscriptFonts = true;
fontconfig.enable = true;
fonts = with pkgs; [
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.
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.
];
};
};
}

7
modules/desktop/graphics.nix Normal file → Executable file
View File

@ -12,14 +12,13 @@ in {
type = types.bool;
default = bool;
}; in {
enable = mkBoolDefault false;
raster.enable = mkBoolDefault false;
vector.enable = mkBoolDefault false;
_3d.enable = mkBoolDefault false;
};
config = mkIf cfg.enable {
home.packages = with pkgs;
config = {
my.packages = with pkgs;
[
font-manager # Self-explanatory name is self-explanatory.
imagemagick # A command-line tool for manipulating images.
@ -28,7 +27,7 @@ in {
(if cfg.raster.enable then [
gimp # Adobe Photoshop replacement.
krita # A good painting program useful for "pure" digital arts.
aseprite # A pixel art editor.
aseprite-unfree # A pixel art editor.
] else []) ++
(if cfg.vector.enable then [

23
modules/desktop/multimedia.nix Executable file
View File

@ -0,0 +1,23 @@
# Muh consumer applications...
{ config, options, lib, pkgs, ... }:
with lib;
{
options.modules.desktop.multimedia = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.desktop.multimedia.enable {
my.packages = with pkgs; [
hexchat # The ultimate IRC client for neckbeards.
mpv # The ultimate media player for hipsters.
newsboat # The ultimate RSS aggregator for some person.
openshot-qt # A decent video editor.
thunderbird # The ultimate email client for dumbasses like me.
zathura # The ultimate PDF viewer for run-of-the-mill ricing.
];
};
}

15
modules/desktop/music.nix Normal file → Executable file
View File

@ -11,14 +11,14 @@ in {
type = types.bool;
default = bool;
}; in {
enable = mkBoolDefault false;
composition = mkBoolDefault false;
production = mkBoolDefault false;
composition.enable = mkBoolDefault false;
production.enable = mkBoolDefault false;
};
config = mkIf cfg.enable {
home.packages = with pkgs;
config = {
my.packages = with pkgs;
(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.
supercollider # Programming platform for synthesizing them 'zics.
@ -26,8 +26,13 @@ in {
(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.
helm # A great synthesizer plugin.
hydrogen # Them drum beats composition will get good.
polyphone # Edit your fonts for sound.
zynaddsubfx # Ze most advanced synthesizer I've seen so far (aside from the upcoming Vital syntehsizer).
# As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe.
# lmms

24
modules/dev/android.nix Executable file
View File

@ -0,0 +1,24 @@
# Android is the mobile version of Linux.
{ config, options, lib, pkgs, ... }:
with lib;
{
options.modules.dev.android = {
enable = mkOption {
type = types.bool;
default = false;
};
};
config = mkIf config.modules.dev.android.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.
];
# Enable Android Debug Bridge for some device debugging.
programs.adb.enable = true;
};
}

5
modules/dev/base.nix Normal file → Executable file
View File

@ -11,9 +11,12 @@ with lib;
};
config = mkIf config.modules.dev.base.enable {
home.packages = with pkgs; [
my.packages = with pkgs; [
caddy2 # THE ULTIMATE HTTPS/2 SERVER FOR 'YER GOLFIN' SESSIONS!!!
cookiecutter # A project scaffolding tool.
direnv # Augment your shell with automatic environment variables loading and unloading.
gnumake # Make your life easier with GNU Make.
tldr # What manuals should include.
universal-ctags # Enable fast traveling to your code (assuming written in a supported language).
];
};

2
modules/dev/cc.nix Normal file → Executable file
View File

@ -11,7 +11,7 @@ with lib;
};
config = mkIf config.modules.dev.cc.enable {
home.packages = with pkgs; [
my.packages = with pkgs; [
cmake # Yo dawg, I heard you like Make.
# clang # A C compiler frontend for LLVM.
gcc # A compiler toolchain.

3
modules/dev/default.nix Normal file → Executable file
View File

@ -2,12 +2,15 @@
{
imports = [
./android.nix
./base.nix
./cc.nix
./documentation.nix
./gamedev.nix
./java.nix
./javascript.nix
./lisp.nix
./math.nix
./rust.nix
];
}

18
modules/dev/documentation.nix Normal file → Executable file
View File

@ -16,21 +16,35 @@ in
}; 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 {
home.packages = with pkgs; [
asciidoctor # Keeping Asciidoc alive with the improved version.
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
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.
vale # The customizable linter for your intended writings.
# TODO: Make Neuron its own package.
(let neuronSrc = builtins.fetchTarball "https://github.com/srid/neuron/archive/master.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 []);

6
modules/dev/gamedev.nix Normal file → Executable file
View File

@ -18,14 +18,14 @@ in
};
config = {
home.packages = with pkgs;
my.packages = with pkgs;
(if cfg.godot.enable then [
godot # The Godot, not to be confused with a certain prosecutor.
] else []) ++
(if cfg.unity3d.enable then [
unity3d
unityhub
unity3d # The Unity, not to be confused with a certain ideal.
unityhub # The ideal hub for your Unity projects.
] else []);
};
}

2
modules/dev/java.nix Normal file → Executable file
View File

@ -12,7 +12,7 @@ with lib;
};
config = mkIf config.modules.dev.java.enable {
home.packages = [
my.packages = with pkgs; [
jdk # The Java Development Kit.
jre # The Java Runtime Environment for running Java apps.
];

4
modules/dev/javascript.nix Normal file → Executable file
View File

@ -19,13 +19,13 @@ in
};
config = {
home.packages = with pkgs;
my.packages = with pkgs;
(if cfg.deno.enable then [
deno # The Deltarune of Node.
] else []) ++
(if cfg.node.enable then [
node # The JavaScript framework/runtime where you don't have to kill. :)
nodejs # The JavaScript framework/runtime where you don't have to kill someone for bad code. :)
] else []);
};
}

2
modules/dev/lisp.nix Normal file → Executable file
View File

@ -20,7 +20,7 @@ in
};
config = {
home.packages = with pkgs;
my.packages = with pkgs;
(if cfg.clojure.enable then [
clojure # Improved Java version.
] else []) ++

34
modules/dev/math.nix Executable file
View File

@ -0,0 +1,34 @@
# 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 {
python.enable = mkEnableOption;
r.enable = mkEnableOption;
};
config = {
my.packages = with pkgs; [
gnuplot # I came for the plots.
octave # Matlab's hipster brother.
] ++
(if cfg.python.enable then [
python # Serious question: do I really need to install this?
python38Packages.sympy # The Python library that always being noticed.
] else []) ++
(if cfg.r.enable then [
R # Rated G for accessibility.
] else []);
};
}

8
modules/dev/rust.nix Normal file → Executable file
View File

@ -12,13 +12,13 @@ with lib;
};
config = mkIf config.modules.dev.rust.enable {
home.packages = with pkgs; [
my.packages = with pkgs; [
rustup
];
programs.zsh.sessionVariables = mkIf config.modules.shell.zsh.enable {
CARGO_HOME = "${config.xdg.dataHome}/cargo";
RUSTUP_HOME = "${config.xdg.dataHome}/rustup";
my.env = {
CARGO_HOME = "$XDG_DATA_HOME/cargo";
RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
PATH = [ "$CARGO_HOME/bin" ];
};
};

5
modules/editors/default.nix Normal file → Executable file
View File

@ -8,7 +8,6 @@ with lib;
imports = [
./emacs.nix
./neovim.nix
./vscode.nix
];
options.modules.editors = {
@ -17,4 +16,8 @@ with lib;
default = "vim";
};
};
config = {
my.env.EDITOR = config.modules.editors.default;
};
}

29
modules/editors/emacs.nix Normal file → Executable file
View File

@ -11,10 +11,20 @@ with lib;
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.emacsUnstable;
};
};
config = mkIf config.modules.editors.emacs.enable {
home.packages = with pkgs; [
my.packages = with pkgs; [
((emacsPackagesNgGen config.modules.editors.emacs.pkg).emacsWithPackages (epkgs: [
epkgs.vterm
]))
# Doom dependencies
git
(ripgrep.override { withPCRE2 = true; })
@ -42,21 +52,14 @@ with lib;
## :tools lookup & :lang org+roam
sqlite
] ++
## :lang javascript
(if config.modules.dev.javascript.node.enable then [
nodePackages.javascript-typescript-langserver # The LSP for JS/TS.
] else []) ++
## :lang cc
(if config.modules.dev.cc.enable then [
ccls
] else []);
];
fonts.fonts = with pkgs; [
emacs-all-the-icons-fonts
];
# Placing the Doom Emacs config.
xdg.configFile."doom" = {
my.home.xdg.configFile."doom" = {
source = ../../config/emacs;
recursive = true;
};

22
modules/editors/neovim.nix Normal file → Executable file
View File

@ -12,21 +12,21 @@ with lib;
};
config = mkIf config.modules.editors.neovim.enable {
home = {
packages = with pkgs; [
my.packages = with pkgs; [
editorconfig-core-c # Editorconfig is a MUST, you feel me?!
];
};
programs.neovim = {
enable = true;
withPython3 = true;
withRuby = true;
};
my.home = {
programs.neovim = {
enable = true;
withPython3 = true;
withRuby = true;
};
xdg.configFile."nvim" = {
source = ../../config/nvim;
recursive = true;
xdg.configFile."nvim" = {
source = ../../config/nvim;
recursive = true;
};
};
};
}

View File

@ -1,42 +0,0 @@
# Visual Studio Code is the middle ground between a text editor and an IDE.
# Perfect for managing medium-sized software projects.
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.editors.vscode;
in {
options.modules.editors.vscode = {
enable = mkOption {
type = types.bool;
default = false;
};
};
# I'll be using the home-manager module for this one since it already did the work for me.
# If I were to create one from scratch, it'll most likely end up similar anyways.
config = mkIf cfg.enable {
programs.vscode = {
enable = true;
extensions = with pkgs.vscode-extensions; [
# Material Icon theme
PKief.material-icon-theme
# Material theme that comes with multiple variants
Equinusocio.vsc-material-theme
# The official implementation for the Nord color scheme
arcticicestudio.nord-visual-studio-code
# ESLint
dbaeumer.vscode-eslint
# Supercharged Git integration into the editor
eamodio.gitlens
# A code formatter
esbenp.prettier-vscode
];
};
};
}

10
modules/services/default.nix Executable file
View File

@ -0,0 +1,10 @@
# Seeing systemd as a great software is my guilty pleasure.
# Here's where services are declared.
{ config, options, lib, pkgs, ... }:
{
imports = [
./recoll.nix
./unison.nix
];
}

60
modules/services/recoll.nix Executable file
View File

@ -0,0 +1,60 @@
# 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}";
Restart = "on-failure";
};
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" ];
};
};
};
};
}

42
modules/services/unison.nix Executable file
View File

@ -0,0 +1,42 @@
# When enabled, this will periodically backup your stuff as configured in '$UNISON/default.prf' (or not with the 'flags' option).
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.services.unison;
in
{
options.modules.services.unison = {
enable = mkOption {
type = types.bool;
default = false;
};
flags = mkOption {
type = types.str;
default = "";
};
};
config = mkIf cfg.enable {
my.home = {
systemd.user.services.unison = {
Unit = {
Description = "Unison backup";
Documentation = [ "https://www.cis.upenn.edu/~bcpierce/unison/docs.html" ];
};
Service = {
ExecStart = "${(pkgs.unison.override { enableX11 = false; })}/bin/unison ${cfg.flags}";
Environment = [ "UNISON=\"$XDG_DATA_HOME/unison\"" ];
RestartSec = "5mins";
};
Install = {
WantedBy = [ "default.target" ];
};
};
};
};
}

20
modules/shell/base.nix Normal file → Executable file
View File

@ -11,22 +11,26 @@ with lib;
};
config = mkIf config.modules.shell.base.enable {
home.packages = with pkgs; [
aspell # Want to check spelling on the command-line?
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 therpay.
fzf # A fuzzy finder, not furry finder which is a common misconception.
hexyl # Binary viewer on the command-line.
fd # find(1) after a cognitive behavioral therapy.
fzf # A fuzzy finder that enables fuzzy finding not furry finding, a common misconception.
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 HTTP pie.
gopass # The improved version of Password Store which is a password manager for hipsters.
maim # A command-line interface for screenshots.
maim # A command-line interface for parsing screenshots.
jq # A command-line interface for parsing JSON.
pup # A command-line interface for parsing HTML.
ripgrep # Super-fast full-text searcher.
(ripgrep.override { withPCRE2 = true; }) # Super-fast full-text searcher.
(recoll.override { withGui = false; }) # Bring the search engine to the desktop!
sqlite # Battle-tested cute little database that can grow into an abomination of a data spaghetti.
tree # I'm not a scammer, I swear.
youtube-dl # A command-line interface for downloading videos.
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.
];
};
}

0
modules/shell/default.nix Normal file → Executable file
View File

9
modules/shell/git.nix Normal file → Executable file
View File

@ -10,12 +10,13 @@ with lib;
type = types.bool;
default = false;
};
config = mkOption {
type = types.submodule;
};
};
config = mkIf config.modules.shell.git.enable {
home.packages = with pkgs; [
gitAndTools.delta
gitAndTools.diff-so-fancy
];
modules.shell.git.config = mkAliasDefinitions options.programs.git;
};
}

4
modules/shell/lf.nix Normal file → Executable file
View File

@ -12,11 +12,11 @@ with lib;
};
config = mkIf config.modules.shell.lf.enable {
home.packages = with pkgs; [
my.packages = with pkgs; [
lf
];
xdg.configFile."lf" = {
my.home.xdg.configFile."lf" = {
source = ../../config/lf;
recursive = true;
};

23
modules/shell/zsh.nix Normal file → Executable file
View File

@ -15,9 +15,26 @@ with lib;
programs.zsh = {
enable = true;
enableCompletion = true;
enableAutosuggestions = true;
dotDir = "${config.xdg.configHome}";
history.path = "${config.xdg.dataHome}/zsh/history";
autosuggestions.enable = true;
histFile = "\$XDG_DATA_HOME/zsh/history";
loginShellInit = "
export ZDOTDIR=\"\$XDG_CONFIG_HOME/zsh\"
";
# Adding basic version control support to the zsh prompt.
# https://git-scm.com/book/en/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh
promptInit = "
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
zstyle ':vcs_info:*' formats '[%s] (%b)'
autoload -U colors && colors
PROMPT=\"%F%{\${fg[white]}%}%(0?..%?) %B%{\$fg[magenta]%}%1~%{\$reset_color%} \$vcs_info_msg_0_ $%f%b \"
RPROMPT=\"[%D %*]\"
";
syntaxHighlighting.enable = true;
};
};
}

40
modules/themes/default.nix Executable file
View File

@ -0,0 +1,40 @@
{ config, options, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.themes;
in
{
imports = [
./fair-and-square
];
options.modules.themes = {
name = mkOption {
type = with types; nullOr str;
default = null;
};
version = mkOption {
type = with types; nullOr str;
default = null;
};
path = mkOption {
type = with types; nullOr path;
default = null;
};
wallpaper = mkOption {
type = with types; nullOr path;
default = if cfg.path != null
then "${cfg.path}/config/wallpaper"
else null;
};
};
config = mkIf (cfg.path != null && builtins.pathExists cfg.wallpaper) {
my.home.home.file.".background-image".source = cfg.wallpaper;
};
}

View File

@ -0,0 +1,19 @@
= 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:
- bspwm as the window manager
- polybar for the bars
- rofi for the application laucher and the generic interface
- dunst (and libnotify) for desktop notifications
- Arc is the chosen GTK theme
Other miscellaneous stuff:
- sxhkd (since you're using bspwm, anyways)
- feh (for setting the background)

View File

@ -0,0 +1,465 @@
# 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: "#2E3440"
foreground: "#D8DEE9"
normal:
black: "#3B4252"
red: "#BF616A"
green: "#A3BE8C"
yellow: "#EBCB8B"
blue: "#81A1C1"
magenta: "#B48EAD"
cyan: "#88C0D0"
white: "#E5E9F0"
bright:
black: "#727B8A"
red: "#BF616A"
green: "#A3BE8C"
yellow: "#EBCB8B"
blue: "#81A1C1"
magenta: "#B48EAD"
cyan: "#8FBCBB"
white: "#ECEFF4"
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
# 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" }

View File

@ -0,0 +1,28 @@
#!/bin/sh
# Starting all of the required programs.
pkill polybar || polybar "fds-bar" &
pkill feh || feh $HOME/.background-image
# Removing all rules at startup to prevent duplicating rules.
bspc rule -r "*"
# Set up the desktops (workspaces) for the monitor
bspc monitor -d I II III IV V
bspc config border_width 2
bspc config window_gap 9
bspc config split_ratio 0.50
bspc config borderless_monocle true
bspc config gapless_monocle true
bspc config focused_border_color "#88C0D0"
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

View File

@ -0,0 +1,432 @@
[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+50"
# 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 = 2
# Defines color of the frame around the notification window.
frame_color = "#D8DEE9"
# 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 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:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
# <http://developer.gnome.org/pango/stable/PangoMarkupFormat.html>.
#
# 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 = "<b>%s</b>\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
# Paths to default icons.
icon_path = /usr/share/icons/Adwaita/16x16/status/:/usr/share/icons/Adwaita/16x16/devices/
### 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 = "#2E3440"
foreground = "#ECEFF4"
timeout = 10
# Icon for notifications with low urgency, uncomment to enable
#icon = /path/to/icon
[urgency_normal]
background = "#2E3440"
foreground = "#D8DEE9"
timeout = 10
# Icon for notifications with normal urgency, uncomment to enable
#icon = /path/to/icon
[urgency_critical]
background = "#2E3440"
foreground = "#A3BE8C"
frame_color = "#A3BE8C"
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

View File

@ -0,0 +1,188 @@
; 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 = "#2E3440"
background-light = "#727B8A"
foreground = "#D8DEE9"
foreground-light = "#ECEFF4"
accent = "#88C0D0"
; The common style between bars.
[bar-common-style]
width = 100%
height = 32
wm-restack = bspwm
fixed-center = false
line-size = 3
line-color = #f00
padding = 1
module-margin = 1
module-padding = 1
font-0 = "Iosevka;2"
font-1 = "Fira Code;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 home-fs root-fs
[module/home-fs]
type = internal/fs
mount-0 = /home
format-margin = 0
format-padding = 0
label-margin = 0
label-padding = 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/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/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-background = ${colors.foreground}
label-urgent-padding = 1
label-empty = %index%
label-empty-foreground = ${colors.foreground-light}
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 = <label-connected>
format-connected-underline = #9f78e1
format-prefix = "NET"
label-connected = %essid%
format-disconnected = <label-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"
time = %T
time-alt = %F
format-prefix = ""
label = %date% %time%
[module/pulseaudio]
inherit = module-common-style
type = internal/pulseaudio
format-volume-prefix = ""
format-volume = <label-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

View File

@ -0,0 +1,9 @@
configuration {
display-drun: "Application";
display-run: "Execute";
display-window: "Window";
display-ssh: "SSH";
font: "Iosevka 12";
show-icons: true;
theme: "themes/fds-mini-sidebar";
}

View File

@ -0,0 +1,66 @@
/**
* 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: #2E3440;
foreground: #D8DEE9;
color0: #3B4252;
color1: #BF616A;
color2: #A3BE8C;
color3: #EBCB8B;
color4: #81A1C1;
color5: #B48EAD;
color6: #88C0D0;
color7: #E5E9F0;
color8: #727B8A;
color9: #BF616A;
color10: #A3BE8C;
color11: #EBCB8B;
color12: #81A1C1;
color13: #B48EAD;
color14: #8FBCBB;
color15: #ECEFF4;
background-color: @background;
border-color: @foreground;
text-color: @foreground;
font: "Iosevka 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;
}

View File

@ -0,0 +1,93 @@
* {
/* The color configuration */
/* Useful for quick editing in case for compiled templates */
background: #2E3440;
foreground: #D8DEE9;
color0: #3B4252;
color1: #BF616A;
color2: #A3BE8C;
color3: #EBCB8B;
color4: #81A1C1;
color5: #B48EAD;
color6: #88C0D0;
color7: #E5E9F0;
color8: #727B8A;
color9: #BF616A;
color10: #A3BE8C;
color11: #EBCB8B;
color12: #81A1C1;
color13: #B48EAD;
color14: #8FBCBB;
color15: #ECEFF4;
/* 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 12";
}
window {
background-color: transparent;
height: 65%;
width: 45%;
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;
}

View File

@ -0,0 +1,122 @@
* {
/* The color configuration */
/* Useful for quick editing in case for compiled templates */
background: #2E3440;
foreground: #D8DEE9;
color0: #3B4252;
color1: #BF616A;
color2: #A3BE8C;
color3: #EBCB8B;
color4: #81A1C1;
color5: #B48EAD;
color6: #88C0D0;
color7: #E5E9F0;
color8: #727B8A;
color9: #BF616A;
color10: #A3BE8C;
color11: #EBCB8B;
color12: #81A1C1;
color13: #B48EAD;
color14: #8FBCBB;
color15: #ECEFF4;
/* 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 12";
}
window {
background-color: transparent;
height: 65%;
width: 35%;
position: southwest;
location: southwest;
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: @color0;
margin: 0 1em 0 0;
}
element {
background-color: @color0;
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;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 300 KiB

View File

@ -0,0 +1,114 @@
{ 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 {
# Pass the metadata of the theme.
modules.themes = {
name = "Fair and square";
version = "0.1.0";
path = ./.;
};
# Enable picom compositor.
services = {
picom = {
enable = true;
fade = false;
shadow = false;
};
xserver = {
displayManager = {
lightdm.enable = true;
lightdm.greeters.mini.enable = true;
lightdm.greeters.mini.user = config.my.username;
defaultSession = "none+bspwm";
};
enable = true;
libinput.enable = true;
windowManager.bspwm.enable = true;
};
};
my.env.TERMINAL = "alacritty";
my.home = {
# Enable GTK configuration.
gtk.enable = true;
# Enable QT configuration.
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 = <config/sxhkd>;
recursive = true;
};
})
(mkIf config.services.xserver.enable {
"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"
'';
})
];
};
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
font-awesome-ttf
];
};
}

7
packages/default.nix Executable file
View File

@ -0,0 +1,7 @@
[
(self: super: with super; {
# defold = (callPackage ./defold.nix {});
})
(import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz))
]

51
packages/defold.nix Executable file
View File

@ -0,0 +1,51 @@
# https://defold.com/open/
# It'sa game engine for cross-platform development.
{ stdenv, fetchFromGitHub,
autoconf,
automake,
cmake,
curl,
freeglut,
git,
jdk11,
libtool,
libuuid,
mesa_glu,
openalSoft,
python2,
rpm,
valgrind,
waf,
xorgproto,
libXi,
libXext,
}:
stdenv.mkDerivation rec {
pname = "defold";
version = "1.2.171";
src = fetchFromGitHub {
owner = "defold";
repo = "defold";
rev = "v1.2.171";
sha256 = "1anpwxgai1qk6c97zslfvj5b6s66fyk459cfnxnqm7d8sq9d0qg2";
};
buildPhase = ''
./scripts/build.py shell --platform=${stdenv.system}
./scripts/build.py install_ext --platform=${stdenv.system}
./scripts/build.py build_engine --platform=${stdenv.system}
'';
enableParallelBuilding = true;
doCheck = true;
meta = with stdenv.lib; {
description = "A free and open-source game engine for cross-platform development.";
homepage = "https://defold.com/";
license = licenses.free;
maintainers = [ maintainers.foo-dogsquared ];
platforms = [ "i686-linux" "x86_64-linux" ];
};
}