Skip to content

Conversation

haruki7049
Copy link
Contributor

Purpose

This PR adds Nix flake attribute .#nixosModules for Nix flakes' users.

How to use .#nixosModules

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

    # Now there is my fork repo
    simula.url = "github:haruki7049/Simula/add-nixos-modules";
    # simula.url = "github:SimulaVR/Simula";
  };

  outputs = { nixpkgs, simula, ... }: {
    nixosConfigurations."example-configuration" = nixpkgs.lib.nixosSystem {
      system = "x86_64-linux";
      modules = [
        ({
          config,
            lib,
            pkgs,
            ...
        }: {
          # Omitting other configuration, such as imports, boot, networking, and etc...
          programs.simula.enable = true;
        })
      ];
    };
  };
}

Out of scope

  1. This PR doesn't creates any Nix channels, so we cannot use a channel for Simula, as <simula/modules>.

@haruki7049
Copy link
Contributor Author

There are:

  • programs.simula.enable with bool value
  • programs.simula.package with package value
  • programs.simula.extraPackages with packages' list value
{
  ...
}:

{
  # Omitting other attributes...

  programs.simula = {
    enable = true;
    packages = <simula-drv>;
    extraPackages = [
      # Example packages
      pkgs.xterm
      pkgs.i3status
    ];
  };
}

@haruki7049
Copy link
Contributor Author

Converting this PR to a draft PR, in order to add more options about Simula One.

@haruki7049 haruki7049 marked this pull request as draft July 10, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant