diff --git a/common/environment.nix b/common/environment.nix index 384e88d..122e2f5 100644 --- a/common/environment.nix +++ b/common/environment.nix @@ -12,6 +12,11 @@ lsof tcpdump netcat # <3 + + # used for nix config + colmena + agenix + rc2nix ]; environment.wordlist.enable = true; diff --git a/common/home-manager.nix b/common/home-manager.nix index 171a382..e4d7106 100644 --- a/common/home-manager.nix +++ b/common/home-manager.nix @@ -1,9 +1,13 @@ { config, lib, pkgs, ... }: { - home-manager = { - useUserPackages = true; - useGlobalPkgs = true; - backupFileExtension = "backup"; + home-manager.users = { + qenya = { config, lib, pkgs, osConfig, ... }: { + home.homeDirectory = osConfig.users.users.qenya.home; + + imports = [ + ../home/qenya + ]; + }; }; } diff --git a/common/users/qenya.nix b/common/users/qenya.nix index 19dc8ed..e9d11ad 100644 --- a/common/users/qenya.nix +++ b/common/users/qenya.nix @@ -11,9 +11,4 @@ in { }; programs.zsh.enable = true; - - home-manager.users.qenya = { config, lib, pkgs, osConfig, ... }: { - home.homeDirectory = osConfig.users.users.qenya.home; - imports = [ ../../home/qenya ]; - }; } diff --git a/flake.nix b/flake.nix index 7f3b793..9746dec 100644 --- a/flake.nix +++ b/flake.nix @@ -42,8 +42,18 @@ nix.nixPath = [ "nixpkgs=flake:nixpkgs" ]; nixpkgs.config.allowUnfree = true; - nixpkgs.overlays = [ nur.overlay ]; - home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; + nixpkgs.config.packageOverrides = pkgs: { + agenix = inputs.agenix.packages.${config.nixpkgs.hostPlatform.system}.default; + rc2nix = inputs.plasma-manager.packages.${config.nixpkgs.hostPlatform.system}.rc2nix; + }; + nixpkgs.overlays = [ inputs.nur.overlay ]; + + home-manager = { + useUserPackages = true; + useGlobalPkgs = true; + backupFileExtension = "backup"; + sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ]; + }; imports = [ home-manager.nixosModules.home-manager @@ -88,19 +98,5 @@ ]; }; }; - - # TODO: have this work on other systems too - devShells."x86_64-linux".default = - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in - pkgs.mkShell { - packages = [ - pkgs.colmena - agenix.packages.${system}.default - plasma-manager.packages.${system}.rc2nix - ]; - }; }; } diff --git a/home/qenya/zsh.nix b/home/qenya/zsh.nix index 42ccf8f..f6ded78 100644 --- a/home/qenya/zsh.nix +++ b/home/qenya/zsh.nix @@ -25,15 +25,6 @@ theme = "agnoster"; }; - initExtra = '' - # If a shell is started in a directory with a shell.nix, automatically run nix-shell - if [ -f ./shell.nix ]; then - if [ -z "$IN_NIX_SHELL" ]; then - nix-shell --command "zsh" - fi - fi - ''; - envExtra = '' DEFAULT_USER=qenya ''; diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 688ef15..0000000 --- a/shell.nix +++ /dev/null @@ -1,9 +0,0 @@ -let - shell = (import - (fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/refs/tags/v1.0.1.tar.gz"; - sha256 = "0jm6nzb83wa6ai17ly9fzpqc40wg1viib8klq8lby54agpl213w5"; - }) - { src = ./.; }).shellNix; -in -shell.devShells.${builtins.currentSystem}