nix: format with alejandra

This commit is contained in:
Primrose 2025-02-08 12:05:12 +01:00
parent d5cad148da
commit 95eb4b71e0
Signed by: primrose
GPG key ID: 4E887A4CA9714ADA
118 changed files with 1291 additions and 1703 deletions

View file

@ -1,6 +1,6 @@
{
programs.atuin = {
flags = [ "--disable-up-arrow" ];
flags = ["--disable-up-arrow"];
settings = {
history_filter = [
# privacy

View file

@ -2,9 +2,7 @@
nixosConfig ? null,
lib,
...
}:
{
}: {
nix.gc = lib.mkIf (!nixosConfig.nix.gc.automatic or false) {
automatic = true;
frequency = "daily";

View file

@ -3,152 +3,135 @@
lib,
config,
...
}:
let
}: let
cfg = config.services."autoupdate";
in
{
options =
let
eachPathOption = {
options = {
enable = lib.mkOption {
type = with lib.types; bool;
description = "Whether to enable this rule";
default = true;
};
startAt = lib.mkOption {
type = with lib.types; listOf str;
description = "When to update automatically";
default = [ "wed,sat 02:00" ];
};
updateCommand = lib.mkOption {
type = with lib.types; str;
description = "Command to run to update inputs";
};
commitOptions = lib.mkOption {
type = with lib.types; listOf str;
description = "Arguments passed to `git commit'";
default = [
"--no-verify"
"--no-gpg-sign"
];
};
commitMessageCommand = lib.mkOption {
type = with lib.types; nullOr str;
description = "Optional command to run, which result will be written to the commit message";
default = null;
};
path = lib.mkOption {
type = with lib.types; str;
description = "The path to be updated";
};
in {
options = let
eachPathOption = {
options = {
enable = lib.mkOption {
type = with lib.types; bool;
description = "Whether to enable this rule";
default = true;
};
startAt = lib.mkOption {
type = with lib.types; listOf str;
description = "When to update automatically";
default = ["wed,sat 02:00"];
};
updateCommand = lib.mkOption {
type = with lib.types; str;
description = "Command to run to update inputs";
};
commitOptions = lib.mkOption {
type = with lib.types; listOf str;
description = "Arguments passed to `git commit'";
default = [
"--no-verify"
"--no-gpg-sign"
];
};
commitMessageCommand = lib.mkOption {
type = with lib.types; nullOr str;
description = "Optional command to run, which result will be written to the commit message";
default = null;
};
path = lib.mkOption {
type = with lib.types; str;
description = "The path to be updated";
};
};
in
{
services."autoupdate" = {
enable = lib.mkEnableOption "autoupdate";
settings = lib.mkOption {
type = with lib.types; attrsOf (submodule eachPathOption);
description = "Paths to update";
default = { };
};
};
};
config = lib.mkIf cfg.enable {
systemd.user.services =
let
toSystemdService =
name:
{
path,
enable,
updateCommand,
commitMessageCommand,
commitOptions,
...
}:
lib.nameValuePair "autoupdate-${name}" (
lib.mkIf enable {
Unit = {
Description = "Automatically update ${name} flake inputs";
After = [ "network.target" ];
};
Install = {
WantedBy = [ "multi-user.target" ];
};
Service = {
WorkingDirectory = path;
ExecStart =
let
script = pkgs.writeShellApplication {
name = "autoupdate";
runtimeInputs = [
pkgs.git
pkgs.bash
pkgs.uutils-coreutils-noprefix
config.nix.package
];
text = ''
${updateCommand}
${
if (commitMessageCommand != null) then
''
changed="$(${commitMessageCommand})"
''
else
''
changed=""
''
}
git add .
git commit ${builtins.concatStringsSep " " commitOptions} -m "$(
cat <<-EOF
nix: update inputs
$changed
EOF
)"
'';
};
in
"${lib.getExe script}";
};
}
);
in
lib.mapAttrs' toSystemdService cfg.settings;
systemd.user.timers =
let
toSystemdTimer =
name:
{ enable, startAt, ... }:
lib.nameValuePair "autoupdate-${name}" (
lib.mkIf enable {
Unit.Description = "Automatically update ${name} flake inputs";
Timer = {
OnCalendar = startAt;
Persistent = true;
};
Install.WantedBy = [ "timers.target" ];
}
);
in
lib.mapAttrs' toSystemdTimer cfg.settings;
in {
services."autoupdate" = {
enable = lib.mkEnableOption "autoupdate";
settings = lib.mkOption {
type = with lib.types; attrsOf (submodule eachPathOption);
description = "Paths to update";
default = {};
};
};
};
config = lib.mkIf cfg.enable {
systemd.user.services = let
toSystemdService = name: {
path,
enable,
updateCommand,
commitMessageCommand,
commitOptions,
...
}:
lib.nameValuePair "autoupdate-${name}" (
lib.mkIf enable {
Unit = {
Description = "Automatically update ${name} flake inputs";
After = ["network.target"];
};
Install = {
WantedBy = ["multi-user.target"];
};
Service = {
WorkingDirectory = path;
ExecStart = let
script = pkgs.writeShellApplication {
name = "autoupdate";
runtimeInputs = [
pkgs.git
pkgs.bash
pkgs.uutils-coreutils-noprefix
config.nix.package
];
text = ''
${updateCommand}
${
if (commitMessageCommand != null)
then ''
changed="$(${commitMessageCommand})"
''
else ''
changed=""
''
}
git add .
git commit ${builtins.concatStringsSep " " commitOptions} -m "$(
cat <<-EOF
nix: update inputs
$changed
EOF
)"
'';
};
in "${lib.getExe script}";
};
}
);
in
lib.mapAttrs' toSystemdService cfg.settings;
systemd.user.timers = let
toSystemdTimer = name: {
enable,
startAt,
...
}:
lib.nameValuePair "autoupdate-${name}" (
lib.mkIf enable {
Unit.Description = "Automatically update ${name} flake inputs";
Timer = {
OnCalendar = startAt;
Persistent = true;
};
Install.WantedBy = ["timers.target"];
}
);
in
lib.mapAttrs' toSystemdTimer cfg.settings;
};
}

View file

@ -3,14 +3,9 @@
lib,
config,
...
}:
let
}: let
cfg = config.services."battery-notify";
in
{
in {
options = {
services."battery-notify" = {
enable = lib.mkEnableOption "battery-notify";
@ -22,7 +17,7 @@ in
checkAt = lib.mkOption {
type = with lib.types; listOf str;
description = "At which frequency should the service check for the battery status";
default = [ "*:0/5" ]; # every five minutes
default = ["*:0/5"]; # every five minutes
};
device_full = lib.mkOption {
type = with lib.types; str;
@ -39,29 +34,27 @@ in
systemd.user.services."battery-notify" = {
Unit.Description = "Notify when battery is low";
Install = {
WantedBy = [ "multi-user.target" ];
WantedBy = ["multi-user.target"];
};
Service = {
ExecStart =
let
script = pkgs.writeShellApplication {
name = "battery-notify";
runtimeInputs = [
pkgs.libnotify
pkgs.bc
pkgs.uutils-coreutils-noprefix
];
text = ''
now="$(cat ${cfg.device_now})"
full="$(cat ${cfg.device_full})"
ExecStart = let
script = pkgs.writeShellApplication {
name = "battery-notify";
runtimeInputs = [
pkgs.libnotify
pkgs.bc
pkgs.uutils-coreutils-noprefix
];
text = ''
now="$(cat ${cfg.device_now})"
full="$(cat ${cfg.device_full})"
if (( $(bc -l <<< "($now / $full) * 100 < ${builtins.toString cfg.triggerLevel}") )); then
notify-send -u critical "Battery Low" "Please charge your battery"
fi
'';
};
in
"${lib.getExe script}";
if (( $(bc -l <<< "($now / $full) * 100 < ${builtins.toString cfg.triggerLevel}") )); then
notify-send -u critical "Battery Low" "Please charge your battery"
fi
'';
};
in "${lib.getExe script}";
};
};
@ -71,8 +64,7 @@ in
OnCalendar = cfg.checkAt;
Persistent = true;
};
Install.WantedBy = [ "timers.target" ];
Install.WantedBy = ["timers.target"];
};
};
}

View file

@ -1,5 +1,7 @@
{ config, lib, ... }:
{
xdg.configFile = lib.mkIf config.programs.btop.enable { btop.source = ./btop; };
config,
lib,
...
}: {
xdg.configFile = lib.mkIf config.programs.btop.enable {btop.source = ./btop;};
}

View file

@ -1,71 +1,66 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
programs.cmus.extraConfig = let
# dispatch to multiple callbacks
callback-script = pkgs.writeShellApplication {
name = "cmus-callback-script";
runtimeInputs = [
pkgs.cmusfm
pkgs.libnotify
];
text = ''
# All keys contain only chars a-z. Values are UTF-8 strings.
#
# Keys: status file url artist album discnumber tracknumber title date
# - status (stopped, playing, paused) is always given
# - file or url is given only if track is 'loaded' in cmus
# - other keys/values are given only if they are available
programs.cmus.extraConfig =
let
# dispatch to multiple callbacks
callback-script = pkgs.writeShellApplication {
name = "cmus-callback-script";
runtimeInputs = [
pkgs.cmusfm
pkgs.libnotify
];
text = ''
# All keys contain only chars a-z. Values are UTF-8 strings.
#
# Keys: status file url artist album discnumber tracknumber title date
# - status (stopped, playing, paused) is always given
# - file or url is given only if track is 'loaded' in cmus
# - other keys/values are given only if they are available
# Use a map so that we can redirect all the args to cmusfm
argv=("$@")
declare -A map
while [ $# -gt 0 ]; do
map["$1"]="$2"
shift
shift
done
# Use a map so that we can redirect all the args to cmusfm
argv=("$@")
declare -A map
while [ $# -gt 0 ]; do
map["$1"]="$2"
shift
shift
done
# Setup pretty symbols
case ''${map[status]} in
paused)
SYMB=""
;;
playing)
SYMB=""
;;
esac
# Setup pretty symbols
case ''${map[status]} in
paused)
SYMB=""
;;
playing)
SYMB=""
;;
esac
notify-send \
"$SYMB ''${map[title]}" \
"''${map[artist]} / ''${map[album]}"
cmusfm "''${argv[@]}"
'';
};
in
notify-send \
"$SYMB ''${map[title]}" \
"''${map[artist]} / ''${map[album]}"
cmusfm "''${argv[@]}"
'';
};
in
(builtins.readFile ./rc)
+ (lib.optionalString pkgs.stdenv.isLinux ''
set status_display_program=${lib.getExe callback-script}
'')
+ (lib.optionalString pkgs.stdenv.isDarwin ''
set status_display_program=${lib.getExe pkgs.cmusfm}
'')
# This handles volume better
# Alsa backend has this behavior where system volume button will unsync two channels
+ (lib.optionalString pkgs.stdenv.isLinux ''
set output_plugin=pulse
'')
# When switching over bluetooth, toggle the output device to coreaudio
# and back to ao would fix the no sound issue.
+ (lib.optionalString pkgs.stdenv.isDarwin ''
# distortion fix https://github.com/cmus/cmus/issues/1130#issuecomment-1003324193
set output_plugin=ao
'');
}

View file

@ -1,13 +1,9 @@
{ config, ... }:
{
{config, ...}: {
programs.direnv = {
nix-direnv.enable = true;
config = {
whitelist.prefix = [ "${config.home.homeDirectory}/.dotfiles" ];
whitelist.prefix = ["${config.home.homeDirectory}/.dotfiles"];
global.strict_env = true;
};
};
}

View file

@ -3,10 +3,7 @@
config,
lib,
...
}:
{
}: {
i18n.inputMethod = {
fcitx5.addons = [
pkgs.fcitx5-chinese-addons
@ -17,5 +14,4 @@
xdg.configFile = lib.mkIf (config.i18n.inputMethod.enabled != null) {
"fcitx5".source = ./fcitx;
};
}

View file

@ -1,5 +1,4 @@
{
programs.feh = {
keybindings = {
prev_img = [
@ -22,5 +21,4 @@
zoom_fit = "=";
};
};
}

View file

@ -1,16 +1,11 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) nur;
in
{
in {
home.packages = [
pkgs.cascadia-code # Used in tab bar
];
programs.firefox = {
# some options only works with firefox-esr
package = pkgs.firefox-esr;
@ -48,42 +43,35 @@ in
};
profiles.leana = {
userChrome = let
onebar = pkgs.fetchFromGitea {
domain = "git.gay";
owner = "freeplay";
repo = "Firefox-Onebar";
rev = "197a5e5298985be3767da504bac153f3b75b63f7";
hash = "sha256-+AG6dp92//zEROtKQgPPB0YCTGtHywM8AtobvguF1PM=";
};
in ''
#statuspanel-label {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
.urlbar-input-box {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
userChrome =
let
onebar = pkgs.fetchFromGitea {
domain = "git.gay";
owner = "freeplay";
repo = "Firefox-Onebar";
rev = "197a5e5298985be3767da504bac153f3b75b63f7";
hash = "sha256-+AG6dp92//zEROtKQgPPB0YCTGtHywM8AtobvguF1PM=";
};
in
''
#statuspanel-label {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
.urlbar-input-box {
font-size: 18px !important;
font-family: "Cascadia Code" !important;
}
${builtins.readFile "${onebar}/onebar.css"}
'';
extensions =
let
addons = nur.repos.rycee.firefox-addons;
in
[
addons.ublock-origin
addons.privacy-badger
addons.tridactyl
addons.news-feed-eradicator
];
${builtins.readFile "${onebar}/onebar.css"}
'';
extensions = let
addons = nur.repos.rycee.firefox-addons;
in [
addons.ublock-origin
addons.privacy-badger
addons.tridactyl
addons.news-feed-eradicator
];
};
};
}

View file

@ -3,8 +3,7 @@
hostname,
lib,
...
}:
{
}: {
programs.fish = {
shellAbbrs = lib.mergeAttrsList [
{
@ -54,8 +53,7 @@
(lib.optionalAttrs pkgs.stdenv.isDarwin (
let
cmds = builtins.concatStringsSep ";";
in
{
in {
reset_launchpad = cmds [
"defaults write com.apple.dock ResetLaunchPad -bool true"
"killall Dock"

View file

@ -3,15 +3,11 @@
config,
pkgs,
...
}:
let
}: let
cfg = config.programs.fish;
fishExe = "${lib.getExe cfg.package}";
in
{
in {
imports = [
./aliasesAbbrs.nix
./sourcePaths.nix
@ -60,7 +56,6 @@ in
}) (builtins.readDir ./functions);
programs.fish = {
sourcePaths =
[
# Make sure wrapper comes first
@ -79,7 +74,6 @@ in
"/nix/var/nix/profiles/default/bin"
"/run/current-system/sw/bin"
]
# Add brew, but as fallback
++ (lib.optional pkgs.stdenv.isDarwin "/opt/homebrew/bin");
@ -105,7 +99,5 @@ in
};
}
];
};
}

View file

@ -1,7 +1,8 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
options.programs.fish.sourcePaths = lib.mkOption {
type = with lib.types; nonEmptyListOf str;
description = ''
@ -27,5 +28,4 @@
end
end
'';
}

View file

@ -1,5 +1,4 @@
{
programs.fzf.defaultOptions = [
"--cycle"
"--border=none"
@ -10,5 +9,4 @@
"--color=marker:#0184bc,spinner:#645199,header:#645199"
"--color=gutter:#eeeeee"
];
}

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
# git plugins
programs.git = {
lfs.enable = true;
@ -54,22 +53,20 @@
};
};
programs.git.includes =
let
universityIdentity = url: {
condition = "hasconfig:remote.*.url:git@${url}:*/**";
contents = {
init.defaultBranch = "main";
user = {
name = "Léana CHIANG";
email = "leana.chiang@etudiant.univ-rennes1.fr";
signingKey = "0x32035DB97E777EEB";
};
programs.git.includes = let
universityIdentity = url: {
condition = "hasconfig:remote.*.url:git@${url}:*/**";
contents = {
init.defaultBranch = "main";
user = {
name = "Léana CHIANG";
email = "leana.chiang@etudiant.univ-rennes1.fr";
signingKey = "0x32035DB97E777EEB";
};
};
in
[
(universityIdentity "gitlab.istic.univ-rennes1.fr")
(universityIdentity "gitlab2.istic.univ-rennes1.fr")
];
};
in [
(universityIdentity "gitlab.istic.univ-rennes1.fr")
(universityIdentity "gitlab2.istic.univ-rennes1.fr")
];
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
services = {
gpg-agent.defaultCacheTtl = 1209600;
gpg-agent.pinentryPackage = pkgs.pinentry-tty;

View file

@ -1,10 +1,10 @@
{ lib, config, ... }:
let
cfg = config.programs.kitty;
in
{
lib,
config,
...
}: let
cfg = config.programs.kitty;
in {
programs.kitty = lib.mkIf cfg.enable {
font = {
name = "AltiosevkaNFM";

View file

@ -3,20 +3,15 @@
lib,
config,
...
}:
{
}: {
home = {
username = lib.mkDefault "leana";
homeDirectory =
let
inherit (config.home) username;
in
homeDirectory = let
inherit (config.home) username;
in
lib.mkMerge [
(lib.mkIf pkgs.stdenv.isLinux (lib.mkDefault "/home/${username}"))
(lib.mkIf pkgs.stdenv.isDarwin (lib.mkDefault "/Users/${username}"))
];
};
}

View file

@ -1,9 +1,4 @@
{
nixosConfig ? null,
...
}:
{
{nixosConfig ? null, ...}: {
home.language = {
base = nixosConfig.i18n.defaultLocale or "en_US.UTF-8";
};

View file

@ -1,9 +1,4 @@
{
pkgs,
...
}:
{
{pkgs, ...}: {
programs.neovim = {
defaultEditor = true;
extraPackages = [

View file

@ -1,7 +1,8 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
programs = {
vim.enable = true;
};
@ -18,5 +19,4 @@
]
# coreutils for darwin
++ (lib.optional pkgs.stdenv.isDarwin pkgs.uutils-coreutils-noprefix);
}

View file

@ -3,14 +3,9 @@
pkgs,
lib,
...
}:
let
}: let
cfg = config.programs.password-store;
in
{
in {
home.packages = lib.mkIf cfg.enable [
pkgs.pwgen
pkgs.diceware
@ -22,5 +17,4 @@ in
exts.pass-import
]);
};
}

View file

@ -1,9 +1,9 @@
{ config, lib, ... }:
{
config,
lib,
...
}: {
programs.sioyek = {
bindings = {
"move_up" = "k";
"move_down" = "j";
@ -17,21 +17,19 @@
"u"
"<C-u>"
];
"toggle_two_page_mode" = [ "T" ];
"toggle_two_page_mode" = ["T"];
};
config.should_launch_new_window = "1";
};
xdg.mimeApps = lib.mkIf config.programs.sioyek.enable {
enable = true;
associations.added = {
"application/pdf" = [ "sioyek.desktop" ];
"application/pdf" = ["sioyek.desktop"];
};
defaultApplications = {
"application/pdf" = [ "sioyek.desktop" ];
"application/pdf" = ["sioyek.desktop"];
};
};
}

View file

@ -1,13 +1,11 @@
{ lib, config, ... }:
let
cfg = config.programs.starship;
in
{
lib,
config,
...
}: let
cfg = config.programs.starship;
in {
xdg.configFile = lib.mkIf cfg.enable {
"starship.toml".source = ./starship.toml;
};
}

View file

@ -1,14 +1,14 @@
{ pkgs, lib, ... }:
{
pkgs,
lib,
...
}: {
programs.tmux.extraConfig =
(builtins.readFile ./tmux.conf)
+ (lib.optionalString pkgs.stdenv.isDarwin ''
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'pbcopy'
'')
+ (lib.optionalString pkgs.stdenv.isLinux ''
bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'xclip -in -selection clipboard'

View file

@ -3,10 +3,7 @@
lib,
pkgs,
...
}:
{
}: {
nix = {
package = lib.mkDefault (nixosConfig.nix.package or pkgs.nix);
@ -38,7 +35,5 @@
to.type = "git";
to.url = "https://codeberg.org/leana8959/flakies";
};
};
}

View file

@ -1,31 +1,27 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.vim = {
extraConfig = builtins.readFile ./vimrc;
plugins =
let
vpkgs = pkgs.vimPlugins;
plugins = let
vpkgs = pkgs.vimPlugins;
paramount = pkgs.vimUtils.buildVimPlugin {
name = "paramount";
src = pkgs.fetchFromGitHub {
owner = "owickstrom";
repo = "vim-colors-paramount";
rev = "a5601d36fb6932e8d1a6f8b37b179a99b1456798";
hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY=";
};
paramount = pkgs.vimUtils.buildVimPlugin {
name = "paramount";
src = pkgs.fetchFromGitHub {
owner = "owickstrom";
repo = "vim-colors-paramount";
rev = "a5601d36fb6932e8d1a6f8b37b179a99b1456798";
hash = "sha256-j9nMjKYK7bqrGHprYp0ddLEWs1CNMudxXD13sOROVmY=";
};
in
[
vpkgs.vim-sleuth
vpkgs.vim-surround
vpkgs.vim-fugitive
vpkgs.vim-commentary
vpkgs.undotree
vpkgs.tabular
vpkgs.vim-caddyfile
paramount
];
};
in [
vpkgs.vim-sleuth
vpkgs.vim-surround
vpkgs.vim-fugitive
vpkgs.vim-commentary
vpkgs.undotree
vpkgs.tabular
vpkgs.vim-caddyfile
paramount
];
};
}

View file

@ -1,7 +1,5 @@
{
services.wired = {
config = ./wired.ron;
};
}

View file

@ -1,30 +1,24 @@
{
self,
...
}@inputs:
let
inherit (self.lib)
{self, ...} @ inputs: let
inherit
(self.lib)
modulesFromDir
mergeAttrsWith
;
inherit (inputs.nixpkgs) lib;
in
let
in let
common =
mergeAttrsWith
(x: y: {
imports = [
x
y
];
})
(modulesFromDir ./common)
{
wired = inputs.wired-notify.homeManagerModules.default;
};
(x: y: {
imports = [
x
y
];
})
(modulesFromDir ./common)
{
wired = inputs.wired-notify.homeManagerModules.default;
};
extra = modulesFromDir ./extra;
@ -36,13 +30,12 @@ let
];
}) (modulesFromDir ./named);
in
lib.mergeAttrsList [
{
commonModules.imports = lib.attrValues common;
extraModules.imports = lib.attrValues extra;
}
common
extra
named
]
lib.mergeAttrsList [
{
commonModules.imports = lib.attrValues common;
extraModules.imports = lib.attrValues extra;
}
common
extra
named
]

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
programs.neovim.extraPackages = [
# lua
pkgs.lua-language-server

View file

@ -1,10 +1,10 @@
{ pkgs, lib, ... }:
let
inherit (pkgs) myPkgs;
in
{
pkgs,
lib,
...
}: let
inherit (pkgs) myPkgs;
in {
programs = {
neovim.enable = true;
git.enable = true;

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
programs.direnv.enable = true;
home.packages = [

View file

@ -1,11 +1,7 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
imports = [ ./fonts.nix ];
in {
imports = [./fonts.nix];
home.packages = [
pkgs.qmk
@ -28,7 +24,7 @@ in
];
programs = {
neovim.extraPackages = [ pkgs.fish-lsp ];
neovim.extraPackages = [pkgs.fish-lsp];
git.signing.signByDefault = true;
cmus.enable = true;

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
home.packages = [
myPkgs.hiosevka-nerd-font-mono
pkgs.jetbrains-mono

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
imports = [
./firefox.nix
./gui.nix
@ -59,12 +55,12 @@ in
xdg.mimeApps = {
enable = true;
associations.added = {
"x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ];
"x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ];
"x-scheme-handler/mailto" = ["org.gnome.Evolution.desktop"];
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"];
};
defaultApplications = {
"x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ];
"x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ];
"x-scheme-handler/mailto" = ["org.gnome.Evolution.desktop"];
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"];
};
};
}

View file

@ -1,10 +1,10 @@
{ pkgs, config, ... }:
let
inherit (pkgs) myPkgs;
in
{
pkgs,
config,
...
}: let
inherit (pkgs) myPkgs;
in {
home.packages = [
pkgs.gnumake
pkgs.cmake
@ -39,10 +39,10 @@ in
pkgs.maven
# scala
(pkgs.sbt.override { jre = config.programs.java.package; })
(pkgs.scala.override { jre = config.programs.java.package; })
(pkgs.metals.override { jre = config.programs.java.package; })
(pkgs.ammonite.override { jre = config.programs.java.package; })
(pkgs.sbt.override {jre = config.programs.java.package;})
(pkgs.scala.override {jre = config.programs.java.package;})
(pkgs.metals.override {jre = config.programs.java.package;})
(pkgs.ammonite.override {jre = config.programs.java.package;})
# isabelle
pkgs.isabelle # module ACF
@ -85,7 +85,7 @@ in
programs.vscode = {
enable = true;
extensions = [
(pkgs.vscode-extensions.redhat.java.overrideAttrs { jdk = config.programs.java.package; })
(pkgs.vscode-extensions.redhat.java.overrideAttrs {jdk = config.programs.java.package;})
pkgs.vscode-extensions.vscjava.vscode-java-pack
];
};
@ -97,7 +97,7 @@ in
programs.java = {
enable = true;
package = pkgs.jdk17.override { enableJavaFX = true; };
package = pkgs.jdk17.override {enableJavaFX = true;};
};
programs.git.maintenance = {

View file

@ -1,13 +1,7 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) nur;
in
{
in {
programs.firefox = {
enable = true;
policies.SearchEngines = {
@ -28,17 +22,13 @@ in
"browser.ctrlTab.sortByRecentlyUsed" = false;
};
extensions =
let
addons = nur.repos.rycee.firefox-addons;
in
[
addons.sponsorblock
# flaky, find a better source to be fetched
# addons.bypass-paywalls-clean
];
extensions = let
addons = nur.repos.rycee.firefox-addons;
in [
addons.sponsorblock
# flaky, find a better source to be fetched
# addons.bypass-paywalls-clean
];
};
};
}

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
home.pointerCursor = {
x11.enable = true;
gtk.enable = true;

View file

@ -1,5 +1,4 @@
{
programs.xmobar.extraConfig = ''
Config { overrideRedirect = False
, font = "Iosevka 11"
@ -39,5 +38,4 @@
, template = "%XMonadLog% }{ %kbd% | %alsa:default:Master% | %thermal2% | %memory% | %battery% | %date% "
}
'';
}

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = [
pkgs.just
pkgs.parallel

View file

@ -1,10 +1,10 @@
{ pkgs, lib, ... }:
let
inherit (pkgs) myPkgs;
in
{
pkgs,
lib,
...
}: let
inherit (pkgs) myPkgs;
in {
home.stateVersion = "24.05";
home = {
@ -12,10 +12,9 @@ in
homeDirectory = "/udd/ychiang";
};
home.packages = [ myPkgs.necrolib ];
home.packages = [myPkgs.necrolib];
home.file.".local/share/fonts/truetype".source =
"${myPkgs.altiosevka-nerd-font-mono}/share/fonts/truetype";
home.file.".local/share/fonts/truetype".source = "${myPkgs.altiosevka-nerd-font-mono}/share/fonts/truetype";
# it gets turned off so I need to run it more frequently
nix.gc.frequency = lib.mkForce "3 hours";

View file

@ -1,6 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.stateVersion = "24.05";
home = {

View file

@ -1,4 +1,4 @@
{
imports = [ ./fonts.nix ];
imports = [./fonts.nix];
programs.cmus.enable = true;
}

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
home.packages = [
myPkgs.hiosevka-nerd-font-mono
pkgs.jetbrains-mono

View file

@ -3,9 +3,7 @@
lib,
hostname,
...
}:
{
}: {
services.autoupdate = {
enable = true;
settings = {

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
imports = [
./firefox.nix
./gui.nix
@ -66,10 +62,10 @@ in
xdg.mimeApps = {
enable = true;
associations.added = {
"x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ];
"x-scheme-handler/mailto" = ["org.gnome.Evolution.desktop"];
};
defaultApplications = {
"x-scheme-handler/mailto" = [ "org.gnome.Evolution.desktop" ];
"x-scheme-handler/mailto" = ["org.gnome.Evolution.desktop"];
};
};
}

View file

@ -1,7 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = [
# preview markdown
pkgs.python3Packages.grip
@ -39,5 +36,4 @@
enable = true;
goPath = ".go";
};
}

View file

@ -1,13 +1,7 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) nur;
in
{
in {
programs.firefox = {
enable = true;
policies.SearchEngines = {
@ -28,19 +22,15 @@ in
"browser.ctrlTab.sortByRecentlyUsed" = false;
};
extensions =
let
addons = nur.repos.rycee.firefox-addons;
in
[
addons.sponsorblock
# flaky, find a better source to be fetched
# addons.bypass-paywalls-clean
addons.return-youtube-dislikes
];
extensions = let
addons = nur.repos.rycee.firefox-addons;
in [
addons.sponsorblock
# flaky, find a better source to be fetched
# addons.bypass-paywalls-clean
addons.return-youtube-dislikes
];
};
};
}

View file

@ -1,10 +1,6 @@
{ pkgs, ... }:
let
{pkgs, ...}: let
inherit (pkgs) myPkgs;
in
{
in {
home.pointerCursor = {
x11.enable = true;
gtk.enable = true;

View file

@ -1,5 +1,4 @@
{
programs.xmobar.extraConfig = ''
Config { overrideRedirect = False
, font = "Iosevka 11"
@ -39,5 +38,4 @@
, template = "%XMonadLog% }{ %kbd% | %alsa:default:Master% | %thermal2% | %memory% | %battery% | %date% "
}
'';
}