added option to toggle office bloat

This commit is contained in:
revol-xut 2022-04-19 16:39:09 +02:00
parent a8a8e6bad5
commit 048bd78eeb
No known key found for this signature in database
GPG key ID: 4F56FF7759627D07
6 changed files with 45 additions and 26 deletions

View file

@ -9,6 +9,9 @@
outputs = { self, nixpkgs, sops-nix, fsr-infoscreen, ... }@inputs: outputs = { self, nixpkgs, sops-nix, fsr-infoscreen, ... }@inputs:
let let
in { in {
packages."aarch64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
packages."x86_64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
nixosConfigurations = { nixosConfigurations = {
birne = nixpkgs.lib.nixosSystem { birne = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
@ -20,6 +23,10 @@
./modules/desktop.nix ./modules/desktop.nix
./modules/printing.nix ./modules/printing.nix
./modules/wifi.nix ./modules/wifi.nix
./modules/options.nix
{
fsr.enable_office_bloat = true;
}
]; ];
}; };
@ -37,7 +44,11 @@
./modules/autoupdate.nix ./modules/autoupdate.nix
./modules/wifi.nix ./modules/wifi.nix
./modules/desktop.nix ./modules/desktop.nix
./modules/options.nix
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix" "${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
{
fsr.enable_office_bloat = false;
}
]; ];
}; };
}; };

View file

@ -7,7 +7,6 @@
{ {
imports = imports =
[ # Include the results of the hardware scan. [ # Include the results of the hardware scan.
./hardware-configuration.nix
]; ];
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@ -35,7 +34,7 @@
firefox firefox
]; ];
system.stateVersion = "21.11"; system.stateVersion = "21.05";
} }

View file

@ -1,9 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [
./hardware-configuration.nix
];
boot = { boot = {
loader = { loader = {
grub.enable = false; grub.enable = false;
@ -18,6 +14,11 @@
tmpOnTmpfs = true; tmpOnTmpfs = true;
}; };
nix = {
autoOptimiseStore = true;
};
networking = { networking = {
hostName = "sanddorn"; hostName = "sanddorn";
@ -27,6 +28,8 @@
firewall.enable = false; firewall.enable = false;
}; };
programs.tmux.enable = true;
# Do not log to flash: # Do not log to flash:
services.journald.extraConfig = '' services.journald.extraConfig = ''
Storage=volatile Storage=volatile
@ -37,6 +40,7 @@
wheelNeedsPassword = false; wheelNeedsPassword = false;
}; };
system.stateVersion = "21.11"; documentation.enable = false;
system.stateVersion = "21.05";
} }

View file

@ -1,6 +1,16 @@
{ pkgs, config, ... }: { 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 # enable XFCE as lightweight desktop environment
services = { services = {
xserver.enable = true; xserver.enable = true;
@ -24,16 +34,8 @@
## audio management ## audio management
pavucontrol pavucontrol
## terminal, browsers, text editing ## terminal, browsers, text editing
vscodium #vscodium
firefox firefox
## document viewers ] ++ extra_office_packages;
okular
## LaTeX
texlive.combined.scheme-full
texstudio
## the eternal pain continues
libreoffice-fresh
# media viewers
vlc
];
} }

View file

@ -1,8 +1,4 @@
{ pkgs { pkgs, lib, config, ...}:
, lib
, config
, ...
}:
let let
fsr-infoscreen = pkgs.fsr-infoscreen; fsr-infoscreen = pkgs.fsr-infoscreen;

7
modules/options.nix Normal file
View file

@ -0,0 +1,7 @@
{config, lib, ...}: with lib; {
options.fsr.enable_office_bloat = mkOption {
type = types.bool;
default = false;
description = "install heavy office bloat like texlive, okular, ...";
};
}