Add hardware config and fix hummelberg build
This commit is contained in:
parent
1452c2a43d
commit
b2f0797b01
15 changed files with 68 additions and 52 deletions
24
flake.nix
24
flake.nix
|
@ -2,6 +2,7 @@
|
|||
inputs = {
|
||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
home-manager.url = "github:nix-community/home-manager/release-21.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
qois-infrastructure.url = "path:/etc/nixos/qois-infrastructure";
|
||||
|
@ -9,14 +10,17 @@
|
|||
fabianhauser-etaxes-sg.inputs.nixpkgs.follows = "nixpkgs-stable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager, qois-infrastructure, fabianhauser-etaxes-sg, ... }@inputs:
|
||||
let system = "x86_64-linux";
|
||||
outputs = { self, nixpkgs-unstable, nixpkgs-stable, home-manager
|
||||
, qois-infrastructure, fabianhauser-etaxes-sg, nixos-hardware, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgsUnstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true; # For vscode
|
||||
};
|
||||
in {
|
||||
checks.${system}.formatCheck = let pkgs = pkgsUnstable; in pkgs.runCommand "nixfmt-check" { } ''
|
||||
checks.${system}.formatCheck = let pkgs = pkgsUnstable;
|
||||
in pkgs.runCommand "nixfmt-check" { } ''
|
||||
set -euo pipefail
|
||||
cd ${self}
|
||||
${pkgs.findutils}/bin/find . -type f -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt --check {} +
|
||||
|
@ -31,18 +35,26 @@
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit pkgsUnstable; pkgsEtaxesSg = fabianhauser-etaxes-sg.packages.${system}; };
|
||||
extraSpecialArgs = {
|
||||
inherit pkgsUnstable;
|
||||
pkgsEtaxesSg = fabianhauser-etaxes-sg.packages.${system};
|
||||
};
|
||||
users.fhauser = import ./home/fhauser/default.nix;
|
||||
};
|
||||
};
|
||||
mapHostnameToAttr = host:
|
||||
nixpkgs-stable.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ qois-infrastructure.nixosModule home-manager.nixosModules.home-manager home-manager-config ./host/${host}/default.nix ];
|
||||
specialArgs.hardwareModules = nixos-hardware.nixosModules;
|
||||
modules = [
|
||||
qois-infrastructure.nixosModule
|
||||
home-manager.nixosModules.home-manager
|
||||
home-manager-config
|
||||
./host/${host}/default.nix
|
||||
];
|
||||
};
|
||||
in pkgsUnstable.lib.genAttrs hosts mapHostnameToAttr;
|
||||
|
||||
|
||||
homeConfigurations = {
|
||||
fhauser = home-manager.lib.homeManagerConfiguration rec {
|
||||
inherit system;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue