Skip to main content

NixOS

Serpantinum provides flake outputs, a NixOS module for system dependencies, and a Home Manager module for user configuration and service management.

1. Add flake input​

Add Serpantinum to your flake.nix:

{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
serpantinum.url = "github:ilyamiro/serpantinum";
};

outputs = { self, nixpkgs, serpantinum, ... }: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit serpantinum; };
modules = [
./configuration.nix
serpantinum.nixosModules.default
];
};
};
}

2. configuration.nix​

Enable the NixOS module to configure system prerequisites:

{
programs.serpantinum.enable = true;
}

If you prefer installing the package directly without the system module:

{ pkgs, serpantinum, ... }:

{
environment.systemPackages = [
serpantinum.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}

3. Home Manager configuration​

{ serpantinum, ... }:

{
imports = [
serpantinum.homeManagerModules.default
];

programs.serpantinum = {
enable = true;
systemd.enable = true;

settings = {
wallpaperDir = "/home/username/Pictures/Wallpapers";

general = {
language = "en";
weatherUnit = "metric";
weatherInterval = 30;
};

bar = {
position = "top";
style = "solid";
width = 40;
workspaceCount = 10;
modules = {
left = [ "workspaces" ];
center = [ "time" ];
right = [ "tray" [ "kb" "wifi" "bt" "vol" "bat" ] ];
};
};

theme = {
fontFamily = "Adwaita Mono";
borderRadius = 12;
matugen = true;
};

notifications = {
dnd = false;
position = "top right";
sound = true;
};
};
};
}

4. Updating​

Update the flake lockfile and rebuild your system:

nix flake update serpantinum
sudo nixos-rebuild switch --flake .