Compare commits

..

No commits in common. "5176e7cdf8bef4955bde87649b9e5e1b61646e0e" and "f6ea49629d59b7e44fc437ebfe3f4c38e7056040" have entirely different histories.

6 changed files with 30 additions and 42 deletions

View File

@ -1,5 +1,5 @@
{ {
description = "My NixOS desktop and server configs"; description = "A simple NixOS flake";
inputs = { inputs = {
@ -28,59 +28,47 @@
}; };
outputs = { self, nixpkgs, nixpkgs-unstable, ... }@attrs: outputs = { self, nixpkgs, home-manager, disko, nixos-hardware, ... }@inputs:
let let
supportedSystems = [ "x86_64-linux" ]; inherit (self) outputs;
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; forAllSystems = nixpkgs.lib.genAttrs [
forAllSystemsUnstable = nixpkgs-unstable.lib.genAttrs supportedSystems; "x86_64-linux"
];
pkgs = forAllSystems (system: import nixpkgs { inherit system; }); inherit (nixpkgs) lib;
pkgs-unstable = forAllSystemsUnstable (system: import nixpkgs-unstable { inherit system; }); configVars = import /home/willifan/.nix-config/vars { inherit inputs lib; };
specialArgs = { inherit inputs outputs configVars nixpkgs; };
in in
{ {
nixosConfigurations = { nixosConfigurations = {
Lenni = let Lenni = lib.nixosSystem {
system = "x86_64-linux"; inherit specialArgs;
in
nixpkgs.lib.nixosSystem {
specialArgs = {
hostname = "Lenni";
inherit system;
};
modules = [ modules = [
attrs.home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
} }
attrs.disko.nixosModules.disko disko.nixosModules.disko
attrs.nixos-hardware.nixosModules.framework-12th-gen-intel nixos-hardware.nixosModules.framework-12th-gen-intel
./hosts ./hosts
./users/willifan ./users/willifan
]; ];
}; };
Puenktchen = let Puenktchen = lib.nixosSystem {
system = "x86_64-linux"; inherit specialArgs;
in
nixpkgs.lib.nixosSystem {
specialArgs = {
hostname = "Puenktchen";
inherit system;
};
modules = [ modules = [
attrs.home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
} }
attrs.disko.nixosModules.disko disko.nixosModules.disko
attrs.nixos-hardware.nixosModules.common-cpu-amd nixos-hardware.nixosModules.common-cpu-amd
attrs.nixos-hardware.nixosModules.common-cpu-amd-pstate nixos-hardware.nixosModules.common-cpu-amd-pstate
attrs.nixos-hardware.nixosModules.common-cpu-amd-zenpower nixos-hardware.nixosModules.common-cpu-amd-zenpower
attrs.nixos-hardware.nixosModules.common-gpu-amd nixos-hardware.nixosModules.common-gpu-amd
./hosts ./hosts
./users/willifan ./users/willifan
]; ];

View File

@ -1,6 +1,6 @@
{ pkgs, hostname, ... }: { pkgs, configVars, ... }:
{ {
networking.hostName = hostname; networking.hostName = configVars.hostname;
imports = [ imports = [
./nix-ld.nix ./nix-ld.nix
./boot.nix ./boot.nix

View File

@ -1,7 +1,7 @@
{ pkgs, hostname, ... }: { pkgs, configVars, ... }:
{ {
imports = [ imports = [
./common ./common
./${hostname} ./${configVars.hostname}
]; ];
} }

View File

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, home-manager-unstable, ... }:
{ {

View File

@ -1,7 +1,7 @@
{ pkgs, hostname, ... }: { pkgs, configVars, ... }:
{ {
imports = [ imports = [
./common ./common
./${hostname} ./${configVars.hostname}
]; ];
} }

View File

@ -1,4 +1,4 @@
{ pkgs, ... }: { pkgs, home-manager-unstable, ... }:
{ {
imports = [ imports = [