mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-04-24 12:19:12 +00:00
Update miscellaneous parts of the configuration
This commit is contained in:
parent
3d2076dabb
commit
def1a4a9a4
23
README.adoc
23
README.adoc
@ -144,7 +144,15 @@ Hello! I'm new to Nix and NixOS, where should I start?::
|
|||||||
Oh no, you've seen the multiple configurations from other systems, didn't you?
|
Oh no, you've seen the multiple configurations from other systems, didn't you?
|
||||||
I hope you're ready for some time understanding because the learning curve is steeper than the link:https://en.wikipedia.org/wiki/Troll_Wall[Troll Wall].
|
I hope you're ready for some time understanding because the learning curve is steeper than the link:https://en.wikipedia.org/wiki/Troll_Wall[Troll Wall].
|
||||||
I've written link:https://foo-dogsquared.github.io/blog/posts/moving-into-nixos/[a blog post regarding my experience with Nix] with a bunch of links for getting started.
|
I've written link:https://foo-dogsquared.github.io/blog/posts/moving-into-nixos/[a blog post regarding my experience with Nix] with a bunch of links for getting started.
|
||||||
(Un)Fortunately, it is mostly the same experience now that I've revisited it.
|
Fortunately footnote:[Or unfortunately from a different perspective.], it is mostly the same experience now that I've revisited it.
|
||||||
|
(That said, Nix Pills is getting better!)
|
||||||
|
+
|
||||||
|
For a more practical start, I recommend to look into several configurations to see the general gist of configuration with Nix.
|
||||||
|
Here's a few I personally dug into:
|
||||||
|
+
|
||||||
|
* https://github.com/divnix/devos
|
||||||
|
* https://github.com/hlissner/dotfiles
|
||||||
|
* https://github.com/thiagokokada/nix-configs
|
||||||
|
|
||||||
Any requirements for this setup?::
|
Any requirements for this setup?::
|
||||||
You only need Nix 2.4 installed with the experimental features for Nix command and flakes enabled (i.e., `experimental-features = nix-command flakes`).
|
You only need Nix 2.4 installed with the experimental features for Nix command and flakes enabled (i.e., `experimental-features = nix-command flakes`).
|
||||||
@ -158,10 +166,19 @@ What is my experience on Nix flakes?::
|
|||||||
link:https://youtu.be/iWJKZK_1l88[I LIKE IT!]
|
link:https://youtu.be/iWJKZK_1l88[I LIKE IT!]
|
||||||
There are still some hiccups like the strict tie-in to Git which leads to strange experience like having to add untracked files just to be recognized.
|
There are still some hiccups like the strict tie-in to Git which leads to strange experience like having to add untracked files just to be recognized.
|
||||||
However, this feature is still in the works so no surprise there.
|
However, this feature is still in the works so no surprise there.
|
||||||
|
+
|
||||||
|
With that said, it is workable to be a daily part of the NixOS experience especially with the benefits of Nix flakes.
|
||||||
|
+
|
||||||
|
* More user-friendly compared to Nix channels.
|
||||||
|
* Just one reference file to know what is being exported from a project.
|
||||||
|
* Unification with commonly-agreed schemas.
|
||||||
|
+
|
||||||
|
This feature somewhat helped me understand more about the Nix language, oddly.
|
||||||
|
I guess those lightbulb moments can come from random places.
|
||||||
|
|
||||||
Is this based from link:https://github.com/divnix/devos[devos]?::
|
Is this based from link:https://github.com/divnix/devos[devos]?::
|
||||||
Yes but I've created this from scratch.
|
Yes but I've created this from scratch.
|
||||||
One of my goals when creating this config is to use as little dependency as much as possible.
|
One of my goals when creating this config is to use as little dependency as much as possible and to understand more what's going under the hood with Nix.
|
||||||
At the time I've rewritten this configuration, I have little idea about Nix as a language and I find devos to be overwhelming so I doubled down to create from scratch.
|
At the time I've rewritten this configuration, I have little idea about Nix as a language and I find devos to be overwhelming so I doubled down to create from scratch.
|
||||||
+
|
+
|
||||||
However, I can say that my configuration is moving in a similar direction to devos (which is intended to be modified anyways) as I explore more of Nix.
|
However, I can say that my configuration is moving in a similar direction to devos (which is intended to be modified anyways) as I explore more of Nix.
|
||||||
@ -173,7 +190,7 @@ It is nice that such a project exists serving as a reference for bigger configur
|
|||||||
|
|
||||||
== Inspirations
|
== Inspirations
|
||||||
|
|
||||||
I ~stole~ got the ideas from the following projects:
|
I ~stole~ got several parts of this configuration from the following projects:
|
||||||
|
|
||||||
* link:https://github.com/divnix/devos[devos, an overengineered configuration framework.]
|
* link:https://github.com/divnix/devos[devos, an overengineered configuration framework.]
|
||||||
I'm slowly grokking Nix and its ecosystem so I didn't use this outright.
|
I'm slowly grokking Nix and its ecosystem so I didn't use this outright.
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
description = "foo-dogsquared's NixOS config as a flake";
|
description = "foo-dogsquared's NixOS config as a flake";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
# I know NixOS can be stable but we're going cutting edge, baybee!
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
# We're using this library for other functions, mainly testing.
|
# We're using this library for other functions, mainly testing.
|
||||||
@ -27,10 +28,11 @@
|
|||||||
# Easy access to development environments.
|
# Easy access to development environments.
|
||||||
devshell.url = "github:numtide/devshell";
|
devshell.url = "github:numtide/devshell";
|
||||||
|
|
||||||
# Overlays.
|
# We're getting more unstable there should be a black hole at my home right now.
|
||||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
|
|
||||||
|
# The more recommended Rust overlay so I'm going with it.
|
||||||
rust-overlay.url = "github:oxalica/rust-overlay";
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||||||
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# A list of utilities specifically in my flake output.
|
# A list of utilities specifically in my flake output. Take note it needs
|
||||||
|
# `lib/default.nix` for it to work.
|
||||||
{ lib, inputs }:
|
{ lib, inputs }:
|
||||||
|
|
||||||
let
|
let
|
||||||
@ -26,7 +27,8 @@ in rec {
|
|||||||
*/
|
*/
|
||||||
mkHost = file:
|
mkHost = file:
|
||||||
attrs@{ system ? sys, ... }:
|
attrs@{ system ? sys, ... }:
|
||||||
lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
# The system of the NixOS system.
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|
||||||
# Additional attributes to be referred to our modules.
|
# Additional attributes to be referred to our modules.
|
||||||
@ -58,7 +60,9 @@ in rec {
|
|||||||
file -> attrset -> homeManagerConfiguration
|
file -> attrset -> homeManagerConfiguration
|
||||||
Where:
|
Where:
|
||||||
- `file` is the entry point to the home-manager configuration.
|
- `file` is the entry point to the home-manager configuration.
|
||||||
- `attrset` is the additional attribute set to be insert as one of the imported modules minus the attributes used for `home-manager.lib.homeManagerConfiguration`.
|
- `attrset` is the additional attribute set to be insert as one of the
|
||||||
|
imported modules minus the attributes used for
|
||||||
|
`home-manager.lib.homeManagerConfiguration`.
|
||||||
Returns:
|
Returns:
|
||||||
A home-manager configuration to be exported in flakes.
|
A home-manager configuration to be exported in flakes.
|
||||||
|
|
||||||
@ -80,6 +84,8 @@ in rec {
|
|||||||
homeDirectory = "/home/${username}";
|
homeDirectory = "/home/${username}";
|
||||||
extraModules = hmModules ++ extraModules
|
extraModules = hmModules ++ extraModules
|
||||||
++ [ (lib.filterAttrs (n: _: !lib.elem n hmConfigFunctionArgs) attrs) ];
|
++ [ (lib.filterAttrs (n: _: !lib.elem n hmConfigFunctionArgs) attrs) ];
|
||||||
|
|
||||||
|
# Additional attributes to be referred to the modules.
|
||||||
extraSpecialArgs = { inherit lib system; };
|
extraSpecialArgs = { inherit lib system; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -28,13 +28,15 @@ in {
|
|||||||
|
|
||||||
(lib.mkIf cfg.audio.enable {
|
(lib.mkIf cfg.audio.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
ardour
|
musescore # The free composition tool.
|
||||||
musescore
|
zrythm # The freer FL Studio (if you're sailing by the high seven seas).
|
||||||
|
|
||||||
# Trying to
|
# !!! Be sure to install Wine for this one.
|
||||||
yabridge
|
yabridge # Building bridges to Windows and Linux audio tools.
|
||||||
yabridgectl
|
yabridgectl # The bridge controller.
|
||||||
helvum
|
|
||||||
|
helvum # The Pipewire Patchbay.
|
||||||
|
carla # The Carla Carla.
|
||||||
];
|
];
|
||||||
|
|
||||||
services.easyeffects.enable = true;
|
services.easyeffects.enable = true;
|
||||||
|
@ -45,8 +45,7 @@ stdenv.mkDerivation rec {
|
|||||||
--replace "/etc/sioyek" "$out/etc/sioyek"
|
--replace "/etc/sioyek" "$out/etc/sioyek"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
qmakeFlags =
|
qmakeFlags = lib.optional stdenv.isLinux "DEFINES+=LINUX_STANDARD_PATHS";
|
||||||
if stdenv.isLinux then [ "DEFINES+=LINUX_STANDARD_PATHS" ] else [ ];
|
|
||||||
|
|
||||||
preBuild = ''
|
preBuild = ''
|
||||||
# Remove and replace it with packages from nixpkgs.
|
# Remove and replace it with packages from nixpkgs.
|
||||||
|
@ -23,5 +23,6 @@ stdenv.mkDerivation rec {
|
|||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Experimental vector graphics and 3D animation editor";
|
description = "Experimental vector graphics and 3D animation editor";
|
||||||
homepage = "https://www.vpaint.org/";
|
homepage = "https://www.vpaint.org/";
|
||||||
|
license = licenses.apl20;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
# My custom shell for developing Flatpak manifests.
|
# My custom shell for developing Flatpak manifests.
|
||||||
{ mkShell, lib, flatpak-builder, editorconfig-checker, editorconfig-core-c, git, dasel }:
|
# This is not suitable outside of NixOS, unfortunately.
|
||||||
|
{ mkShell, lib, diffoscope, flatpak-builder, editorconfig-checker
|
||||||
|
, editorconfig-core-c, git, dasel }:
|
||||||
|
|
||||||
mkShell {
|
mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
dasel # For converting various data into something.
|
dasel # For converting various data into something.
|
||||||
|
diffoscope # `diff(1)` on steroids.
|
||||||
flatpak-builder # A required tool.
|
flatpak-builder # A required tool.
|
||||||
editorconfig-checker # We're most likely writing manifests in YAML so I need them consistent spaces.
|
editorconfig-checker # We're most likely writing manifests in YAML so I need them consistent spaces.
|
||||||
editorconfig-core-c # editorconfig will not work without the engine, of course.
|
editorconfig-core-c # editorconfig will not work without the engine, of course.
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
borgmatic
|
borgmatic
|
||||||
borgbackup
|
borgbackup
|
||||||
ncmpcpp
|
ncmpcpp
|
||||||
|
vscodium-fhs
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
@ -15,14 +16,18 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitFull;
|
package = pkgs.gitFull;
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
userName = "foo-dogsquared";
|
userName = "Gabriel Arazas";
|
||||||
userEmail = "foo.dogsquared@gmail.com";
|
userEmail = "foo.dogsquared@gmail.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
# My music player setup, completely configured with Nix!
|
# My music player setup, completely configured with Nix!
|
||||||
services.mpd = {
|
services.mopidy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
musicDirectory = "$HOME/library/music";
|
extensionPackages = with pkgs; [
|
||||||
|
mopidy-mpd
|
||||||
|
mopidy-mpris
|
||||||
|
mopidy-local
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# My custom modules.
|
# My custom modules.
|
||||||
@ -49,4 +54,16 @@
|
|||||||
};
|
};
|
||||||
bleachbit.enable = true;
|
bleachbit.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
|
||||||
|
# The XDG base directories.
|
||||||
|
documents = "$HOME/library/documents";
|
||||||
|
music = "$HOME/library/music";
|
||||||
|
pictures = "$HOME/library/pictures";
|
||||||
|
templates = "$HOME/library/templates";
|
||||||
|
videos = "$HOME/library/videos";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user