chore: update lock file

This commit is contained in:
Artur Manuel 2024-10-29 15:37:11 +00:00
commit 0226353025
17 changed files with 425 additions and 86 deletions

View file

@ -0,0 +1,16 @@
{pkgs, ...}: let
ezaOptions = "--colour=always --icons=never --group-directories-first --octal-permissions";
in {
config = {
environment = {
shellAliases = builtins.mapAttrs (_: v: "${v} ${ezaOptions}") {
l = "eza -alh";
ls = "eza";
ll = "eza -l";
};
systemPackages = [
pkgs.eza
];
};
};
}

View file

@ -7,5 +7,10 @@
./pipewire.nix
./mpd.nix
./fonts.nix
./emacs.nix
./ssh.nix
./direnv.nix
./xonsh.nix
./aliases.nix
];
}

View file

@ -0,0 +1,23 @@
{
config,
lib,
...
}: let
cfg = config.alqueva.direnv;
in {
options.alqueva.direnv = {
enable = lib.mkEnableOption "direnv";
};
config = lib.mkIf cfg.enable {
programs.direnv = {
enable = true;
silent = true;
nix-direnv.enable = true;
direnvrcExtra = ''
echo "direnv version: ${config.programs.direnv.package.version}"
echo "shell version: ${config.users.defaultUserShell.pname} ${config.users.defaultUserShell.version}"
'';
};
};
}

View file

@ -0,0 +1,19 @@
{
config,
pkgs,
lib,
inputs,
...
}: let
cfg = config.alqueva.emacs;
in {
options.alqueva.emacs = {
enable = lib.mkEnableOption "Emacs";
};
config = lib.mkIf cfg.enable {
environment = {
systemPackages = [inputs.pankomacs.packages.${pkgs.system}.pankomacs];
sessionVariables."EDITOR" = "emacs";
};
};
}

View file

@ -1,5 +1,6 @@
{
config,
pkgs,
lib,
...
}: let
@ -9,13 +10,28 @@ in {
enable = lib.mkEnableOption "fish";
};
config = lib.mkIf cfg.enable {
programs.fish = {
vendor = {
functions.enable = true;
config.enable = true;
completions.enable = true;
programs = {
fish = {
vendor = {
functions.enable = true;
config.enable = true;
completions.enable = true;
};
enable = true;
};
enable = true;
starship = {
enable = true;
presets = ["no-nerd-font"];
};
};
environment.systemPackages = builtins.attrValues {
inherit
(pkgs.fishPlugins)
fzf-fish
forgit
autopair
;
};
};
}

View file

@ -6,53 +6,45 @@
}: let
cfg = config.alqueva.fonts;
inherit (lib) types mkOption;
fontSubmodule = fontPackages: fontNames: {
options = {
packages = mkOption {
type = types.listOf types.package;
default = fontPackages;
description = "Package of the font used.";
};
names = mkOption {
type = types.listOf types.str;
default = fontNames;
description = "Name of the default font you will be using.";
};
};
};
mkFontOption = fontType: fontPackages: fontNames:
mkStringsOption = default: letterform:
mkOption {
type = types.submodule (fontSubmodule fontPackages fontNames);
description = "Options for the ${fontType} letterform.";
type = types.listOf types.str;
inherit default;
description = "Which ${letterform} font packages you want to use.";
};
in {
options.alqueva.fonts = {
enable = mkEnableOption "" // {description = "Whether you want to use this fonts module.";};
sansSerif = mkFontOption "sans-serif" [pkgs.roboto] ["Roboto"];
monospace = mkFontOption "monospace" [pkgs.roboto-mono] ["Roboto Mono"];
serif = mkFontOption "serif" [pkgs.roboto-serif] ["Roboto Serif"];
emoji = mkFontOption "emoji" [pkgs.noto-fonts-color-emoji] ["Noto Color Emoji"];
extraPackages = mkOption {
enable = lib.mkEnableOption "" // {description = "Whether you want to use this fonts module.";};
packages = mkOption {
type = types.listOf types.package;
default = [];
description = "Extra font packages to be installed.";
default = [pkgs.roboto pkgs.roboto-serif pkgs.roboto-mono pkgs.noto-fonts-color-emoji];
description = "Packages related to fonts to be installed.";
};
names = builtins.mapAttrs (_n: v: mkStringsOption v.default v.letterform) {
sansSerif = {
default = ["Roboto"];
letterform = "sans-serif";
};
monospace = {
default = ["Roboto Mono"];
letterform = "monospace";
};
serif = {
default = ["Roboto Serif"];
letterform = "serif";
};
emoji = {
default = ["Noto Color Emoji"];
letterform = "emoji";
};
};
};
config = lib.mkIf cfg.enable {
fonts = {
packages = builtins.concatLists [
cfg.extraPackages
cfg.sansSerif.packages
cfg.monospace.packages
cfg.serif.packages
cfg.emoji.packages
];
inherit (cfg) packages;
fontconfig = {
defaultFonts = {
sansSerif = cfg.sansSerif.names;
monospace = cfg.monospace.names;
serif = cfg.serif.names;
emoji = cfg.emoji.names;
inherit (cfg.names) sansSerif monospace serif emoji;
};
enable = true;
};

View file

@ -18,6 +18,7 @@ in {
config = lib.mkIf cfg.enable {
services.mpd.enable = true;
environment.systemPackages =
lib.optional cfg.ncmpcpp pkgs.ncmpcpp;
[pkgs.mpd]
++ lib.optional cfg.ncmpcpp pkgs.ncmpcpp;
};
}

View file

@ -14,6 +14,7 @@ in {
services.pipewire = {
enable = true;
alsa.enable = true;
jack.enable = true;
pulse.enable = true;
wireplumber.enable = true;
};

View file

@ -12,9 +12,7 @@ in {
config = lib.mkIf cfg.enable {
environment.systemPackages = [
(pkgs.qutebrowser-qt5.override {
enableVulkan = true;
})
pkgs.qutebrowser
];
};
}

16
computers/shared/ssh.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
lib,
...
}: let
cfg = config.alqueva.openssh;
in {
options.alqueva.openssh = {
enable = lib.mkEnableOption "OpenSSH";
};
config = lib.mkIf cfg.enable {
programs.ssh.enableAskPassword = true;
services.openssh.enable = true;
};
}

View file

@ -0,0 +1,63 @@
{
config,
pkgs,
lib,
...
}: let
cfg = config.alqueva.xonsh;
inherit (pkgs) fetchFromGitHub;
in {
options.alqueva.xonsh = {
enable = lib.mkEnableOption "xonsh";
};
config = lib.mkIf cfg.enable {
programs = {
xonsh = {
config =
"from xonsh.xontribs import get_xontribs\n"
+ lib.concatStringsSep "\n" (builtins.attrValues (builtins.mapAttrs (n: v: "aliases['${n}'] = '${v}'\n") config.environment.shellAliases))
+ ''
for $xontrib in get_xontribs():
xontrib load $xontrib
execx($(zoxide init xonsh --cmd j), 'exec', __xonsh__.ctx, filename='zoxide')
'';
package = pkgs.xonsh.override {
extraPackages = ps: [
(let
name = "xontrib-fish-completer";
version = "0.0.1";
in
ps.buildPythonPackage {
inherit name version;
src = fetchFromGitHub {
owner = "xonsh";
repo = name;
rev = version;
hash = "sha256-PhhdZ3iLPDEIG9uDeR5ctJ9zz2+YORHBhbsiLrJckyA=";
};
})
(let
name = "xontrib-prompt-bar";
version = "0.5.8";
in
ps.buildPythonPackage {
inherit name version;
src = fetchFromGitHub {
owner = "anki-code";
repo = name;
rev = version;
hash = "sha256-n80XDApfoUJQORSzIY1FACLeL++HKmIxcz4MAeQ3CZ0=";
};
})
];
};
enable = true;
};
};
environment.systemPackages = [
pkgs.zoxide
];
};
}