From c37719764c7899608a36576ae1ba2b3cc3680e94 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 18 Aug 2021 11:42:40 +0200 Subject: Flakeify home config Use nix flakes instead of niv for pinning dependency channels. First step towards merging my "nixos-system" and "nixos-home" configs into a single trivially reproducible flake setup. Apply home config via: > nix build .#homeManagerConfigurations.common.activationPackage --impure > ./result/activate --- flake.nix | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..7388919 --- /dev/null +++ b/flake.nix @@ -0,0 +1,49 @@ +{ + description = "Computing environment of Adrian Kummerlaender"; + + inputs = { + nixpkgs.url = github:NixOS/nixpkgs/nixos-21.05; + nixpkgs-unstable.url = github:NixOS/nixpkgs/nixpkgs-unstable; + home-manager = { + url = github:nix-community/home-manager/release-21.05; + inputs = { nixpkgs.follows = "nixpkgs"; }; + }; + emacs.url = github:nix-community/emacs-overlay/master; + personal = { + url = https://pkgs.kummerlaender.eu/nixexprs.tar.xz; + flake = false; + }; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable, emacs, home-manager, personal, ... }: let + system = "x86_64-linux"; + + pkgs = import nixpkgs { + inherit system; + config = { allowUnfree = true; }; + }; + + in { + homeManagerConfigurations = { + common = home-manager.lib.homeManagerConfiguration { + configuration = { pkgs, ... }: { + _module.args = { + pkgs-personal = import personal { }; + pkgs-unstable = import nixpkgs-unstable { + inherit system; + config = { allowUnfree = true; }; + overlays = [ emacs.overlay ]; + }; + }; + imports = [ ./home.nix ]; + nixpkgs = { + config = { allowUnfree = true; }; + }; + }; + system = system; + homeDirectory = "/home/common"; + username = "common"; + }; + }; + }; +} -- cgit v1.2.3