From 75c2af4aedd2ac5c2cfc74b346625fa4b265541d Mon Sep 17 00:00:00 2001 From: Petri Hienonen Date: Thu, 23 May 2024 09:44:38 +0300 Subject: Nixos --- flake.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..44581ae --- /dev/null +++ b/flake.nix @@ -0,0 +1,40 @@ +{ + description = "Petri's system"; + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-23.11"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager/release-23.11"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = inputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, nixos-hardware, ... }: + let + inherit (self) outputs; + vars = { + user = "petri"; + name = "Petri Hienonen"; + email= "petri.hienonen@gmail.com"; + location = "$HOME/.nix"; + terminal = "alacritty"; + editor = "helix"; + shell = "fish"; + }; + in { + nixosConfigurations = { + saarni = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs outputs vars nixpkgs-unstable; }; + modules = [ + ./hosts/saarni + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + ]; + }; + }; + }; +} + -- cgit v1.2.3-70-g09d2