Compare commits

..

9 Commits

Author SHA1 Message Date
Jan-Bulthuis 4fed3712b0 Added background module for themed backgrounds 2025-02-27 11:13:47 +01:00
Jan-Bulthuis 2aa2a5ecba Fixed the system keyring 2025-02-27 11:13:33 +01:00
Jan-Bulthuis c4326f1aba Removed the use for dbus-run-session 2025-02-27 11:13:03 +01:00
Jan-Bulthuis 8b70bcb229 Removed i3 module 2025-02-27 11:12:42 +01:00
Jan-Bulthuis d2fa73f887 Modified specialisation generation slightly 2025-02-27 11:12:24 +01:00
Jan-Bulthuis 3619713bf2 Updated nixgreety 2025-02-27 11:12:01 +01:00
Jan-Bulthuis a61d63ff2c Fixed systemwide config 2025-02-27 11:11:52 +01:00
Jan-Bulthuis 8ca41a3a46 Enabled rtkit 2025-02-27 11:10:45 +01:00
Jan-Bulthuis 00ce18733e Removed wpa_supplicant line from laptop config 2025-02-27 11:10:14 +01:00
14 changed files with 333 additions and 243 deletions

View File

@ -19,7 +19,6 @@
bluetooth.enable = true; bluetooth.enable = true;
power-saving.enable = false; power-saving.enable = false;
networkmanager.enable = true; networkmanager.enable = true;
# wpa_supplicant.enable = true;
}; };
# Hardware configuration # Hardware configuration

View File

@ -97,6 +97,7 @@ in
to = 11000; to = 11000;
} }
]; ];
security.rtkit.enable = true;
# TODO: Move to USB module # TODO: Move to USB module
# services.gvfs.enable = true; # services.gvfs.enable = true;

View File

@ -25,12 +25,13 @@ let
mkIf mkIf
(any ( (any (
user: user:
(user.modules.${name}.enable (
or (any (specialisation: specialisation.configuration.modules.${name}.enable) ( config.home-manager.users.${user}.modules.${name}.enable
attrValues user.modules.${name}.specialisations || (any (specialisation: specialisation.configuration.modules.${name}.enable) (
attrValues config.home-manager.users.${user}.specialisation
)) ))
) )
) (attrValues config.home-manager.users)) ) (attrNames config.home-manager.users))
(if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; })); (if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; }));
}; };

View File

@ -9,8 +9,8 @@ rustPlatform.buildRustPackage {
domain = "git.bulthuis.dev"; domain = "git.bulthuis.dev";
owner = "Jan"; owner = "Jan";
repo = "nixgreety"; repo = "nixgreety";
rev = "4b5f812e95f6359ce61aef685005dc4013f0fb5f"; rev = "c7278a910a0238a53f23fe9a0ae881802a4bcb31";
hash = "sha256-/eikqX/2byDi04v1XvsBVva1Vs7OGLl/cC/Vrq+QF9A="; hash = "sha256-kZB+iEFIDJ8pOJetu4Isu4oaktgIn14D4PcpDXLOXA8=";
}; };
cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA="; cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA=";

View File

@ -14,7 +14,6 @@ in
# Import desktop environment modules # Import desktop environment modules
./bar/waybar.nix ./bar/waybar.nix
./lock-screen/waylock.nix ./lock-screen/waylock.nix
./window-manager/i3.nix
./window-manager/river.nix ./window-manager/river.nix
]; ];

View File

@ -1,27 +0,0 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.i3;
in
{
options.modules.i3.enable = lib.mkEnableOption "i3";
config = lib.mkIf cfg.enable {
# Set desktop type to x11
# modules.desktop.x11 = true;
modules.rofi.enable = true;
desktop.initScript = ''
i3
'';
xsession.windowManager.i3 = {
enable = true;
};
};
}

View File

@ -33,7 +33,7 @@ in
# Change desktop to execute river # Change desktop to execute river
desktop.initScript = '' desktop.initScript = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.river}/bin/river ${pkgs.river}/bin/river
''; '';
desktop.session.type = "wayland"; desktop.session.type = "wayland";
@ -65,7 +65,7 @@ in
wayland.windowManager.river = { wayland.windowManager.river = {
enable = true; enable = true;
xwayland.enable = false; xwayland.enable = false;
systemd.enable = false; systemd.enable = true;
settings = settings =
let let
layout = "filtile"; layout = "filtile";
@ -120,6 +120,9 @@ in
# TODO: Generic background options # TODO: Generic background options
# "\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\"" # "\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
"udiskie" "udiskie"
# TODO: Should this be part of the keyring configuration directly?
# "\"gnome-keyring-daemon --replace --components=pkcs11,secrets,ssh\""
"wpaperd"
]; ];
map = ( map = (
lib.attrsets.recursiveUpdate lib.attrsets.recursiveUpdate

View File

@ -34,9 +34,11 @@ let
}; };
}; };
customBuilder = config: { customBuilder =
configuration = recursiveUpdate { desktop.name = config.name; } config.extraConfig; config:
}; recursiveUpdate {
desktop.name = config.name;
} config.extraConfig;
# Environment builders # Environment builders
environmentBuilders = { environmentBuilders = {
@ -89,9 +91,9 @@ in
}; };
config = { config = {
specialisation = mapAttrs ( specialisation = mapAttrs (name: value: {
name: value: (environmentBuilders."${value.type}" value) configuration = (environmentBuilders."${value.type}" value);
) cfg.environments; }) cfg.environments;
# Create session files # Create session files
home.extraBuilderCommands = '' home.extraBuilderCommands = ''

View File

@ -5,17 +5,4 @@
river = { river = {
programs.river.enable = true; programs.river.enable = true;
}; };
i3 = {
services.xserver = {
layout = "us";
xkbVariant = "";
enable = true;
desktopManager = {
xterm.enable = true;
xfce = {
enable = true;
};
};
};
};
} }

View File

@ -0,0 +1,119 @@
{
config,
pkgs,
lib,
...
}:
with lib;
let
cfg = config.desktop.theming.background;
in
{
options.desktop.theming.background = {
path = mkOption {
type = types.str;
# default = "minimal/a_cat_in_a_cup.png";
default = "minimal/a_flower_on_a_dark_background.png";
description = "Path to the background image.";
};
themed = mkEnableOption "themed background";
invert = mkEnableOption "invert background";
src = mkOption {
default = pkgs.fetchFromGitHub {
owner = "dharmx";
repo = "walls";
rev = "6bf4d733ebf2b484a37c17d742eb47e5139e6a14";
sha256 = "sha256-M96jJy3L0a+VkJ+DcbtrRAquwDWaIG9hAUxenr/TcQU=";
};
};
};
config =
with pkgs;
let
theme = writeTextFile {
name = "gowall-theme";
text = builtins.toJSON {
name = "NixOS";
colors =
let
colors = config.desktop.theming.schemeColors;
in
[
"#${colors.base00}"
"#${colors.base01}"
"#${colors.base02}"
"#${colors.base03}"
"#${colors.base04}"
"#${colors.base05}"
"#${colors.base06}"
"#${colors.base07}"
"#${colors.base08}"
"#${colors.base09}"
"#${colors.base0A}"
"#${colors.base0B}"
"#${colors.base0C}"
"#${colors.base0D}"
"#${colors.base0E}"
"#${colors.base0F}"
];
};
executable = true;
};
background-themed = stdenv.mkDerivation {
name = "background-themed-1.0.0";
src = cfg.src;
buildInputs = [
gowall
imagemagick
(writeShellScriptBin "xdg-open" "")
];
buildPhase =
if cfg.themed then
if cfg.invert then
''
cp ${theme} ./theme.json
export HOME=$PWD
convert ./${cfg.path} -channel RGB -negate ./${cfg.path}
gowall convert ./${cfg.path} -o themed -t ./theme.json
mv Pictures/gowall/themed.* ./
mogrify -format png themed.*
''
else
''
cp ${theme} ./theme.json
export HOME=$PWD
gowall convert ./${cfg.path} -o themed -t ./theme.json
mv Pictures/gowall/themed.* ./
mogrify -format png themed.*
''
else
''
cp ${cfg.path} ./themed
mogrify -format png themed
'';
installPhase = ''
install -Dm644 -t $out themed.png
'';
};
in
{
programs.wpaperd = {
enable = true;
settings.default = {
path = "${background-themed}/";
mode = "center";
};
};
};
}

