The other part of dotfiles
This commit is contained in:
parent
2fbfed0e7a
commit
9f1ba4a64b
25 changed files with 1089 additions and 0 deletions
7
modules/desktop/default.nix
Normal file
7
modules/desktop/default.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./gnome.nix
|
||||
./plymouth.nix
|
||||
./steam.nix
|
||||
];
|
||||
}
|
||||
110
modules/desktop/gnome.nix
Normal file
110
modules/desktop/gnome.nix
Normal file
|
|
@ -0,0 +1,110 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.gnome;
|
||||
in
|
||||
{
|
||||
options.gnome = {
|
||||
enable = lib.mkEnableOption "Enable Gnome and apply customization module";
|
||||
|
||||
keyboardLayout = lib.mkOption {
|
||||
default = "it";
|
||||
type = lib.types.str;
|
||||
description = config.services.xserver.xkb.layout.description;
|
||||
};
|
||||
|
||||
disableXTerm = lib.mkOption {
|
||||
default = true;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Disable the default terminal. Xterm.
|
||||
If disable don't forget to install one terminal!
|
||||
'';
|
||||
};
|
||||
|
||||
# extraExtension = lib.mkOption {
|
||||
# default = [ ];
|
||||
# description = ''
|
||||
# Extra extensions to add without polluting the main module
|
||||
# '';
|
||||
# };
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb.layout = cfg.keyboardLayout;
|
||||
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
|
||||
desktopManager.xterm.enable = !cfg.disableXTerm;
|
||||
excludePackages = lib.mkIf cfg.disableXTerm [ pkgs.xterm ];
|
||||
};
|
||||
|
||||
libinput.enable = true;
|
||||
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
dconf
|
||||
dconf2nix
|
||||
gnome-extension-manager
|
||||
gnome.dconf-editor
|
||||
gnome.gnome-tweaks
|
||||
];
|
||||
|
||||
# Remove standard Gnome Packages
|
||||
gnome.excludePackages = (with pkgs; [
|
||||
gedit # text editor
|
||||
gnome-photos
|
||||
gnome-tour
|
||||
gnome-connections
|
||||
gnome-photos
|
||||
]) ++ (with pkgs.gnome; [
|
||||
atomix # puzzle game
|
||||
cheese # webcam tool
|
||||
epiphany # web browser
|
||||
evince # document viewer
|
||||
geary # email reader
|
||||
gnome-calendar
|
||||
gnome-characters
|
||||
gnome-clocks
|
||||
gnome-contacts
|
||||
gnome-font-viewer
|
||||
gnome-maps
|
||||
gnome-music
|
||||
gnome-terminal
|
||||
gnome-weather
|
||||
hitori # sudoku game
|
||||
iagno # go game
|
||||
tali # poker game
|
||||
totem # video player
|
||||
yelp # help viewer
|
||||
]);
|
||||
|
||||
};
|
||||
|
||||
# gnome-extensions
|
||||
# home.packages = with pkgs;
|
||||
# lib.mkIf cfg.enableExtension
|
||||
# [
|
||||
# gnomeExtensions.blur-my-shell
|
||||
# gnomeExtensions.caffeine
|
||||
# gnomeExtensions.dash-to-dock
|
||||
# gnomeExtensions.gsconnect
|
||||
# gnomeExtensions.gtile
|
||||
# gnomeExtensions.just-perfection
|
||||
# gnomeExtensions.pano
|
||||
# gnomeExtensions.quick-settings-tweaker
|
||||
# gnomeExtensions.rounded-window-corners
|
||||
# gnomeExtensions.tailscale-status
|
||||
# gnomeExtensions.vitals
|
||||
# ] ++ cfg.extraExtension;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
18
modules/desktop/plymouth.nix
Normal file
18
modules/desktop/plymouth.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.plymouth;
|
||||
in
|
||||
{
|
||||
options.plymouth = {
|
||||
enable = lib.mkEnableOption "Enable Plymouth and apply customization module";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
theme = "colorful_loop";
|
||||
themePackages = [ (pkgs.adi1090x-plymouth-themes.override { selected_themes = [ "colorful_loop" ]; }) ];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
18
modules/desktop/steam.nix
Normal file
18
modules/desktop/steam.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.steam;
|
||||
in
|
||||
{
|
||||
options.steam = {
|
||||
enable = lib.mkEnableOption "Enable Steam and apply customization module";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.steam.enable = true;
|
||||
|
||||
# Necessary for Steam
|
||||
hardware.opengl.driSupport32Bit = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue