Merge pull request #47 from fsr/garbage

Garbage collection v2
This commit is contained in:
Rouven Seifert 2023-07-07 12:20:12 +02:00 committed by GitHub
commit 35ae1a27f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 0 additions and 1532 deletions

View file

@ -9,31 +9,11 @@
}; };
outputs = { self, nixpkgs, sops-nix, kpp, ... }@inputs: outputs = { self, nixpkgs, sops-nix, kpp, ... }@inputs:
{ {
#packages."aarch64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
packages."x86_64-linux".quitte = self.nixosConfigurations.quitte-vm.config.system.build.vm; packages."x86_64-linux".quitte = self.nixosConfigurations.quitte-vm.config.system.build.vm;
packages."x86_64-linux".default = self.packages."x86_64-linux".quitte; packages."x86_64-linux".default = self.packages."x86_64-linux".quitte;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt; formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
nixosConfigurations = { nixosConfigurations = {
sanddorn = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
modules = [
{
# nixpkgs.overlays = [ fsr-infoscreen.overlay."aarch64-linux" ];
nixpkgs.config.allowBroken = true;
sdImage.compressImage = false;
}
./hosts/sanddorn/configuration.nix
# ./modules/infoscreen.nix
./modules/base.nix
./modules/desktop.nix
./modules/options.nix
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
{
fsr.enable_office_bloat = false;
}
];
};
quitte = nixpkgs.lib.nixosSystem { quitte = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
@ -72,7 +52,6 @@
./modules/options.nix ./modules/options.nix
./modules/base.nix ./modules/base.nix
./modules/ldap ./modules/ldap
# ./modules/keycloak.nix replaced by portunus
./modules/nginx.nix ./modules/nginx.nix
./modules/mail.nix ./modules/mail.nix
./modules/mailman.nix ./modules/mailman.nix

View file

@ -1,46 +0,0 @@
{ config, lib, pkgs, ... }:
{
boot = {
loader = {
grub.enable = false;
raspberryPi = {
enable = true;
version = 3;
uboot.enable = true;
};
};
kernelPackages = pkgs.linuxPackages_latest;
# No ZFS on latest kernel:
tmp.useTmpfs = true;
};
nix = {
settings.auto-optimise-store = true;
};
networking = {
hostName = "sanddorn";
useDHCP = false;
interfaces.eth0.useDHCP = true;
interfaces.wlan0.useDHCP = true;
firewall.enable = false;
};
programs.tmux.enable = true;
# Do not log to flash:
services.journald.extraConfig = ''
Storage=volatile
'';
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
documentation.enable = false;
system.stateVersion = "21.05";
}

View file

@ -1,48 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
#imports =
# [ (modulesPath + "/installer/scan/not-detected.nix")
# ];
boot.initrd.availableKernelModules = [ "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "snd_bcm2835.enable_headphones=1" ];
boot.blacklistedKernelModules = [ "vc4_hdmi" ];
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
};
"/swap" = {
device = "/dev/disk/by-uuid/SWAP";
fsType = "btrfs";
options = [ "subvol=swap" "compress=lzo" "noatime" ]; # Note these options effect the entire BTRFS filesystem and not just this volume, with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
swapDevices = [{
device = "/swap/swapfile";
size = (1024 * 2);
}];
hardware.enableRedistributableFirmware = true;
#networking.wireless.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
gpu_mem=192
dtparam=audio=on
'';
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View file

File diff suppressed because it is too large Load diff

View file

@ -1,42 +0,0 @@
{ pkgs, lib, config, office_stuff, ... }:
let
extra_office_packages = (lib.ifEnable config.fsr.enable_office_bloat (with pkgs; [
vlc
libreoffice-fresh
okular
texlive.combined.scheme-full
]));
in
{
# enable XFCE as lightweight desktop environment
services = {
xserver.enable = true;
xserver.desktopManager.xfce.enable = true;
xserver.displayManager.defaultSession = "xfce";
# Configure keymap in X11
xserver.layout = "de";
xserver.xkbOptions = "eurosign:e,ctrl:nocaps,compose:prsc";
# enable touchpad support
xserver.libinput.enable = true;
};
# enable sound
sound.enable = true;
sound.mediaKeys.enable = true;
hardware.pulseaudio.enable = true;
# additional programs for a lightweight working office environment
environment.systemPackages = with pkgs; [
## audio management
pavucontrol
## terminal, browsers, text editing
#vscodium
firefox
] ++ extra_office_packages;
}

View file

@ -1,29 +0,0 @@
{ pkgs, lib, config, ... }:
let
fsr-infoscreen = pkgs.fsr-infoscreen;
in
{
systemd = {
services."fsr-infoscreen" = {
enable = true;
wantedBy = [ "multi-user.target" ];
script = ''
${pkgs.python39}/bin/python39 ${fsr-infoscreen}/build/middleware/infoscreen.py
'';
serviceConfig = {
User = "infoscreen";
Restart = "on-failure";
};
};
};
users.users.infoscreen = {
name = "infoscreen";
description = "custom user for service infoscreen service";
isNormalUser = true;
};
}

View file

@ -1,75 +0,0 @@
{ lib
, pkgs
#, buildpythonApplication
#, buildPythonPackage
, fetchFromGitHub
#, fetchPypi
}:
let
dvb = pkgs.python39Packages.buildPythonPackage rec {
pname = "dvb";
version = "1.2.0";
src = fetchFromGitHub {
owner = "revol-xut";
repo = "dvbpy";
rev = "66c975f58b9f831ff6044aa65da58c3246938e5e";
sha256 = "sha256-OzK9r6tyyjawdDzqrDw9CFh0lf8Bn11rJpQl60YCoT8=";
};
doCheck = false;
propagatedBuildInputs = with pkgs.python39Packages; [ pyproj numpy requests ];
};
flask-misaka = pkgs.python39Packages.buildPythonPackage rec {
pname = "flask-misaka";
version = "1.0.0";
src = fetchFromGitHub {
owner = "singingwolfboy";
repo = "flask-misaka";
rev = "d960e512ac1ea16225d236984fcf130a46bb7b83";
sha256 = "sha256-RYDD+Bj3+S2isTdccl04zvLjpbalQ5sqb3sYnUy1+bU=";
};
doCheck = false;
propagatedBuildInputs = with pkgs.python39Packages; [ flask misaka ];
};
in
pkgs.python39Packages.buildPythonApplication rec {
pname = "fsr-infoscreen";
version = "2.1.0";
src = fetchFromGitHub {
owner = "fsr";
repo = "infoscreen";
rev = "43fb1fdc9dd15ccf40ef28b448ac6cfd51f32bc4";
sha256 = "sha256-KVIuL9g5gYC+3o2U7HQRqHQnU02kn7E9P7ZydFc/tyA=";
};
nativeBuildInputs = with pkgs; [ pkg-config python3Packages.wrapPython ];
propagatedBuildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
buildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
pythonPath = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
installPhase = ''
mkdir -p $out/build/middleware
install -Dm755 middleware/infoscreen.py $out/build/middleware
mkdir -p $out/share/infoscreen
wrapPythonPrograms
'';
makeWrapperArgs = [
"--prefix PYTHONPATH : $out/share/fsr-infoscreen"
];
meta = with lib; {
description = "A minimal python server which supplies the fsr infoscreen with information.";
homepage = "https://github.com/fsr/infoscreen";
license = licenses.mit;
maintainers = with maintainers; [ revol-xut ];
};
}