feat: MIT license and some changes

This commit is contained in:
Artur Manuel 2024-11-26 13:51:16 +00:00
commit b164cad6e2
8 changed files with 70 additions and 21 deletions

19
LICENSE Normal file
View file

@ -0,0 +1,19 @@
Copyright (c) 2024 Artur Manuel <balkenix@outlook.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -6,8 +6,8 @@ riverctl spawn "swaybg -i ~/.local/share/wallpapers/02.jpg -m fill"
riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" riverctl spawn "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river" riverctl spawn "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=river"
riverctl map normal Super T spawn alacritty riverctl map normal Super+Shift Return spawn alacritty
riverctl map normal Super R spawn fuzzel riverctl map normal Super P spawn fuzzel
riverctl map normal Super Q close riverctl map normal Super Q close
riverctl map normal Super+Shift E exit riverctl map normal Super+Shift E exit
riverctl map normal Super+Shift C spawn "~/.config/river/init" riverctl map normal Super+Shift C spawn "~/.config/river/init"

View file

@ -1,6 +1,6 @@
{pkgs, ...}: { {pkgs, ...}: {
imports = [ imports = [
./hardware-configuration.nix ./hardware.nix
./disks.nix ./disks.nix
./theme.nix ./theme.nix
./apps.nix ./apps.nix

View file

@ -1,17 +1,20 @@
{pkgs, ...}: { {pkgs, ...}: {
alqueva.fonts = { alqueva.fonts = {
names = { names = {
sansSerif = ["Iosevka Comfy Wide Fixed"]; sansSerif = ["Source Sans Pro"];
monospace = ["Iosevka Comfy Wide Fixed"]; monospace = ["Source Code Pro"];
serif = ["Iosevka Comfy Wide Motion Fixed"]; serif = ["Source Serif Pro"];
emoji = ["OpenMoji Color"];
}; };
packages = builtins.attrValues { packages = {
inherit sansSerif = [pkgs.source-sans-pro];
(pkgs.iosevka-comfy) monospace = [pkgs.source-code-pro];
comfy-wide-fixed serif = [pkgs.source-serif-pro];
comfy-wide-motion-fixed emoji = [pkgs.openmoji-color];
; extra = [
nerdfonts = pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}; pkgs.source-han-sans
(pkgs.nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];})
];
}; };
enable = true; enable = true;
}; };

View file

@ -1,5 +1,4 @@
{ {
inputs,
pkgs, pkgs,
lib, lib,
... ...

View file

@ -10,16 +10,43 @@
mkOption { mkOption {
type = types.listOf types.str; type = types.listOf types.str;
inherit default; inherit default;
description = "Which ${letterform} font packages you want to use."; description = "The default fonts for ${letterform}.";
};
mkPackagesOption = default: letterform:
mkOption {
type = types.listOf types.package;
inherit default;
description = "The packages you want to use for your ${letterform} fonts.";
}; };
in { in {
options.alqueva.fonts = { options.alqueva.fonts = {
enable = lib.mkEnableOption "" // {description = "Whether you want to use this fonts module.";}; enable = lib.mkEnableOption "" // {description = "Whether you want to use this fonts module.";};
packages = mkOption { packages =
type = types.listOf types.package; {
default = [pkgs.roboto pkgs.roboto-serif pkgs.roboto-mono pkgs.noto-fonts-color-emoji]; extra = mkOption {
description = "Packages related to fonts to be installed."; type = types.listOf types.package;
}; default = [];
description = "Extra font packages you want installed.";
};
}
// builtins.mapAttrs (_n: v: mkPackagesOption v.default v.letterform) {
sansSerif = {
default = [pkgs.roboto];
letterform = "sans-serif";
};
monospace = {
default = [pkgs.roboto-mono];
letterform = "monospace";
};
serif = {
default = [pkgs.roboto-serif];
letterform = "serif";
};
emoji = {
default = [pkgs.noto-fonts-color-emoji];
letterform = "emoji";
};
};
names = builtins.mapAttrs (_n: v: mkStringsOption v.default v.letterform) { names = builtins.mapAttrs (_n: v: mkStringsOption v.default v.letterform) {
sansSerif = { sansSerif = {
default = ["Roboto"]; default = ["Roboto"];
@ -41,7 +68,7 @@ in {
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
fonts = { fonts = {
inherit (cfg) packages; packages = builtins.concatLists (builtins.attrValues cfg.packages);
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
inherit (cfg.names) sansSerif monospace serif emoji; inherit (cfg.names) sansSerif monospace serif emoji;

View file

@ -25,6 +25,7 @@
dates = "weekly"; dates = "weekly";
}; };
}; };
nixpkgs.config.allowUnfree = true;
environment.shellAliases = { environment.shellAliases = {
rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}"; rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}";
rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}"; rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}";