some modularizing and refactoring

This commit is contained in:
cnst
2024-10-24 18:49:49 +02:00
parent 7f9d5c000f
commit ca0dc208e0
25 changed files with 248 additions and 227 deletions

View File

@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
nixos = {
boot = {
loader = {
@@ -17,15 +17,15 @@
};
};
gaming = {
# steam = {
# enable = true;
# };
# gamescope = {
# enable = true;
# };
# lutris = {
# enable = true;
# };
steam = {
enable = true;
};
gamescope = {
enable = true;
};
lutris = {
enable = true;
};
gamemode = {
enable = true;
optimizeGpu = {
@@ -173,12 +173,23 @@
};
};
system = {
devpkgs = {
enable = true;
};
fonts = {
enable = true;
};
locale = {
enable = true;
timeZone = "Europe/Stockholm";
defaultLocale = "en_US.UTF-8";
extraLocale = "sv_SE.UTF-8";
};
xdg = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
};
utils = {
android = {

View File

@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
nixos = {
boot = {
loader = {
@@ -148,19 +148,30 @@
};
};
system = {
devpkgs = {
enable = true;
};
fonts = {
enable = true;
};
locale = {
enable = true;
timeZone = "Europe/Stockholm";
defaultLocale = "en_US.UTF-8";
extraLocale = "sv_SE.UTF-8";
};
xdg = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
};
utils = {
android = {
enable = true;
};
anyrun = {
enable = true;
enable = false;
};
brightnessctl = {
enable = true;

View File

@@ -19,10 +19,6 @@
# shorten paths
inherit (inputs.nixpkgs.lib) nixosSystem;
mod = "${systemConfig}";
# get the basic config to build on top of
inherit (import "${systemConfig}") shared;
# get these into the module system
specialArgs = {inherit inputs self userConfig systemConfig hostConfig cnstConfig toothpickConfig umodPath smodPath;};
@@ -30,57 +26,51 @@
cnix = nixosSystem {
inherit specialArgs;
modules =
shared
++ [
./cnix
"${mod}/dev"
{
home-manager = {
users.cnst.imports = homeImports."cnst@cnix";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
modules = [
./cnix
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@cnix";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
toothpc = nixosSystem {
inherit specialArgs;
modules =
shared
++ [
./toothpc
"${mod}/dev"
{
home-manager = {
users.toothpick.imports = homeImports."toothpick@toothpc";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
modules = [
./toothpc
"${self}/nix"
{
home-manager = {
users.toothpick.imports = homeImports."toothpick@toothpc";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
cnixpad = nixosSystem {
inherit specialArgs;
modules =
shared
++ [
./cnixpad
"${mod}/dev"
{
home-manager = {
users.cnst.imports = homeImports."cnst@cnixpad";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
modules = [
./cnixpad
"${self}/nix"
{
home-manager = {
users.cnst.imports = homeImports."cnst@cnixpad";
extraSpecialArgs = specialArgs;
};
}
self.nixosModules.nixos
inputs.chaotic.nixosModules.default
inputs.agenix.nixosModules.default
];
};
};
}

View File

@@ -1,4 +1,4 @@
{
{pkgs, ...}: {
nixos = {
boot = {
loader = {
@@ -165,12 +165,23 @@
};
};
system = {
devpkgs = {
enable = true;
};
fonts = {
enable = true;
};
locale = {
enable = true;
timeZone = "Europe/Stockholm";
defaultLocale = "en_US.UTF-8";
extraLocale = "sv_SE.UTF-8";
};
xdg = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
};
utils = {
android = {