restructure folder organisation

This commit is contained in:
Felix Buehler 2022-12-05 20:32:39 +01:00
parent 599d55fa6a
commit 9cf7be677d
72 changed files with 95 additions and 98 deletions

View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
meshlab
cura
openscad
];
}

View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
services.octoprint = {
enable = true;
plugins = plugins: with plugins; [
costestimation
displayprogress
m86motorsoff
stlviewer
telegram
titlestatus
];
};
networking.firewall.allowedTCPPorts = [ 5000 ];
}

View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
programs.adb.enable = true;
environment.systemPackages = with pkgs; [
scrcpy
];
}

13
legacy/modules/avahi.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, pkgs, lib, ... }:
{
services.avahi = {
enable = true;
nssmdns = true;
publish = {
enable = true;
addresses = true;
workstation = true;
userServices = true;
};
};
}

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
services.blueman.enable = true;
environment.systemPackages = with pkgs; [
sony-headphones-client
];
}

10
legacy/modules/clean.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
baobab
dupeguru
findimagedupes
jdupes
kondo
];
}

View file

@ -0,0 +1,96 @@
{ config, lib, pkgs, ... }:
{
imports = [
./fonts.nix
./nautilus.nix
];
programs.gnome-disks.enable = true;
services.udisks2.enable = true;
xdg.mime.enable = true;
# make gnome settings persistent
programs.dconf.enable = true;
# gnome services
services.dbus.packages = [ pkgs.dconf ];
services.udev.packages = [ pkgs.gnome.gnome-settings-daemon ];
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
adwaita-qt
arc-icon-theme
arc-kde-theme
arc-theme
evince
firefox-wayland
#geary
unstable.ghostwriter
(gimp-with-plugins.override {
plugins = with gimpPlugins; [
resynthesizer
];
})
glib
gnome.adwaita-icon-theme
gnome.dconf-editor
gnome.eog
gnome.file-roller
gnome.gnome-calendar
gnome.gnome-system-monitor
gnome.simple-scan
keepassxc
keychain
konsole
libnotify
libreoffice
lollypop
unstable.newsflash
numix-cursor-theme
numix-icon-theme
numix-icon-theme-circle
polkit_gnome
qgnomeplatform
rhythmbox
simple-scan
socat
sshuttle
tdesktop
thunderbird
virtmanager
vlc
(mpv-with-scripts.override {
scripts = with mpvScripts; [
convert
mpris
simple-mpv-webui
sponsorblock
thumbnail
];
})
wayvnc
xdg-utils
zathura
zeal
# TODO sort them in different files
pdfgrep
physlock
#symlinks
];
# Enable firmware update daemon
services.fwupd.enable = true;
programs.wireshark.enable = true;
programs.wireshark.package = pkgs.wireshark;
services.accounts-daemon.enable = true;
environment.interactiveShellInit = ''
if test `tty` = /dev/tty1; then
exec sway
fi
'';
}

View file

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
arduino
bless # hex editor
chromium
dbeaver
filezilla
fritzing
gnome.gnome-font-viewer
meld
insomnia
qgis
sqlitebrowser
unstable.sublime4
];
}

View file

@ -0,0 +1,44 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# rust
unstable.cargo
unstable.clippy # lint
cargo-flamegraph
cargo-outdated
rustfmt
unstable.rustc
# general
clang
cloc
cmake
dfeet
direnv
entr
git
gnumake
go
hugo
meson
ninja
(python3.withPackages (ps: with ps; [
jupyter # notebooks
matplotlib
numpy
pandas
pillow
plotly
scikitlearn
scipy
tqdm # progressbar in pandas
wheel # python development
]))
ripgrep
shellcheck
topgrade
valgrind
vimPlugins.YouCompleteMe
ycmd
woeusb-ng
];
}

13
legacy/modules/docker.nix Normal file
View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
docker
docker-compose
];
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
}

View file

@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
davfs2
exfat
fuse3
hfsprogs
mtpfs
nfs-utils
ntfs3g
sshfs
];
}

29
legacy/modules/fonts.nix Normal file
View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
{
fonts = {
fontconfig.defaultFonts = {
monospace = [ "Ubuntu Mono" ];
sansSerif = [ "Ubuntu" ];
};
fonts = with pkgs; [
cantarell-fonts # gnome default
dina-font
fira
fira-mono
fira-code
fira-code-symbols
font-awesome
liberation_ttf
mplus-outline-fonts.githubRelease
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
proggyfonts
ubuntu_font_family
joypixels
unifont # unicode
];
};
nixpkgs.config.joypixels.acceptLicense = true;
}

22
legacy/modules/gaming.nix Normal file
View file

@ -0,0 +1,22 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
blobby
discord
minetest
openttd
prismlauncher # replace minecraft
superTuxKart
steam
SDL
SDL2
wine
winetricks
];
programs.steam.enable = true;
hardware.opengl.driSupport32Bit = true;
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
hardware.pulseaudio.support32Bit = true;
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
{
services.smartd.enable = true;
environment.systemPackages = with pkgs; [
dmidecode
f3
hdparm
lm_sensors
nvme-cli
pciutils
smartmontools
testdisk
];
}

View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
hardware.opengl = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
];
};
}

5
legacy/modules/intel.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, lib, pkgs, ... }:
{
hardware.cpu.intel.updateMicrocode = true;
}

9
legacy/modules/kvm.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, lib, pkgs, ... }:
{
boot.kernelModules = [
"kvm-amd"
"kvm-intel"
];
virtualisation.libvirtd.enable = true;
}

View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
{
location.provider = "geoclue2";
services.geoclue2 = {
enable = true;
enableDemoAgent = true;
appConfig."gammastep" = {
desktopID = "gammastep";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
appConfig."gammastep-indicator" = {
desktopID = "gammastep-indicator";
isAllowed = true;
isSystem = false;
# Empty list allows all users
users = [ ];
};
};
}

32
legacy/modules/media.nix Normal file
View file

@ -0,0 +1,32 @@
{ config, lib, pkgs, ... }:
let
yt-dlp = pkgs.yt-dlp.override {
withAlias = true;
};
in
{
environment.systemPackages = with pkgs; [
audacity
chromaprint # music-brainz fingerprint
ffmpeg
gallery-dl
graphviz
handbrake
image_optim
imagemagick
inkscape
mat2 # metadata-cleaning
mediaelch
mp3gain
mp3splt # splitting mp3 files
mp3val
pdfsam-basic # pdf editing
picard # music tagging
projectm # visualization of music
puddletag # audio tagging
shotwell # photo management
sonixd # cloud-music-player
soundkonverter
yt-dlp
];
}

View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
element-desktop-wayland
mumble
nheko
skypeforlinux
signal-desktop
teamspeak_client
];
}

View file

@ -0,0 +1,26 @@
{ config, lib, pkgs, ... }:
{
# enable trash & network-mount
services.gvfs.enable = true;
environment.sessionVariables.NAUTILUS_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-3.0";
environment.pathsToLink = [
"/share/nautilus-python/extensions"
];
services.gnome.glib-networking.enable = true; # network-mount
environment.systemPackages = with pkgs; [
# thumbnails
ffmpegthumbnailer
gnome.nautilus
# enable plugins
gnome.nautilus-python
# thumbnails
gst_all_1.gst-libav
# default-programms
shared-mime-info
# terminal-context-entry
nautilus-open-any-terminal
];
}

View file

@ -0,0 +1,22 @@
{ pkgs, config, ... }:
{
boot.initrd.network = {
enable = true;
ssh = {
enable = true;
port = 2222;
hostKeys = [
"/etc/secrets/initrd/ssh_host_ed25519_key"
];
authorizedKeys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOFx6OLwL9MbkD3mnMsv+xrzZHN/rwCTgVs758SCLG0h felix@thinkman"
];
};
postCommands = ''
echo 'cryptsetup-askpass' >> /root/.profile
'';
};
}

41
legacy/modules/nix.nix Normal file
View file

@ -0,0 +1,41 @@
{ config, lib, pkgs, inputs, ... }:
{
nix = {
settings = {
trusted-users = [
"root"
"@wheel"
];
auto-optimise-store = true;
};
gc = {
automatic = true;
options = "--delete-older-than 30d";
};
extraOptions = ''
experimental-features = nix-command flakes
'';
registry = {
nixpkgs.flake = inputs.nixpkgs;
unstable.flake = inputs.nixpkgs-unstable;
};
};
# support auto upgrade with flakes
system.autoUpgrade.flags = [
"--update-input"
"nixpkgs"
"--commit-lock-file"
];
environment.systemPackages = with pkgs; [
nix-prefetch
nix-update
nixpkgs-fmt
nixpkgs-lint
nixpkgs-review
];
}

19
legacy/modules/power.nix Normal file
View file

@ -0,0 +1,19 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = [
config.boot.kernelPackages.cpupower
pkgs.powertop
pkgs.s-tui
];
powerManagement = {
cpuFreqGovernor = lib.mkDefault "powersave";
#powertop.enable = true; # messes up usb mouse
};
services = {
thermald.enable = true;
upower.enable = true;
};
}

View file

@ -0,0 +1,6 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
pdfpc
];
}

View file

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
services.printing.enable = true;
services.printing.drivers = with pkgs; [
canon-cups-ufr2
gutenprint
hplip
];
programs.system-config-printer.enable = true;
}

View file

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
remmina
teamviewer
];
services.pipewire.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
gtkUsePortal = true;
};
# for firefox
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
};
}

View file

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
aircrack-ng
lynis
];
}

54
legacy/modules/sway.nix Normal file
View file

@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
{
imports = [
../modules/theme.nix
];
programs.light.enable = true;
environment.systemPackages = with pkgs; [
polkit_gnome
];
environment.pathsToLink = [ "/libexec" ];
programs.wshowkeys.enable = true;
programs.sway = {
enable = true;
wrapperFeatures = {
gtk = true;
base = true;
};
extraPackages = with pkgs; [
brightnessctl
dmenu
foot
gammastep
grim
i3status-rust
mako
slurp
swayidle
swaylock
wdisplays
wf-recorder
wl-clipboard
wofi
xwayland
wshowkeys
];
extraSessionCommands = ''
export XDG_SESSION_TYPE=wayland
export XDG_CURRENT_DESKTOP=sway
export SDL_VIDEODRIVER=wayland
export QT_QPA_PLATFORM=wayland
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
export _JAVA_AWT_WM_NONREPARENTING=1
export CLUTTER_BACKEND=wayland
export SAL_USE_VCLPLUGIN=gtk3
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
'';
};
}

9
legacy/modules/sync.nix Normal file
View file

@ -0,0 +1,9 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
nextcloud-client
syncthing
magic-wormhole
vdirsyncer
];
}

View file

@ -0,0 +1,6 @@
{ config, ... }:
{
systemd.user.extraConfig = ''
DefaultEnvironment="PATH=/run/current-system/sw/bin"
'';
}

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
boot = {
loader = {
timeout = 1;
systemd-boot = {
enable = true;
configurationLimit = 10;
consoleMode = "keep";
editor = true;
};
efi.canTouchEfiVariables = true;
};
};
}

10
legacy/modules/tex.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
biber
jabref
qtikz
texlive.combined.scheme-full
texstudio
];
}

10
legacy/modules/theme.nix Normal file
View file

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
gtk-engine-murrine
gtk_engines
gsettings-desktop-schemas
lxappearance
];
programs.qt5ct.enable = true;
}

View file

@ -0,0 +1,7 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
thunderbolt
];
services.hardware.bolt.enable = true;
}

View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
services.bazarr = {
enable = true;
openFirewall = true;
};
systemd.services.bazarr = {
after = [ "network-online.target" ];
#unitConfig.RequiresMountsFor = [ "/storage" ];
};
webapps.apps.bazarr = {
dashboard = {
name = "Bazarr";
category = "manag";
icon = "closed-captioning";
link = "http://192.168.178.60:6767";
};
};
}

View file

@ -0,0 +1,31 @@
{ config, pkgs, ... }:
{
services.prowlarr = {
enable = true;
openFirewall = true;
};
systemd.services.prowlarr = {
after = [ "network-online.target" ];
#unitConfig.RequiresMountsFor = [ "/storage" ];
};
webapps.apps.prowlarr = {
dashboard = {
name = "Prowlarr";
category = "manag";
icon = "sync-alt";
link = "http://192.168.178.60:9696";
};
};
# ugly fix for service not having a homedirectory
users.users.prowlarr = {
isSystemUser = true;
home = "/var/lib/prowlarr";
group = "prowlarr";
uid = 61654;
};
users.groups.prowlarr = {
gid = 61654;
};
}

View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
services.radarr = {
enable = true;
openFirewall = true;
};
systemd.services.radarr = {
after = [ "network-online.target" ];
#unitConfig.RequiresMountsFor = [ "/storage" ];
};
webapps.apps.radarr = {
dashboard = {
name = "Radarr";
category = "manag";
icon = "film";
link = "http://192.168.178.60:7878";
};
};
}

View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
services.sonarr = {
enable = true;
openFirewall = true;
};
systemd.services.sonarr = {
after = [ "network-online.target" ];
#unitConfig.RequiresMountsFor = [ "/storage" ];
};
webapps.apps.sonarr = {
dashboard = {
name = "Sonarr";
category = "manag";
icon = "tv";
link = "http://192.168.178.60:8989";
};
};
}

View file

@ -0,0 +1,8 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
fswebcam
gnome.cheese
];
}