From 720f6496f8191953202c5f6565256706174eb137 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Tue, 17 Sep 2024 22:51:08 +0300 Subject: [PATCH] Use home-manager as flake --- Makefile | 6 ------ flake.nix | 21 +++++++++------------ common.nix => nixos_common.nix | 21 +++++++++++---------- 3 files changed, 20 insertions(+), 28 deletions(-) delete mode 100644 Makefile rename common.nix => nixos_common.nix (86%) diff --git a/Makefile b/Makefile deleted file mode 100644 index 7e9c2509..00000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -.PHONY: update clean -update: - home-manager switch --flake .#functionalhacker - -clean: - nix-collect-garbage -d diff --git a/flake.nix b/flake.nix index b5779311..2df7ebe8 100644 --- a/flake.nix +++ b/flake.nix @@ -11,24 +11,21 @@ }; outputs = { nixpkgs, home-manager, ... }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in { nixosConfigurations.Mirkwood = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - ./common.nix ./hosts/Mirkwood/configuration.nix - ]; - }; + ./nixos_common.nix - homeConfigurations = { - functionalhacker = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ ./users/functionalhacker/home.nix ]; - }; + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.functionalhacker = + import ./users/functionalhacker/home.nix; + } + ]; }; }; } diff --git a/common.nix b/nixos_common.nix similarity index 86% rename from common.nix rename to nixos_common.nix index 03519a6d..515eba41 100644 --- a/common.nix +++ b/nixos_common.nix @@ -64,16 +64,17 @@ enable = true; nativeMessagingHosts.packages = [ pkgs.browserpass ]; }; - zsh = { enable = true; }; + zsh.enable = true; }; - environment.systemPackages = with pkgs; [ - git - gnumake - home-manager - neovim - telegram-desktop - usbutils - wl-clipboard - ]; + environment = { + shells = [ pkgs.zsh ]; + systemPackages = with pkgs; + [ + neovim + telegram-desktop + usbutils + wl-clipboard + ]; + }; }