View File

@ -90,6 +90,8 @@ let
in in
{ {
imports = [ imports = [
./background.nix
# Import all themes # Import all themes
./themes/catppuccin.nix ./themes/catppuccin.nix
./themes/gruvbox.nix ./themes/gruvbox.nix

View File

@ -15,9 +15,9 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# Development packages
home.packages = with pkgs; [ home.packages = with pkgs; [
seahorse seahorse
]; ];
services.gnome-keyring.enable = true;
}; };
} }

View File

@ -1,7 +1,7 @@
{ {
keyring = { keyring = {
services.gnome.gnome-keyring = { services.gnome.gnome-keyring.enable = true;
enable = true; security.pam.services.greetd.enableGnomeKeyring = true;
}; security.pam.services.login.enableGnomeKeyring = true;
}; };
} }

View File

@ -23,8 +23,10 @@
freecad-wayland freecad-wayland
inkscape inkscape
ente-auth ente-auth
bitwarden
]; ];
# desktop.development = "river-light";
desktop.environments = { desktop.environments = {
river-dark = { river-dark = {
name = "River Dark"; name = "River Dark";
@ -57,6 +59,12 @@
}; };
# Color scheme # Color scheme
desktop.theming.background = {
# path = "unsorted/a_group_of_mountains_with_a_building_in_the_background.jpg";
path = "anime/a_colorful_buildings_with_power_lines.jpg";
themed = true;
invert = false;
};
desktop.theming.themes.catppuccin = { desktop.theming.themes.catppuccin = {
enable = true; enable = true;
flavor = "mocha"; flavor = "mocha";
@ -94,186 +102,198 @@
}; };
# Color scheme # Color scheme
desktop.theming.background = {
# path = "unsorted/a_group_of_mountains_with_a_building_in_the_background.jpg";
path = "anime/a_cartoon_of_a_street_with_buildings.jpeg";
themed = true;
invert = false;
};
desktop.theming.themes.catppuccin = { desktop.theming.themes.catppuccin = {
enable = true; enable = true;
flavor = lib.mkForce "latte"; flavor = lib.mkForce "latte";
}; };
}; };
}; };
cosmic = { # cosmic = {
name = "Cosmic"; # name = "Cosmic";
type = "custom"; # type = "custom";
config = { }; # config = { };
extraConfig = { # extraConfig = {
desktop = { # desktop = {
initScript = '' # initScript = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.cosmic-session}/bin/cosmic-session # ${pkgs.cosmic-session}/bin/cosmic-session
''; # '';
session = { # session = {
type = "wayland"; # type = "wayland";
desktop = "cosmic"; # desktop = "cosmic";
}; # };
}; # };
home.packages = with pkgs; [ # # TODO: Remove everything below, it is here out of convenience and should be elsewhere
adwaita-icon-theme # xdg.portal = {
alsa-utils # enable = true;
cosmic-applets
cosmic-applibrary
cosmic-bg
(cosmic-comp.override {
useXWayland = false;
})
cosmic-edit
cosmic-files
cosmic-greeter
cosmic-icons
cosmic-idle
cosmic-launcher
cosmic-notifications
cosmic-osd
cosmic-panel
cosmic-player
cosmic-randr
cosmic-screenshot
cosmic-session
cosmic-settings
cosmic-settings-daemon
cosmic-term
cosmic-wallpapers
cosmic-workspaces-epoch
hicolor-icon-theme
playerctl
pop-icon-theme
pop-launcher
xdg-user-dirs
xwayland
cosmic-store
# Fonts # config.common.default = [
fira # "cosmic"
noto-fonts # "gtk"
open-sans # ];
];
xdg.portal = { # extraPortals = with pkgs; [
enable = true; # xdg-desktop-portal-cosmic
extraPortals = with pkgs; [ # xdg-desktop-portal-gtk
xdg-desktop-portal-cosmic # ];
xdg-desktop-portal-gtk
];
configPackages = lib.mkDefault (with pkgs; [ xdg-desktop-portal-cosmic ]);
};
}; # configPackages = lib.mkDefault (with pkgs; [ xdg-desktop-portal-cosmic ]);
}; # };
gnome = { # home.packages = with pkgs; [
name = "Gnome"; # adwaita-icon-theme
type = "custom"; # alsa-utils
config = { }; # cosmic-applets
extraConfig = { # cosmic-applibrary
programs = { # cosmic-bg
gnome-shell.enable = true; # (cosmic-comp.override {
}; # useXWayland = false;
desktop = { # })
initScript = '' # cosmic-edit
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome-session}/bin/gnome-session # cosmic-files
''; # cosmic-greeter
session = { # cosmic-icons
type = "wayland"; # cosmic-idle
desktop = "GNOME"; # cosmic-launcher
}; # cosmic-notifications
}; # cosmic-osd
home.packages = [ # cosmic-panel
# Core utilities # cosmic-player
pkgs.baobab # cosmic-randr
pkgs.epiphany # cosmic-screenshot
pkgs.gnome-text-editor # cosmic-session
pkgs.gnome-calculator # cosmic-settings
pkgs.gnome-calendar # cosmic-settings-daemon
pkgs.gnome-characters # cosmic-term
pkgs.gnome-clocks # cosmic-wallpapers
pkgs.gnome-console # cosmic-workspaces-epoch
pkgs.gnome-contacts # hicolor-icon-theme
pkgs.gnome-font-viewer # playerctl
pkgs.gnome-logs # pop-icon-theme
pkgs.gnome-maps # pop-launcher
pkgs.gnome-music # xdg-user-dirs
pkgs.gnome-system-monitor # xwayland
pkgs.gnome-weather # cosmic-store
pkgs.loupe
pkgs.nautilus
pkgs.gnome-connections
pkgs.simple-scan
pkgs.snapshot
pkgs.totem
pkgs.yelp
# Optional packages # # Fonts
pkgs.adwaita-icon-theme # fira
pkgs.gnome-backgrounds # noto-fonts
pkgs.gnome-bluetooth # open-sans
pkgs.gnome-color-manager # ];
pkgs.gnome-control-center # };
pkgs.gnome-shell-extensions # };
pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in. # gnome = {
pkgs.gnome-user-docs # name = "Gnome";
pkgs.glib # for gsettings program # type = "custom";
pkgs.gnome-menus # config = { };
pkgs.gtk3.out # for gtk-launch program # extraConfig = {
pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/ # programs = {
pkgs.xdg-user-dirs-gtk # Used to create the default bookmarks # gnome-shell.enable = true;
# };
# desktop = {
# initScript = ''
# ${pkgs.gnome-session}/bin/gnome-session
# '';
# session = {
# type = "wayland";
# desktop = "GNOME";
# };
# };
# Games # # TODO: Remove everything below, it is here out of convenience and should be elsewhere
pkgs.aisleriot # xdg.portal = {
pkgs.atomix # enable = true;
pkgs.five-or-more
pkgs.four-in-a-row
pkgs.gnome-2048
pkgs.gnome-chess
pkgs.gnome-klotski
pkgs.gnome-mahjongg
pkgs.gnome-mines
pkgs.gnome-nibbles
pkgs.gnome-robots
pkgs.gnome-sudoku
pkgs.gnome-taquin
pkgs.gnome-tetravex
pkgs.hitori
pkgs.iagno
pkgs.lightsoff
pkgs.quadrapassel
pkgs.swell-foop
pkgs.tali
# Fonts # config.common.default = [
pkgs.cantarell-fonts # "gnome"
pkgs.dejavu_fonts # "gtk"
pkgs.source-code-pro # Default monospace font in 3.32 # ];
pkgs.source-sans
# Other stuff # extraPortals = with pkgs; [
pkgs.gnome-session # xdg-desktop-portal-gnome
# pkgs.gnome-session.sessions # xdg-desktop-portal-gtk
]; # ];
}; # };
}; # home.packages = [
# # Core utilities
# pkgs.baobab
# pkgs.epiphany
# pkgs.gnome-text-editor
# pkgs.gnome-calculator
# pkgs.gnome-calendar
# pkgs.gnome-characters
# pkgs.gnome-clocks
# pkgs.gnome-console
# pkgs.gnome-contacts
# pkgs.gnome-font-viewer
# pkgs.gnome-logs
# pkgs.gnome-maps
# pkgs.gnome-music
# pkgs.gnome-system-monitor
# pkgs.gnome-weather
# pkgs.loupe
# pkgs.nautilus
# pkgs.gnome-connections
# pkgs.simple-scan
# pkgs.snapshot
# pkgs.totem
# pkgs.yelp
# # Optional packages
# pkgs.adwaita-icon-theme
# pkgs.gnome-backgrounds
# pkgs.gnome-bluetooth
# pkgs.gnome-color-manager
# pkgs.gnome-control-center
# pkgs.gnome-shell-extensions
# pkgs.gnome-tour # GNOME Shell detects the .desktop file on first log-in.
# pkgs.gnome-user-docs
# pkgs.glib # for gsettings program
# pkgs.gnome-menus
# pkgs.gtk3.out # for gtk-launch program
# pkgs.xdg-user-dirs # Update user dirs as described in https://freedesktop.org/wiki/Software/xdg-user-dirs/
# pkgs.xdg-user-dirs-gtk # Used to create the default bookmarks
# # Games
# pkgs.aisleriot
# pkgs.atomix
# pkgs.five-or-more
# pkgs.four-in-a-row
# pkgs.gnome-2048
# pkgs.gnome-chess
# pkgs.gnome-klotski
# pkgs.gnome-mahjongg
# pkgs.gnome-mines
# pkgs.gnome-nibbles
# pkgs.gnome-robots
# pkgs.gnome-sudoku
# pkgs.gnome-taquin
# pkgs.gnome-tetravex
# pkgs.hitori
# pkgs.iagno
# pkgs.lightsoff
# pkgs.quadrapassel
# pkgs.swell-foop
# pkgs.tali
# # Fonts
# pkgs.cantarell-fonts
# pkgs.dejavu_fonts
# pkgs.source-code-pro # Default monospace font in 3.32
# pkgs.source-sans
# # Other stuff
# pkgs.gnome-session
# # pkgs.gnome-session.sessions
# ];
# };
# };
}; };
# Desktop environments
# desktop.environments =
# let
# in
# [
# {
# name = "river";
# type = "custom";
# config = { };
# extraConfig = {
# home.packages = with pkgs; [ cowsay ];
# };
# }
# ];
# Enabled modules # Enabled modules
modules = { modules = {
# Communication # Communication
@ -283,11 +303,11 @@
# Browser # Browser
firefox = { firefox = {
enable = true; enable = true;
default = true; default = false;
}; };
qutebrowser = { qutebrowser = {
enable = true; enable = true;
default = false; default = true;
}; };
# Gaming # Gaming
@ -365,21 +385,5 @@
flavor = "mocha"; flavor = "mocha";
}; };
}; };
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
xdg.portal = {
enable = true;
config.common.default = [
"wlr"
"gtk"
];
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
}; };
} }