Compare commits

...

15 Commits

Author SHA1 Message Date
Jan-Bulthuis b5b5063065 Set up desktop environments 2025-02-23 14:53:11 +01:00
Jan-Bulthuis 1d5233512b Added cosmic desktop flake 2025-02-23 14:53:00 +01:00
Jan-Bulthuis 8858b2967c Pinned es-de reference to nixpkgs-stable 2025-02-23 14:52:46 +01:00
Jan-Bulthuis 8f2708d137 Removed unnecessary imports 2025-02-23 14:52:28 +01:00
Jan-Bulthuis f224a5efa7 Set default terminal 2025-02-23 14:52:07 +01:00
Jan-Bulthuis 63093d8a87 Progress on desktop system, added integration with nixgreety 2025-02-23 14:51:56 +01:00
Jan-Bulthuis 86b8a5571b Switched to nixgreety for greeter 2025-02-23 14:51:07 +01:00
Jan-Bulthuis 4775dac377 Added nixgreety module 2025-02-23 14:50:51 +01:00
Jan-Bulthuis 839df21c46 Added nixgreety package 2025-02-23 14:50:14 +01:00
Jan-Bulthuis 539b63cc1c Removed debug info from dina-psfu 2025-02-23 14:49:55 +01:00
Jan-Bulthuis b62640e1df Moved pipewire to base 2025-02-23 14:49:36 +01:00
Jan-Bulthuis ef385b01e8 Updated systemwide to look into specialisations 2025-02-23 14:48:54 +01:00
Jan-Bulthuis f7ea0d0c11 Added swap file 2025-02-23 14:48:32 +01:00
Jan-Bulthuis 77fc328c84 Moved desktop config 2025-02-17 15:38:32 +01:00
Jan-Bulthuis a68f032fee Moved theming modules 2025-02-17 15:06:20 +01:00
54 changed files with 603 additions and 119 deletions

View File

@ -121,6 +121,22 @@
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1717312683,
"narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=",
"owner": "nix-community",
"repo": "flake-compat",
"rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
@ -134,7 +150,7 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_3": {
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1733328505,
@ -510,7 +526,59 @@
"type": "gitlab"
}
},
"nixos-cosmic": {
"inputs": {
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1740267801,
"narHash": "sha256-ckbjP4UON7juVdSsYDpu9vFGRtdS2JvUDRHKq0SQwuA=",
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"rev": "80952def5b97be37f69a9774163911b47980623a",
"type": "github"
},
"original": {
"owner": "lilyinstarlight",
"repo": "nixos-cosmic",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1739866667,
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1739923778,
"narHash": "sha256-BqUY8tz0AQ4to2Z4+uaKczh81zsGZSYxjgvtw+fvIfM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "36864ed72f234b9540da4cf7a0c49e351d30d3f1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1739698114,
"narHash": "sha256-8S9n69Dnpg8DhfFlP0YvMGmSOY2X4kImGSPWXYNpaHM=",
@ -526,7 +594,7 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1738797219,
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
@ -542,7 +610,7 @@
"type": "github"
}
},
"nixpkgs_3": {
"nixpkgs_4": {
"locked": {
"lastModified": 1736798957,
"narHash": "sha256-qwpCtZhSsSNQtK4xYGzMiyEDhkNzOCz/Vfu4oL2ETsQ=",
@ -561,12 +629,12 @@
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-parts": "flake-parts",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2",
"nixpkgs": "nixpkgs_3",
"nuschtosSearch": "nuschtosSearch",
"treefmt-nix": "treefmt-nix"
},
@ -634,7 +702,8 @@
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nix-matlab": "nix-matlab",
"nixpkgs": "nixpkgs",
"nixos-cosmic": "nixos-cosmic",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim",
"nur": "nur",
"stylix": "stylix"
@ -647,12 +716,12 @@
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"firefox-gnome-theme": "firefox-gnome-theme",
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"flake-utils": "flake-utils_3",
"git-hooks": "git-hooks_2",
"gnome-shell": "gnome-shell",
"home-manager": "home-manager_3",
"nixpkgs": "nixpkgs_3",
"nixpkgs": "nixpkgs_4",
"systems": "systems_3",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",

View File

@ -18,6 +18,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
};
outputs =
@ -29,6 +30,7 @@
nixvim,
nur,
nix-matlab,
nixos-cosmic,
...
}:
let
@ -41,6 +43,10 @@
machineConfig
home-manager.nixosModules.home-manager
{
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
};
machine.users = userConfig;
home-manager.extraSpecialArgs = { inherit system; };
home-manager.sharedModules = [
@ -50,6 +56,7 @@
{
nixpkgs.overlays = [
nix-matlab.overlay
nixos-cosmic.overlays.default
];
}
];

