mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nix: format with alejandra
This commit is contained in:
parent
d5cad148da
commit
95eb4b71e0
118 changed files with 1291 additions and 1703 deletions
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
programs.atuin = {
|
||||
flags = [ "--disable-up-arrow" ];
|
||||
flags = ["--disable-up-arrow"];
|
||||
settings = {
|
||||
history_filter = [
|
||||
# privacy
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
nixosConfig ? null,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
}: {
|
||||
nix.gc = lib.mkIf (!nixosConfig.nix.gc.automatic or false) {
|
||||
automatic = true;
|
||||
frequency = "daily";
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
'');
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
|
||||
programs.feh = {
|
||||
keybindings = {
|
||||
prev_img = [
|
||||
|
|
@ -22,5 +21,4 @@
|
|||
zoom_fit = "=";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
|||
};
|
||||
}
|
||||
];
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
|
||||
programs.fzf.defaultOptions = [
|
||||
"--cycle"
|
||||
"--border=none"
|
||||
|
|
@ -10,5 +9,4 @@
|
|||
"--color=marker:#0184bc,spinner:#645199,header:#645199"
|
||||
"--color=gutter:#eeeeee"
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services = {
|
||||
gpg-agent.defaultCacheTtl = 1209600;
|
||||
gpg-agent.pinentryPackage = pkgs.pinentry-tty;
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -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}"))
|
||||
];
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
nixosConfig ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
{nixosConfig ? null, ...}: {
|
||||
home.language = {
|
||||
base = nixosConfig.i18n.defaultLocale or "en_US.UTF-8";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.neovim = {
|
||||
defaultEditor = true;
|
||||
extraPackages = [
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
]);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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"];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{
|
||||
|
||||
services.wired = {
|
||||
config = ./wired.ron;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue