diff options
author | Adrian Kummerlaender | 2021-08-18 11:42:40 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2021-08-18 11:43:38 +0200 |
commit | c37719764c7899608a36576ae1ba2b3cc3680e94 (patch) | |
tree | 4323a37170907eb53da1646cda1a6f451c535547 /flake.nix | |
parent | 4cd072bceab3a45d34c0f042eba8b5cb5f2c380f (diff) | |
download | nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar.gz nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar.bz2 nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar.lz nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar.xz nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.tar.zst nixos_home-c37719764c7899608a36576ae1ba2b3cc3680e94.zip |
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
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 49 |
1 files changed, 49 insertions, 0 deletions
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"; + }; + }; + }; +} |