mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-17 20:52:09 -08:00
fix: reconfigure modules to build successfully on demeter
This commit is contained in:
parent
ce89f8149e
commit
180741ec71
11 changed files with 54 additions and 63 deletions
|
@ -14,6 +14,28 @@
|
|||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
liminalOS = {
|
||||
system = {
|
||||
audio.prod.enable = true;
|
||||
networking = {
|
||||
enable = true;
|
||||
firewallPresets.vite = true;
|
||||
cloudflareNameservers.enable = true;
|
||||
};
|
||||
};
|
||||
theming.enable = true;
|
||||
desktop.enable = true;
|
||||
extras.gaming = {
|
||||
enable = true;
|
||||
roblox.enable = true;
|
||||
utilities.gamemode = {
|
||||
enable = true;
|
||||
gamemodeUsers = [ "youwen" ];
|
||||
};
|
||||
};
|
||||
programs.flatpak.enable = true;
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
|
|
|
@ -6,18 +6,7 @@
|
|||
imports =
|
||||
[
|
||||
./configuration.nix
|
||||
../../modules/linux/gaming
|
||||
../../modules/linux/audio
|
||||
../../modules/linux/networking
|
||||
../../modules/linux/fonts
|
||||
../../modules/linux/greeter
|
||||
../../modules/linux/core
|
||||
../../modules/linux/hamachi
|
||||
../../modules/linux/desktop-portal
|
||||
../../modules/linux/audio-prod
|
||||
../../modules/linux/stylix
|
||||
../../modules/linux/wine
|
||||
../../modules/linux/flatpak
|
||||
../../modules/linux
|
||||
../../overlays
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
|
|
@ -12,13 +12,6 @@ in
|
|||
./linux
|
||||
];
|
||||
options.liminalOS = {
|
||||
linux.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to enable liminalOS's default modules and options for Linux.
|
||||
'';
|
||||
};
|
||||
darwin.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
|
@ -5,7 +5,7 @@ in
|
|||
{
|
||||
options.liminalOS.system.audio.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.linux.enable;
|
||||
default = config.liminalOS.enable;
|
||||
description = ''
|
||||
Whether to set up PipeWire and default audio utilities.
|
||||
'';
|
||||
|
|
|
@ -46,8 +46,8 @@ in
|
|||
'';
|
||||
};
|
||||
flakeLocation = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
type = lib.types.nullOr lib.types.path;
|
||||
default = null;
|
||||
description = ''
|
||||
Absolute filepath location of the NixOS system configuration flake.
|
||||
'';
|
||||
|
|
|
@ -4,16 +4,23 @@
|
|||
./audio
|
||||
./audio-prod
|
||||
./core
|
||||
./desktop-portal
|
||||
./desktop-environment
|
||||
./distrobox
|
||||
./flatpak
|
||||
./fonts
|
||||
./gaming
|
||||
./greeter
|
||||
./misc
|
||||
./networking
|
||||
./stylix
|
||||
./wine
|
||||
./wsl
|
||||
./misc
|
||||
];
|
||||
|
||||
options.liminalOS.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = ''
|
||||
Whether to enable liminalOS's default modules and options for Linux.
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.programs.flatpaks;
|
||||
cfg = config.liminalOS.programs.flatpak;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.${cfg.moduleName}.nixosModules.nix-flatpak
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
|
||||
options.liminalOS.programs.flatpaks = {
|
||||
options.liminalOS.programs.flatpak = {
|
||||
enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
|
|
|
@ -15,7 +15,7 @@ in
|
|||
gamemode = {
|
||||
enable = lib.mkEnableOption "gamemode";
|
||||
gamemodeUsers = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.string;
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
List of users to add to the gamemode group. Gamemode will likely not work unless you add your user to the group!
|
||||
|
@ -44,7 +44,7 @@ in
|
|||
mangojuice
|
||||
];
|
||||
|
||||
liminalOS.programs.flatpaks.enable = true;
|
||||
liminalOS.programs.flatpak.enable = true;
|
||||
|
||||
services.flatpak.packages = lib.mkIf cfg.roblox.enable [
|
||||
{
|
||||
|
@ -82,7 +82,7 @@ in
|
|||
};
|
||||
|
||||
users.users = forAllGamemodeUsers (username: {
|
||||
${username}.extraGroups = [ "gamemode" ];
|
||||
extraGroups = [ "gamemode" ];
|
||||
});
|
||||
|
||||
services.logmein-hamachi.enable = cfg.utilities.hamachi.enable;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.system.printing;
|
||||
cfg = config.liminalOS.system;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
|
@ -17,7 +17,13 @@ in
|
|||
Whether to set up default options for printing and printer discover on UNIX.
|
||||
'';
|
||||
};
|
||||
fonts.enable = lib.mkEnableOption "fonts";
|
||||
fonts.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.enable;
|
||||
description = ''
|
||||
Whether to set up some nice default fonts, including a Nerd Font, Noto Fonts, and CJK.
|
||||
'';
|
||||
};
|
||||
distrobox.enable = lib.mkEnableOption "distrobox and podman";
|
||||
};
|
||||
|
||||
|
@ -45,11 +51,11 @@ in
|
|||
]);
|
||||
};
|
||||
|
||||
virtualisation.podman = cfg.distrobox.enable {
|
||||
virtualisation.podman = mkIf cfg.distrobox.enable {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = cfg.distrobox.enable [ pkgs.distrobox ];
|
||||
environment.systemPackages = mkIf cfg.distrobox.enable [ pkgs.distrobox ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,13 +11,6 @@ in
|
|||
{
|
||||
options.liminalOS.theming = {
|
||||
enable = lib.mkEnableOption "theming";
|
||||
stylixName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "stylix";
|
||||
description = ''
|
||||
Name of Stylix module defined in `inputs`. Defaults to `stylix`. You must define `inputs.stylix.url` in your `flake.nix` to enable this option
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
@ -58,11 +51,5 @@ in
|
|||
size = 26;
|
||||
};
|
||||
};
|
||||
assertions = [
|
||||
{
|
||||
assertion = builtins.hasAttr cfg.stylixName inputs;
|
||||
message = ''You enabled theming but did not add a Stylix module to your flake inputs, or did not set `liminalOS.theming.stylixName` to the name of your Stylix input, if it is not `stylix`. Please set `inputs.stylix.url = "github:danth/stylix"` or set the stylixName option to the name of your stylix flake input.'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -9,18 +9,11 @@ let
|
|||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.${cfg.wslName}.nixosModules.default
|
||||
inputs.nixos-wsl.nixosModules.default
|
||||
];
|
||||
|
||||
options = {
|
||||
options.liminalOS.wsl = {
|
||||
enable = lib.mkEnableOption "WSL";
|
||||
wslName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "nixos-wsl";
|
||||
description = ''
|
||||
Name of the NixOS WSL module in your flake inputs. You should define `inputs.nixos-wsl.url = "github:nixos-community/nixos-wsl", and set `liminalOS.wsl.wslName` if you did not call it `nixos-wsl`.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config.wsl = lib.mkIf cfg.enable {
|
||||
|
@ -28,10 +21,4 @@ in
|
|||
defaultUser = config.liminalOS.username;
|
||||
useWindowsDriver = true;
|
||||
};
|
||||
assertions = [
|
||||
{
|
||||
assertion = builtins.hasAttr cfg.wslName inputs;
|
||||
message = ''You enabled WSL but did not add the WSL module to your flake inputs, or did not set `liminalOS.theming.wslName` to the name of your NixOS WSL input, if it is not `nixos-wsl`. Please set `inputs.nixos-wsl.url = "github:nix-community/nixos-wsl"` or set the wslName option to the name of your WSL flake input.'';
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue