Compare commits
2 commits
7d6dd5e9e4
...
f86275f331
| Author | SHA1 | Date | |
|---|---|---|---|
| f86275f331 | |||
| 86090fa40e |
9 changed files with 89 additions and 9 deletions
13
modules/factory/users/user.nix
Normal file
13
modules/factory/users/user.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config.flake.factory.user = username: {
|
||||
nixos."${username}" = {pkgs, ...}: {
|
||||
users.users."${username}" = {
|
||||
isNormalUser = true;
|
||||
name = "${username}";
|
||||
};
|
||||
extraGroups = ["wheel"];
|
||||
|
||||
shell = pkgs.nushell;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
flake.nixosModules.firefoxHelix = {pkgs, ...}: {
|
||||
programs.firefox.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
helix
|
||||
];
|
||||
};
|
||||
}
|
||||
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
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/nix/flake-parts/factory.nix
Normal file
6
modules/nix/flake-parts/factory.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{lib, ...}: {
|
||||
options.flake.factory = lib.mkOption {
|
||||
type = lib.types.attrsof lib.types.unspecified;
|
||||
default = {};
|
||||
};
|
||||
}
|
||||
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;}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/users/benDesktop/benDesktop.nix
Normal file
9
modules/users/benDesktop/benDesktop.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
flake.modules = lib.mkMerge [
|
||||
(self.factory.user "benDesktop")
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue