Hello
Today I want to present my latest project: nix-maid. It started as a systemd-centric alternative to home-manager, as it only uses tmpfiles and regular user services (as opposed to activation hooks).
Please visit the page for more information, and let me know if you try it: https://viperml.github.io/nix-maid/ (GitHub)
This is an example standalone nix-maid configuration, that can be installed with nix-env -if ./my-config.nix && activate
(I also provide a NixOS module and a Flake).
# my-config.nix
let
sources = import ./npins;
pkgs = import sources.nixpkgs;
nix-maid = import sources.nix-maid;
in
nix-maid pkgs {
# Add packages to install
packages = [
pkgs.yazi
pkgs.bat
pkgs.eza
];
# Create files in your home directory
file.home.".gitconfig".text = ''
[user]
name=Maid
'';
file.xdg_config."zellij/config.kdl".source = ./config.kdl;
# `file` supports a mustache syntax, for dynamically resolving the value of {{home}}
# This same configuration is portable between systems with different home dirs
file.xdg_config."hypr/hyprland.conf".source = "{{home}}/dotfiles/hyprland.conf";
# Define systemd-user services, like you would on NixOS
systemd.services.waybar = {
path = [ pkgs.waybar ];
script = ''
exec waybar
'';
wantedBy = [ "graphical-session.target" ];
};
# Configure gnome with dconf or gsettings
gsettings.settings = {
"org.gnome.mutter"."experimental-features" = [
"scale-monitor-framebuffer" "xwayland-native-scaling"
];
};
dconf.settings = {
"/org/gnome/desktop/interface/color-scheme" = "prefer-dark";
};
# Mustache syntax is also available in dynamicRules
systemd.tmpfiles.dynamicRules = [
"L {{xdg_config_dir}}/hypr/workspaces.conf - - - - {{home}}/dotfiles/workspaces.conf"
];
}