progress
This commit is contained in:
parent
86090fa40e
commit
f86275f331
5 changed files with 61 additions and 0 deletions
13
modules/hosts/desktop/boot.nix
Normal file
13
modules/hosts/desktop/boot.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
flake.modules.nixos.desktop = {
|
||||||
|
boot = {
|
||||||
|
kernelPackages = pkgs.linuxPackages_6_12;
|
||||||
|
kernelParams = ["nvidia-drm.modeset=1"];
|
||||||
|
|
||||||
|
loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
device = "/dev/disk/by-id/ata-KINGSTON_SKC300S37A60G_50026B7239039148";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
1
modules/hosts/desktop/flake-parts.nix
Normal file
1
modules/hosts/desktop/flake-parts.nix
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
{inputs, ...}: {flake.nixosConfigurations = inputs.self.lib.mkNixos "x86_64-linux" "desktop";}
|
||||||
19
modules/hosts/desktop/hardware.nix
Normal file
19
modules/hosts/desktop/hardware.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{config, ...}: {
|
||||||
|
flake.modules.nixos.desktop = {
|
||||||
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
graphics = {
|
||||||
|
enable = true;
|
||||||
|
enable32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = true;
|
||||||
|
open = false;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
7
modules/hosts/desktop/users/benDesktop.nix
Normal file
7
modules/hosts/desktop/users/benDesktop.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{self, ...}: {
|
||||||
|
flake.modules.nixos.desktop = {
|
||||||
|
imports = [
|
||||||
|
self.factory.benDesktop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/nix/flake-parts/lib.nix
Normal file
21
modules/nix/flake-parts/lib.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options.flake.lib = lib.mkOption {
|
||||||
|
type = lib.types.attrsOf lib.types.unspecified;
|
||||||
|
default = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
config.flake.lib = {
|
||||||
|
mkNixos = system: name: {
|
||||||
|
${name} = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
inputs.self.modules.nixos.${name}
|
||||||
|
{nixpkgs.hostPlatform = lib.mkDefault system;}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue