feat: add gnome setup
This commit is contained in:
parent
29b3d30b74
commit
8735eb323f
12 changed files with 224 additions and 124 deletions
|
@ -23,12 +23,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
theme = {
|
theme = {
|
||||||
name = "Catppuccin-Mocha-Compact-Pink-Dark";
|
name = "Catppuccin-Compact-Pink";
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.callPackage ../../pkgs/catppuccin-gtk.nix {};
|
||||||
accents = ["pink"];
|
|
||||||
variant = "mocha";
|
|
||||||
size = "compact";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||||
gtk2.extraConfig = ''
|
gtk2.extraConfig = ''
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
lib,
|
|
||||||
flakePath,
|
flakePath,
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
@ -20,7 +21,7 @@
|
||||||
lat = 48.210033;
|
lat = 48.210033;
|
||||||
lng = 16.363449;
|
lng = 16.363449;
|
||||||
in {
|
in {
|
||||||
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) {
|
config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux && (osConfig.dotfiles.desktop == "sway")) {
|
||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
|
./gnome.nix
|
||||||
./greeter.nix
|
./greeter.nix
|
||||||
./input.nix
|
./input.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
./session.nix
|
|
||||||
./sound.nix
|
./sound.nix
|
||||||
|
./sway.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
console.colors = [
|
console.colors = [
|
||||||
|
@ -39,4 +40,10 @@
|
||||||
environment.systemPackages = [pkgs.xdg-utils];
|
environment.systemPackages = [pkgs.xdg-utils];
|
||||||
|
|
||||||
system.stateVersion = "22.11";
|
system.stateVersion = "22.11";
|
||||||
|
|
||||||
|
# enable yubikey u2f support
|
||||||
|
security.pam.u2f = {
|
||||||
|
enable = true;
|
||||||
|
cue = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
44
machines/common/linux/gnome.nix
Normal file
44
machines/common/linux/gnome.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf (config.dotfiles.desktop == "gnome") {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
desktopManager.gnome.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [gnomeExtensions.appindicator];
|
||||||
|
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
|
# https://github.com/NixOS/nixpkgs/blob/nixos-23.11/nixos/modules/services/x11/desktop-managers/gnome.nix#L467
|
||||||
|
environment.gnome.excludePackages = with pkgs.gnome; [
|
||||||
|
# baobab
|
||||||
|
epiphany
|
||||||
|
# gnome-calculator
|
||||||
|
gnome-calendar
|
||||||
|
gnome-characters
|
||||||
|
gnome-clocks
|
||||||
|
gnome-contacts
|
||||||
|
gnome-font-viewer
|
||||||
|
gnome-logs
|
||||||
|
gnome-maps
|
||||||
|
gnome-music
|
||||||
|
gnome-system-monitor
|
||||||
|
gnome-weather
|
||||||
|
# nautilus
|
||||||
|
pkgs.gnome-connections
|
||||||
|
# pkgs.gnome-console
|
||||||
|
pkgs.gnome-text-editor
|
||||||
|
pkgs.loupe
|
||||||
|
# pkgs.snapshot
|
||||||
|
simple-scan
|
||||||
|
totem
|
||||||
|
yelp
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -4,6 +4,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
||||||
services.greetd = {
|
services.greetd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.default_session = {
|
settings.default_session = {
|
||||||
|
@ -18,19 +19,13 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
security.pam.services.greetd = {
|
||||||
security.pam = {
|
|
||||||
u2f = {
|
|
||||||
enable = true;
|
|
||||||
cue = true;
|
|
||||||
};
|
|
||||||
services.greetd = {
|
|
||||||
enableGnomeKeyring = true;
|
enableGnomeKeyring = true;
|
||||||
u2fAuth = true;
|
u2fAuth = true;
|
||||||
};
|
};
|
||||||
};
|
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
|
|
||||||
|
# start a keyring daemon for sway
|
||||||
systemd = {
|
systemd = {
|
||||||
packages = [pkgs.polkit_gnome];
|
packages = [pkgs.polkit_gnome];
|
||||||
user.services.polkit-gnome-authentication-agent-1 = {
|
user.services.polkit-gnome-authentication-agent-1 = {
|
||||||
|
@ -49,4 +44,5 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,67 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# file management
|
|
||||||
p7zip
|
|
||||||
unzip
|
|
||||||
zip
|
|
||||||
gnome.file-roller
|
|
||||||
gnome.nautilus
|
|
||||||
gnome.sushi
|
|
||||||
|
|
||||||
# thumbnails
|
|
||||||
webp-pixbuf-loader
|
|
||||||
ffmpegthumbnailer
|
|
||||||
];
|
|
||||||
programs = {
|
|
||||||
dconf.enable = true;
|
|
||||||
noisetorch.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.sway = {
|
|
||||||
enable = true;
|
|
||||||
extraPackages = with pkgs; [
|
|
||||||
foot
|
|
||||||
swaylock-effects
|
|
||||||
swayidle
|
|
||||||
];
|
|
||||||
extraSessionCommands = ''
|
|
||||||
# session
|
|
||||||
export XDG_SESSION_TYPE=wayland
|
|
||||||
export XDG_SESSION_DESKTOP=sway
|
|
||||||
export XDG_CURRENT_DESKTOP=sway
|
|
||||||
# wayland
|
|
||||||
export NIXOS_OZONE_WL=1
|
|
||||||
export MOZ_ENABLE_WAYLAND=1
|
|
||||||
export QT_QPA_PLATFORM=wayland
|
|
||||||
export SDL_VIDEODRIVER=wayland
|
|
||||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
'';
|
|
||||||
wrapperFeatures = {
|
|
||||||
base = true;
|
|
||||||
gtk = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.dbus.packages = with pkgs; [
|
|
||||||
darkman
|
|
||||||
# gcr needed for gnome3 pinentry, managed in Home-Manager
|
|
||||||
gcr
|
|
||||||
gnome.sushi
|
|
||||||
];
|
|
||||||
xdg.portal.enable = true;
|
|
||||||
xdg.portal.wlr.enable = true;
|
|
||||||
xdg.portal.extraPortals = with pkgs; [
|
|
||||||
darkman
|
|
||||||
xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
|
|
||||||
services = {
|
|
||||||
# mounting
|
|
||||||
gvfs.enable = true;
|
|
||||||
udisks2.enable = true;
|
|
||||||
devmon.enable = true;
|
|
||||||
|
|
||||||
# thumbnails
|
|
||||||
tumbler.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{
|
||||||
security = {
|
programs.noisetorch.enable = true;
|
||||||
rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
};
|
|
||||||
services = {
|
services = {
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
76
machines/common/linux/sway.nix
Normal file
76
machines/common/linux/sway.nix
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
config = lib.mkIf (config.dotfiles.desktop == "sway") {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# file management
|
||||||
|
p7zip
|
||||||
|
unzip
|
||||||
|
zip
|
||||||
|
gnome.file-roller
|
||||||
|
gnome.nautilus
|
||||||
|
gnome.nautilus-python
|
||||||
|
gnome.sushi
|
||||||
|
nautilus-open-any-terminal
|
||||||
|
|
||||||
|
# thumbnails
|
||||||
|
webp-pixbuf-loader
|
||||||
|
ffmpegthumbnailer
|
||||||
|
];
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
environment.pathsToLink = ["/share/nautilus-python/extensions"];
|
||||||
|
environment.sessionVariables.NAUTILUS_4_EXTENSION_DIR = "${config.system.path}/lib/nautilus/extensions-4";
|
||||||
|
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
foot
|
||||||
|
swaylock-effects
|
||||||
|
swayidle
|
||||||
|
];
|
||||||
|
extraSessionCommands = ''
|
||||||
|
# session
|
||||||
|
export XDG_SESSION_TYPE=wayland
|
||||||
|
export XDG_SESSION_DESKTOP=sway
|
||||||
|
export XDG_CURRENT_DESKTOP=sway
|
||||||
|
# wayland
|
||||||
|
export NIXOS_OZONE_WL=1
|
||||||
|
export MOZ_ENABLE_WAYLAND=1
|
||||||
|
export QT_QPA_PLATFORM=wayland
|
||||||
|
export SDL_VIDEODRIVER=wayland
|
||||||
|
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||||
|
'';
|
||||||
|
wrapperFeatures = {
|
||||||
|
base = true;
|
||||||
|
gtk = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.dbus.packages = with pkgs; [
|
||||||
|
darkman
|
||||||
|
nautilus-open-any-terminal
|
||||||
|
# gcr needed for gnome3 pinentry, managed in Home-Manager
|
||||||
|
gcr
|
||||||
|
];
|
||||||
|
xdg.portal.enable = true;
|
||||||
|
xdg.portal.wlr.enable = true;
|
||||||
|
xdg.portal.extraPortals = with pkgs; [
|
||||||
|
darkman
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
# mounting
|
||||||
|
gvfs.enable = true;
|
||||||
|
udisks2.enable = true;
|
||||||
|
devmon.enable = true;
|
||||||
|
|
||||||
|
# thumbnails
|
||||||
|
tumbler.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -11,9 +11,9 @@
|
||||||
then "/home"
|
then "/home"
|
||||||
else throw "Unsupported OS";
|
else throw "Unsupported OS";
|
||||||
in {
|
in {
|
||||||
users.users."${config.lib.dotfiles.username}" =
|
users.users."${config.dotfiles.username}" =
|
||||||
{
|
{
|
||||||
home = "${homeRoot}/${config.lib.dotfiles.username}";
|
home = "${homeRoot}/${config.dotfiles.username}";
|
||||||
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"];
|
openssh.authorizedKeys.keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILm0O46zW/XfVOSwz0okRWYeOAg+wCVkCtCAoVTpZsOh"];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
virtualisation.podman.enable = true;
|
virtualisation.podman.enable = true;
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
|
|
||||||
users.users."${config.lib.dotfiles.username}".extraGroups = ["libvirtd" "transmission"];
|
users.users."${config.dotfiles.username}".extraGroups = ["libvirtd" "transmission"];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cabextract
|
cabextract
|
||||||
|
|
|
@ -47,12 +47,27 @@
|
||||||
modules = with inputs;
|
modules = with inputs;
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
config.lib.dotfiles = {inherit username;};
|
options = let
|
||||||
options.isGraphical = pkgs.lib.mkOption {
|
inherit (pkgs) lib;
|
||||||
type = pkgs.lib.types.bool;
|
in {
|
||||||
|
dotfiles = {
|
||||||
|
username = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = username;
|
||||||
|
description = "The username of the user";
|
||||||
|
};
|
||||||
|
desktop = lib.mkOption {
|
||||||
|
type = lib.types.enum ["gnome" "sway"];
|
||||||
|
default = "sway";
|
||||||
|
description = "The desktop environment to use";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
isGraphical = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
default = isGraphical;
|
default = isGraphical;
|
||||||
description = "Whether the system is a isGraphical target";
|
description = "Whether the system is a isGraphical target";
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
./common/shared
|
./common/shared
|
||||||
./common/${hostPlatform}
|
./common/${hostPlatform}
|
||||||
|
|
33
pkgs/catppuccin-gtk.nix
Normal file
33
pkgs/catppuccin-gtk.nix
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
pkgs ? import <nixpkgs> {},
|
||||||
|
accents ? ["pink"],
|
||||||
|
size ? "compact",
|
||||||
|
lightFlavor ? "latte",
|
||||||
|
darkFlavor ? "mocha",
|
||||||
|
}: let
|
||||||
|
capitalize = s: (pkgs.lib.toUpper (builtins.substring 0 1 s)) + (builtins.substring 1 (builtins.stringLength s) s);
|
||||||
|
darkName = capitalize darkFlavor;
|
||||||
|
lightName = capitalize lightFlavor;
|
||||||
|
in
|
||||||
|
pkgs.symlinkJoin {
|
||||||
|
name = "Catppuccin-Compact-Pink";
|
||||||
|
paths = [
|
||||||
|
(pkgs.catppuccin-gtk.override {
|
||||||
|
inherit accents size;
|
||||||
|
variant = darkFlavor;
|
||||||
|
})
|
||||||
|
(pkgs.catppuccin-gtk.override {
|
||||||
|
inherit accents size;
|
||||||
|
variant = lightFlavor;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
postBuild = ''
|
||||||
|
cd $out/share/themes
|
||||||
|
mv -v Catppuccin-${lightName}-Compact-Pink-Light Catppuccin-Compact-Pink
|
||||||
|
mv -v Catppuccin-${lightName}-Compact-Pink-Light-hdpi Catppuccin-Compact-Pink-hdpi
|
||||||
|
mv -v Catppuccin-${lightName}-Compact-Pink-Light-xhdpi Catppuccin-Compact-Pink-xhdpi
|
||||||
|
mv -v Catppuccin-${darkName}-Compact-Pink-Dark Catppuccin-Compact-Pink-dark
|
||||||
|
mv -v Catppuccin-${darkName}-Compact-Pink-Dark-hdpi Catppuccin-Compact-Pink-hdpi-dark
|
||||||
|
mv -v Catppuccin-${darkName}-Compact-Pink-Dark-xhdpi Catppuccin-Compact-Pink-xhdpi-dark
|
||||||
|
'';
|
||||||
|
}
|
Loading…
Reference in a new issue