flake: reformat with nixfmt
This commit is contained in:
parent
a79e641851
commit
eaf4f56ac0
117 changed files with 2667 additions and 1592 deletions
|
@ -1,37 +1,45 @@
|
|||
{ config, main, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
main,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
xdg.configFile = {
|
||||
"neofetch/config.conf".source = pkgs.substituteAll {
|
||||
src = ./neofetch.conf;
|
||||
xdg.configFile =
|
||||
{
|
||||
"neofetch/config.conf".source = pkgs.substituteAll {
|
||||
src = ./neofetch.conf;
|
||||
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/ad-oliviero/uwufetch/main/res/nixos.png";
|
||||
sha256 = "007q947q2a5c8z9r6cc6mj3idq0ss9zsi9xvij8l8chkjnh8fwn2";
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/ad-oliviero/uwufetch/main/res/nixos.png";
|
||||
sha256 = "007q947q2a5c8z9r6cc6mj3idq0ss9zsi9xvij8l8chkjnh8fwn2";
|
||||
};
|
||||
inherit (main.info) model;
|
||||
inherit (main.info.env) wm;
|
||||
};
|
||||
inherit (main.info) model;
|
||||
inherit (main.info.env) wm;
|
||||
};
|
||||
|
||||
"black".text = ''
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ["py310"]
|
||||
'';
|
||||
} // optionalAttrs main.info.graphical {
|
||||
"qtile".source = pkgs.substituteSubset {
|
||||
src = ./qtile;
|
||||
files = [ "config.py" ];
|
||||
"black".text = ''
|
||||
[tool.black]
|
||||
line-length = 120
|
||||
target-version = ["py310"]
|
||||
'';
|
||||
}
|
||||
// optionalAttrs main.info.graphical {
|
||||
"qtile".source = pkgs.substituteSubset {
|
||||
src = ./qtile;
|
||||
files = [ "config.py" ];
|
||||
|
||||
wallpaper = pkgs.fetchurl {
|
||||
name = "BotanWallpaper.jpg";
|
||||
# Source: https://www.pixiv.net/en/artworks/86093828
|
||||
url = "https://safebooru.org//images/3159/6c2d22b1fcac19a679de61f713c56503bca5aad9.jpg";
|
||||
sha256 = "sha256-3oVx9k+IN8GI8EWx3kPiQWdPGSO645abrEIL8C6sNq8=";
|
||||
wallpaper = pkgs.fetchurl {
|
||||
name = "BotanWallpaper.jpg";
|
||||
# Source: https://www.pixiv.net/en/artworks/86093828
|
||||
url = "https://safebooru.org//images/3159/6c2d22b1fcac19a679de61f713c56503bca5aad9.jpg";
|
||||
sha256 = "sha256-3oVx9k+IN8GI8EWx3kPiQWdPGSO645abrEIL8C6sNq8=";
|
||||
};
|
||||
wallpaper_mode = "fill";
|
||||
firefox = config.programs.firefox.package.meta.mainProgram;
|
||||
locker = main.common.wm.locker.meta.mainProgram;
|
||||
};
|
||||
wallpaper_mode = "fill";
|
||||
firefox = config.programs.firefox.package.meta.mainProgram;
|
||||
locker = main.common.wm.locker.meta.mainProgram;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,11 @@
|
|||
{ config, common, secrets, lib, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
common,
|
||||
secrets,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) flatten optional mkIf;
|
||||
ifGraphical = lib.optionals config.info.graphical;
|
||||
|
@ -8,66 +15,78 @@ in
|
|||
imports = [
|
||||
];
|
||||
|
||||
home = { config, main, ... }: {
|
||||
imports = [
|
||||
./config
|
||||
];
|
||||
home =
|
||||
{ config, main, ... }:
|
||||
{
|
||||
imports = [
|
||||
./config
|
||||
];
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
userEmail = "infinidoge@inx.moe";
|
||||
userName = "Infinidoge";
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
user.signingkey = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
||||
programs = {
|
||||
git = {
|
||||
userEmail = "infinidoge@inx.moe";
|
||||
userName = "Infinidoge";
|
||||
extraConfig = {
|
||||
gpg.format = "ssh";
|
||||
commit.gpgsign = true;
|
||||
user.signingkey = "${config.home.homeDirectory}/.ssh/id_ed25519.pub";
|
||||
};
|
||||
};
|
||||
firefox = {
|
||||
enable = main.info.graphical;
|
||||
package = pkgs.firefox-devedition;
|
||||
};
|
||||
};
|
||||
firefox = {
|
||||
enable = main.info.graphical;
|
||||
package = pkgs.firefox-devedition;
|
||||
|
||||
home.sessionVariables = {
|
||||
KEYID = "0x30E7A4C03348641E";
|
||||
POP_SMTP_HOST = common.email.smtp.address;
|
||||
POP_SMTP_PORT = common.email.smtp.STARTTLS;
|
||||
POP_SMTP_USERNAME = common.email.withUser "infinidoge";
|
||||
POP_SMTP_PASSWORD = "$(cat ${secrets.personal-smtp-password})";
|
||||
};
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
flatten [
|
||||
bitwarden-cli
|
||||
bsd-finger
|
||||
jmtpfs
|
||||
ncdu
|
||||
peaclock
|
||||
pop
|
||||
|
||||
(lib.optionals (!main.universe.minimal.enable) [
|
||||
packwiz
|
||||
toot
|
||||
])
|
||||
|
||||
(ifGraphical [
|
||||
speedcrunch
|
||||
(discord-canary.override {
|
||||
withVencord = true;
|
||||
withOpenASAR = true;
|
||||
withTTS = false;
|
||||
})
|
||||
])
|
||||
|
||||
(lib.optionals (!main.universe.minimal.enable && main.info.graphical) [
|
||||
(discord.override {
|
||||
withVencord = true;
|
||||
withOpenASAR = true;
|
||||
withTTS = false;
|
||||
})
|
||||
schildichat-desktop
|
||||
signal-desktop
|
||||
teams-for-linux
|
||||
thunderbird
|
||||
tor-browser
|
||||
bitwarden
|
||||
qbittorrent
|
||||
])
|
||||
];
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
KEYID = "0x30E7A4C03348641E";
|
||||
POP_SMTP_HOST = common.email.smtp.address;
|
||||
POP_SMTP_PORT = common.email.smtp.STARTTLS;
|
||||
POP_SMTP_USERNAME = common.email.withUser "infinidoge";
|
||||
POP_SMTP_PASSWORD = "$(cat ${secrets.personal-smtp-password})";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; flatten [
|
||||
bitwarden-cli
|
||||
bsd-finger
|
||||
jmtpfs
|
||||
ncdu
|
||||
peaclock
|
||||
pop
|
||||
|
||||
(lib.optionals (!main.universe.minimal.enable) [
|
||||
packwiz
|
||||
toot
|
||||
])
|
||||
|
||||
(ifGraphical [
|
||||
speedcrunch
|
||||
(discord-canary.override { withVencord = true; withOpenASAR = true; withTTS = false; })
|
||||
])
|
||||
|
||||
(lib.optionals (!main.universe.minimal.enable && main.info.graphical) [
|
||||
(discord.override { withVencord = true; withOpenASAR = true; withTTS = false; })
|
||||
schildichat-desktop
|
||||
signal-desktop
|
||||
teams-for-linux
|
||||
thunderbird
|
||||
tor-browser
|
||||
bitwarden
|
||||
qbittorrent
|
||||
])
|
||||
];
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.users.infinidoge.rules = mkIf config.universe.media.enable [
|
||||
"L+ /home/infinidoge/.local/share/jellyfinmediaplayer/scripts/mpris.so - - - - ${pkgs.mpvScripts.mpris}/share/mpv/scripts/mpris.so"
|
||||
];
|
||||
|
@ -82,7 +101,6 @@ in
|
|||
monospace = [ "DejaVuSansMono" ];
|
||||
};
|
||||
|
||||
|
||||
modules = {
|
||||
desktop.wm.qtile.enable = true;
|
||||
};
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
# Modified from https://github.com/nix-community/impermanence/blob/master/home-manager.nix
|
||||
|
||||
|
@ -14,54 +19,60 @@ in
|
|||
|
||||
home.bindmounts = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (
|
||||
submodule ({ name, ... }: {
|
||||
options =
|
||||
type =
|
||||
with types;
|
||||
attrsOf (
|
||||
submodule (
|
||||
{ name, ... }:
|
||||
{
|
||||
directories = mkOption {
|
||||
type = with types; listOf (submodule {
|
||||
options = {
|
||||
source = mkOption {
|
||||
type = with types; str;
|
||||
};
|
||||
options = {
|
||||
directories = mkOption {
|
||||
type =
|
||||
with types;
|
||||
listOf (submodule {
|
||||
options = {
|
||||
source = mkOption {
|
||||
type = with types; str;
|
||||
};
|
||||
|
||||
target = mkOption {
|
||||
type = with types; str;
|
||||
};
|
||||
};
|
||||
});
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of directories and target locations that you wish to bind-mount from the initial source.
|
||||
'';
|
||||
};
|
||||
target = mkOption {
|
||||
type = with types; str;
|
||||
};
|
||||
};
|
||||
});
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of directories and target locations that you wish to bind-mount from the initial source.
|
||||
'';
|
||||
};
|
||||
|
||||
allowOther = mkOption {
|
||||
type = with types; nullOr bool;
|
||||
default = null;
|
||||
example = true;
|
||||
apply = x:
|
||||
if x == null then
|
||||
warn ''
|
||||
home.bindmounts."${name}".allowOther not set; assuming 'false'.
|
||||
See https://github.com/nix-community/impermanence#home-manager for more info.
|
||||
''
|
||||
false
|
||||
else
|
||||
x;
|
||||
description = ''
|
||||
Whether to allow other users, such as
|
||||
<literal>root</literal>, access to files through the
|
||||
bind mounted directories listed in
|
||||
<literal>directories</literal>. Requires the NixOS
|
||||
configuration parameter
|
||||
<literal>programs.fuse.userAllowOther</literal> to
|
||||
be <literal>true</literal>.
|
||||
'';
|
||||
allowOther = mkOption {
|
||||
type = with types; nullOr bool;
|
||||
default = null;
|
||||
example = true;
|
||||
apply =
|
||||
x:
|
||||
if x == null then
|
||||
warn ''
|
||||
home.bindmounts."${name}".allowOther not set; assuming 'false'.
|
||||
See https://github.com/nix-community/impermanence#home-manager for more info.
|
||||
'' false
|
||||
else
|
||||
x;
|
||||
description = ''
|
||||
Whether to allow other users, such as
|
||||
<literal>root</literal>, access to files through the
|
||||
bind mounted directories listed in
|
||||
<literal>directories</literal>. Requires the NixOS
|
||||
configuration parameter
|
||||
<literal>programs.fuse.userAllowOther</literal> to
|
||||
be <literal>true</literal>.
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
);
|
||||
}
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -69,11 +80,18 @@ in
|
|||
config = {
|
||||
systemd.user.services =
|
||||
let
|
||||
mkBindMountService = persistentStoragePath: dir:
|
||||
mkBindMountService =
|
||||
persistentStoragePath: dir:
|
||||
let
|
||||
inherit (dir) source target;
|
||||
targetDir = escapeShellArg (concatPaths [ persistentStoragePath source ]);
|
||||
mountPoint = escapeShellArg (concatPaths [ config.home.homeDirectory target ]);
|
||||
targetDir = escapeShellArg (concatPaths [
|
||||
persistentStoragePath
|
||||
source
|
||||
]);
|
||||
mountPoint = escapeShellArg (concatPaths [
|
||||
config.home.homeDirectory
|
||||
target
|
||||
]);
|
||||
name = "bindMount-${sanitizeName targetDir}";
|
||||
bindfsOptions = concatStringsSep "," (
|
||||
optional (!cfg.${persistentStoragePath}.allowOther) "no-allow-other"
|
||||
|
@ -125,21 +143,25 @@ in
|
|||
Service = {
|
||||
ExecStart = "${startScript}";
|
||||
ExecStop = "${stopScript}";
|
||||
Environment = "PATH=${makeBinPath [ pkgs.coreutils pkgs.util-linux pkgs.gnugrep pkgs.bindfs ]}:/run/wrappers/bin";
|
||||
Environment = "PATH=${
|
||||
makeBinPath [
|
||||
pkgs.coreutils
|
||||
pkgs.util-linux
|
||||
pkgs.gnugrep
|
||||
pkgs.bindfs
|
||||
]
|
||||
}:/run/wrappers/bin";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
mkBindMountServicesForPath = persistentStoragePath:
|
||||
listToAttrs (map
|
||||
(mkBindMountService persistentStoragePath)
|
||||
cfg.${persistentStoragePath}.directories
|
||||
mkBindMountServicesForPath =
|
||||
persistentStoragePath:
|
||||
listToAttrs (
|
||||
map (mkBindMountService persistentStoragePath) cfg.${persistentStoragePath}.directories
|
||||
);
|
||||
in
|
||||
builtins.foldl'
|
||||
recursiveUpdate
|
||||
{ }
|
||||
(map mkBindMountServicesForPath persistentStoragePaths);
|
||||
builtins.foldl' recursiveUpdate { } (map mkBindMountServicesForPath persistentStoragePaths);
|
||||
|
||||
home.activation =
|
||||
let
|
||||
|
@ -148,17 +170,20 @@ in
|
|||
# The name of the activation script entry responsible for
|
||||
# reloading systemd user services. The name was initially
|
||||
# `reloadSystemD` but has been changed to `reloadSystemd`.
|
||||
reloadSystemd =
|
||||
if config.home.activation ? reloadSystemD then
|
||||
"reloadSystemD"
|
||||
else
|
||||
"reloadSystemd";
|
||||
reloadSystemd = if config.home.activation ? reloadSystemD then "reloadSystemD" else "reloadSystemd";
|
||||
|
||||
mkBindMount = persistentStoragePath: dir:
|
||||
mkBindMount =
|
||||
persistentStoragePath: dir:
|
||||
let
|
||||
inherit (dir) source target;
|
||||
targetDir = escapeShellArg (concatPaths [ persistentStoragePath source ]);
|
||||
mountPoint = escapeShellArg (concatPaths [ config.home.homeDirectory target ]);
|
||||
targetDir = escapeShellArg (concatPaths [
|
||||
persistentStoragePath
|
||||
source
|
||||
]);
|
||||
mountPoint = escapeShellArg (concatPaths [
|
||||
config.home.homeDirectory
|
||||
target
|
||||
]);
|
||||
mount = "${pkgs.util-linux}/bin/mount";
|
||||
bindfsOptions = concatStringsSep "," (
|
||||
optional (!cfg.${persistentStoragePath}.allowOther) "no-allow-other"
|
||||
|
@ -189,15 +214,18 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
mkBindMountsForPath = persistentStoragePath:
|
||||
concatMapStrings
|
||||
(mkBindMount persistentStoragePath)
|
||||
cfg.${persistentStoragePath}.directories;
|
||||
mkBindMountsForPath =
|
||||
persistentStoragePath:
|
||||
concatMapStrings (mkBindMount persistentStoragePath) cfg.${persistentStoragePath}.directories;
|
||||
|
||||
mkUnmount = persistentStoragePath: dir:
|
||||
mkUnmount =
|
||||
persistentStoragePath: dir:
|
||||
let
|
||||
inherit (dir) target;
|
||||
mountPoint = escapeShellArg (concatPaths [ config.home.homeDirectory target ]);
|
||||
mountPoint = escapeShellArg (concatPaths [
|
||||
config.home.homeDirectory
|
||||
target
|
||||
]);
|
||||
in
|
||||
''
|
||||
if [[ -n ''${mountedPaths[${mountPoint}]+x} ]]; then
|
||||
|
@ -218,39 +246,29 @@ in
|
|||
fi
|
||||
'';
|
||||
|
||||
mkUnmountsForPath = persistentStoragePath:
|
||||
concatMapStrings
|
||||
(mkUnmount persistentStoragePath)
|
||||
cfg.${persistentStoragePath}.directories;
|
||||
mkUnmountsForPath =
|
||||
persistentStoragePath:
|
||||
concatMapStrings (mkUnmount persistentStoragePath) cfg.${persistentStoragePath}.directories;
|
||||
|
||||
in
|
||||
mkIf (any (path: cfg.${path}.directories != [ ]) persistentStoragePaths) {
|
||||
createAndMountPersistentStoragePaths =
|
||||
dag.entryBefore
|
||||
[ "writeBoundary" ]
|
||||
''
|
||||
declare -A mountedPaths
|
||||
${(concatMapStrings mkBindMountsForPath persistentStoragePaths)}
|
||||
'';
|
||||
createAndMountPersistentStoragePaths = dag.entryBefore [ "writeBoundary" ] ''
|
||||
declare -A mountedPaths
|
||||
${(concatMapStrings mkBindMountsForPath persistentStoragePaths)}
|
||||
'';
|
||||
|
||||
unmountPersistentStoragePaths =
|
||||
dag.entryBefore
|
||||
[ "createAndMountPersistentStoragePaths" ]
|
||||
''
|
||||
unmountBindMounts() {
|
||||
${concatMapStrings mkUnmountsForPath persistentStoragePaths}
|
||||
}
|
||||
# Run the unmount function on error to clean up stray
|
||||
# bind mounts
|
||||
trap "unmountBindMounts" ERR
|
||||
'';
|
||||
unmountPersistentStoragePaths = dag.entryBefore [ "createAndMountPersistentStoragePaths" ] ''
|
||||
unmountBindMounts() {
|
||||
${concatMapStrings mkUnmountsForPath persistentStoragePaths}
|
||||
}
|
||||
# Run the unmount function on error to clean up stray
|
||||
# bind mounts
|
||||
trap "unmountBindMounts" ERR
|
||||
'';
|
||||
|
||||
runUnmountPersistentStoragePaths =
|
||||
dag.entryBefore
|
||||
[ reloadSystemd ]
|
||||
''
|
||||
unmountBindMounts
|
||||
'';
|
||||
runUnmountPersistentStoragePaths = dag.entryBefore [ reloadSystemd ] ''
|
||||
unmountBindMounts
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, main, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
main,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
|
@ -17,7 +22,13 @@
|
|||
};
|
||||
|
||||
publicKeys = [
|
||||
{ source = pkgs.fetchurl { url = "https://inx.moe/pub.txt"; sha256 = "sha256-Eocb+3TbeWmwkxQNQ3XKmRi5N9vz7QoLni0b8b0zw2k="; }; trust = "ultimate"; }
|
||||
{
|
||||
source = pkgs.fetchurl {
|
||||
url = "https://inx.moe/pub.txt";
|
||||
sha256 = "sha256-Eocb+3TbeWmwkxQNQ3XKmRi5N9vz7QoLni0b8b0zw2k=";
|
||||
};
|
||||
trust = "ultimate";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
@ -2,48 +2,57 @@
|
|||
{
|
||||
programs.htop = {
|
||||
enable = true;
|
||||
settings = {
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
color_scheme = 0;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
find_comm_in_cmdline = 1;
|
||||
tree_view = 1;
|
||||
header_margin = 1;
|
||||
show_cpu_usage = 1;
|
||||
show_cpu_frequency = 1;
|
||||
show_cpu_temperature = 1;
|
||||
update_process_names = 1;
|
||||
} // (with config.lib.htop; leftMeters [
|
||||
(bar "AllCPUs")
|
||||
(bar "CPU")
|
||||
]) // (with config.lib.htop; rightMeters [
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
(text "Blank")
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
(text "Systemd")
|
||||
(text "DiskIO")
|
||||
(text "NetworkIO")
|
||||
]);
|
||||
settings =
|
||||
{
|
||||
fields = with config.lib.htop.fields; [
|
||||
PID
|
||||
USER
|
||||
PRIORITY
|
||||
NICE
|
||||
M_SIZE
|
||||
M_RESIDENT
|
||||
M_SHARE
|
||||
STATE
|
||||
PERCENT_CPU
|
||||
PERCENT_MEM
|
||||
TIME
|
||||
COMM
|
||||
];
|
||||
color_scheme = 0;
|
||||
cpu_count_from_one = 0;
|
||||
delay = 15;
|
||||
highlight_base_name = 1;
|
||||
highlight_megabytes = 1;
|
||||
highlight_threads = 1;
|
||||
find_comm_in_cmdline = 1;
|
||||
tree_view = 1;
|
||||
header_margin = 1;
|
||||
show_cpu_usage = 1;
|
||||
show_cpu_frequency = 1;
|
||||
show_cpu_temperature = 1;
|
||||
update_process_names = 1;
|
||||
}
|
||||
// (
|
||||
with config.lib.htop;
|
||||
leftMeters [
|
||||
(bar "AllCPUs")
|
||||
(bar "CPU")
|
||||
]
|
||||
)
|
||||
// (
|
||||
with config.lib.htop;
|
||||
rightMeters [
|
||||
(bar "Memory")
|
||||
(bar "Swap")
|
||||
(text "Blank")
|
||||
(text "Tasks")
|
||||
(text "LoadAverage")
|
||||
(text "Uptime")
|
||||
(text "Systemd")
|
||||
(text "DiskIO")
|
||||
(text "NetworkIO")
|
||||
]
|
||||
);
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
{ main, lib, pkgs, ... }:
|
||||
lib.mkIf main.universe.media.enable
|
||||
{
|
||||
main,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf main.universe.media.enable {
|
||||
services = {
|
||||
mpris-proxy.enable = true;
|
||||
playerctld.enable = true;
|
||||
|
|
|
@ -1,19 +1,40 @@
|
|||
{ main, pkgs, lib, ... }:
|
||||
{
|
||||
main,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
flattenTree = lib.our.flattenTree' (val: val ? action) "";
|
||||
|
||||
mkLeader = { leader, mode }: name: value: {
|
||||
key = leader + name;
|
||||
inherit mode;
|
||||
} // value;
|
||||
mkLeader =
|
||||
{ leader, mode }:
|
||||
name: value:
|
||||
{
|
||||
key = leader + name;
|
||||
inherit mode;
|
||||
}
|
||||
// value;
|
||||
|
||||
mkLeaderMap = tree:
|
||||
builtins.concatMap
|
||||
(leader: lib.mapAttrsToList (mkLeader leader) (flattenTree tree))
|
||||
[
|
||||
{ leader = "<leader>"; mode = [ "n" "v" ]; }
|
||||
{ leader = "<M- >"; mode = [ "n" "v" "i" ]; }
|
||||
];
|
||||
mkLeaderMap =
|
||||
tree:
|
||||
builtins.concatMap (leader: lib.mapAttrsToList (mkLeader leader) (flattenTree tree)) [
|
||||
{
|
||||
leader = "<leader>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
}
|
||||
{
|
||||
leader = "<M- >";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
"i"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
inherit (main.universe) programming;
|
||||
inherit (main) universe;
|
||||
|
@ -34,7 +55,10 @@ in
|
|||
shiftwidth = 4;
|
||||
};
|
||||
|
||||
clipboard.register = [ "unnamedplus" "unnamed" ];
|
||||
clipboard.register = [
|
||||
"unnamedplus"
|
||||
"unnamed"
|
||||
];
|
||||
|
||||
globals = {
|
||||
doom_one_cursor_coloring = true;
|
||||
|
@ -51,50 +75,58 @@ in
|
|||
globals.mapleader = " ";
|
||||
|
||||
autoCmd = [
|
||||
{ event = [ "TermOpen" ]; command = "setlocal nonumber norelativenumber"; }
|
||||
{
|
||||
event = [ "TermOpen" ];
|
||||
command = "setlocal nonumber norelativenumber";
|
||||
}
|
||||
];
|
||||
|
||||
keymaps = [
|
||||
{
|
||||
key = "<Space>";
|
||||
action = "<Nop>";
|
||||
mode = [ "n" "v" ];
|
||||
options = {
|
||||
silent = true;
|
||||
keymaps =
|
||||
[
|
||||
{
|
||||
key = "<Space>";
|
||||
action = "<Nop>";
|
||||
mode = [
|
||||
"n"
|
||||
"v"
|
||||
];
|
||||
options = {
|
||||
silent = true;
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<C-w>n";
|
||||
action = "<C-\\><C-n>";
|
||||
mode = "t";
|
||||
}
|
||||
]
|
||||
++ mkLeaderMap {
|
||||
c = {
|
||||
a.action.__raw = "vim.lsp.buf.code_action";
|
||||
f.action = ":Format<Enter>";
|
||||
t = {
|
||||
f.action = ":FormatToggle<Enter>";
|
||||
};
|
||||
};
|
||||
}
|
||||
{
|
||||
key = "<C-w>n";
|
||||
action = "<C-\\><C-n>";
|
||||
mode = "t";
|
||||
}
|
||||
] ++ mkLeaderMap {
|
||||
c = {
|
||||
a.action.__raw = "vim.lsp.buf.code_action";
|
||||
f.action = ":Format<Enter>";
|
||||
t = {
|
||||
f.action = ":FormatToggle<Enter>";
|
||||
w = {
|
||||
q.action = ":close<Enter>";
|
||||
d.action = ":close<Enter>";
|
||||
v.action = ":vsplit<Enter>";
|
||||
s.action = ":split<Enter>";
|
||||
V.action = ":vsplit ";
|
||||
S.action = ":split ";
|
||||
n.action = ":next<Enter>";
|
||||
p.action = ":previous<Enter>";
|
||||
};
|
||||
f = {
|
||||
s.action = ":w<enter>";
|
||||
};
|
||||
q = {
|
||||
q.action = ":q<Enter>";
|
||||
Q.action = ":q!<Enter>";
|
||||
x.action = ":x<Enter>";
|
||||
};
|
||||
};
|
||||
w = {
|
||||
q.action = ":close<Enter>";
|
||||
d.action = ":close<Enter>";
|
||||
v.action = ":vsplit<Enter>";
|
||||
s.action = ":split<Enter>";
|
||||
V.action = ":vsplit ";
|
||||
S.action = ":split ";
|
||||
n.action = ":next<Enter>";
|
||||
p.action = ":previous<Enter>";
|
||||
};
|
||||
f = {
|
||||
s.action = ":w<enter>";
|
||||
};
|
||||
q = {
|
||||
q.action = ":q<Enter>";
|
||||
Q.action = ":q!<Enter>";
|
||||
x.action = ":x<Enter>";
|
||||
};
|
||||
};
|
||||
|
||||
plugins = {
|
||||
autoclose = {
|
||||
|
@ -119,10 +151,16 @@ in
|
|||
neorg = {
|
||||
enable = true;
|
||||
settings = {
|
||||
load = let empty = { __empty = null; }; in {
|
||||
"core.defaults" = empty;
|
||||
"core.concealer" = empty;
|
||||
};
|
||||
load =
|
||||
let
|
||||
empty = {
|
||||
__empty = null;
|
||||
};
|
||||
in
|
||||
{
|
||||
"core.defaults" = empty;
|
||||
"core.concealer" = empty;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
{ config, main, pkgs, ... }:
|
||||
{
|
||||
config,
|
||||
main,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.zsh = rec {
|
||||
enable = true;
|
||||
|
@ -35,10 +40,13 @@
|
|||
|
||||
history.path = "$HOME/${dotDir}/.zsh_history";
|
||||
|
||||
shellAliases = builtins.removeAttrs
|
||||
(main.environment.shellAliases // config.home.shellAliases // {
|
||||
shellAliases = builtins.removeAttrs (
|
||||
main.environment.shellAliases
|
||||
// config.home.shellAliases
|
||||
// {
|
||||
lsdiskw = "while true; do clear; lsdisk; sleep 1; done";
|
||||
}) [ "mktmp" ];
|
||||
}
|
||||
) [ "mktmp" ];
|
||||
|
||||
oh-my-zsh = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
{ config, main, lib, pkgs, ... }:
|
||||
lib.mkIf main.info.graphical
|
||||
{
|
||||
config,
|
||||
main,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf main.info.graphical {
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
hashedPasswordFile = lib.mkIf config.modules.secrets.enable config.secrets.root-password;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue