dzgui-nix/README.md

86 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2023-01-22 14:59:45 -03:00
Install dzgui on nix-based systems
# Installation
2024-12-09 12:14:55 -03:00
## Using flake profiles
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```sh
2023-01-22 14:59:45 -03:00
# install
nix profile install github:lelgenio/dzgui-nix
# update
nix profile upgrade '.*dzgui.*'
```
2024-12-09 12:14:55 -03:00
## On non flake NixOs systems
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```nix
# configuration.nix
2024-12-09 12:14:55 -03:00
{ pkgs, ... }:
let
dzgui-nix = pkgs.fetchFromGitHub {
owner = "lelgenio";
repo = "dzgui-nix";
rev = "995dd52adc6fe5cbbd4530a9f2add88e1e04d0da";
hash = "sha256-giMAU0PqMOqTe3zQax4rTbhu5efyFcaQu3EP5CqPIaU=";
};
dzgui = (pkgs.callPackage "${dzgui-nix}/package");
in
2023-05-18 08:25:02 -03:00
{
2024-12-09 12:14:55 -03:00
environment.systemPackages = [
dzgui
];
2023-05-18 08:25:02 -03:00
}
```
2024-12-09 12:14:55 -03:00
## As part of a NixOs system flake
2023-05-18 08:25:02 -03:00
Flake users are assumed to have a `flake.nix` file and a `configuration.nix`.
1 - Add `dzgui-nix` as a flake input:
2023-01-22 14:59:45 -03:00
```nix
# flake.nix
{
2023-05-18 08:25:02 -03:00
inputs.dzgui-nix = {
2023-01-22 14:59:45 -03:00
# url of this repository, may change in the future
url = "github:lelgenio/dzgui-nix";
# save storage by not having duplicates of packages
inputs.nixpkgs.follows = "nixpkgs";
};
2023-05-18 08:25:02 -03:00
# other inputs...
2023-01-22 14:59:45 -03:00
}
```
2024-12-09 12:14:55 -03:00
2 - Add the `dzgui` package to your environment packages:
2023-01-22 14:59:45 -03:00
```nix
# flake.nix
{
outputs = inputs@{pkgs, ...}: {
nixosConfigurations.your-hostname-here = lib.nixosSystem {
2024-12-09 12:14:55 -03:00
modules = [
{
environment.systemPackages = [
inputs.dzgui-nix.packages.default
];
}
2023-05-18 08:25:02 -03:00
# other modules...
];
2023-01-22 14:59:45 -03:00
};
};
}
```
2023-05-18 08:25:02 -03:00
3 - Rebuild your system
2023-01-22 14:59:45 -03:00
2023-05-18 08:25:02 -03:00
```sh
nixos-rebuild --switch --flake .#your-hostname-here
2023-01-22 14:59:45 -03:00
```
2023-05-18 08:25:02 -03:00
Now dzgui will update together with your flake:
2023-01-22 14:59:45 -03:00
```sh
2023-05-18 08:25:02 -03:00
nix flake update
2023-01-22 14:59:45 -03:00
```