View File

@ -18,7 +18,6 @@
base.enable = true;
bluetooth.enable = true;
power-saving.enable = false;
pipewire.enable = true;
networkmanager.enable = true;
# wpa_supplicant.enable = true;
};
@ -35,7 +34,6 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
swapDevices = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
@ -52,5 +50,13 @@
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
};
}

View File

@ -61,7 +61,8 @@ in
fontconfig.enable = true;
neovim.enable = true;
systemd-boot.enable = true;
ly.enable = true;
nixgreety.enable = true;
pipewire.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere

View File

@ -18,6 +18,7 @@ with lib;
./fontconfig/default.nix
./graphics/default.nix
./greeter/greetd/default.nix
./greeter/greetd/nixgreety.nix
./greeter/greetd/tuigreet.nix
./greeter/ly/default.nix
./locale/default.nix

View File

@ -24,7 +24,7 @@ in
enable = true;
settings.default_session = {
command = cfg.command;
user = "greeter";
user = mkDefault "greeter";
};
};
};

View File

@ -0,0 +1,30 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.modules.nixgreety;
in
{
options.modules.nixgreety = {
enable = mkEnableOption "nixgreety";
};
config = mkIf cfg.enable {
# Enable greetd
modules.greetd = {
enable = true;
command = "${pkgs.nixgreety}/bin/nixgreety";
};
services.greetd.settings.default_session.user = "root";
environment.systemPackages = with pkgs; [
nixgreety
];
};
}

View File

@ -21,9 +21,17 @@ let
name: moduleConfig:
{ pkgs, ... }:
{
config = mkIf (any (user: user.modules.${name}.enable) (attrValues config.home-manager.users)) (
if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; })
);
config =
mkIf
(any (
user:
(user.modules.${name}.enable
or (any (specialisation: specialisation.configuration.modules.${name}.enable) (
attrValues user.modules.${name}.specialisations
))
)
) (attrValues config.home-manager.users))
(if (isAttrs moduleConfig) then moduleConfig else (moduleConfig { inherit config pkgs; }));
};
imports = map (name: mkModule name moduleConfig."${name}") moduleNames;

View File

@ -10,6 +10,7 @@ let
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = prev.callPackage ./fonts/wqy-bitmapsong.nix { };
nixgreety = prev.callPackage ./programs/nixgreety.nix { };
# ly = prev.callPackage ./programs/ly/default.nix { };
};
in

View File

