Make gui global option

This commit is contained in:
Simon Bruder 2020-12-05 13:48:06 +01:00
parent ba3a59d8c0
commit 6a2a9c48bc
No known key found for this signature in database
GPG key ID: 6F03E0000CC5B62F
20 changed files with 178 additions and 170 deletions

View file

@ -8,15 +8,18 @@
../../modules/gpu/intel.nix ../../modules/gpu/intel.nix
../../modules/restic.nix ../../modules/restic.nix
../../modules/ssd.nix ../../modules/ssd.nix
(import ../../modules/libvirt.nix { inherit pkgs; gui = true; }) ../../modules/libvirt.nix
#../../modules/texlive.nix #../../modules/texlive.nix
../../profiles/base.nix ../../profiles/base.nix
../../profiles/dev.nix ../../profiles/dev.nix
../../profiles/gui.nix
../../profiles/laptop.nix ../../profiles/laptop.nix
../../users/simon ../../users/simon
]; ];
sbruder = {
gui = true;
};
boot.loader.grub.device = "/dev/disk/by-id/ata-INTEL_SSDSC2KB480G7_PHYS749202D6480BGN"; boot.loader.grub.device = "/dev/disk/by-id/ata-INTEL_SSDSC2KB480G7_PHYS749202D6480BGN";
boot.initrd.luks.devices = { boot.initrd.luks.devices = {

View file

@ -6,15 +6,18 @@
./hardware-configuration.nix ./hardware-configuration.nix
../../modules/cpu/intel.nix ../../modules/cpu/intel.nix
../../modules/gpu/amd.nix ../../modules/gpu/amd.nix
(import ../../modules/libvirt.nix { inherit pkgs; gui = true; }) ../../modules/libvirt.nix
../../modules/restic.nix ../../modules/restic.nix
../../modules/ssd.nix ../../modules/ssd.nix
../../profiles/base.nix ../../profiles/base.nix
../../profiles/dev.nix ../../profiles/dev.nix
../../profiles/gui.nix
../../users/simon ../../users/simon
]; ];
sbruder = {
gui = true;
};
boot.loader.grub.device = "/dev/disk/by-id/ata-MTFDDAK256TBN-1AR15ABHA_UFZMQ01ZR50NMM"; boot.loader.grub.device = "/dev/disk/by-id/ata-MTFDDAK256TBN-1AR15ABHA_UFZMQ01ZR50NMM";
boot.initrd.luks.devices = { boot.initrd.luks.devices = {

View file

@ -1,6 +1,22 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [
./options.nix
./tools.nix
./communication.nix
./creative.nix
./cups.nix
./fonts.nix
./tools.nix
./media.nix
./network-manager.nix
./office.nix
./pulseaudio.nix
./sway.nix
./web.nix
];
# Essential system tools # Essential system tools
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git

View file

@ -1,111 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# top like tools
bmon # network monitor
gotop # fancy top
mtr # interactive traceroute
# batch processing/automation
jq # sed for json
parallel # parallel batch processing
yq # sed for yaml
# unix tools on steroids
curlie # better httpie (easier curl)
exa # better ls
fd # better find
ripgrep # better grep
# file tools
aria # multithreaded http/ftp/bittorrent download manager
dos2unix # convert CRLF (dos) or CR (classic mac) line endings to LF (unix)
fdupes # find duplicate files
file # file type
hexyl # user friendly hex file viewer
hyperfine # cli benchmarking
megatools # cli for mega.nz
minio-client # client for s3 compatible storage systems
mktorrent # bittorrent seed file generator
ntfs3g # ntfs filesystem driver
rclone # rsync for cloud storage
rename # sed for filenames
rsync # incremental file transfer
tokei # fast cloc
wget # download tool
xdelta # binary diff
# file format tools
imagemagick # image conversion
p7zip # 7z cli
pdftk # pdf multitool
sqlite-interactive # cli for sqlite databses
upx # executable packer
# network tools
dnsutils # dig
gatling # high performance web serve
iperf
iperf2 # bandwidth measurement tool
nmap # port scanner
sshfs # mount remote host
vnstat # client for vnstatd
whois # whois client
zmap # scanner for large address spaces
# system tools
libva-utils # vainfo
lm_sensors # temperature sensors
ncdu # interactive du
pciutils # lspci
reptyr # move process to current terminal
smartmontools # hard drive monitoring
usbutils # lsusb
# clients
drone-cli # client for drone ci
hcloud # cli for Hetzner Cloud
libnotify # notify-send
# function eye candy
fzf # fuzzy finder
pv # monitor progress in pipe
starship # zsh prompt
# end user programs
apacheHttpd # for htpasswd
libqalculate # flexible calculator for humans
scrcpy # stream/control android phones over adb
taskwarrior # todo list manager
# passwords
(pass-wayland.withExtensions (es: with es; [ pass-otp ])) # password manager
pwgen
pwgen-secure # password generator
xkcdpass # memorable password generator
# misc
toilet # free figlet
python38Packages.ipython # better python repl (useful for one-liners)
# vim
neovim-remote # controlling another neovim process
universal-ctags # ctags
# git
gitAndTools.delta # nicer diff
gitAndTools.git-annex
gitAndTools.git-annex-remote-rclone # git for non source files
gitAndTools.pre-commit # pre-commit hook for git
# nix tools
niv # depdendency manager
];
programs = {
adb.enable = true;
bandwhich.enable = true;
iotop.enable = true;
};
}

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
(mumble.override { pulseSupport = true; }) # VoIP group chat (mumble.override { pulseSupport = true; }) # VoIP group chat
claws-mail # email client that looks ugly but just works claws-mail # email client that looks ugly but just works

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
blender # 3d animation blender # 3d animation
darktable # photo development darktable # photo development

View file

@ -1,8 +1,8 @@
{ lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
gutenprintWithVersion = "gutenprint.${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}"; gutenprintWithVersion = "gutenprint.${lib.versions.majorMinor (lib.getVersion pkgs.gutenprint)}";
in in
{ lib.mkIf config.sbruder.gui {
services = { services = {
printing = { printing = {
enable = true; enable = true;

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
fonts = { fonts = {
fonts = with pkgs; [ fonts = with pkgs; [
corefonts # good ol microsoft fonts corefonts # good ol microsoft fonts

View file

@ -1,14 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
anki # flashcard SRS
filezilla # ftp client
gparted # gui for parted
qalculate-gtk # flexible calculator
antimicroX # gamepad to keyboard/mouse mapping
wl-clipboard # not really gui, but cli tool to manage wayland clipboard
wxhexeditor # hex editor
xfce.thunar # graphical file manager
];
}

View file

@ -1,7 +1,7 @@
{ pkgs, gui ? false, ... }: { config, lib, pkgs, ... }:
{ {
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
environment.systemPackages = if gui then [ pkgs.virt-manager ] else [ ]; environment.systemPackages = lib.mkIf config.sbruder.gui [ pkgs.virt-manager ];
} }

View file

@ -1,4 +1,4 @@
{ pkgs, gui ? false, ... }: { config, pkgs, ... }:
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
@ -24,7 +24,7 @@
# Literature # Literature
mupdf # document (pdf) viewer and tools mupdf # document (pdf) viewer and tools
] ++ ( ] ++ (
if gui then [ if config.sbruder.gui then [
# Audio # Audio
audacity # audio editor audacity # audio editor
picard # musicbrainz tagger picard # musicbrainz tagger

View file

@ -1,6 +1,6 @@
{ ... }: { config, lib, ... }:
{ lib.mkIf config.sbruder.gui {
networking.networkmanager = { networking.networkmanager = {
enable = true; enable = true;
}; };

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
aspellDicts.de aspellDicts.de
aspellDicts.en aspellDicts.en

7
modules/options.nix Normal file
View file

@ -0,0 +1,7 @@
{ config, lib, pkgs, ... }:
{
options.sbruder = {
gui = lib.mkEnableOption "Enable gui configuration";
};
}

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
sound.enable = true; sound.enable = true;
hardware.pulseaudio = { hardware.pulseaudio = {
enable = true; enable = true;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
programs.sway.enable = true; # actual configuration happens in home-manager programs.sway.enable = true; # actual configuration happens in home-manager
services.logind.lidSwitchDocked = config.services.logind.lidSwitch; services.logind.lidSwitchDocked = config.services.logind.lidSwitch;

123
modules/tools.nix Normal file
View file

@ -0,0 +1,123 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; lib.mkMerge [
[
# top like tools
bmon # network monitor
gotop # fancy top
mtr # interactive traceroute
# batch processing/automation
jq # sed for json
parallel # parallel batch processing
yq # sed for yaml
# unix tools on steroids
curlie # better httpie (easier curl)
exa # better ls
fd # better find
ripgrep # better grep
# file tools
aria # multithreaded http/ftp/bittorrent download manager
dos2unix # convert CRLF (dos) or CR (classic mac) line endings to LF (unix)
fdupes # find duplicate files
file # file type
hexyl # user friendly hex file viewer
hyperfine # cli benchmarking
megatools # cli for mega.nz
minio-client # client for s3 compatible storage systems
mktorrent # bittorrent seed file generator
ntfs3g # ntfs filesystem driver
rclone # rsync for cloud storage
rename # sed for filenames
rsync # incremental file transfer
tokei # fast cloc
wget # download tool
xdelta # binary diff
# file format tools
imagemagick # image conversion
p7zip # 7z cli
pdftk # pdf multitool
sqlite-interactive # cli for sqlite databses
upx # executable packer
# network tools
dnsutils # dig
gatling # high performance web serve
iperf
iperf2 # bandwidth measurement tool
nmap # port scanner
sshfs # mount remote host
vnstat # client for vnstatd
whois # whois client
zmap # scanner for large address spaces
# system tools
libva-utils # vainfo
lm_sensors # temperature sensors
ncdu # interactive du
pciutils # lspci
reptyr # move process to current terminal
smartmontools # hard drive monitoring
usbutils # lsusb
# clients
drone-cli # client for drone ci
hcloud # cli for Hetzner Cloud
libnotify # notify-send
# function eye candy
fzf # fuzzy finder
pv # monitor progress in pipe
starship # zsh prompt
# end user programs
apacheHttpd # for htpasswd
libqalculate # flexible calculator for humans
scrcpy # stream/control android phones over adb
taskwarrior # todo list manager
# passwords
(pass-wayland.withExtensions (es: with es; [ pass-otp ])) # password manager
pwgen
pwgen-secure # password generator
xkcdpass # memorable password generator
# misc
toilet # free figlet
python38Packages.ipython # better python repl (useful for one-liners)
# vim
neovim-remote # controlling another neovim process
universal-ctags # ctags
# git
gitAndTools.delta # nicer diff
gitAndTools.git-annex
gitAndTools.git-annex-remote-rclone # git for non source files
gitAndTools.pre-commit # pre-commit hook for git
# nix tools
niv # depdendency manager
]
(lib.mkIf config.sbruder.gui [
anki # flashcard SRS
filezilla # ftp client
gparted # gui for parted
qalculate-gtk # flexible calculator
antimicroX # gamepad to keyboard/mouse mapping
wl-clipboard # not really gui, but cli tool to manage wayland clipboard
wxhexeditor # hex editor
xfce.thunar # graphical file manager
])
];
programs = {
adb.enable = true;
bandwhich.enable = true;
iotop.enable = true;
};
}

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { config, lib, pkgs, ... }:
{ lib.mkIf config.sbruder.gui {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
firefox-wayland firefox-wayland
# Buidling chromium from source on a potato laptop is not fun # Buidling chromium from source on a potato laptop is not fun

View file

@ -4,7 +4,6 @@
imports = imports =
[ [
../modules/base.nix ../modules/base.nix
../modules/cli-tools.nix
../modules/docker.nix ../modules/docker.nix
../modules/grub.nix ../modules/grub.nix
../modules/locales.nix ../modules/locales.nix

View file

@ -1,18 +0,0 @@
{ pkgs, ... }:
{
imports =
[
../modules/communication.nix
../modules/creative.nix
../modules/cups.nix
../modules/fonts.nix
../modules/gui-tools.nix
(import ../modules/media.nix { inherit pkgs; gui = true; })
../modules/network-manager.nix
../modules/office.nix
../modules/pulseaudio.nix
../modules/sway.nix
../modules/web.nix
];
}