nix: Put desktop behind option

This commit is contained in:
Geoffrey Frogeye 2023-11-22 14:05:48 +01:00
parent 9a18827cbc
commit eb2f12b6c5
Signed by: geoffrey
GPG key ID: C72403E7F82E6AD8
9 changed files with 655 additions and 627 deletions

View file

@ -7,4 +7,5 @@
networking.hostName = "curacao"; networking.hostName = "curacao";
frogeye.extra = true; frogeye.extra = true;
frogeye.desktop.xorg = true;
} }

View file

@ -8,5 +8,6 @@
home.homeDirectory = "/home/gnix"; home.homeDirectory = "/home/gnix";
frogeye.extra = true; frogeye.extra = true;
frogeye.desktop.xorg = true;
frogeye.desktop.nixGLIntel = true; frogeye.desktop.nixGLIntel = true;
} }

View file

@ -465,23 +465,28 @@ in
# Favourite commands # Favourite commands
PAGER = "${pkgs.coreutils}/bin/less"; PAGER = "${pkgs.coreutils}/bin/less";
EDITOR = "${pkgs.neovim}/bin/nvim"; EDITOR = "${pkgs.neovim}/bin/nvim";
VISUAL = "${pkgs.neovim}/bin/nvim";
BROWSER = "${config.programs.qutebrowser.package}/bin/qutebrowser"; # Extra config
} // direnv // {
BOOT9_PATH = "${config.xdg.dataHome}/citra-emu/sysdata/boot9.bin"; BOOT9_PATH = "${config.xdg.dataHome}/citra-emu/sysdata/boot9.bin";
CCACHE_CONFIGPATH = "${config.xdg.configHome}/ccache.conf"; CCACHE_CONFIGPATH = "${config.xdg.configHome}/ccache.conf";
# INPUTRC = "${config.xdg.configHome}/inputrc"; # UPST Will use programs.readline, but doesn't allow path setting # INPUTRC = "${config.xdg.configHome}/inputrc"; # UPST Will use programs.readline, but doesn't allow path setting
LESSHISTFILE = "${config.xdg.stateHome}/lesshst"; LESSHISTFILE = "${config.xdg.stateHome}/lesshst";
NODE_REPL_HISTORY = "${config.xdg.cacheHome}/node_repl_history"; NODE_REPL_HISTORY = "${config.xdg.cacheHome}/node_repl_history";
PYTHONSTARTUP = "${config.xdg.configHome}/pythonstartup.py"; PYTHONSTARTUP = "${config.xdg.configHome}/pythonstartup.py";
RXVT_SOCKET = "${config.xdg.stateHome}/urxvtd"; # Used to want -$HOME suffix, hopefullt this isn't needed
# TODO I think we're not using the urxvt daemon on purpose? # TODO I think we're not using the urxvt daemon on purpose?
# TODO this should be desktop only, as a few things are too. # TODO this should be desktop only, as a few things are too.
SCREENRC = "${config.xdg.configHome}/screenrc"; SCREENRC = "${config.xdg.configHome}/screenrc";
SQLITE_HISTFILE = "${config.xdg.stateHome}/sqlite_history"; SQLITE_HISTFILE = "${config.xdg.stateHome}/sqlite_history";
YARN_DISABLE_SELF_UPDATE_CHECK = "true"; # This also disable the creation of a ~/.yarnrc file YARN_DISABLE_SELF_UPDATE_CHECK = "true"; # This also disable the creation of a ~/.yarnrc file
} // lib.optionalAttrs config.frogeye.desktop.xorg {
# Favourite commands
VISUAL = "${pkgs.neovim}/bin/nvim";
BROWSER = "${config.programs.qutebrowser.package}/bin/qutebrowser";
# Extra config
RXVT_SOCKET = "${config.xdg.stateHome}/urxvtd"; # Used to want -$HOME suffix, hopefullt this isn't needed
# XAUTHORITY = "${config.xdg.configHome}/Xauthority"; # Disabled as this causes lock-ups with DMs # XAUTHORITY = "${config.xdg.configHome}/Xauthority"; # Disabled as this causes lock-ups with DMs
}; } // direnv;
# TODO Session variables only get reloaded on login I think. # TODO Session variables only get reloaded on login I think.
sessionPath = [ sessionPath = [
"$HOME/.local/bin" "$HOME/.local/bin"

File diff suppressed because it is too large Load diff

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { { pkgs, config, ... }: {
# TODO Separate in diffrent packages once the structure is finalized... # TODO Separate in diffrent packages once the structure is finalized...
# or connvert into per-directory requirements # or connvert into per-directory requirements
home.packages = with pkgs; [ home.packages = with pkgs; [
@ -19,17 +19,14 @@
yq yq
universal-ctags universal-ctags
highlight highlight
zeal-qt6 # Offline documentation
# Docker # Docker
docker docker
docker-compose docker-compose
# FPGA # FPGA
yosys
verilog verilog
# ghdl # TODO Not on aarch64 # ghdl # TODO Not on aarch64
gtkwave # TODO Display server only
# Network # Network
socat socat
@ -37,13 +34,22 @@
whois whois
nmap nmap
tcpdump tcpdump
wireshark-qt # TODO Display server only
# nix # nix
nix nix
# Python # Python
python3Packages.ipython python3Packages.ipython
] ++ lib.optionals config.frogeye.desktop.xorg [
# Common
zeal-qt6 # Offline documentation
# FPGA
yosys
gtkwave
# Network
wireshark-qt
]; ];
} }

View file

@ -1,27 +1,14 @@
{ pkgs, lib, config, ... }: { pkgs, lib, config, ... }:
{ {
home.packages = with pkgs; lib.mkIf config.frogeye.extra [ home.packages = with pkgs; lib.mkIf config.frogeye.extra ([
# android tools # android tools
android-tools android-tools
# multimedia editors
gimp
inkscape
darktable
blender
puddletag
musescore
audacity
# downloading # downloading
yt-dlp yt-dlp
megatools megatools
# transmission TODO Collision if both transmissions are active? # transmission TODO Collision if both transmissions are active?
transmission-qt
# wine
wine
# TODO wine-gecko wine-mono lib32-libpulse (?)
# documents # documents
pandoc pandoc
@ -34,11 +21,30 @@
hunspellDicts.nl_NL hunspellDicts.nl_NL
# TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr # TODO libreoffice-extension-languagetool or libreoffice-extension-grammalecte-fr
] ++ lib.optionals config.frogeye.desktop.xorg [
# multimedia editors
gimp
inkscape
darktable
blender
puddletag
musescore
audacity
# downloading
transmission-qt
# wine
wine
# TODO wine-gecko wine-mono lib32-libpulse (?)
# gaming # gaming
steam steam
yuzu-mainline yuzu-mainline
minecraft minecraft
# TODO factorio # TODO factorio
];
]);
} }

View file

@ -2,6 +2,9 @@
{ {
options.frogeye = { options.frogeye = {
extra = lib.mkEnableOption "Big software"; extra = lib.mkEnableOption "Big software";
desktop.nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager"; desktop = {
xorg = lib.mkEnableOption "Enable X11 support";
nixGLIntel = lib.mkEnableOption "Enable nixGLIntel/nixVulkanIntel for windows manager";
};
}; };
} }

View file

@ -1,17 +1,18 @@
{ pkgs, ... }: { pkgs, lib, config, ... }:
{ {
# Enable the X11 windowing system config = lib.mkIf config.frogeye.desktop.xorg {
services.xserver.enable = true; # Enable the X11 windowing system
services.xserver = { services.xserver = {
windowManager.i3.enable = true; enable = true;
displayManager.defaultSession = "none+i3"; windowManager.i3.enable = true;
displayManager.defaultSession = "none+i3";
# Keyboard layout # Keyboard layout
extraLayouts.qwerty-fr = { extraLayouts.qwerty-fr = {
description = "QWERTY-fr"; description = "QWERTY-fr";
languages = [ "fr" ]; languages = [ "fr" ];
symbolsFile = "${pkgs.stdenv.mkDerivation { symbolsFile = "${pkgs.stdenv.mkDerivation {
name = "qwerty-fr-keypad"; name = "qwerty-fr-keypad";
src = builtins.fetchGit { src = builtins.fetchGit {
url = "https://github.com/qwerty-fr/qwerty-fr.git"; url = "https://github.com/qwerty-fr/qwerty-fr.git";
@ -26,11 +27,12 @@
runHook postInstall runHook postInstall
''; '';
}}/linux/us_qwerty-fr"; }}/linux/us_qwerty-fr";
};
layout = "qwerty-fr";
}; };
layout = "qwerty-fr";
};
# Enable sound # Enable sound
sound.enable = true; sound.enable = true;
hardware.pulseaudio.enable = true; hardware.pulseaudio.enable = true;
};
} }

View file

@ -5,8 +5,10 @@
<nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix> <nixpkgs/nixos/modules/installer/sd-card/sd-image-aarch64.nix>
./os/loader.nix ./os/loader.nix
]; ];
networking.hostName = "pindakaas";
# nixos-hardware use latest kernel by default. This obviously runs quickly out of sync with zfs packages. # nixos-hardware use latest kernel by default. This obviously runs quickly out of sync with zfs packages.
# zfs packages are included despite me asking anything zfs, probably they're in the image for installation purposes? # zfs packages are included despite me asking anything zfs, probably they're in the image for installation purposes?
boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
networking.hostName = "pindakaas";
frogeye.desktop.xorg = true;
} }