Compare commits
No commits in common. "25011a33536c8d1cf061c75efe8b794536c63cd2" and "05b1f2d88ae592350e086adfb8e1772e5d976a77" have entirely different histories.
25011a3353
...
05b1f2d88a
|
@ -19,8 +19,6 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
programs =
|
programs =
|
||||||
let
|
let
|
||||||
commonRc = lib.strings.concatLines ([
|
commonRc = lib.strings.concatLines ([
|
||||||
|
@ -104,6 +102,13 @@ in
|
||||||
# ll = "ls -l"; # Disabled because would overwrite the colored one
|
# ll = "ls -l"; # Disabled because would overwrite the colored one
|
||||||
# la = "ls -la"; # Eh maybe it's not that bad, but for now let's keep compatibility
|
# la = "ls -la"; # Eh maybe it's not that bad, but for now let's keep compatibility
|
||||||
s = "sudo -s -E";
|
s = "sudo -s -E";
|
||||||
|
# n = "$HOME/.config/i3/terminal & disown"; # Not used anymore since alacritty daemon mode doesn't preserve environment variables
|
||||||
|
x = "startx ${config.xdg.configHome}/xinitrc; logout";
|
||||||
|
nx = "nvidia-xrun ${config.xdg.configHome}/xinitrc; sudo systemctl start nvidia-xrun-pm; logout";
|
||||||
|
# TODO Put in display.nix
|
||||||
|
# Was also thinking of not storing the config in .config and use nix-store instead,
|
||||||
|
# but maybe it's a bad idea as home-manager switch doesn't replace aliases in running shells
|
||||||
|
# FIXME Is it still relevant with NixOS?
|
||||||
|
|
||||||
|
|
||||||
# Give additional config to those programs, and not have them in my path
|
# Give additional config to those programs, and not have them in my path
|
||||||
|
@ -134,6 +139,11 @@ in
|
||||||
newestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | tail'';
|
newestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | tail'';
|
||||||
oldestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | head'';
|
oldestFile = ''${pkgs.findutils}/bin/find -type f -printf '%T+ %p\n' | sort | head'';
|
||||||
tracefiles = ''${pkgs.strace}/bin/strace -f -t -e trace=file'';
|
tracefiles = ''${pkgs.strace}/bin/strace -f -t -e trace=file'';
|
||||||
|
} // lib.optionalAttrs config.frogeye.desktop.xorg {
|
||||||
|
noise = ''${pkgs.sox}/bin/play -c 2 -n synth $'' + ''{1}noise'';
|
||||||
|
beep = ''${pkgs.sox}/bin/play -n synth sine E5 sine A4 remix 1-2 fade 0.5 1.2 0.5 2> /dev/null'';
|
||||||
|
# FIXME ALSA lib dlmisc.c:337:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/nix/store/9b06fxbvm07iy9f9dvi5vk2iy9pk8hyz-alsa-lib-1.2.8/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory)
|
||||||
|
|
||||||
} // lib.attrsets.mergeAttrsList (map (p: { "${p}" = "HOME=${config.xdg.cacheHome}/junkhome ${p}"; }) treatsHomeAsJunk);
|
} // lib.attrsets.mergeAttrsList (map (p: { "${p}" = "HOME=${config.xdg.cacheHome}/junkhome ${p}"; }) treatsHomeAsJunk);
|
||||||
# TODO Maybe make nixpkg wrapper instead? So it also works from dmenu
|
# TODO Maybe make nixpkg wrapper instead? So it also works from dmenu
|
||||||
# Could also accept my fate... Home-manager doesn't necessarily make it easy to put things out of the home directory
|
# Could also accept my fate... Home-manager doesn't necessarily make it easy to put things out of the home directory
|
||||||
|
@ -141,7 +151,6 @@ in
|
||||||
historyFile = "${config.xdg.cacheHome}/shell_history";
|
historyFile = "${config.xdg.cacheHome}/shell_history";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
bash = {
|
bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -157,7 +166,7 @@ in
|
||||||
historyFile = historyFile;
|
historyFile = historyFile;
|
||||||
historyFileSize = historySize;
|
historyFileSize = historySize;
|
||||||
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
||||||
shellAliases = commonShellAliases // config.frogeye.shellAliases;
|
shellAliases = commonShellAliases;
|
||||||
};
|
};
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -177,7 +186,7 @@ in
|
||||||
expireDuplicatesFirst = true;
|
expireDuplicatesFirst = true;
|
||||||
};
|
};
|
||||||
sessionVariables = commonSessionVariables;
|
sessionVariables = commonSessionVariables;
|
||||||
shellAliases = commonShellAliases // config.frogeye.shellAliases;
|
shellAliases = commonShellAliases;
|
||||||
};
|
};
|
||||||
dircolors = {
|
dircolors = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -263,8 +272,12 @@ in
|
||||||
".mypy_cache"
|
".mypy_cache"
|
||||||
];
|
];
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
userEmail = lib.mkDefault "geoffrey@frogeye.fr";
|
signing = {
|
||||||
userName = lib.mkDefault "Geoffrey Frogeye";
|
key = "0x8312C8CAC1BAC289"; # FIXME Only in extension
|
||||||
|
# TODO signByDefault?
|
||||||
|
};
|
||||||
|
userEmail = "geoffrey@frogeye.fr";
|
||||||
|
userName = "Geoffrey “Frogeye” Preud'homme";
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
core = {
|
core = {
|
||||||
editor = "nvim";
|
editor = "nvim";
|
||||||
|
@ -340,10 +353,13 @@ in
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
enable = true; # TODO Consider not enabling it when not having any private key
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
|
enableSshSupport = true;
|
||||||
pinentryFlavor = "gtk2"; # Falls back to curses when needed
|
pinentryFlavor = "gtk2"; # Falls back to curses when needed
|
||||||
|
sshKeys = [ "72A5F2913026776593947CF00DFF330E820E731D" ]; # TODO This seems to prevent other keys from being added?
|
||||||
|
# FIXME For g extension, as base is not supposed to have private keys
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
|
@ -486,7 +502,7 @@ in
|
||||||
sessionPath = [
|
sessionPath = [
|
||||||
"${config.home.homeDirectory}/.local/bin"
|
"${config.home.homeDirectory}/.local/bin"
|
||||||
"${config.home.sessionVariables.GOPATH}"
|
"${config.home.sessionVariables.GOPATH}"
|
||||||
(builtins.toString ./scripts)
|
"${config.frogeye.dotfiles.path}/scripts"
|
||||||
];
|
];
|
||||||
file = {
|
file = {
|
||||||
".face" = {
|
".face" = {
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
./dev.nix
|
./dev.nix
|
||||||
./extra.nix
|
./extra.nix
|
||||||
./ssh.nix
|
|
||||||
./style.nix
|
./style.nix
|
||||||
./vim.nix
|
./vim.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,18 +1,6 @@
|
||||||
{ pkgs, config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.frogeye.desktop.xorg {
|
config = lib.mkIf config.frogeye.desktop.xorg {
|
||||||
frogeye.shellAliases = {
|
|
||||||
noise = ''${pkgs.sox}/bin/play -c 2 -n synth $'' + ''{1}noise'';
|
|
||||||
beep = ''${pkgs.sox}/bin/play -n synth sine E5 sine A4 remix 1-2 fade 0.5 1.2 0.5 2> /dev/null'';
|
|
||||||
# FIXME ALSA lib dlmisc.c:337:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pulse.so (/nix/store/9b06fxbvm07iy9f9dvi5vk2iy9pk8hyz-alsa-lib-1.2.8/lib/alsa-lib/libasound_module_pcm_pulse.so: cannot open shared object file: No such file or directory)
|
|
||||||
|
|
||||||
# n = "$HOME/.config/i3/terminal & disown"; # Not used anymore since alacritty daemon mode doesn't preserve environment variables
|
|
||||||
x = "startx ${config.xdg.configHome}/xinitrc; logout";
|
|
||||||
nx = "nvidia-xrun ${config.xdg.configHome}/xinitrc; sudo systemctl start nvidia-xrun-pm; logout";
|
|
||||||
# Was also thinking of not storing the config in .config and use nix-store instead,
|
|
||||||
# but maybe it's a bad idea as home-manager switch doesn't replace aliases in running shells
|
|
||||||
# FIXME Is it still relevant with NixOS?
|
|
||||||
};
|
|
||||||
xsession = {
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
windowManager = {
|
windowManager = {
|
||||||
|
@ -360,28 +348,17 @@
|
||||||
# TODO Unbind d and T (?)
|
# TODO Unbind d and T (?)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
loadAutoconfig = true;
|
loadAutoconfig = true; # FIXME Salvage stuff from autoconfig.yml
|
||||||
searchEngines = rec {
|
searchEngines = rec {
|
||||||
DEFAULT = ecosia;
|
DEFAULT = ecosia;
|
||||||
alpinep = "https://pkgs.alpinelinux.org/packages?name={}&branch=edge";
|
|
||||||
ampwhat = "http://www.amp-what.com/unicode/search/{}";
|
ampwhat = "http://www.amp-what.com/unicode/search/{}";
|
||||||
arch = "https://wiki.archlinux.org/?search={}";
|
|
||||||
archp = "https://www.archlinux.org/packages/?q={}";
|
|
||||||
aur = "https://aur.archlinux.org/packages/?K={}";
|
|
||||||
aw = ampwhat;
|
aw = ampwhat;
|
||||||
ddg = duckduckgo;
|
ddg = duckduckgo;
|
||||||
dockerhub = "https://hub.docker.com/search/?isAutomated=0&isOfficial=0&page=1&pullCount=0&q={}&starCount=0";
|
|
||||||
duckduckgo = "https://duckduckgo.com/?q={}&ia=web";
|
duckduckgo = "https://duckduckgo.com/?q={}&ia=web";
|
||||||
ecosia = "https://www.ecosia.org/search?q={}";
|
ecosia = "https://www.ecosia.org/search?q={}";
|
||||||
gfr = "https://www.google.fr/search?hl=fr&q={}";
|
|
||||||
g = google;
|
|
||||||
gh = github;
|
|
||||||
gi = "http://images.google.com/search?q={}";
|
|
||||||
giphy = "https://giphy.com/search/{}";
|
|
||||||
github = "https://github.com/search?q={}";
|
github = "https://github.com/search?q={}";
|
||||||
google = "https://www.google.fr/search?q={}";
|
google = "https://www.google.fr/search?q={}";
|
||||||
invidious = "https://invidious.frogeye.fr/search?q={}";
|
g = google;
|
||||||
inv = invidious;
|
|
||||||
npm = "https://www.npmjs.com/search?q={}";
|
npm = "https://www.npmjs.com/search?q={}";
|
||||||
q = qwant;
|
q = qwant;
|
||||||
qwant = "https://www.qwant.com/?t=web&q={}";
|
qwant = "https://www.qwant.com/?t=web&q={}";
|
||||||
|
@ -395,23 +372,16 @@
|
||||||
show = "never";
|
show = "never";
|
||||||
tabs_are_windows = true;
|
tabs_are_windows = true;
|
||||||
};
|
};
|
||||||
url = rec {
|
url = {
|
||||||
open_base_url = true;
|
open_base_url = true;
|
||||||
start_pages = lib.mkDefault "https://geoffrey.frogeye.fr/blank.html";
|
start_pages = "https://geoffrey.frogeye.fr/blank.html";
|
||||||
default_page = start_pages;
|
|
||||||
};
|
};
|
||||||
content = {
|
content = {
|
||||||
# I had this setting below, not sure if it did something special
|
# I had this setting below, not sure if it did something special
|
||||||
# config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
|
# config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
|
||||||
cookies.accept = "no-3rdparty";
|
cookies.accept = "no-3rdparty";
|
||||||
prefers_reduced_motion = true;
|
prefers_reduced_motion = true;
|
||||||
headers.accept_language = "fr-FR, fr;q=0.9, en-GB;q=0.8, en-US;q=0.7, en;q=0.6";
|
|
||||||
tls.certificate_errors = "ask-block-thirdparty";
|
|
||||||
};
|
};
|
||||||
editor.command = [ "${pkgs.neovide}/bin/neovide" "--" "-f" "{file}" "-c" "normal {line}G{column0}l" ];
|
|
||||||
# TODO Doesn't work on Arch. Does it even load the right profile on Nix?
|
|
||||||
# TODO spellcheck.languages = ["fr-FR" "en-GB" "en-US"];
|
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -476,8 +446,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
rofi = {
|
rofi = {
|
||||||
# TODO This theme template, that was used for Arch, looks much better:
|
|
||||||
# https://gitlab.com/jordiorlando/base16-rofi/-/blob/master/templates/default.mustache
|
|
||||||
enable = true;
|
enable = true;
|
||||||
pass.enable = true;
|
pass.enable = true;
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
|
@ -663,6 +631,7 @@
|
||||||
zathura
|
zathura
|
||||||
meld
|
meld
|
||||||
python3Packages.magic
|
python3Packages.magic
|
||||||
|
yubikey-touch-detector
|
||||||
|
|
||||||
# x11-exclusive
|
# x11-exclusive
|
||||||
numlockx
|
numlockx
|
||||||
|
|
13
hm/extra.nix
13
hm/extra.nix
|
@ -3,23 +3,14 @@
|
||||||
config = lib.mkIf config.frogeye.extra {
|
config = lib.mkIf config.frogeye.extra {
|
||||||
programs = {
|
programs = {
|
||||||
pandoc.enable = true;
|
pandoc.enable = true;
|
||||||
yt-dlp = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
format = "bestvideo[height<=${builtins.toString config.frogeye.desktop.maxVideoHeight}]+bestaudio/best";
|
|
||||||
sponsorblock-mark = "all";
|
|
||||||
sponsorblock-remove = "intro,outro,sponsor,selfpromo,preview,interaction,music_offtopic";
|
|
||||||
sub-langs = "en,fr";
|
|
||||||
write-auto-subs = true;
|
|
||||||
write-subs = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; ([
|
home.packages = with pkgs; ([
|
||||||
# android tools
|
# android tools
|
||||||
android-tools
|
android-tools
|
||||||
|
|
||||||
# downloading
|
# downloading
|
||||||
|
yt-dlp
|
||||||
|
megatools
|
||||||
# transmission TODO Collision if both transmissions are active?
|
# transmission TODO Collision if both transmissions are active?
|
||||||
|
|
||||||
# Multimedia toolbox
|
# Multimedia toolbox
|
||||||
|
|
24
hm/ssh.nix
24
hm/ssh.nix
|
@ -1,24 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
controlMaster = "auto";
|
|
||||||
controlPersist = "60s"; # TODO Default is 10minutes... makes more sense no?
|
|
||||||
# Ping the server frequently enough so it doesn't think we left (non-spoofable)
|
|
||||||
serverAliveInterval = 30;
|
|
||||||
matchBlocks."*" = {
|
|
||||||
# Do not forward the agent (-A) to a machine by default,
|
|
||||||
# as it is kinda a security concern
|
|
||||||
forwardAgent = false;
|
|
||||||
# Restrict terminal features (servers don't necessarily have the terminfo for my cutting edge terminal)
|
|
||||||
sendEnv = [ "!TERM" ];
|
|
||||||
# TODO Why not TERM=xterm-256color?
|
|
||||||
extraOptions = {
|
|
||||||
# Check SSHFP records
|
|
||||||
VerifyHostKeyDNS = "yes";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
25
options.nix
25
options.nix
|
@ -5,11 +5,6 @@
|
||||||
desktop = {
|
desktop = {
|
||||||
xorg = lib.mkEnableOption "Enable X11 support";
|
xorg = lib.mkEnableOption "Enable X11 support";
|
||||||
nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager";
|
nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager";
|
||||||
maxVideoHeight = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
description = "Maximum video height in pixel the machine can reasonably watch";
|
|
||||||
default = 1080;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
dev = {
|
dev = {
|
||||||
ansible = lib.mkEnableOption "Ansible dev stuff";
|
ansible = lib.mkEnableOption "Ansible dev stuff";
|
||||||
|
@ -18,19 +13,13 @@
|
||||||
fpga = lib.mkEnableOption "FPGA dev stuff";
|
fpga = lib.mkEnableOption "FPGA dev stuff";
|
||||||
python = lib.mkEnableOption "Python dev stuff";
|
python = lib.mkEnableOption "Python dev stuff";
|
||||||
};
|
};
|
||||||
shellAliases = lib.mkOption {
|
dotfiles = {
|
||||||
default = { };
|
path = lib.mkOption {
|
||||||
example = lib.literalExpression ''
|
type = lib.types.str;
|
||||||
{
|
# default = "${config.home.homeDirectory}/.config/dotfiles";
|
||||||
ll = "ls -l";
|
# FIXME Above doesn't work outside home-manager context
|
||||||
".." = "cd ..";
|
default = "/home/geoffrey/.config/dotfiles";
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
An attribute set that maps aliases (the top level attribute names in
|
|
||||||
this option) to command strings or directly to build outputs.
|
|
||||||
'';
|
|
||||||
type = lib.types.attrsOf lib.types.str;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue