Flatten directory/file structure a bit

Move system/home/default.nix into system/default.nix,
system/home/desktop/default.nix into system/desktop.nix to reduce
unnecessary duplication. Moved everything in home/desktop up to home/
and adjusted paths accordingly. Moved wallpapers up to system/ since
it makes sense with where it's used.

Merge allowUnfreePredicate into single place again since it seems to
override rather than combine if used multiple times.

Install NoMachine on all machines again by default.
This commit is contained in:
Evie Litherland-Smith 2024-11-14 08:43:27 +00:00
parent dd98ba83b7
commit 68b4a7b063
90 changed files with 112 additions and 133 deletions

View file

@ -56,6 +56,15 @@
max-free = ${toString (1024 * 1024 * 1024)}
'';
};
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
"steam-original"
"steam-run"
"nomachine-client"
];
system.autoUpgrade = {
enable = true;
persistent = true;
@ -122,11 +131,16 @@
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = {
imports = [ ./home/default.nix ];
imports = [
./home/shell/default.nix
./home/scripts/default.nix
./home/password-store/default.nix
];
home = {
inherit username;
homeDirectory = "/home/${username}";
};
programs.home-manager.enable = true;
};
extraSpecialArgs = {
inherit inputs;
@ -189,7 +203,7 @@
console.useXkbConfig = true;
stylix = {
enable = true;
image = ./home/desktop/wallpapers/tropic_island_day.jpg;
image = ./wallpapers/tropic_island_day.jpg;
base16Scheme = ./one-light.yaml; # Base24 scheme
polarity = "light";
opacity.popups = 0.8;

View file

@ -1,6 +1,5 @@
{ pkgs, username, ... }:
{
home-manager.users.${username}.imports = [ ./home/desktop/default.nix ];
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
hardware.bluetooth.enable = true;
environment = {
@ -15,9 +14,24 @@
libsecret
libnotify
xdg-utils
wl-clipboard
hunspell
hunspellDicts.en_GB-large
gnome.nautilus
libreoffice-fresh
evince
image-roll
clapper
g4music
ffmpeg
remmina
fractal
webcord
signal-desktop
whatsapp-for-linux
teams-for-linux
twinkle
nomachine-client
];
};
security = {
@ -96,4 +110,81 @@
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
home-manager.users.${username} =
{
config,
pkgs,
osConfig,
...
}:
{
imports = [
./home/hyprland.nix
./home/email/default.nix
./home/calendar/default.nix
./home/terminal/default.nix
./home/emacs/default.nix
./home/browser/default.nix
];
home.file.${config.gtk.gtk2.configLocation}.force = true;
services = {
syncthing.enable = true;
gammastep = {
inherit (osConfig.location) latitude longitude provider;
enable = true;
tray = true;
};
};
gtk = {
enable = true;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
package = (pkgs.papirus-icon-theme.override { color = "magenta"; });
name = "Papirus-Light";
};
};
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; ''
@define-color accent_color ${base0E-hex};
@define-color accent_bg_color ${base0E-hex};
'';
xdg = {
mime.enable = true;
mimeApps =
let
defaultApplications = import ./mimeapps.nix;
in
{
enable = true;
inherit defaultApplications;
associations.added = defaultApplications;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
};
};
configFile = {
# Stop programs from overriding mimeapps
"mimeapps.list".force = true;
# Ensure GTK config is set
"gtk-3.0/gtk.css".force = true;
"gtk-3.0/settings.ini".force = true;
"gtk-4.0/gtk.css".force = true;
"gtk-4.0/settings.ini".force = true;
# Autostart some programs
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop";
"teams-for-linux/config.json".text = builtins.toJSON {
awayOnSystemIdle = true;
closeAppOnCross = false;
followSystemTheme = true;
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = [ "en_GB" ];
};
};
};
};
}

View file

@ -1,9 +0,0 @@
{ ... }:
{
imports = [
./shell/default.nix
./scripts/default.nix
./password-store/default.nix
];
programs.home-manager.enable = true;
}

View file

@ -1,94 +0,0 @@
{
config,
pkgs,
osConfig,
...
}:
{
imports = [
./hyprland.nix
./email/default.nix
./calendar/default.nix
./terminal/default.nix
./emacs/default.nix
./browser/default.nix
];
home = {
packages = with pkgs; [
wl-clipboard
libreoffice-fresh
evince
image-roll
clapper
g4music
ffmpeg
remmina
fractal
webcord
signal-desktop
whatsapp-for-linux
teams-for-linux
twinkle
];
file.${config.gtk.gtk2.configLocation}.force = true;
};
services = {
syncthing.enable = true;
gammastep = {
inherit (osConfig.location) latitude longitude provider;
enable = true;
tray = true;
};
};
gtk = {
enable = true;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
package = (pkgs.papirus-icon-theme.override { color = "magenta"; });
name = "Papirus-Light";
};
};
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; ''
@define-color accent_color ${base0E-hex};
@define-color accent_bg_color ${base0E-hex};
'';
xdg = {
mime.enable = true;
mimeApps =
let
defaultApplications = import ./mimeapps.nix;
in
{
enable = true;
inherit defaultApplications;
associations.added = defaultApplications;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
};
};
configFile = {
# Stop programs from overriding mimeapps
"mimeapps.list".force = true;
# Ensure GTK config is set
"gtk-3.0/gtk.css".force = true;
"gtk-3.0/settings.ini".force = true;
"gtk-4.0/gtk.css".force = true;
"gtk-4.0/settings.ini".force = true;
# Autostart some programs
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source = "${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop";
"teams-for-linux/config.json".text = builtins.toJSON {
awayOnSystemIdle = true;
closeAppOnCross = false;
followSystemTheme = true;
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = [ "en_GB" ];
};
};
};
}

