mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-02-12 15:59:27 +01:00
meta: Move nixosConfiguration logic to separate file
Makes it easier to reason about the flake-specific stuff inside the flake.
This commit is contained in:
parent
7a8fdd7259
commit
51273df2c8
39
default.nix
Normal file
39
default.nix
Normal file
@ -0,0 +1,39 @@
|
||||
{ self, pkgs, ... }:
|
||||
|
||||
let
|
||||
inherit (builtins) attrValues;
|
||||
in
|
||||
{
|
||||
imports = attrValues self.nixosModules ++ [
|
||||
./hardware/laptop.nix
|
||||
];
|
||||
|
||||
nixpkgs.overlays = attrValues self.overlays;
|
||||
home-manager.sharedModules = attrValues self.homeManagerModules;
|
||||
environment.systemPackages = attrValues self.packages.${pkgs.system};
|
||||
|
||||
environment.pathsToLink = [
|
||||
"/share/backgrounds"
|
||||
"/share/eww"
|
||||
"/share/thumbnailers"
|
||||
"/share/fonts"
|
||||
];
|
||||
|
||||
modules = {
|
||||
hardware = {
|
||||
disableLaptopKeyboard = true;
|
||||
lidIgnore = true;
|
||||
powerIgnore = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
mullvad = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
japanese = true;
|
||||
bloat = true;
|
||||
wine = true;
|
||||
};
|
||||
};
|
||||
}
|
39
flake.nix
39
flake.nix
@ -21,11 +21,11 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, stylix, ... } @ attrs:
|
||||
outputs = { self, nixpkgs, ... } @ attrs:
|
||||
let
|
||||
inherit (nixpkgs.lib) nixosSystem;
|
||||
inherit (nixpkgs.legacyPackages.x86_64-linux) nixpkgs-fmt callPackage;
|
||||
inherit (builtins) attrValues attrNames listToAttrs map replaceStrings readDir;
|
||||
inherit (builtins) attrNames listToAttrs map replaceStrings readDir;
|
||||
|
||||
checkArgs = {
|
||||
inherit self;
|
||||
@ -44,40 +44,7 @@
|
||||
nixos = nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = attrs // { nix-config = self; };
|
||||
modules = [
|
||||
./hardware/laptop.nix
|
||||
{
|
||||
environment.pathsToLink = [
|
||||
"/share/backgrounds"
|
||||
"/share/eww"
|
||||
"/share/thumbnailers"
|
||||
"/share/fonts"
|
||||
];
|
||||
|
||||
nixpkgs.overlays = attrValues self.overlays;
|
||||
imports = attrValues self.nixosModules;
|
||||
home-manager.sharedModules = attrValues self.homeManagerModules;
|
||||
environment.systemPackages = attrValues self.packages.x86_64-linux;
|
||||
|
||||
modules = {
|
||||
hardware = {
|
||||
disableLaptopKeyboard = true;
|
||||
lidIgnore = true;
|
||||
powerIgnore = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
mullvad = true;
|
||||
};
|
||||
|
||||
desktop = {
|
||||
japanese = true;
|
||||
bloat = true;
|
||||
wine = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
modules = [ ./. ];
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user