Compare commits
No commits in common. "25011a33536c8d1cf061c75efe8b794536c63cd2" and "05b1f2d88ae592350e086adfb8e1772e5d976a77" have entirely different histories.
25011a3353
...
05b1f2d88a
|
@ -19,8 +19,6 @@ let
|
|||
in
|
||||
{
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs =
|
||||
let
|
||||
commonRc = lib.strings.concatLines ([
|
||||
|
@ -104,6 +102,13 @@ in
|
|||
# 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
|
||||
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
|
||||
|
@ -134,6 +139,11 @@ in
|
|||
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'';
|
||||
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);
|
||||
# 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
|
||||
|
@ -141,7 +151,6 @@ in
|
|||
historyFile = "${config.xdg.cacheHome}/shell_history";
|
||||
in
|
||||
{
|
||||
|
||||
home-manager.enable = true;
|
||||
bash = {
|
||||
enable = true;
|
||||
|
@ -157,7 +166,7 @@ in
|
|||
historyFile = historyFile;
|
||||
historyFileSize = historySize;
|
||||
historyControl = [ "erasedups" "ignoredups" "ignorespace" ];
|
||||
shellAliases = commonShellAliases // config.frogeye.shellAliases;
|
||||
shellAliases = commonShellAliases;
|
||||
};
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
@ -177,7 +186,7 @@ in
|
|||
expireDuplicatesFirst = true;
|
||||
};
|
||||
sessionVariables = commonSessionVariables;
|
||||
shellAliases = commonShellAliases // config.frogeye.shellAliases;
|
||||
shellAliases = commonShellAliases;
|
||||
};
|
||||
dircolors = {
|
||||
enable = true;
|
||||
|
@ -263,8 +272,12 @@ in
|
|||
".mypy_cache"
|
||||
];
|
||||
lfs.enable = true;
|
||||
userEmail = lib.mkDefault "geoffrey@frogeye.fr";
|
||||
userName = lib.mkDefault "Geoffrey Frogeye";
|
||||
signing = {
|
||||
key = "0x8312C8CAC1BAC289"; # FIXME Only in extension
|
||||
# TODO signByDefault?
|
||||
};
|
||||
userEmail = "geoffrey@frogeye.fr";
|
||||
userName = "Geoffrey “Frogeye” Preud'homme";
|
||||
extraConfig = {
|
||||
core = {
|
||||
editor = "nvim";
|
||||
|
@ -340,10 +353,13 @@ in
|
|||
};
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true; # TODO Consider not enabling it when not having any private key
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableSshSupport = true;
|
||||
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 = {
|
||||
|
@ -486,7 +502,7 @@ in
|
|||
sessionPath = [
|
||||
"${config.home.homeDirectory}/.local/bin"
|
||||
"${config.home.sessionVariables.GOPATH}"
|
||||
(builtins.toString ./scripts)
|
||||
"${config.frogeye.dotfiles.path}/scripts"
|
||||
];
|
||||
file = {
|
||||
".face" = {
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
./desktop.nix
|
||||
./dev.nix
|
||||
./extra.nix
|
||||
./ssh.nix
|
||||
./style.nix
|
||||
./vim.nix
|
||||
];
|
||||
|
|
|
@ -1,18 +1,6 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
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 = {
|
||||
enable = true;
|
||||
windowManager = {
|
||||
|
@ -69,7 +57,7 @@
|
|||
{
|
||||
modifier = "Mod1"; # FIXME Mod1 for VM, Mod4 for not VM
|
||||
terminal = "alacritty";
|
||||
bars = [ ]; # Using frobar
|
||||
bars = []; # Using frobar
|
||||
colors = let ignore = "#ff00ff"; in
|
||||
with config.lib.stylix.colors.withHashtag; lib.mkForce {
|
||||
focused = { border = base0B; background = base0B; text = base00; indicator = base00; childBorder = base0B; };
|
||||
|
@ -360,28 +348,17 @@
|
|||
# TODO Unbind d and T (?)
|
||||
};
|
||||
};
|
||||
loadAutoconfig = true;
|
||||
loadAutoconfig = true; # FIXME Salvage stuff from autoconfig.yml
|
||||
searchEngines = rec {
|
||||
DEFAULT = ecosia;
|
||||
alpinep = "https://pkgs.alpinelinux.org/packages?name={}&branch=edge";
|
||||
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;
|
||||
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";
|
||||
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={}";
|
||||
google = "https://www.google.fr/search?q={}";
|
||||
invidious = "https://invidious.frogeye.fr/search?q={}";
|
||||
inv = invidious;
|
||||
g = google;
|
||||
npm = "https://www.npmjs.com/search?q={}";
|
||||
q = qwant;
|
||||
qwant = "https://www.qwant.com/?t=web&q={}";
|
||||
|
@ -395,23 +372,16 @@
|
|||
show = "never";
|
||||
tabs_are_windows = true;
|
||||
};
|
||||
url = rec {
|
||||
url = {
|
||||
open_base_url = true;
|
||||
start_pages = lib.mkDefault "https://geoffrey.frogeye.fr/blank.html";
|
||||
default_page = start_pages;
|
||||
start_pages = "https://geoffrey.frogeye.fr/blank.html";
|
||||
};
|
||||
content = {
|
||||
# I had this setting below, not sure if it did something special
|
||||
# config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
|
||||
cookies.accept = "no-3rdparty";
|
||||
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 = {
|
||||
# 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;
|
||||
pass.enable = true;
|
||||
extraConfig = {
|
||||
|
@ -663,6 +631,7 @@
|
|||
zathura
|
||||
meld
|
||||
python3Packages.magic
|
||||
yubikey-touch-detector
|
||||
|
||||
# x11-exclusive
|
||||
numlockx
|
||||
|
|
13
hm/extra.nix
13
hm/extra.nix
|
@ -3,23 +3,14 @@
|
|||
config = lib.mkIf config.frogeye.extra {
|
||||
programs = {
|
||||
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; ([
|
||||
# android tools
|
||||
android-tools
|
||||
|
||||
# downloading
|
||||
yt-dlp
|
||||
megatools
|
||||
# transmission TODO Collision if both transmissions are active?
|
||||
|
||||
# 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 = {
|
||||
xorg = lib.mkEnableOption "Enable X11 support";
|
||||
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 = {
|
||||
ansible = lib.mkEnableOption "Ansible dev stuff";
|
||||
|
@ -18,19 +13,13 @@
|
|||
fpga = lib.mkEnableOption "FPGA dev stuff";
|
||||
python = lib.mkEnableOption "Python dev stuff";
|
||||
};
|
||||
shellAliases = lib.mkOption {
|
||||
default = { };
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
ll = "ls -l";
|
||||
".." = "cd ..";
|
||||
}
|
||||
'';
|
||||
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;
|
||||
dotfiles = {
|
||||
path = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
# default = "${config.home.homeDirectory}/.config/dotfiles";
|
||||
# FIXME Above doesn't work outside home-manager context
|
||||
default = "/home/geoffrey/.config/dotfiles";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue