aboutsummaryrefslogtreecommitdiff
path: root/home.nix
diff options
context:
space:
mode:
authorAdrian Kummerlaender2021-08-18 11:42:40 +0200
committerAdrian Kummerlaender2021-08-18 11:43:38 +0200
commitc37719764c7899608a36576ae1ba2b3cc3680e94 (patch)
tree4323a37170907eb53da1646cda1a6f451c535547 /home.nix
parent4cd072bceab3a45d34c0f042eba8b5cb5f2c380f (diff)
downloadnixos_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 'home.nix')
-rw-r--r--home.nix21
1 files changed, 7 insertions, 14 deletions
diff --git a/home.nix b/home.nix
index 3f87e95..27a9bba 100644
--- a/home.nix
+++ b/home.nix
@@ -1,21 +1,14 @@
-{ config, pkgs, ... }:
+{ config, pkgs, pkgs-personal, ... }:
-let
- sources = import ./nix/sources.nix;
- pkgs = import sources.nixpkgs { };
- pkgs-unstable = import sources.nixpkgs-unstable { };
- pkgs-personal = import sources.mypkgs { };
-
-in {
- _module.args.sources = sources;
- _module.args.pkgs-unstable = pkgs-unstable;
- _module.args.pkgs-personal = pkgs-personal;
-
- imports = [
+{
+ imports = let
+ # impure access to system config
+ hostname = (import <nixpkgs/nixos> { }).config.networking.hostName;
+ in [
# define options custom to this config
./custom.nix
# load host specific stuff
- ./host/current.nix
+ (./host + ("/" + hostname + ".nix"))
# task shortcuts
./module/tasker.nix
./tasks/default.nix