View file

@ -1,9 +1,9 @@
{ config, pkgs, ... }:
{
imports = [
../../shell/default.nix
../../shell/git.nix
../../gpg/default.nix
../shell/default.nix
../shell/git.nix
../gpg/default.nix
];
stylix.targets.emacs.enable = false;
services.emacs = {

View file

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,13 +1,6 @@
{ lib, ... }:
{
imports = [ ./module.nix ];
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam-original"
"steam-run"
"steamcmd"
];
services.satisfactory-server = {
enable = true;
openFirewall = true;

View file

@ -1,19 +1,10 @@
{
config,
lib,
pkgs,
username,
...
}:
{
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
"steam-original"
"steam-run"
];
environment = {
sessionVariables.MANGOHUD = 1;
systemPackages = [ pkgs.mangohud ];

View file

Before

Width:  |  Height:  |  Size: 747 KiB

After

Width:  |  Height:  |  Size: 747 KiB

View file

Before

Width:  |  Height:  |  Size: 7 MiB

After

Width:  |  Height:  |  Size: 7 MiB

View file

Before

Width:  |  Height:  |  Size: 5.3 MiB

After

Width:  |  Height:  |  Size: 5.3 MiB

View file

Before

Width:  |  Height:  |  Size: 7.8 MiB

After

Width:  |  Height:  |  Size: 7.8 MiB

View file

Before

Width:  |  Height:  |  Size: 3.6 MiB

After

Width:  |  Height:  |  Size: 3.6 MiB

View file

Before

Width:  |  Height:  |  Size: 562 KiB

After

Width:  |  Height:  |  Size: 562 KiB

View file

Before

Width:  |  Height:  |  Size: 642 KiB

After

Width:  |  Height:  |  Size: 642 KiB

View file

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View file

Before

Width:  |  Height:  |  Size: 3.7 MiB

After

Width:  |  Height:  |  Size: 3.7 MiB

View file

Before

Width:  |  Height:  |  Size: 1,000 KiB

After

Width:  |  Height:  |  Size: 1,000 KiB

View file

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB

View file

Before

Width:  |  Height:  |  Size: 4.7 MiB

After

Width:  |  Height:  |  Size: 4.7 MiB

View file

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

Before

Width:  |  Height:  |  Size: 4.9 MiB

After

Width:  |  Height:  |  Size: 4.9 MiB

View file

Before

Width:  |  Height:  |  Size: 1 MiB

After

Width:  |  Height:  |  Size: 1 MiB

View file

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View file

Before

Width:  |  Height:  |  Size: 2.1 MiB

After

Width:  |  Height:  |  Size: 2.1 MiB

View file

Before

Width:  |  Height:  |  Size: 1.5 MiB

After

Width:  |  Height:  |  Size: 1.5 MiB

View file

Before

Width:  |  Height:  |  Size: 8.3 MiB

After

Width:  |  Height:  |  Size: 8.3 MiB

View file

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

View file

Before

Width:  |  Height:  |  Size: 14 MiB

After

Width:  |  Height:  |  Size: 14 MiB

View file

Before

Width:  |  Height:  |  Size: 11 MiB

After

Width:  |  Height:  |  Size: 11 MiB

View file

Before

Width:  |  Height:  |  Size: 4.6 MiB

After

Width:  |  Height:  |  Size: 4.6 MiB

View file

Before

Width:  |  Height:  |  Size: 7.9 MiB

After

Width:  |  Height:  |  Size: 7.9 MiB

View file

Before

Width:  |  Height:  |  Size: 10 MiB

After

Width:  |  Height:  |  Size: 10 MiB

View file

Before

Width:  |  Height:  |  Size: 6 MiB

After

Width:  |  Height:  |  Size: 6 MiB

View file

Before

Width:  |  Height:  |  Size: 668 KiB

After

Width:  |  Height:  |  Size: 668 KiB

View file

Before

Width:  |  Height:  |  Size: 6.6 MiB

After

Width:  |  Height:  |  Size: 6.6 MiB

View file

Before

Width:  |  Height:  |  Size: 2.6 MiB

After

Width:  |  Height:  |  Size: 2.6 MiB

View file

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View file

Before

Width:  |  Height:  |  Size: 984 KiB

After

Width:  |  Height:  |  Size: 984 KiB

View file

Before

Width:  |  Height:  |  Size: 480 KiB

After

Width:  |  Height:  |  Size: 480 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 MiB

After

Width:  |  Height:  |  Size: 3.9 MiB

View file

Before

Width:  |  Height:  |  Size: 6.5 MiB

After

Width:  |  Height:  |  Size: 6.5 MiB

View file

Before

Width:  |  Height:  |  Size: 4.8 MiB

After

Width:  |  Height:  |  Size: 4.8 MiB

View file

Before

Width:  |  Height:  |  Size: 4 MiB

After

Width:  |  Height:  |  Size: 4 MiB

View file

Before

Width:  |  Height:  |  Size: 4.3 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

View file

Before

Width:  |  Height:  |  Size: 4 MiB

After

Width:  |  Height:  |  Size: 4 MiB

View file

Before

Width:  |  Height:  |  Size: 229 KiB

After

Width:  |  Height:  |  Size: 229 KiB

View file

Before

Width:  |  Height:  |  Size: 5.1 MiB

After

Width:  |  Height:  |  Size: 5.1 MiB

View file

@ -1,12 +1,5 @@
{ lib, username, ... }:
{
lib,
pkgs,
username,
...
}:
{
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ "nomachine-client" ];
environment.systemPackages = [ pkgs.nomachine-client ];
home-manager.users.${username} =
{ config, ... }:
{