Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 36 additions & 10 deletions examples/hmOnly/flake.nix
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@
{
description = "A DevOS example. And also a digga test bed.";
description = "Example tracking unstable channels and libraries";

inputs = {
nixos.url = "github:nixos/nixpkgs/nixos-22.05";
digga.url = "github:divnix/digga";
digga.inputs.nixpkgs.follows = "nixos";
digga.inputs.home-manager.follows = "home";
home.url = "github:nix-community/home-manager/release-22.05";
home.inputs.nixpkgs.follows = "nixos";
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-trunk.url = "github:NixOS/nixpkgs";
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05";

digga.url = "github:divnix/digga/home-manager-22.11";
digga.inputs.nixpkgs.follows = "nixpkgs";
digga.inputs.nixlib.follows = "nixpkgs";
digga.inputs.home-manager.follows = "home-manager";

home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixos-unstable";

emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";

nixpkgs.follows = "nixos-unstable";
};

outputs = inputs @ { self, nixos, digga, home }:
outputs = {
self
, digga
, nixos-unstable
, emacs-overlay
, home-manager
, nixpkgs
, ...
} @ inputs:
digga.lib.mkFlake {

inherit self inputs;

channels.nixos = { };
channels = {
nixos-unstable = {};
nixos-stable = {};
nixos-trunk = {};
};

sharedOverlays = [
emacs-overlay.overlay
];

# FIXME: should probably not be required, but it is.
nixos.hostDefaults.channelName = "nixos";

home = ./home;
Expand Down
2 changes: 1 addition & 1 deletion examples/hmOnly/home/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{ self, inputs, ... }:
let
lib = inputs.digga.lib;
inherit (inputs.digga) lib;
in
{
imports = [ (lib.importExportableModules ./modules) ];
Expand Down
16 changes: 15 additions & 1 deletion examples/hmOnly/home/users/testuser.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,27 @@ in
{
imports = suites.shell;

home.packages = [ pkgs.hello ];
home.packages = with pkgs; [
# Provided by emacs-overlay
emacsPgtk
# Python packages often fail to build on unstable channels.
httpie
];

programs.browserpass.enable = true;
programs.starship.enable = true;
programs.git = {
userName = name;
userEmail = email;
};

programs.emacs = {
enable = true;
# While you'll probably want to use a native-comp package in the real world,
# in this example we want to avoid compilation to cut down on time/resources.
package = pkgs.emacsPgtk;
};

home.stateVersion = "22.11";
}