martyr-deepin / dde-nixos

[Archived] dde 23 on NixOS
MIT License
33 stars 5 forks source link

This project will archive soon

Move To https://github.com/NixOS/nixpkgs/pull/257400

dde-nixos

This is an experimental flake for DDE (Deepin Desktop Environment) on NixOS.

DDE v20 has been merged into Nixpkgs

Getting Started

Installation for NixOS

With flakes (Recommended):

{
  inputs = {
    nixpkgs.url = "nixpkgs/nixos-unstable";
    dde-nixos = {
      url = "github:linuxdeepin/dde-nixos";
      inputs.nixpkgs.follows = "nixpkgs";
    };
   };
  outputs = { self, nixpkgs, dde-nixos, ... } @ inputs:
    let
      system = "x86_64-linux";
    in {
      nixosConfigurations.<hostname> = nixpkgs.lib.nixosSystem {
        inherit system;
        modules = [
          dde-nixos.nixosModules.${system}
          {
            services.xserver.desktopManager.deepin-unstable.enable = true;
          }
          ./configuration.nix # your system configuration goes here
        ];
      };
    };
}

example: rewine's NixOS config

With ordinary configuration.nix and flake-compat:

{pkgs, ...}: let
  flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz";

  dde-nixos = (import flake-compat {
    src = builtins.fetchTarball "https://github.com/linuxdeepin/dde-nixos/archive/master.tar.gz";
  }).defaultNix;
in {
  imports = [dde-nixos.nixosModules.${pkgs.system}];

  services.xserver.desktopManager.deepin-unstable.enable = true;

  # other configuration still goes here
}

Testing in Qemu

Quickly start an virtual machine to test out as long as you have installed nix:

git clone git@github.com:linuxdeepin/dde-nixos.git
cd dde-nixos/vm
# edit vm/flake.nix
nix run -v -L

In case you don't apply custom configuration:

nix --experimental-features 'nix-command flakes' run "github:linuxdeepin/dde-nixos?dir=vm" -v -L --no-write-lock-file

Building yourself

Using Nix build hooks:

nix build .#deepin-calculator -v -L

Manually build for debugging purposes:

nix develop .#deepin-calculator
git clone git@github.com:linuxdeepin/deepin-calculator.git
git checkout 5.7.16
... # maintainence code
cmake --build build

Garnix cache

Thanks Garnix for providing CI and binary cache.

For faster build and test with garnix cache, add https://cache.garnix.io to substituters, and cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= to trusted-public-keys.

Project using dde-nixos

References

License

MIT