mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-25 18:19:10 +00:00
Update the Nix config
A bunch of minor updates here, a bunch of minor changes there. All of the Nix changes is here for all the world to see.
This commit is contained in:
parent
91ff5c8add
commit
ef12c29f36
25
Makefile
25
Makefile
@ -6,39 +6,40 @@ DOTS := /etc/dotfiles
|
|||||||
NIXOS_VERSION := 20.09
|
NIXOS_VERSION := 20.09
|
||||||
NIXOS_PREFIX := $(PREFIX)/etc/nixos
|
NIXOS_PREFIX := $(PREFIX)/etc/nixos
|
||||||
FLAGS := -I "config=$$(pwd)/config" \
|
FLAGS := -I "config=$$(pwd)/config" \
|
||||||
-I "modules=$$(pwd)/modules" \
|
-I "modules=$$(pwd)/modules" \
|
||||||
-I "bin=$$(pwd)/bin" \
|
-I "bin=$$(pwd)/bin" \
|
||||||
$(FLAGS)
|
$(FLAGS)
|
||||||
|
|
||||||
config: $(NIXOS_PREFIX)/configuration.nix
|
config: $(NIXOS_PREFIX)/configuration.nix
|
||||||
home: $(HOME)/dotfiles
|
home: $(HOME)/dotfiles
|
||||||
|
|
||||||
# The channels will be used on certain modules like in `packages/default.nix` where it will be referred to install certain packages from the unstable channel.
|
# The channels will be used on certain modules like in `packages/default.nix` where it will be referred to install certain packages from the unstable channel.
|
||||||
unstable_channels:
|
channels:
|
||||||
@sudo nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos
|
@sudo nix-channel --add "https://nixos.org/channels/nixos-unstable" nixos
|
||||||
@sudo nix-channel --add "https://github.com/rycee/home-manager/archive/master.tar.gz" home-manager
|
@sudo nix-channel --add "https://github.com/rycee/home-manager/archive/master.tar.gz" home-manager
|
||||||
@sudo nix-channel --add "https://nixos.org/channels/nixpkgs-unstable" nixpkgs-unstable
|
@sudo nix-channel --add "https://nixos.org/channels/nixpkgs-unstable" nixpkgs-unstable
|
||||||
|
|
||||||
channels:
|
|
||||||
@sudo nix-channel --add "https://nixos.org/channels/nixos-${NIXOS_VERSION}" nixos
|
|
||||||
@sudo nix-channel --add "https://github.com/rycee/home-manager/archive/release-${NIXOS_VERSION}.tar.gz" home-manager
|
|
||||||
@sudo nix-channel --add "https://nixos.org/channels/nixpkgs-unstable" nixpkgs-unstable
|
|
||||||
|
|
||||||
update:
|
update:
|
||||||
@sudo nix-channel --update
|
@sudo nix-channel --update
|
||||||
|
|
||||||
switch:
|
switch:
|
||||||
@sudo nixos-rebuild $(FLAGS) switch
|
@sudo nixos-rebuild $(FLAGS) switch
|
||||||
|
|
||||||
|
# 'boot' and 'switch' are somewhat the same except 'boot' takes care of setting the kernel so use this if you've changed the kernel settings.
|
||||||
|
boot:
|
||||||
|
@sudo nixos-rebuild $(FLAGS) boot
|
||||||
|
|
||||||
install: channels update
|
install: channels update
|
||||||
@sudo nixos-generate-config --root "$(PREFIX)" && sudo cp --update "$(NIXOS_PREFIX)/hardware-configuration.nix" "$$(pwd)/hosts/$(HOST)/hardware-configuration.nix"
|
@sudo nixos-generate-config --root "$(PREFIX)"
|
||||||
@echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix"
|
@echo "import \"$(DOTS)\" \"$(HOST)\" \"$${USER}\"" | sudo tee "${NIXOS_PREFIX}/configuration.nix"
|
||||||
@sudo nixos-install --root "$(PREFIX)" $(FLAGS)
|
@sudo nixos-install --root "$(PREFIX)" $(FLAGS)
|
||||||
@sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles"
|
@sudo cp -r "$(DOTS)" "$(PREFIX)/etc/dotfiles"
|
||||||
@sudo nixos-enter --root "$(PREFIX)" -c chown $(USER):users $(DOTS)
|
@sudo nixos-enter --root "$(PREFIX)" --command "chown $(USER):users $(DOTS) --recursive"
|
||||||
|
@sudo nixos-enter --root "$(PREFIX)" --command "make -C $(DOTS) channels"
|
||||||
|
@echo "Set password for $(USER)" && sudo nixos-enter --root "$(PREFIX)" --command "passwd $(USER)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@sudo nix-collect-garbage -d
|
@nix-collect-garbage -d
|
||||||
|
|
||||||
upgrade: update switch
|
upgrade: update switch
|
||||||
|
|
||||||
|
31
README.adoc
31
README.adoc
@ -31,10 +31,10 @@ To correct this behavior, simply configure the `PREFIX` variable (e.g., `PREFIX=
|
|||||||
|
|
||||||
For more information, simply inspect the link:./Makefile[`./Makefile`].
|
For more information, simply inspect the link:./Makefile[`./Makefile`].
|
||||||
|
|
||||||
Assuming you did install, your project will have the following stuff.
|
Assuming you did install, your NixOS setup will have the following stuff.
|
||||||
|
|
||||||
- Add the nixpkgs unstable channel as `nixpkgs-unstable` (i.e., `nix-channels --update https://nixos.org/channels/nixos-unstable`).
|
- Uses the NixOS unstable channel (https://nixos.org/channels/nixos-unstable) for its package set.
|
||||||
- Have the https://github.com/rycee/home-manager[home-manager] installed with the stable release.
|
- Have the https://github.com/rycee/home-manager[home-manager] installed with the unstable release.
|
||||||
- You start with the TTY and nothing else is installed (i.e., bare installation similar in spirit to Arch Linux).
|
- You start with the TTY and nothing else is installed (i.e., bare installation similar in spirit to Arch Linux).
|
||||||
To setup your graphical installation, see the <<Themes>> section.
|
To setup your graphical installation, see the <<Themes>> section.
|
||||||
|
|
||||||
@ -45,8 +45,8 @@ There are some things you need to keep in mind when using this setup.
|
|||||||
|
|
||||||
* This setup is not meant to be fully reproducible.
|
* This setup is not meant to be fully reproducible.
|
||||||
It is a personal setup for a person who wants to live on the bleeding edge, personally.
|
It is a personal setup for a person who wants to live on the bleeding edge, personally.
|
||||||
Despite being a NixOS setup which should be reproducible on paper, it mainly uses the unstable versions of the channels and packages.
|
Despite being a NixOS setup which should be reproducible on paper, it mainly uses the unstable versions of the channels and packages meaning you would have a different installation each time (unless you do something like https://nixos.org/guides/towards-reproducibility-pinning-nixpkgs.html[pinning the nixpkgs repo] or using https://www.tweag.io/blog/2020-05-25-flakes/[the flakes feature]).
|
||||||
If we're to install this setup at separate times, the full list of installed packages with their depedencies and versions wouldn't be the same.
|
footnote:[I'm most likely using the Nix flakes some time in the future.]
|
||||||
|
|
||||||
* It may use third-party channels for certain versions of the packages, hammering the first precaution even further regarding reproducibility.
|
* It may use third-party channels for certain versions of the packages, hammering the first precaution even further regarding reproducibility.
|
||||||
|
|
||||||
@ -117,7 +117,6 @@ For best practice, you may want to follow the following project structure:
|
|||||||
├── config/
|
├── config/
|
||||||
├── modules/
|
├── modules/
|
||||||
├── default.nix*
|
├── default.nix*
|
||||||
├── hardware-configuration.nix*
|
|
||||||
└── README.adoc
|
└── README.adoc
|
||||||
----
|
----
|
||||||
|
|
||||||
@ -128,9 +127,6 @@ For best practice, you may want to follow the following project structure:
|
|||||||
* `default.nix` is the entrypoint for our host module.
|
* `default.nix` is the entrypoint for our host module.
|
||||||
It contains configuration of our link:./modules[`./modules`], NixOS (i.e., `man configuration.nix`), https://github.com/rycee/home-manager[home-manager] (i.e., `man home-configuration.nix`), and other things you might want to include in the host-specific `$HOST/modules/` folder.
|
It contains configuration of our link:./modules[`./modules`], NixOS (i.e., `man configuration.nix`), https://github.com/rycee/home-manager[home-manager] (i.e., `man home-configuration.nix`), and other things you might want to include in the host-specific `$HOST/modules/` folder.
|
||||||
|
|
||||||
* `hardware-configuration.nix` is there for hardware configurations...
|
|
||||||
(I plan to remove this one since it should use the dynamically generated hardware config at `/etc/nixos/hardware-configuration.nix`.)
|
|
||||||
|
|
||||||
* A README file in whatever format you prefer.
|
* A README file in whatever format you prefer.
|
||||||
(I just choose https://asciidoctor.org/[Asciidoctor] with the `.adoc` file extension since it's my go-to document format.)
|
(I just choose https://asciidoctor.org/[Asciidoctor] with the `.adoc` file extension since it's my go-to document format.)
|
||||||
|
|
||||||
@ -209,9 +205,9 @@ footnote:[Don't forget to visit the nixpkgs repo and look at the source code for
|
|||||||
|
|
||||||
It'll be a full-time geeky story if I have to explain so I'll put it in a bullet list.
|
It'll be a full-time geeky story if I have to explain so I'll put it in a bullet list.
|
||||||
|
|
||||||
* You can configure your system from the system-wide packages, user-specific packages, boot loader settings, graphical environments, and what-have-you.
|
* You can configure your system from the system-wide packages, user-specific packages, boot loader settings, graphical environments, and what-have-you stored in text files.
|
||||||
That fact alone blew my mind ever since I saw @hlissner's NixOS and the temptation just keeps growing ever since.
|
That fact alone blew my mind ever since I saw @hlissner's NixOS and the temptation just keeps growing ever since I see more NixOS-related posts.
|
||||||
This is where the real power of NixOS (and also https://guix.gnu.org/[GuixSD]) really made it worth: declarative configuration.
|
This is where the real power of NixOS (and also https://guix.gnu.org/[GuixSD]) really made it worth the try: declarative system and local configuration.
|
||||||
|
|
||||||
* It is reproducible (in a way, anyway).
|
* It is reproducible (in a way, anyway).
|
||||||
Compared to other distros I've used in the past before discovering NixOS (which is only Arch and Fedora), it is very easy to reproduce the config.
|
Compared to other distros I've used in the past before discovering NixOS (which is only Arch and Fedora), it is very easy to reproduce the config.
|
||||||
@ -227,6 +223,14 @@ It's like Windows Restore on steroids.
|
|||||||
* The packaging process is straightforward (or so I've heard).
|
* The packaging process is straightforward (or so I've heard).
|
||||||
I've yet to create one but it'll quickly change once I found my ideal set up for starting game dev as a hobby.
|
I've yet to create one but it'll quickly change once I found my ideal set up for starting game dev as a hobby.
|
||||||
|
|
||||||
|
* Hipster points.
|
||||||
|
https://www.archlinux.org/[Arch?]
|
||||||
|
https://k1ss.org/[KISS Linux?]
|
||||||
|
https://www.gentoo.org/[Gentoo?]
|
||||||
|
http://www.linuxfromscratch.org/[Linux From Scratch?]
|
||||||
|
Forget that!
|
||||||
|
NixOS-influenced distros are the future and I'll continue to shill it for the rest of my computing shtick.
|
||||||
|
|
||||||
|
|
||||||
=== Want to learn NixOS?
|
=== Want to learn NixOS?
|
||||||
|
|
||||||
@ -255,6 +259,9 @@ The https://nixos.wiki/[unofficial NixOS wiki] is one of the more reliable sourc
|
|||||||
For more learning on the Nix conventions, ecosystem, and practices, I recommend https://nix.dev/[nix.dev] to look out for.
|
For more learning on the Nix conventions, ecosystem, and practices, I recommend https://nix.dev/[nix.dev] to look out for.
|
||||||
It provides some information that the official (and unofficial) sources misses.
|
It provides some information that the official (and unofficial) sources misses.
|
||||||
|
|
||||||
|
|
||||||
|
=== Problems encountered along the way
|
||||||
|
|
||||||
NixOS is a wildly different beast compared to other distros.
|
NixOS is a wildly different beast compared to other distros.
|
||||||
I did go through some rocky road to learning it;
|
I did go through some rocky road to learning it;
|
||||||
my time learning NixOS is not composed of 100% absorbing the information efficiently.
|
my time learning NixOS is not composed of 100% absorbing the information efficiently.
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
# Paths to synchronize
|
# Paths to synchronize
|
||||||
path = writings
|
|
||||||
path = projects
|
|
||||||
path = library
|
path = library
|
||||||
|
path = phone
|
||||||
|
path = projects
|
||||||
|
path = writings
|
||||||
|
|
||||||
# My GnuPG keys
|
# My GnuPG keys
|
||||||
path = .gnupg
|
path = .gnupg
|
||||||
@ -18,6 +19,7 @@ ignore = Name *~
|
|||||||
ignore = Name .*~
|
ignore = Name .*~
|
||||||
ignore = Name *.o
|
ignore = Name *.o
|
||||||
ignore = Name *.tmp
|
ignore = Name *.tmp
|
||||||
|
ignore = Name *.qcow2
|
||||||
|
|
||||||
# Node cache
|
# Node cache
|
||||||
ignore = Name node_modules
|
ignore = Name node_modules
|
||||||
@ -25,6 +27,9 @@ ignore = Name node_modules
|
|||||||
# Rust build caches
|
# Rust build caches
|
||||||
ignore = Name target
|
ignore = Name target
|
||||||
|
|
||||||
|
# Nix build result
|
||||||
|
ignore = Name result
|
||||||
|
|
||||||
# The diff command with the unified style (the same style Git uses for showing diffs)
|
# The diff command with the unified style (the same style Git uses for showing diffs)
|
||||||
diff = diff --unified
|
diff = diff --unified
|
||||||
|
|
@ -3,12 +3,14 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = import ./modules/overlays.nix;
|
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# Change the Linux kernel version.
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_5_8;
|
||||||
|
boot.extraModulePackages = [ pkgs.linuxPackages_5_8.nvidia_x11 ];
|
||||||
|
|
||||||
# Clean up the /tmp directory.
|
# Clean up the /tmp directory.
|
||||||
boot.cleanTmpDir = true;
|
boot.cleanTmpDir = true;
|
||||||
|
|
||||||
@ -57,12 +59,24 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Enable some font configs.
|
||||||
|
fonts = {
|
||||||
|
enableDefaultFonts = true;
|
||||||
|
fontconfig.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Module configurations.
|
# Module configurations.
|
||||||
modules = {
|
modules = {
|
||||||
desktop = {
|
desktop = {
|
||||||
|
audio = {
|
||||||
|
enable = true;
|
||||||
|
composition.enable = true;
|
||||||
|
production.enable = true;
|
||||||
|
};
|
||||||
browsers = {
|
browsers = {
|
||||||
brave.enable = true;
|
brave.enable = true;
|
||||||
firefox.enable = true;
|
firefox.enable = true;
|
||||||
|
nyxt.enable = true;
|
||||||
};
|
};
|
||||||
cad.enable = true;
|
cad.enable = true;
|
||||||
fonts.enable = true;
|
fonts.enable = true;
|
||||||
@ -73,10 +87,6 @@
|
|||||||
_3d.enable = true;
|
_3d.enable = true;
|
||||||
};
|
};
|
||||||
multimedia.enable = true;
|
multimedia.enable = true;
|
||||||
music = {
|
|
||||||
composition.enable = true;
|
|
||||||
production.enable = true;
|
|
||||||
};
|
|
||||||
research.enable = true;
|
research.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -93,6 +103,7 @@
|
|||||||
godot.enable = true;
|
godot.enable = true;
|
||||||
unity3d.enable = true;
|
unity3d.enable = true;
|
||||||
};
|
};
|
||||||
|
go.enable = true;
|
||||||
java.enable = true;
|
java.enable = true;
|
||||||
javascript = {
|
javascript = {
|
||||||
deno.enable = true;
|
deno.enable = true;
|
||||||
@ -102,10 +113,19 @@
|
|||||||
guile.enable = true;
|
guile.enable = true;
|
||||||
racket.enable = true;
|
racket.enable = true;
|
||||||
};
|
};
|
||||||
|
perl.enable = true;
|
||||||
|
python = {
|
||||||
|
enable = true;
|
||||||
|
math.enable = true;
|
||||||
|
};
|
||||||
rust.enable = true;
|
rust.enable = true;
|
||||||
vcs.enable = true;
|
vcs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
drivers = {
|
||||||
|
veikk.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
editors = {
|
editors = {
|
||||||
default = "nvim";
|
default = "nvim";
|
||||||
emacs.enable = true;
|
emacs.enable = true;
|
||||||
@ -115,16 +135,6 @@
|
|||||||
|
|
||||||
services = {
|
services = {
|
||||||
recoll.enable = true;
|
recoll.enable = true;
|
||||||
unison = {
|
|
||||||
enable = true;
|
|
||||||
flags =
|
|
||||||
let
|
|
||||||
homeDirectory = "/home/${config.my.username}";
|
|
||||||
backupDrive = "/run/media/${config.my.username}/Seagate Backup Plus Drive";
|
|
||||||
in ''
|
|
||||||
-root ${homeDirectory} -root ${backupDrive} -auto -batch -fat -force ${homeDirectory} -mountpoint ${backupDrive} -ignorearchives
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
shell = {
|
shell = {
|
||||||
@ -145,12 +155,12 @@
|
|||||||
|
|
||||||
my.packages = with pkgs; [
|
my.packages = with pkgs; [
|
||||||
# Muh games.
|
# Muh games.
|
||||||
unstable.dwarf-fortress # Losing is fun!
|
dwarf-fortress # Losing is fun!
|
||||||
unstable.endless-sky # Losing is meh!
|
endless-sky # Losing is meh!
|
||||||
unstable.minetest # Losing?! What's that?
|
minetest # Losing?! What's that?
|
||||||
unstable.openmw # Losing is even more meh1
|
openmw # Losing is even more meh1
|
||||||
unstable.wesnoth # Losing is frustrating!
|
wesnoth # Losing is frustrating!
|
||||||
unstable.zeroad # Losing is fun and frustrating!
|
zeroad # Losing is fun and frustrating!
|
||||||
|
|
||||||
# Installing some of the dependencies required for my scripts.
|
# Installing some of the dependencies required for my scripts.
|
||||||
ffcast
|
ffcast
|
||||||
@ -167,12 +177,14 @@
|
|||||||
xorg.xwininfo
|
xorg.xwininfo
|
||||||
zbar
|
zbar
|
||||||
|
|
||||||
# My custom packages.
|
# Some other packages.
|
||||||
# fds-nur.brl-cad
|
screenkey
|
||||||
# fds-nur.hypermail
|
]
|
||||||
# fds-nur.wikiman
|
|
||||||
nur.foo-dogsquared.segno
|
# My custom packages.
|
||||||
];
|
++ (with pkgs.nur.foo-dogsquared; [
|
||||||
|
segno
|
||||||
|
]);
|
||||||
|
|
||||||
# Setting up the shell environment.
|
# Setting up the shell environment.
|
||||||
my.env = {
|
my.env = {
|
||||||
@ -206,15 +218,22 @@
|
|||||||
# Install a proprietary Nvidia graphics driver.
|
# Install a proprietary Nvidia graphics driver.
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
libinput = {
|
libinput = {
|
||||||
|
enable = true;
|
||||||
middleEmulation = true;
|
middleEmulation = true;
|
||||||
};
|
};
|
||||||
videoDrivers = [ "nvidiaLegacy390" ];
|
# digimend.enable = true;
|
||||||
|
# videoDrivers = [ "nvidiaLegacy390" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable sound.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
|
# Enable OpenGL.
|
||||||
|
hardware = {
|
||||||
|
opengl.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Additional host-specific program configurations.
|
# Additional host-specific program configurations.
|
||||||
my.home = {
|
my.home = {
|
||||||
programs = {
|
programs = {
|
||||||
@ -232,7 +251,33 @@
|
|||||||
userEmail = "${config.my.email}";
|
userEmail = "${config.my.email}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
unison = let
|
||||||
|
homeDirectory = "/home/${config.my.username}";
|
||||||
|
backupDrive = "/run/media/${config.my.username}/Seagate Backup Plus Drive";
|
||||||
|
in {
|
||||||
|
enable = true;
|
||||||
|
pairs.mainBackup = {
|
||||||
|
roots = [ homeDirectory backupDrive ];
|
||||||
|
commandOptions = {
|
||||||
|
auto = "true";
|
||||||
|
batch = "true";
|
||||||
|
fat = "true";
|
||||||
|
force = "${homeDirectory}";
|
||||||
|
links = "false";
|
||||||
|
ui = "text";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
my.user.extraGroups = [ "docker" ];
|
my.user.extraGroups = [ "docker" ];
|
||||||
|
|
||||||
|
# This value determines the NixOS release with which your system is to be
|
||||||
|
# compatible, in order to avoid breaking some software such as database
|
||||||
|
# servers. You should change this only after NixOS release notes say you
|
||||||
|
# should.
|
||||||
|
system.stateVersion = "20.03"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
# All of the machine-specific overlays.
|
|
||||||
[
|
|
||||||
(self: super:
|
|
||||||
{
|
|
||||||
rofi = super.rofi.overrideAttrs (oldAttrs: {
|
|
||||||
name = "rofi-next";
|
|
||||||
src = super.fetchFromGitHub {
|
|
||||||
owner = "davatorium";
|
|
||||||
repo = "rofi";
|
|
||||||
rev = "802a9489e7fbf809890ab6bf39e62664fa4c134f";
|
|
||||||
sha256 = "1qjqw7v6qdmc5bxfaq57cb8hf99vr0prp5bn4yzal7r5im855s8f";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
})
|
|
||||||
]
|
|
@ -1,22 +1,35 @@
|
|||||||
|
# My audio tools...
|
||||||
# I create "music" (with no experience whatsoever) so here's my "music" workflow.
|
# I create "music" (with no experience whatsoever) so here's my "music" workflow.
|
||||||
|
# TODO: I may have to switch to Pipewire for the FUTURE.
|
||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.desktop.music;
|
cfg = config.modules.desktop.audio;
|
||||||
in {
|
in {
|
||||||
options.modules.desktop.music =
|
options.modules.desktop.audio =
|
||||||
let mkBoolDefault = bool: mkOption {
|
let mkBoolDefault = bool: mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = bool;
|
default = bool;
|
||||||
}; in {
|
}; in {
|
||||||
|
enable = mkBoolDefault false;
|
||||||
composition.enable = mkBoolDefault false;
|
composition.enable = mkBoolDefault false;
|
||||||
production.enable = mkBoolDefault false;
|
production.enable = mkBoolDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = mkIf cfg.enable {
|
||||||
|
# Enable JACK for the most serious audio applications.
|
||||||
|
services.jack = {
|
||||||
|
alsa.enable = true;
|
||||||
|
jackd.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
my.packages = with pkgs;
|
my.packages = with pkgs;
|
||||||
|
[
|
||||||
|
cadence
|
||||||
|
] ++
|
||||||
|
|
||||||
(if cfg.composition.enable then [
|
(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).
|
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.
|
musescore # A music composer for creating musical cheatsheets.
|
||||||
@ -40,5 +53,11 @@ in {
|
|||||||
# As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe.
|
# As of 2020-07-03, lmms has some trouble regarding Qt or something so at least use the "unstable" channel just to be safe.
|
||||||
# lmms
|
# lmms
|
||||||
] else []);
|
] else []);
|
||||||
|
|
||||||
|
# Required when enabling JACK daemon.
|
||||||
|
my.user.extraGroups = [ "jackaudio" ];
|
||||||
|
|
||||||
|
# Add the sequencer and the MIDI kernel module.
|
||||||
|
boot.kernelModules = [ "snd-seq" "snd-rawmidi" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./audio.nix
|
||||||
./browsers.nix
|
./browsers.nix
|
||||||
./cad.nix
|
./cad.nix
|
||||||
./files.nix
|
./files.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./graphics.nix
|
./graphics.nix
|
||||||
./multimedia.nix
|
./multimedia.nix
|
||||||
./music.nix
|
|
||||||
./research.nix
|
./research.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,19 @@ in {
|
|||||||
unison
|
unison
|
||||||
magic-wormhole # Magically transfer stuff between your wormholes!
|
magic-wormhole # Magically transfer stuff between your wormholes!
|
||||||
qbittorrent # Free version of uBittorrent.
|
qbittorrent # Free version of uBittorrent.
|
||||||
transmission # One of the components for sailing the high seas.
|
|
||||||
syncthing # A peer-to-peer synchro summoning.
|
|
||||||
xfce.thunar # A graphical file manager.
|
xfce.thunar # A graphical file manager.
|
||||||
xfce.thunar-volman # A Thunar plugin on volume management for external devices.
|
xfce.thunar-volman # A Thunar plugin on volume management for external devices.
|
||||||
udiskie # An automounter for external devices with authentication.
|
udiskie # An automounter for external devices with authentication.
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
# Enable Syncthing for them cross-device syncing.
|
||||||
|
syncthing.enable = true;
|
||||||
|
|
||||||
|
# Argh! Open t' gateweh t' th' high seas!
|
||||||
|
transmission.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Clean 'yer home!
|
# Clean 'yer home!
|
||||||
my.env = {
|
my.env = {
|
||||||
RECOLL_CONFDIR = "$XDG_DATA_HOME/recoll";
|
RECOLL_CONFDIR = "$XDG_DATA_HOME/recoll";
|
||||||
|
@ -25,7 +25,7 @@ with lib;
|
|||||||
};
|
};
|
||||||
|
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
dejavu_fonts
|
dejavu_fonts # Makes you feel like you've seen them before.
|
||||||
fira-code # The programming font with fancy symbols.
|
fira-code # The programming font with fancy symbols.
|
||||||
ibm-plex # IBM's face, is it professional?
|
ibm-plex # IBM's face, is it professional?
|
||||||
iosevka # The fancy monofont with fancy ligatures.
|
iosevka # The fancy monofont with fancy ligatures.
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
./data.nix
|
./data.nix
|
||||||
./documentation.nix
|
./documentation.nix
|
||||||
./gamedev.nix
|
./gamedev.nix
|
||||||
|
./go.nix
|
||||||
./java.nix
|
./java.nix
|
||||||
./javascript.nix
|
./javascript.nix
|
||||||
./lisp.nix
|
./lisp.nix
|
||||||
|
@ -38,7 +38,7 @@ in
|
|||||||
|
|
||||||
# TODO: Make Neuron its own package.
|
# TODO: Make Neuron its own package.
|
||||||
(let
|
(let
|
||||||
neuronRev = "5c37dd3bbfff7d203883417bee2e2970d41cd70d";
|
neuronRev = "2ea28ba1f023f169657a31a3cad621f1d745c606";
|
||||||
neuronSrc = builtins.fetchTarball "https://github.com/srid/neuron/archive/${neuronRev}.tar.gz";
|
neuronSrc = builtins.fetchTarball "https://github.com/srid/neuron/archive/${neuronRev}.tar.gz";
|
||||||
in import neuronSrc {}) # Neurons and zettels are good for the brain.
|
in import neuronSrc {}) # Neurons and zettels are good for the brain.
|
||||||
] ++
|
] ++
|
||||||
|
@ -1,25 +1,19 @@
|
|||||||
# Ah yes, Rust...
|
# Go, go, Golang coders!
|
||||||
# The programming language that made me appreciate/tolerate C++ even more.
|
|
||||||
{ config, options, lib, pkgs, ... }:
|
{ config, options, lib, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.modules.dev.rust = {
|
options.modules.dev.go = {
|
||||||
enable = mkOption {
|
enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.dev.rust.enable {
|
config = mkIf config.modules.dev.go.enable {
|
||||||
my.packages = with pkgs; [
|
my.packages = with pkgs; [
|
||||||
rustup
|
delve # Wait, Go doesn't have a proper debugger?
|
||||||
|
go # The other zoomer proglang (READ: proglang is a zoomer term for programming language).
|
||||||
];
|
];
|
||||||
|
|
||||||
my.env = {
|
|
||||||
CARGO_HOME = "$XDG_DATA_HOME/cargo";
|
|
||||||
RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
|
|
||||||
PATH = [ "$CARGO_HOME/bin" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,7 @@ with lib;
|
|||||||
|
|
||||||
config = mkIf config.modules.dev.vcs.enable {
|
config = mkIf config.modules.dev.vcs.enable {
|
||||||
my.packages = with pkgs; [
|
my.packages = with pkgs; [
|
||||||
git
|
gitAndTools.gitFull
|
||||||
mercurial
|
mercurial
|
||||||
subversion
|
subversion
|
||||||
];
|
];
|
||||||
|
@ -96,10 +96,15 @@ let
|
|||||||
version = "4.2.0";
|
version = "4.2.0";
|
||||||
sha256 = "1in8lj5gim3jdy33harib9z8qayp5jn8pz6j0zpicbzxx87g2hm1";
|
sha256 = "1in8lj5gim3jdy33harib9z8qayp5jn8pz6j0zpicbzxx87g2hm1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Creating a Rust mini-IDE.
|
||||||
|
{
|
||||||
|
name = "rust";
|
||||||
|
publisher = "rust-lang";
|
||||||
|
version = "0.7.8";
|
||||||
|
sha256 = "039ns854v1k4jb9xqknrjkj8lf62nfcpfn0716ancmjc4f0xlzb3";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
vscode-with-extensions = pkgs.vscode-with-extensions.override {
|
|
||||||
vscodeExtensions = extensions;
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.editors.vscode = {
|
options.modules.editors.vscode = {
|
||||||
@ -110,8 +115,21 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf config.modules.editors.vscode.enable {
|
config = mkIf config.modules.editors.vscode.enable {
|
||||||
my.packages = [
|
my.home = {
|
||||||
vscode-with-extensions
|
programs.vscode = {
|
||||||
];
|
enable = true;
|
||||||
|
extensions = extensions;
|
||||||
|
userSettings = {
|
||||||
|
"diffEditor.codeLens" = true;
|
||||||
|
"editor.fontFamily" = "'Iosevka', 'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'";
|
||||||
|
"editor.fontLigatures" = true;
|
||||||
|
"eslint.alwaysShowStatus" = true;
|
||||||
|
"git.alwaysShowStagedChangesResourceGroup" = true;
|
||||||
|
"update.mode" = "none";
|
||||||
|
"workbench.colorTheme" = "Nord";
|
||||||
|
"workbench.iconTheme" = "material-icon-theme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,6 @@ in
|
|||||||
Service = {
|
Service = {
|
||||||
Environment = [ "RECOLL_CONFDIR=\"$XDG_DATA_HOME/recoll\"" ];
|
Environment = [ "RECOLL_CONFDIR=\"$XDG_DATA_HOME/recoll\"" ];
|
||||||
ExecStart = "${(pkgs.recoll.override { withGui = false; })}/bin/recollindex ${cfg.flags}";
|
ExecStart = "${(pkgs.recoll.override { withGui = false; })}/bin/recollindex ${cfg.flags}";
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Install = {
|
Install = {
|
||||||
|
@ -1,13 +1,9 @@
|
|||||||
[
|
[
|
||||||
(self: super: with super; {
|
(self: super: with super; {
|
||||||
|
|
||||||
# Add packages from the unstable channel with `pkgs.unstable.$PKG`.
|
# Add packages from the unstable channel with `pkgs.unstable.$PKG`.
|
||||||
unstable = import <nixpkgs-unstable> { inherit config; };
|
veikk-linux-driver = (callPackage ./veikk-driver.nix { kernel = pkgs.linux_5_8; });
|
||||||
nur.foo-dogsquared = import (
|
nur.foo-dogsquared = import (
|
||||||
fetchTarball "https://github.com/foo-dogsquared/nur-packages/archive/develop.tar.gz"
|
fetchTarball "https://github.com/foo-dogsquared/nur-packages/archive/develop.tar.gz"
|
||||||
) { inherit pkgs; };
|
) { inherit pkgs; };
|
||||||
})
|
})
|
||||||
|
|
||||||
# The unstable branch of Emacs.
|
|
||||||
# (import (builtins.fetchTarball https://github.com/nix-community/emacs-overlay/archive/master.tar.gz))
|
|
||||||
]
|
]
|
||||||
|
33
packages/veikk-driver.nix
Executable file
33
packages/veikk-driver.nix
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
{ stdenv, fetchFromGitHub, kernel }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "veikk-linux-driver";
|
||||||
|
version = "2.0.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jlam55555";
|
||||||
|
repo = "veikk-linux-driver";
|
||||||
|
rev = "v2.0";
|
||||||
|
sha256 = "11mg74ds58jwvdmi3i7c4chxs6v9g09r9ll22pc2kbxjdnrp8zrn";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
|
patchPhase = ''
|
||||||
|
sed -i Makefile -e 's/modprobe veikk//' -e 's/depmod//'
|
||||||
|
'';
|
||||||
|
|
||||||
|
INSTALL_MOD_PATH = "\${out}";
|
||||||
|
|
||||||
|
makeFlags = [
|
||||||
|
"BUILD_DIR=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Linux device driver for supported VEIKK tablets (e.g., S640, A50, A30).";
|
||||||
|
homepage = "https://github.com/jlam55555/veikk-linux-driver";
|
||||||
|
licenses = licenses.free;
|
||||||
|
maintainers = with maintainers; [ foo-dogsquared ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user