modify gui config, add sddm for launching niri
This commit is contained in:
parent
85c42efac0
commit
6d7b693162
5 changed files with 124 additions and 76 deletions
|
|
@ -26,7 +26,7 @@
|
|||
{
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
pinentryPackage = pkgs.pinentry-curses;
|
||||
}
|
||||
(lib.mkIf config.youthlic.programs.fish.enable {
|
||||
enableFishIntegration = true;
|
||||
|
|
|
|||
|
|
@ -1,13 +1,16 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
(with inputs; [
|
||||
nixos-hardware.nixosModules.asus-fx506hm
|
||||
])
|
||||
++ [
|
||||
./gui.nix
|
||||
./users
|
||||
./steam.nix
|
||||
|
||||
# Include the hardware related config
|
||||
./hardware-configuration.nix
|
||||
|
|
@ -26,6 +29,16 @@
|
|||
openssh.enable = true;
|
||||
steam.enable = true;
|
||||
};
|
||||
gui.enabled = "niri";
|
||||
};
|
||||
|
||||
specialisation = {
|
||||
cosmic = {
|
||||
inheritParentConfig = true;
|
||||
configuration = {
|
||||
youthlic.gui.enabled = lib.mkForce "cosmic";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
|
|
@ -55,6 +68,7 @@
|
|||
wechat-uos
|
||||
nvtopPackages.full
|
||||
spotify
|
||||
localsend
|
||||
];
|
||||
|
||||
environment.variables.EDITOR = "hx";
|
||||
|
|
|
|||
|
|
@ -1,72 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver = {
|
||||
display = 0;
|
||||
enable = true;
|
||||
};
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
# services.displayManager.sddm.enable = true;
|
||||
# services.desktopManager.plasma6.enable = true;
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-unstable;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "cn";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
fontconfig
|
||||
];
|
||||
programs.firefox.enable = true;
|
||||
programs.localsend.enable = true;
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
lxgw-wenkai
|
||||
];
|
||||
fontconfig.defaultFonts = pkgs.lib.mkForce {
|
||||
serif = [
|
||||
"LXGW WenKai"
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
monospace = [
|
||||
"FiraCode Nerd Font"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -20,6 +20,9 @@
|
|||
./dae
|
||||
./openssh.nix
|
||||
./nh.nix
|
||||
./i18n.nix
|
||||
./gui.nix
|
||||
./steam.nix
|
||||
];
|
||||
|
||||
config = {
|
||||
|
|
|
|||
103
nixos/modules/gui.nix
Normal file
103
nixos/modules/gui.nix
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.youthlic.gui;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
youthlic.gui = {
|
||||
enabled = lib.mkOption {
|
||||
type = lib.types.nullOr (
|
||||
lib.types.enum [
|
||||
"cosmic"
|
||||
"niri"
|
||||
]
|
||||
);
|
||||
default = null;
|
||||
example = "cosmic";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf (cfg.enabled == "cosmic") {
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver = {
|
||||
display = 0;
|
||||
enable = true;
|
||||
xkb = {
|
||||
layout = "cn";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
})
|
||||
(lib.mkIf (cfg.enabled == "niri") {
|
||||
services.displayManager.sddm = {
|
||||
enable = true;
|
||||
wayland = {
|
||||
enable = true;
|
||||
compositorCommand = "niri";
|
||||
};
|
||||
};
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
package = pkgs.niri-unstable;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (cfg.enabled != null) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
fontconfig
|
||||
];
|
||||
programs.firefox.enable = true;
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = false;
|
||||
packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-cjk-serif
|
||||
noto-fonts-emoji
|
||||
lxgw-wenkai
|
||||
];
|
||||
fontconfig.defaultFonts = pkgs.lib.mkForce {
|
||||
serif = [
|
||||
"LXGW WenKai"
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Serif CJK SC"
|
||||
"Noto Serif"
|
||||
];
|
||||
monospace = [
|
||||
"FiraCode Nerd Font"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
services.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue