nix #11

Manually merged
geoffrey merged 113 commits from nix into main 2023-12-09 21:43:01 +01:00
18 changed files with 142 additions and 257 deletions
Showing only changes of commit 3af998440f - Show all commits

View file

@ -1,24 +1,4 @@
{# Macros #}
{# Include essential snippets #}
{% include 'snippets/pm_remote.j2' %}
{% include 'snippets/pm_disk_cleanup.j2' %}
{% include 'snippets/pm_local_monitoring.j2' %}
{% include 'snippets/pm_mpd.j2' %}
{% include 'snippets/pm_multimedia_toolbox.j2' %}
{% include 'snippets/pm_multimedia_common.j2' %}
{% include 'snippets/pm_data_management.j2' %}
{# Include rules-determined snippets #} {# Include rules-determined snippets #}
{% if root_access %}
{% include 'snippets/pm_system.j2' %}
{% endif %}
{% if display_server %}
{% include 'snippets/pm_desktop_environment.j2' %}
{% endif %}
{% if termux %}
{% include 'snippets/pm_termux.j2' %}
{% else %}
{% include 'snippets/pm_noandroid.j2' %}
{% endif %}
{% if software_full %} {% if software_full %}
{% include 'snippets/pm_android_tools.j2' %} {% include 'snippets/pm_android_tools.j2' %}
{% include 'snippets/pm_multimedia_editors.j2' %} {% include 'snippets/pm_multimedia_editors.j2' %}

View file

@ -1,12 +0,0 @@
{#
Stuff to synchronize/backup data
#}
rsync
borg
syncthing
{% if arch_based %}
{% if ansible_architecture == 'x86_64' and can_chown %}
freefilesync-bin
{# Not worth the compilation if you can't have the binaries #}
{% endif %}
{% endif %}

View file

@ -1,71 +0,0 @@
{# Essential #}
firefox
qutebrowser
{# Sound #}
pulseaudio
pacmixer
{% if arch_based %}
ttf-dejavu
ttf-twemoji
{% endif %}
{% if arch_based %}
xkb-qwerty-fr
{% endif %}
thunar
gedit
feh
zathura
zbar
{% if arch_based %}
zathura-pdf-mupdf
{% elif debian_based %}
zathura-pdf-poppler
{% endif %}
meld
{{ python_prefix }}-magic
{% if arch_based %}
yubikey-touch-detector
{% endif %}
{% if display_server == "x11" %}
i3-wm
libgnomekbd{{ lib_suffix }}
dunst
i3lock
numlockx
rofi
{% if arch_based %}
rofimoji
{% endif %}
rxvt-unicode
{% if arch_based %}
urxvt-resize-font-git
alacritty
{% endif %}
scrot
simplescreenrecorder
trayer
unclutter
{% if arch_based %}
xautolock
{% endif %}
xclip
{% if arch_based %}
lemonbar-xft-git
wireless_tools
{% else %}
lemonbar
{% endif %}
{# lemonbar dependency #}
notmuch
autorandr
keynav
sct
xorg-xinit
{% if arch_based %}
xorg-xbacklight
{% elif debian_based %}
xbacklight
{% endif %}
{% elif display_server == "wayland" %}
sway
{% endif %}

View file

@ -1,13 +0,0 @@
{#
Program that essentially help you reduce disk usage
#}
jdupes
duperemove
optipng
{% if debian_based %}
libjpeg-turbo-progs
{% else %}
libjpeg-turbo
{% endif %}
reflac
{# EOF #}

View file

@ -1,24 +0,0 @@
{#
Shell utilities to see what's going on on the system
#}
htop
{% if root_access %}
iotop
iftop
{% endif %}
ncdu
{% if not termux %}
lsof
{% endif %}
strace
pv
progress
{% if not termux %}
speedtest-cli
{% endif %}
{% if arch_based %}
pacman-contrib
{% endif %}
{% if has_battery %}
powertop
{% endif %}

View file

@ -1,9 +0,0 @@
{#
To play music with Music Player Daemon
#}
mpd
mpc
{% if arch_based %}
ashuffle-git
vimpc-git
{% endif %}

View file

@ -1,13 +0,0 @@
{% if display_server %}
gimp
inkscape
mpv
{% if arch_based %}
mpv-thumbnail-script
{% endif %}
{% if arch_based %}
libreoffice-fresh
{% elif debian_based %}
libreoffice
{% endif %}
{% endif %}

View file

@ -1,4 +0,0 @@
ffmpeg
sox
imagemagick
{# EOF #}

View file

@ -1,30 +0,0 @@
{#
Stuff that isn't required on Android because there are apps for that
#}
{# Password handling #}
pass
pwgen
{% if display_server %}
rofi-pass
{# TODO Try autopass.cr #}
{% endif %}
{# Mail #}
isync
msmtp
notmuch
neomutt
lynx
{% if not arch_based %}
{# https://aur.archlinux.org/packages/tiv/#comment-812593 #}
tiv
{% endif %}
{% if display_server %}
thunderbird
{% endif %}
{# Organisation #}
vdirsyncer
khard
khal
todoman
syncthing
{# EOF #}

View file

@ -1,6 +0,0 @@
openssh
wget
rsync
{% if display_server %}
tigervnc
{% endif %}

View file

@ -1,16 +0,0 @@
etckeeper
{% if has_battery %}
tlp
{% endif %}
dhcpcd
wpa_supplicant
chrony
{% if encrypt_home_stacked_fs %}
ecryptfs-utils
{% endif %}
kexec-tools
openvpn
{% if arch_based %}
openvpn-update-resolv-conf-git
{# TODO Other distributions #}
{% endif %}

View file

@ -1,9 +0,0 @@
{#
Stuff that only makes sense on Termux
#}
{% if termux %}
{% if root_access %}
tsu
{% endif %}
termux-api
{% endif %}

View file

@ -2,8 +2,6 @@
let let
recursiveMerge = import ./recursiveMerge.nix; recursiveMerge = import ./recursiveMerge.nix;
getModule = name: import (./modules + "/${name}.nix") { inherit config pkgs; }; getModule = name: import (./modules + "/${name}.nix") { inherit config pkgs; };
loadModules = modules: recursiveMerge ((map getModule) modules);
in in
recursiveMerge [ loadModules [ "common" "desktop" "battery" "wireless" ]
(getModule "common")
(getModule "x11")
]

View file

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
users.users.geoffrey.packages = with pkgs; [
powertop
];
environment.systemPackages = with pkgs; [ tlp ];
}

View file

@ -60,10 +60,47 @@
# remote # remote
openssh openssh
rsync rsync
borgbackup
# DEBUG # cleanup
tree jdupes
lolcat duperemove
optipng
libjpeg
# FIXME reflac not available (but also a dumb shell script)
# local monitoring
htop
iotop
iftop
lsof
strace
pv
progress
speedtest-cli
# multimedia toolbox
ffmpeg
sox
imagemagick
# password
pass
pwgen
# Mail
isync
msmtp
notmuch
neomutt
lynx
# Organisation
vdirsyncer
khard
khal
todoman
syncthing
]; ];
initialPassword = "cartable"; # DEBUG initialPassword = "cartable"; # DEBUG
@ -72,7 +109,12 @@
]; ];
}; };
environment.systemPackages = with pkgs; [ neovim wget ]; environment.systemPackages = with pkgs; [
wget
kexec-tools
openvpn
update-resolv-conf # TODO Is it what I think it is?
];
# Enable compilation cache # Enable compilation cache
programs = { programs = {
@ -101,6 +143,7 @@
# Enable the OpenSSH daemon # Enable the OpenSSH daemon
openssh.enable = true; openssh.enable = true;
getty.autologinUser = "geoffrey"; # DEBUG getty.autologinUser = "geoffrey"; # DEBUG
chrony.enable = true;
}; };
# TEST # TEST

View file

@ -0,0 +1,82 @@
{ pkgs, ... }:
{
# Enable the X11 windowing system
services.xserver.enable = true;
# FIXME qwerty-fr for X11
# Enable sound
sound.enable = true;
hardware.pulseaudio.enable = true;
services.xserver.displayManager.startx.enable = true;
services.xserver.windowManager.i3.enable = true;
users.users.geoffrey. packages = with pkgs; [
# remote
tigervnc
# music
mpd
mpc-cli
ashuffle
vimpc
# multimedia common
gimp
inkscape
mpv
mpvScripts.thumbnail
libreoffice
# data management
freefilesync
# browsers
firefox
qutebrowser
# fonts
dejavu_fonts
twemoji-color-font
xfce.thunar
gnome.gedit
feh
zathura
zbar
zathura
meld
python3Packages.magic
yubikey-touch-detector
# x11-exclusive
libgnomekbd # to show keyboard layout
dunst
i3lock
numlockx
rofi
rofimoji
rxvt-unicode
# TODO urxvt-resize-font-git
scrot
simplescreenrecorder
trayer
unclutter
xautolock
xclip
lemonbar-xft
autorandr
keynav
sct
xorg.xinit
xorg.xbacklight
alacritty
# organisation
rofi-pass # TODO Try autopass.cr
thunderbird
];
environment.systemPackages = with pkgs; [ pavucontrol ];
}

View file

@ -0,0 +1,4 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ wirelesstools ];
}

View file

@ -1,22 +0,0 @@
{ pkgs, ... }:
{
# Enable the X11 windowing system
services.xserver.enable = true;
# FIXME qwerty-fr for X11
# Enable sound
sound.enable = true;
hardware.pulseaudio.enable = true;
services.xserver.displayManager.startx.enable = true;
services.xserver.windowManager.i3.enable = true;
users.users.geoffrey. packages = with pkgs; [
# remote
tigervnc
# remote
firefox
];
}