From 31b1a6b63bcbb74d2c41b65dcafa9542da5071cc Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sun, 30 Aug 2020 23:27:12 +0800 Subject: [PATCH] Update config and add a Nix module for CADs --- README.adoc | 5 +++++ hosts/zilch/default.nix | 8 +++++++- modules/desktop/cad.nix | 21 +++++++++++++++++++++ modules/desktop/default.nix | 1 + modules/desktop/music.nix | 6 +++--- modules/editors/emacs.nix | 2 +- 6 files changed, 38 insertions(+), 5 deletions(-) create mode 100755 modules/desktop/cad.nix diff --git a/README.adoc b/README.adoc index 7d6b1fcd..bed0525b 100755 --- a/README.adoc +++ b/README.adoc @@ -50,6 +50,11 @@ If we're to install this setup at separate times, the full list of installed pac * It may use third-party channels for certain versions of the packages, hammering the first precaution even further regarding reproducibility. +* The main user configuration is tightly integrated with the system configuration. +In other words, all upgrades would have to affect the entire system. +If you want separate user profiles (just like how Nix intended to be) with each user having its own pace of upgrading their local system, you're missing out with this config setup. +That said, it is still possible to create user profiles by just declaring the user in `./hosts/$HOST/default.nix` (e.g., `users.users.$USERNAME`), leaving it blank, and configure it at your own pace in `$HOME`. + diff --git a/hosts/zilch/default.nix b/hosts/zilch/default.nix index 7c37bdfc..be7a817b 100755 --- a/hosts/zilch/default.nix +++ b/hosts/zilch/default.nix @@ -157,6 +157,7 @@ maim (tesseract.override { enableLanguages = [ "eng" ]; }) slop + xclip xdg-user-dirs zbar ]; @@ -183,7 +184,12 @@ }; # Install a proprietary Nvidia graphics driver. - services.xserver.videoDrivers = [ "nvidiaLegacy390" ]; + services.xserver = { + libinput = { + middleEmulation = true; + }; + videoDrivers = [ "nvidiaLegacy390" ]; + }; # Enable sound. sound.enable = true; diff --git a/modules/desktop/cad.nix b/modules/desktop/cad.nix new file mode 100755 index 00000000..d1d4d9a9 --- /dev/null +++ b/modules/desktop/cad.nix @@ -0,0 +1,21 @@ +# Even if my designs are computer-aided, it's still horrible. +{ config, options, lib, pkgs, ... }: + +with lib; + +let + cfg = config.modules.desktop.music; +in { + options.modules.desktop.music = { + enable = mkOption { + type = types.bool; + default = false; + }; + }; + + config = { + my.packages = with pkgs; [ + freecad # FREE AS A BIRD, FREE AS A ALL-YOU-CAN-EAT BUFFER! + leocad # A CAD for leos, a well-known brand of toys. + }; +} diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 4b9e3401..d404a2ed 100755 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -4,6 +4,7 @@ { imports = [ ./browsers.nix + ./cad.nix ./files.nix ./fonts.nix ./graphics.nix diff --git a/modules/desktop/music.nix b/modules/desktop/music.nix index 0ebe292d..74c195a3 100755 --- a/modules/desktop/music.nix +++ b/modules/desktop/music.nix @@ -19,13 +19,13 @@ in { my.packages = with pkgs; (if cfg.composition.enable then [ lilypond # Prevent your compositions to be forever lost when you're in grave by engraving them now (or whenever you feel like it). - musescore # A music composer for creating musical cheatsheets. + unstable.musescore # A music composer for creating musical cheatsheets. soundfont-fluid # A soundfont for it or something. - supercollider # Programming platform for synthesizing them 'zics. + unstable.supercollider # Programming platform for synthesizing them 'zics. ] else []) ++ (if cfg.production.enable then [ - ardour # A DAW focuses on hardware recording but it can be used for something else. + unstable.ardour # A DAW focuses on hardware recording but it can be used for something else. audacity # Belongs in the great city of "Simple tools for short audio samples". carla # A plugin host useful for a consistent hub for them soundfonts and SFZs. fluidsynth # Synth for fluid sounds. diff --git a/modules/editors/emacs.nix b/modules/editors/emacs.nix index 4a925c70..ea7a8830 100755 --- a/modules/editors/emacs.nix +++ b/modules/editors/emacs.nix @@ -15,7 +15,7 @@ with lib; # Just make sure the unstable version of Emacs is available as a package by creating an overlay. pkg = mkOption { type = types.package; - default = pkgs.emacs; + default = pkgs.unstable.emacs; }; };