add script to build and switch new nixos config

This commit is contained in:
Pim Kunis 2023-10-08 18:22:51 +02:00
parent 747d2bd03f
commit bbfa8b1d4c
2 changed files with 6 additions and 13 deletions

View file

@ -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 {

3
switch.sh Executable file
View file

@ -0,0 +1,3 @@
#!/usr/bin/env bash
sudo nixos-rebuild switch --flake ./#pim --impure