@ -68,8 +68,6 @@ pkgs.stdenv.mkDerivation {
'';
installPhase = ''
install -Dm644 -t $out/debug ./*.*
install -Dm644 -t $out/debug/BDF ./BDF/*.*
install -Dm644 -t $out/share/consolefonts dina.psfu
'';
}

View File

@ -0,0 +1,19 @@
{ pkgs, ... }:
with pkgs;
rustPlatform.buildRustPackage {
pname = "nixgreety";
version = "master";
src = fetchFromGitea {
domain = "git.bulthuis.dev";
owner = "Jan";
repo = "nixgreety";
rev = "4b5f812e95f6359ce61aef685005dc4013f0fb5f";
hash = "sha256-/eikqX/2byDi04v1XvsBVva1Vs7OGLl/cC/Vrq+QF9A=";
};
cargoHash = "sha256-pklKVzYoChRqPZ/D3BsMGnaBFd615TKbvoAy7iU8UtA=";
useFetchCargoVendor = true;
}

View File

@ -50,14 +50,14 @@ in
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
tridactyl # TODO: Add toggle for this extension?
# tridactyl # TODO: Add toggle for this extension?
];
# Theming
userChrome = readFile (
pkgs.substituteAll {
src = ./userChrome.css;
colors = config.theming.colorsCSS;
colors = config.desktop.theming.colorsCSS;
}
);

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.qutebrowser;
theme = config.theming;
theme = config.desktop.theming;
in
{
options.modules.qutebrowser = {

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.btop;
colors = config.theming.schemeColors;
colors = config.desktop.theming.schemeColors;
in
{
options.modules.btop = {

View File

@ -29,7 +29,6 @@
./spotify/default.nix
./terminal/default.nix
./terminal/foot/default.nix
./theming/default.nix
./vscode/default.nix
./whatsapp/default.nix
./winbox/default.nix

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.waybar;
theme = config.theming;
theme = config.desktop.theming;
colors = theme.colors;
in
{
@ -32,6 +32,7 @@ in
programs.waybar = {
enable = true;
systemd.enable = false;
settings = {
mainBar = {
layer = "top";

View File

@ -20,12 +20,6 @@ in
options.modules.desktop = {
wayland = mkEnableOption "wayland";
# TODO: Remove, not needed with session/display manager
initScript = mkOption {
type = types.lines;
default = "${pkgs.bash}/bin/bash";
description = "Bash script to execute after logging in.";
};
# TODO: Find a nicer way to do this as this is also executed on startup
reloadScript = mkOption {
type = types.lines;
@ -69,16 +63,16 @@ in
);
};
home.file.".initrc" = {
enable = true;
executable = true;
text =
''
#!${pkgs.bash}/bin/bash
# home.file.".initrc" = {
# enable = true;
# executable = true;
# text =
# ''
# #!${pkgs.bash}/bin/bash
''
+ cfg.initScript;
};
# ''
# + cfg.initScript;
# };
}
(
# TODO: Move to dedicated module within desktop or maybe theming?

View File

@ -16,7 +16,7 @@ in
# modules.desktop.x11 = true;
modules.rofi.enable = true;
modules.desktop.initScript = ''
desktop.initScript = ''
i3
'';

View File

@ -32,10 +32,13 @@ in
];
# Change desktop to execute river
modules.desktop.initScript = ''
river
desktop.initScript = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.river}/bin/river
'';
desktop.session.type = "wayland";
desktop.session.desktop = "river";
# TODO: Fix this
# modules.desktop.reloadScript = ''
# ${pkgs.river}/bin/riverctl background-color 0x${config.theming.colors.bg}
@ -62,10 +65,11 @@ in
wayland.windowManager.river = {
enable = true;
xwayland.enable = false;
systemd.enable = false;
settings =
let
layout = "filtile";
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding} -main-ratio 0.5";
layoutOptions = "-outer-padding ${toString config.desktop.theming.layout.windowPadding} -view-padding ${toString config.desktop.theming.layout.windowPadding} -main-ratio 0.5";
modes = [
"normal"
"locked"
@ -83,7 +87,7 @@ in
];
waylockOptions = "-init-color 0x${colors.bg} -input-color 0x${colors.border-focused} -fail-color 0x${colors.bg}";
colors = config.theming.colors;
colors = config.desktop.theming.colors;
# Quick pow function
pow2 = power: if power != 0 then 2 * (pow2 (power - 1)) else 1;
@ -103,7 +107,7 @@ in
xcursor-theme = "BreezeX-RosePine-Linux 24";
keyboard-layout = "-options \"caps:escape\" us";
border-width = toString config.theming.layout.borderSize;
border-width = toString config.desktop.theming.layout.borderSize;
background-color = "0x${colors.bg}";
border-color-focused = "0x${colors.fg}";
border-color-unfocused = "0x${colors.border-unfocused}"; # TODO: Change to use named color;

View File

@ -1,5 +1,124 @@
{ ... }:
{
imports = [ ./custom/default.nix ];
lib,
config,
pkgs,
...
}:
with lib;
let
# Desktop configuration module
desktopConfigurationModule = types.submodule {
options = {
name = mkOption {
type = types.str;
description = "Desktop environment name.";
};
type = mkOption {
type = types.enum [
"custom"
"gnome"
];
description = "Desktop environment type.";
};
config = mkOption {
type = types.attrs;
default = { };
description = "Desktop environment configuration";
};
extraConfig = mkOption {
type = types.attrs;
default = { };
description = "Extra configuration for the configured desktop environment";
};
};
};
customBuilder = config: {
configuration = recursiveUpdate { desktop.name = config.name; } config.extraConfig;
};
# Environment builders
environmentBuilders = {
custom = customBuilder;
};
cfg = config.desktop;
in
{
imports = [
./custom/default.nix
./theming/default.nix
];
options.desktop = {
name = mkOption {
type = types.str;
default = "Shell";
description = "Desktop configuration name.";
};
initScript = mkOption {
type = types.lines;
default = ''
${pkgs.ncurses}/bin/clear
${pkgs.bashInteractive}/bin/bash
'';
description = "Bash script to execute after logging in.";
};
session = {
type = mkOption {
type = types.enum [
"wayland"
"x11"
"tty"
];
default = "tty";
description = "Session type.";
};
desktop = mkOption {
type = types.str;
default = "tty";
description = "Desktop environment name.";
};
};
environments = mkOption {
type = types.attrsOf desktopConfigurationModule;
default = { };
description = "Desktop environments. Every environment will be built as a specialization.";
};
};
config = {
specialisation = mapAttrs (
name: value: (environmentBuilders."${value.type}" value)
) cfg.environments;
# Create session files
home.extraBuilderCommands = ''
mkdir $out/session
echo "${cfg.name}" > $out/session/name
ln -s ${
pkgs.writeTextFile {
name = "desktop-init";
text =
''
#!${pkgs.bash}/bin/bash
''
+ cfg.initScript;
executable = true;
}
} $out/session/init
ln -s ${
pkgs.writeTextFile {
name = "session-env";
text = ''
XDG_SESSION_TYPE=${cfg.session.type}
XDG_CURRENT_DESKTOP=${cfg.session.desktop}
XDG_SESSION_DESKTOP=${cfg.session.desktop}
'';
}
} $out/session/env
'';
};
}

View File

@ -10,7 +10,6 @@
layout = "us";
xkbVariant = "";
enable = true;
windowManager.i3.enable = true;
desktopManager = {
xterm.enable = true;
xfce = {

View File

@ -7,7 +7,7 @@
with lib;
let
cfg = config.theming;
cfg = config.desktop.theming;
# Font module type
fontModule = types.submodule {
@ -99,11 +99,9 @@ in
./themes/nord.nix
];
options.modules.theming.enable = mkEnableOption "theming";
options.theming =
options.desktop.theming =
let
colors = config.theming.schemeColors;
colors = config.desktop.theming.schemeColors;
in
{
darkMode = mkOption {
@ -250,7 +248,7 @@ in
};
};
config = mkIf config.modules.theming.enable {
config = {
# Enable fontconfig
modules.fontconfig.enable = true;

View File

@ -7,11 +7,11 @@
with lib;
let
cfg = config.theming.themes.catppuccin;
cfg = config.desktop.theming.themes.catppuccin;
in
{
options = {
theming.themes.catppuccin = {
desktop.theming.themes.catppuccin = {
enable = mkEnableOption "catppuccin";
flavor = mkOption {
type = types.enum [
@ -26,7 +26,7 @@ in
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = (cfg.flavor != "latte");
colorScheme = "${pkgs.base16-schemes}/share/themes/catppuccin-${cfg.flavor}.yaml";
};

View File

@ -7,12 +7,12 @@
with lib;
let
cfg = config.theming.themes.gruvbox;
cfg = config.desktop.theming.themes.gruvbox;
mode = if cfg.darkMode then "dark" else "light";
in
{
options = {
theming.themes.gruvbox = {
desktop.theming.themes.gruvbox = {
enable = mkEnableOption "gruvbox-hard";
darkMode = mkEnableOption "dark mode";
contrast = mkOption {
@ -27,7 +27,7 @@ in
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/gruvbox-${mode}-${cfg.contrast}.yaml";
};

View File

@ -7,18 +7,18 @@
with lib;
let
cfg = config.theming.themes.nord;
cfg = config.desktop.theming.themes.nord;
mode = if cfg.darkMode then "" else "-light";
in
{
options = {
theming.themes.nord = {
desktop.theming.themes.nord = {
enable = mkEnableOption "nord";
darkMode = mkEnableOption "dark mode";
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/nord${mode}.yaml";
};

View File

@ -7,18 +7,18 @@
with lib;
let
cfg = config.theming.themes.oxocarbon;
cfg = config.desktop.theming.themes.oxocarbon;
mode = if cfg.darkMode then "dark" else "light";
in
{
options = {
theming.themes.oxocarbon = {
desktop.theming.themes.oxocarbon = {
enable = mkEnableOption "oxocarbon";
darkMode = mkEnableOption "dark mode";
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/oxocarbon-${mode}.yaml";
};

View File

@ -7,18 +7,18 @@
with lib;
let
cfg = config.theming.themes.papercolor;
cfg = config.desktop.theming.themes.papercolor;
mode = if cfg.darkMode then "dark" else "light";
in
{
options = {
theming.themes.papercolor = {
desktop.theming.themes.papercolor = {
enable = mkEnableOption "papercolor";
darkMode = mkEnableOption "dark mode";
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = cfg.darkMode;
colorScheme = "${pkgs.base16-schemes}/share/themes/papercolor-${mode}.yaml";
};

View File

@ -7,16 +7,16 @@
with lib;
let
cfg = config.theming.themes.sakura;
cfg = config.desktop.theming.themes.sakura;
in
{
options = {
theming.themes.sakura = {
desktop.theming.themes.sakura = {
enable = mkEnableOption "sakura";
};
};
config.theming = mkIf cfg.enable {
config.desktop.theming = mkIf cfg.enable {
darkMode = false;
colorScheme = "${pkgs.base16-schemes}/share/themes/sakura.yaml";
};

View File

@ -21,7 +21,9 @@ let
'';
configContent = concatStrings (
map (font: aliasConfig config.theming.fonts.pkgs.${font}) config.theming.fonts.installed
map (
font: aliasConfig config.desktop.theming.fonts.pkgs.${font}
) config.desktop.theming.fonts.installed
);
in
{
@ -34,10 +36,10 @@ in
enable = true;
defaultFonts = {
serif = [ config.theming.fonts.serif.name ];
sansSerif = [ config.theming.fonts.sansSerif.name ];
monospace = [ config.theming.fonts.monospace.name ];
emoji = [ config.theming.fonts.emoji.name ];
serif = [ config.desktop.theming.fonts.serif.name ];
sansSerif = [ config.desktop.theming.fonts.sansSerif.name ];
monospace = [ config.desktop.theming.fonts.monospace.name ];
emoji = [ config.desktop.theming.fonts.emoji.name ];
};
};

View File

@ -30,11 +30,12 @@ in
];
# TODO: Remove once emulationstation-de fixes the issue
# TODO: If not fixed, at least pin the specific commit properly
nixpkgs.overlays =
let
pkgs-stable = import (fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/nixos-24.11.tar.gz";
sha256 = "0pbvwix9vjkdan1nxxzqfg2yap28afqf8m2nlw1xkqp5c832bkkz";
sha256 = "1wr1xzkw7v8biqqjcr867gbpqf3kibkgly36lcnhw0glvkr1i986";
}) { inherit system; };
in
[

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.mako;
theme = config.theming;
theme = config.desktop.theming;
colors = theme.colors;
in
{

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.neovim;
theme = config.theming;
theme = config.desktop.theming;
colors = theme.colors;
in
{

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.rofi;
theme = config.theming;
theme = config.desktop.theming;
colors = theme.colors;
in
{

View File

@ -1,7 +1,6 @@
{
lib,
config,
pkgs,
...
}:

View File

@ -1,7 +1,5 @@
{
pkgs,
lib,
config,
...
}:

View File

@ -9,6 +9,9 @@ with lib;
{
options.default.terminal = mkOption {
type = types.str;
# TODO: Make sure everything works even without a default value here
# Maybe make sure most gui applications do not exist in the default specialisation
default = "foot";
description = "Default terminal application";
};
}

View File

@ -20,8 +20,8 @@ in
settings = {
main =
let
font = config.theming.fonts.monospace.name;
size = toString config.theming.fonts.monospace.recommendedSize;
font = config.desktop.theming.fonts.monospace.name;
size = toString config.desktop.theming.fonts.monospace.recommendedSize;
in
{
font = mkForce "${font}:style=Regular:size=${size}";

View File

@ -8,7 +8,7 @@
with lib;
let
cfg = config.modules.vscode;
theme = config.theming;
theme = config.desktop.theming;
in
{
options.modules.vscode = {
@ -31,7 +31,7 @@ in
"vscode-extension-ms-vsliveshare-vsliveshare"
];
theming.fonts.extraFonts = [ cfg.codeFont ];
desktop.theming.fonts.extraFonts = [ cfg.codeFont ];
programs.vscode = {
enable = true;

View File

@ -7,7 +7,7 @@
let
cfg = config.modules.zathura;
colors = config.theming.colors;
colors = config.desktop.theming.colors;
in
{
options.modules.zathura.enable = lib.mkEnableOption "zathura";

View File

@ -1,6 +1,11 @@
# How Jan likes his linux to be configured
{ config, pkgs, ... }:
{
lib,
config,
pkgs,
...
}:
{
config = {
@ -11,44 +16,266 @@
home.packages = with pkgs; [
libreoffice-still
remmina
# dina-vector
# android-studio
# jellyfin-tui
pinentry
thunderbird
signal-desktop
prusa-slicer
freecad-wayland
inkscape
# appflowy
ente-auth
];
# TODO: Move to gpg module
# programs.gpg = {
# enable = true;
# mutableKeys = true;
# mutableTrust = true;
# };
# services.gpg-agent = {
# enable = true;
# enableSshSupport = true;
# };
desktop.environments = {
river-dark = {
name = "River Dark";
type = "custom";
config = { };
extraConfig = {
modules = {
# Desktop environment
river.enable = true;
waylock.enable = true;
waybar.enable = true;
mako.enable = true;
foot.enable = true;
rofi-rbw.enable = true;
};
# 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
];
};
# Color scheme
desktop.theming.themes.catppuccin = {
enable = true;
flavor = "mocha";
};
};
};
river-light = {
name = "River Light";
type = "custom";
config = { };
extraConfig = {
modules = {
# Desktop environment
river.enable = true;
waylock.enable = true;
waybar.enable = true;
mako.enable = true;
foot.enable = true;
rofi-rbw.enable = true;
};
# 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
];
};
# Color scheme
desktop.theming.themes.catppuccin = {
enable = true;
flavor = lib.mkForce "latte";
};
};
};
cosmic = {
name = "Cosmic";
type = "custom";
config = { };
extraConfig = {
desktop = {
initScript = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.cosmic-session}/bin/cosmic-session
'';
session = {
type = "wayland";
desktop = "cosmic";
};
};
home.packages = with pkgs; [
adwaita-icon-theme
alsa-utils
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
fira
noto-fonts
open-sans
];
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-cosmic
xdg-desktop-portal-gtk
];
configPackages = lib.mkDefault (with pkgs; [ xdg-desktop-portal-cosmic ]);
};
};
};
gnome = {
name = "Gnome";
type = "custom";
config = { };
extraConfig = {
programs = {
gnome-shell.enable = true;
};
desktop = {
initScript = ''
${pkgs.dbus}/bin/dbus-run-session ${pkgs.gnome-session}/bin/gnome-session
'';
session = {
type = "wayland";
desktop = "GNOME";
};
};
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
modules = {
# Theming
theming.enable = true;
# Window manager
river.enable = true;
waylock.enable = true;
waybar.enable = true;
# Desktop environment
mako.enable = true;
foot.enable = true;
# Communication
whatsapp.enable = true;
discord.enable = true;
@ -75,7 +302,6 @@
feishin.enable = true;
# Tools
rofi-rbw.enable = true;
git = {
enable = true;
user = "Jan-Bulthuis";
@ -120,9 +346,9 @@
};
# Theme configuration
theming =
desktop.theming =
let
fontpkgs = config.theming.fonts.pkgs;
fontpkgs = config.desktop.theming.fonts.pkgs;
in
{
# Fonts
@ -154,5 +380,6 @@
xdg-desktop-portal-wlr
];
};
};
}