nix: exorcise all with <expr>; uses

This commit is contained in:
Antoine Martin 2022-01-11 16:08:21 +01:00
parent ef59fd800e
commit 912073bee6
67 changed files with 576 additions and 259 deletions

View file

@ -1,11 +1,18 @@
{ pkgs, lib, config, options, ... }:
let
inherit (lib)
mkEnableOption
mkIf
optional
;
in
{
options.my.gui = {
enable = lib.mkEnableOption "System has some kind of screen attached";
isNvidia = lib.mkEnableOption "System a NVIDIA GPU";
enable = mkEnableOption "System has some kind of screen attached";
isNvidia = mkEnableOption "System a NVIDIA GPU";
};
config = lib.mkIf config.my.gui.enable {
config = mkIf config.my.gui.enable {
my.displayManager.sddm.enable = true;
services = {
@ -21,27 +28,30 @@
};
};
environment.systemPackages = with pkgs; [
element-desktop
feh
firefox
ffmpeg
gimp
gnome.nautilus
imagemagick
mpv
obs-studio
pavucontrol
slack
spotify
tdesktop
teams
thunderbird
virt-manager
zathura
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
element-desktop
feh
firefox
ffmpeg
gimp
imagemagick
mpv
obs-studio
pavucontrol
slack
spotify
tdesktop
teams
thunderbird
virt-manager
zathura
;
unstable.discord
];
inherit (pkgs.gnome) nautilus;
inherit (pkgs.unstable) discord;
};
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;

View file

@ -1,6 +1,12 @@
{ lib, ... }:
let
inherit (lib)
mkOption
types
;
in
{
options.my.networking.externalInterface = with lib; mkOption {
options.my.networking.externalInterface = mkOption {
type = types.nullOr types.str;
default = null;
example = "eth0";

View file

@ -19,40 +19,45 @@
bandwhich.enable = true;
};
environment.systemPackages = with pkgs; [
# shell usage
fd
ripgrep
sd
tmux
tokei
tree
wget
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
# shell usage
fd
ripgrep
sd
tmux
tokei
tree
wget
# development
git
git-crypt
git-lfs
gnumake
gnupg
kakoune
pinentry-curses
python3
vim
clang_11
llvmPackages_11.bintools
# development
git
git-crypt
git-lfs
gnumake
gnupg
kakoune
pinentry-curses
python3
vim
# terminal utilities
bottom
dogdns
du-dust
htop
ldns # drill
tealdeer
unzip
zip
# terminal utilities
bottom
dogdns
du-dust
htop
ldns # drill
tealdeer
unzip
zip
# nix pkgs lookup
nix-index
];
# nix pkgs lookup
nix-index
;
inherit (pkgs.llvmPackages_11)
bintools
clang
;
};
}