added individual host variables and pkgs-unstable
This commit is contained in:
parent
41224a66a9
commit
5176e7cdf8
4 changed files with 40 additions and 28 deletions
56
flake.nix
56
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "A simple NixOS flake";
|
description = "My NixOS desktop and server configs";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
||||||
|
@ -28,47 +28,59 @@
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, disko, nixos-hardware, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@attrs:
|
||||||
let
|
let
|
||||||
inherit (self) outputs;
|
supportedSystems = [ "x86_64-linux" ];
|
||||||
forAllSystems = nixpkgs.lib.genAttrs [
|
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||||
"x86_64-linux"
|
forAllSystemsUnstable = nixpkgs-unstable.lib.genAttrs supportedSystems;
|
||||||
];
|
|
||||||
inherit (nixpkgs) lib;
|
pkgs = forAllSystems (system: import nixpkgs { inherit system; });
|
||||||
configVars = import /home/willifan/.nix-config/vars { inherit inputs lib; };
|
pkgs-unstable = forAllSystemsUnstable (system: import nixpkgs-unstable { inherit system; });
|
||||||
specialArgs = { inherit inputs outputs configVars nixpkgs; };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
Lenni = lib.nixosSystem {
|
Lenni = let
|
||||||
inherit specialArgs;
|
system = "x86_64-linux";
|
||||||
|
in
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
hostname = "Lenni";
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
attrs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
disko.nixosModules.disko
|
attrs.disko.nixosModules.disko
|
||||||
nixos-hardware.nixosModules.framework-12th-gen-intel
|
attrs.nixos-hardware.nixosModules.framework-12th-gen-intel
|
||||||
./hosts
|
./hosts
|
||||||
./users/willifan
|
./users/willifan
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
Puenktchen = lib.nixosSystem {
|
Puenktchen = let
|
||||||
inherit specialArgs;
|
system = "x86_64-linux";
|
||||||
|
in
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
hostname = "Puenktchen";
|
||||||
|
inherit system;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
home-manager.nixosModules.home-manager
|
attrs.home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
disko.nixosModules.disko
|
attrs.disko.nixosModules.disko
|
||||||
nixos-hardware.nixosModules.common-cpu-amd
|
attrs.nixos-hardware.nixosModules.common-cpu-amd
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||||
nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||||
nixos-hardware.nixosModules.common-gpu-amd
|
attrs.nixos-hardware.nixosModules.common-gpu-amd
|
||||||
./hosts
|
./hosts
|
||||||
./users/willifan
|
./users/willifan
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, configVars, ... }:
|
{ pkgs, hostname, ... }:
|
||||||
{
|
{
|
||||||
networking.hostName = configVars.hostname;
|
networking.hostName = hostname;
|
||||||
imports = [
|
imports = [
|
||||||
./nix-ld.nix
|
./nix-ld.nix
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, configVars, ... }:
|
{ pkgs, hostname, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common
|
./common
|
||||||
./${configVars.hostname}
|
./${hostname}
|
||||||
];
|
];
|
||||||
}
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, configVars, ... }:
|
{ pkgs, hostname, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./common
|
./common
|
||||||
./${configVars.hostname}
|
./${hostname}
|
||||||
];
|
];
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue