From bbfa8b1d4c28d083ecb3bc34f52b1130a4e8bd2d Mon Sep 17 00:00:00 2001 From: Pim Kunis Date: Sun, 8 Oct 2023 18:22:51 +0200 Subject: [PATCH] add script to build and switch new nixos config --- flake.nix | 16 +++------------- switch.sh | 3 +++ 2 files changed, 6 insertions(+), 13 deletions(-) create mode 100755 switch.sh diff --git a/flake.nix b/flake.nix index 41ff6dd..57e9e93 100644 --- a/flake.nix +++ b/flake.nix @@ -9,20 +9,10 @@ }; }; - outputs = { self, nixpkgs, home-manager }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { - inherit system; - config = { - allowUnfree = true; - }; - }; - in - { + outputs = { self, nixpkgs, home-manager }: { nixosConfigurations = { - myNixos = nixpkgs.lib.nixosSystem { - inherit system; + pim = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; modules = [ ./configuration.nix home-manager.nixosModules.home-manager { diff --git a/switch.sh b/switch.sh new file mode 100755 index 0000000..ffed5f4 --- /dev/null +++ b/switch.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +sudo nixos-rebuild switch --flake ./#pim --impure