Clean up the files

This commit is contained in:
Gabriel Arazas 2022-02-02 12:25:03 +08:00
parent 4aaf393a81
commit 905b5680b1
7 changed files with 109 additions and 17 deletions

View File

@ -75,6 +75,9 @@
# The default configuration for our NixOS systems. # The default configuration for our NixOS systems.
hostDefaultConfig = { hostDefaultConfig = {
# Default architecture.
system = "x86_64-linux";
# I want to capture the usual flakes to its exact version so we're # I want to capture the usual flakes to its exact version so we're
# making them available to our system. This will also prevent the # making them available to our system. This will also prevent the
# annoying downloads since it always get the latest revision. # annoying downloads since it always get the latest revision.
@ -91,12 +94,12 @@
}; };
# Set several binary caches. # Set several binary caches.
nix = { nix.settings = {
binaryCaches = [ substituters = [
"https://nix-community.cachix.org" "https://nix-community.cachix.org"
"https://foo-dogsquared.cachix.org" "https://foo-dogsquared.cachix.org"
]; ];
binaryCachePublicKeys = [ trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E=" "foo-dogsquared.cachix.org-1:/2fmqn/gLGvCs5EDeQmqwtus02TUmGy0ZlAEXqRE70E="
]; ];
@ -107,10 +110,8 @@
# Extend nixpkgs with our overlays except for the NixOS-focused modules # Extend nixpkgs with our overlays except for the NixOS-focused modules
# here. # here.
nixpkgs.overlays = overlays ++ [ nixpkgs.overlays = overlays
inputs.nix-alien.overlay ++ [ inputs.nix-alien.overlay inputs.guix-overlay.overlay ];
inputs.guix-overlay.overlay
];
# Please clean your temporary crap. # Please clean your temporary crap.
boot.cleanTmpDir = true; boot.cleanTmpDir = true;
@ -151,8 +152,7 @@
}; };
}]; }];
}; };
in in {
{
# Exposes only my library with the custom functions to make it easier to # Exposes only my library with the custom functions to make it easier to
# include in other flakes. # include in other flakes.
lib = import ./lib { lib = nixpkgs.lib; }; lib = import ./lib { lib = nixpkgs.lib; };
@ -181,7 +181,9 @@
# My custom packages, available in here as well. Though, I mainly support # My custom packages, available in here as well. Though, I mainly support
# "x86_64-linux". I just want to try out supporting other systems. # "x86_64-linux". I just want to try out supporting other systems.
packages = forAllSystems (system: packages = forAllSystems (system:
import ./pkgs { pkgs = import nixpkgs { inherit system overlays; }; }); inputs.flake-utils.lib.flattenTree (import ./pkgs {
pkgs = import nixpkgs { inherit system overlays; };
}));
# The development environment for this flake. # The development environment for this flake.
devShell = forAllSystems (system: devShell = forAllSystems (system:

View File

@ -27,7 +27,7 @@
neovim.enable = true; neovim.enable = true;
}; };
users.users.foo-dogsquared.settings = { users.users.foo-dogsquared.settings = {
extraGroups = [ "wheel" "audio" "docker" "podman" "network-manager" ]; extraGroups = [ "wheel" "audio" "docker" "podman" "networkmanager" ];
hashedPassword = hashedPassword =
"$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg."; "$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg.";
isNormalUser = true; isNormalUser = true;
@ -41,6 +41,10 @@
themes.a-happy-gnome.enable = true; themes.a-happy-gnome.enable = true;
}; };
environment.systemPackages = with pkgs; [
guile_3_0
];
# Enable Guix service. # Enable Guix service.
services.guix-binary.enable = true; services.guix-binary.enable = true;

View File

@ -39,6 +39,7 @@ in {
carla # The Carla Carla. carla # The Carla Carla.
]; ];
# This is assuming you're using Pipewire, yes?
services.easyeffects.enable = true; services.easyeffects.enable = true;
services.fluidsynth = { services.fluidsynth = {
enable = true; enable = true;

View File

@ -9,6 +9,7 @@ in {
lib.mkEnableOption "foo-dogsquared's user-specific development setup"; lib.mkEnableOption "foo-dogsquared's user-specific development setup";
shell.enable = shell.enable =
lib.mkEnableOption "configuration of foo-dogsquared's shell of choice"; lib.mkEnableOption "configuration of foo-dogsquared's shell of choice";
extras.enable = lib.mkEnableOption "additional tools for development stuff";
}; };
config = lib.mkIf cfg.enable (lib.mkMerge [ config = lib.mkIf cfg.enable (lib.mkMerge [
@ -37,10 +38,19 @@ in {
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.zoxide.enable = true; programs.zoxide.enable = true;
# Enable Starship prompt.
programs.starship = { programs.starship = {
enable = true; enable = true;
settings = { add_newline = false; }; settings = { add_newline = false; };
}; };
}) })
(lib.mkIf cfg.extras.enable {
home.packages = with pkgs; [
tree-sitter # The modern way of text highlighting.
hyperfine # Command-line profiling.
];
})
]); ]);
} }

View File

@ -28,7 +28,9 @@ in {
(lib.mkIf cfg.emacs.enable { (lib.mkIf cfg.emacs.enable {
# Doom Emacs dependencies. # Doom Emacs dependencies.
home.packages = with pkgs; [ home.packages = with pkgs; [
emacs ((emacsPackagesFor emacs).emacsWithPackages (epkgs: [
epkgs.vterm
]))
# Required dependencies. # Required dependencies.
ripgrep ripgrep

View File

@ -20,6 +20,7 @@ in {
description = description =
"Whether to enable persistence for the cleanup, allowing it to activate the next time it boots when missed."; "Whether to enable persistence for the cleanup, allowing it to activate the next time it boots when missed.";
default = true; default = true;
defaultText = "true";
example = false; example = false;
}; };
@ -97,7 +98,7 @@ in {
PartOf = [ "default.target" ]; PartOf = [ "default.target" ];
}; };
Install.WantedBy = [ "default.target" ]; Install.WantedBy = [ "timers.target" ];
Timer = { Timer = {
OnCalendar = cfg.startAt; OnCalendar = cfg.startAt;

View File

@ -1,12 +1,36 @@
{ config, options, lib, pkgs, ... }: { config, options, lib, pkgs, ... }:
{ let
yt-dlp-for-audio-config = pkgs.writeText "yt-dlp-for-audio-config" ''
# Don't overwrite for cautious individuals.
--no-overwrite
# To make sure all audio-related.
--extract-audio
--format bestaudio
--audio-format opus
--output '%(track_number,playlist_autonumber)d-%(track,title)s.%(ext)s'
--download-archive archive
# Add all sorts of metadata.
--embed-thumbnail
--add-metadata
'';
yt-dlp-for-audio = pkgs.writeScriptBin "yt-dlp-audio" ''
${pkgs.yt-dlp}/bin/yt-dlp --config-location "${yt-dlp-for-audio-config}" $@
'';
in {
programs.home-manager.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
neovim neovim
borgmatic borgmatic
borgbackup borgbackup
ncmpcpp ncmpcpp
vscodium-fhs vscodium-fhs
tree-sitter
yt-dlp-for-audio
]; ];
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
@ -24,11 +48,44 @@
services.mopidy = { services.mopidy = {
enable = true; enable = true;
extensionPackages = with pkgs; [ extensionPackages = with pkgs; [
mopidy-beets
mopidy-funkwhale
mopidy-internetarchive
mopidy-iris
mopidy-local
mopidy-mpd mopidy-mpd
mopidy-mpris mopidy-mpris
mopidy-local mopidy-spotify
mopidy-youtube
]; ];
configuration = {
http = {
hostname = "0.0.0.0";
};
file = {
enabled = true;
media_dirs = [
"$XDG_MUSIC_DIR|Music"
];
};
internetarchive = {
enabled = true;
browse_limit = 150;
search_limit = 150;
collections = [
"fav-foo-dogsquared"
"audio"
"etree"
"audio_music"
"audio_foreign"
];
};
};
};
services.recoll = { services.recoll = {
enable = true; enable = true;
settings = { settings = {
@ -70,11 +127,26 @@
bleachbit.enable = true; bleachbit.enable = true;
}; };
# WHOA! Even browsers with extensions can be declarative!
programs.brave = {
enable = true;
extensions = [
{ id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # Vimium
{ id = "ekhagklcjbdpajgpjgmbionohlpdbjgc"; } # Zotero connector
{ id = "jfnifeihccihocjbfcfhicmmgpjicaec"; } # GSConnect
{ id = "aapbdbdomjkkjkaonfhkkikfgjllcleb"; } # Google Translate (yes, I'm disappointed in myself)
{ id = "egpjdkipkomnmjhjmdamaniclmdlobbo"; } # Firenvim
{ id = "gknkbkaapnhpmkcgkmdekdffgcddoiel"; } # Open Access Button
{ id = "fpnmgdkabkmnadcjpehmlllkndpkmiak"; } # Wayback Machine
];
};
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;
createDirectories = true; createDirectories = true;
# The XDG base directories. # The XDG base directories. Most of my setup with this user will be my
# personal computer so I'll set them like so...
documents = "$HOME/library/documents"; documents = "$HOME/library/documents";
music = "$HOME/library/music"; music = "$HOME/library/music";
pictures = "$HOME/library/pictures"; pictures = "$HOME/library/pictures";