Compare commits

..

3 commits

Author SHA1 Message Date
1510694a4a Flatpak: manage flatpak with nix-flatpak 2023-11-12 23:48:20 +01:00
6ca883ca0a Flake: add nix-flatpak 2023-11-12 23:32:06 +01:00
749476efcc Kde: change gtk2 config location 2023-11-12 23:25:23 +01:00
4 changed files with 64 additions and 42 deletions

17
flake.lock generated
View file

@ -159,6 +159,22 @@
"type": "github"
}
},
"nix-flatpak": {
"locked": {
"lastModified": 1699822045,
"narHash": "sha256-ZKKbXcf7UXirQokVYNF0gN5AulWPDPsXXce6KolGr+g=",
"owner": "gmodena",
"repo": "nix-flatpak",
"rev": "bb4a08e975c5a64a909cc42de31cb02408c9bda8",
"type": "github"
},
"original": {
"owner": "gmodena",
"ref": "main",
"repo": "nix-flatpak",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@ -312,6 +328,7 @@
"home-manager": "home-manager_2",
"home-manager-unstable": "home-manager-unstable",
"jovian": "jovian",
"nix-flatpak": "nix-flatpak",
"nix-impermanence": "nix-impermanence",
"nix-index-db": "nix-index-db",
"nix-index-db-unstable": "nix-index-db-unstable",

View file

@ -60,7 +60,9 @@
vscode-extensions = {
url = "github:nix-community/nix-vscode-extensions";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-flatpak.url = github:gmodena/nix-flatpak/main;
};
outputs = { ... } @inputs: with inputs; {

View file

@ -1,20 +1,12 @@
{ config, pkgs, ... }:
{ config, pkgs, flakeSelf, ... }:
{
services.flatpak.enable = true;
/*
Create systemd service that adds flathub after getting network
This adds it automatically, which avoids the whack ass way I was
doing that before
*/
systemd.services.flathub-add = {
description = "Add flathub repo to system flatpak install";
script = "${pkgs.flatpak}/bin/flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo";
serviceConfig.Type = "oneshot";
wantedBy = [ "network-online.target" ];
# Run after networking is working
after = [ "NetworkManager-wait-online.service" ];
restartIfChanged = false;
home-manager = {
sharedModules = [{ imports = [ flakeSelf.inputs.nix-flatpak.homeManagerModules.nix-flatpak ]; }];
users.toast = {
services.flatpak.packages = [ "tv.plex.PlexDesktop" ];
};
};
}

View file

@ -85,36 +85,47 @@ in
environment.systemPackages = [ breezeTint lookAndFeel plasmaDefaults ];
# Plasma configs should be on all users
home-manager.sharedModules = [{
imports = [ flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager ];
gtk = {
enable = true;
cursorTheme = { package = pkgs.breeze-qt5; name = "breeze_cursors"; };
iconTheme = { package = pkgs.breeze-icons; name = "breeze-dark"; };
theme = { package = pkgs.breeze-gtk; name = "Breeze"; };
# Gtk2 doesn't have a dark mode, so I just tell gtk 3 and 4 to use the dark variant
gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
};
programs.plasma = {
enable = true;
workspace.clickItemTo = "select";
shortcuts = {
"kwin" = {
"Switch One Desktop to the Left" = [ "Meta+Ctrl+Left" ];
"Switch One Desktop to the Right" = [ "Meta+Ctrl+Right" ];
};
home-manager.sharedModules = [
(
{ config, ... }:
let gtk2rc = "${config.xdg.configHome}/gtk-2.0/gtkrc"; in
{
gtk.gtk2.configLocation = gtk2rc;
# Kde has an annoying habit of overwriting the gtk2 config file
home.file."${gtk2rc}".force = true;
}
)
{
imports = [ flakeSelf.inputs.plasma-manager.homeManagerModules.plasma-manager ];
gtk = {
enable = true;
cursorTheme = { package = pkgs.breeze-qt5; name = "breeze_cursors"; };
iconTheme = { package = pkgs.breeze-icons; name = "breeze-dark"; };
theme = { package = pkgs.breeze-gtk; name = "Breeze"; };
# Gtk2 doesn't have a dark mode, so I just tell gtk 3 and 4 to use the dark variant
gtk3.extraConfig.gtk-application-prefer-dark-theme = true;
gtk4.extraConfig.gtk-application-prefer-dark-theme = true;
};
configFile = {
"kwinrc" = {
"Desktops" = {
"Number" = 2;
"Rows" = 1;
programs.plasma = {
enable = true;
workspace.clickItemTo = "select";
shortcuts = {
"kwin" = {
"Switch One Desktop to the Left" = [ "Meta+Ctrl+Left" ];
"Switch One Desktop to the Right" = [ "Meta+Ctrl+Right" ];
};
"TabBox"."LayoutName" = "thumbnail_grid";
};
"plasmanotifyrc"."Notifications"."NormalAlwaysOnTop" = true;
configFile = {
"kwinrc" = {
"Desktops" = {
"Number" = 2;
"Rows" = 1;
};
"TabBox"."LayoutName" = "thumbnail_grid";
};
"plasmanotifyrc"."Notifications"."NormalAlwaysOnTop" = true;
};
};
};
}];
}
];
}