mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-29 05:41:52 +02:00
feat: add new wayland compositor - niri
This commit is contained in:
@@ -14,17 +14,26 @@ let
|
||||
# Shoukei (祥瓊, Shōkei)
|
||||
name = "shoukei";
|
||||
base-modules = {
|
||||
nixos-modules = map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/desktop.nix"
|
||||
# host specific
|
||||
"hosts/12kingdoms-${name}"
|
||||
# nixos hardening
|
||||
# "hardening/profiles/default.nix"
|
||||
"hardening/nixpaks"
|
||||
"hardening/bwraps"
|
||||
];
|
||||
nixos-modules =
|
||||
(map mylib.relativeToRoot [
|
||||
# common
|
||||
"secrets/nixos.nix"
|
||||
"modules/nixos/desktop.nix"
|
||||
# host specific
|
||||
"hosts/12kingdoms-${name}"
|
||||
# nixos hardening
|
||||
# "hardening/profiles/default.nix"
|
||||
"hardening/nixpaks"
|
||||
"hardening/bwraps"
|
||||
])
|
||||
++ [
|
||||
{
|
||||
modules.desktop.fonts.enable = true;
|
||||
modules.desktop.wayland.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.preservation.enable = true;
|
||||
}
|
||||
];
|
||||
home-modules = map mylib.relativeToRoot [
|
||||
# common
|
||||
"home/linux/gui.nix"
|
||||
@@ -35,14 +44,6 @@ let
|
||||
|
||||
modules-hyprland = {
|
||||
nixos-modules = [
|
||||
{
|
||||
modules.desktop.wayland.enable = true;
|
||||
modules.secrets.desktop.enable = true;
|
||||
modules.secrets.preservation.enable = true;
|
||||
|
||||
# TODO: remove this option
|
||||
nixpkgs.config.allowUnsupportedSstem = true;
|
||||
}
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-modules = [
|
||||
@@ -50,15 +51,29 @@ let
|
||||
]
|
||||
++ base-modules.home-modules;
|
||||
};
|
||||
|
||||
modules-niri = {
|
||||
nixos-modules = [
|
||||
inputs.niri.nixosModules.niri
|
||||
{ programs.niri.enable = true; }
|
||||
]
|
||||
++ base-modules.nixos-modules;
|
||||
home-modules = [
|
||||
{ modules.desktop.niri.enable = true; }
|
||||
]
|
||||
++ base-modules.home-modules;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
# host with hyprland compositor
|
||||
"${name}-hyprland" = mylib.nixosSystem (modules-hyprland // args);
|
||||
"${name}-niri" = mylib.nixosSystem (modules-niri // args);
|
||||
};
|
||||
|
||||
# generate iso image for hosts with desktop environment
|
||||
packages = {
|
||||
"${name}-hyprland" = inputs.self.nixosConfigurations."${name}-hyprland".config.formats.iso;
|
||||
"${name}-niri" = inputs.self.nixosConfigurations."${name}-niri".config.formats.iso;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user