gui,personal-gui: Split GUI module in two distinct modules

This is mainly for work vs personal computers
This commit is contained in:
Quentin Boyer 2024-07-24 17:35:10 +02:00
parent 3fbd953b99
commit 361b443ac7
19 changed files with 166 additions and 152 deletions

View file

@ -179,6 +179,7 @@
flake = self;
};
personal-cli = import ./personal-cli/hm.nix;
gui = import ./gui/hm.nix;
personal-gui = import ./personal-gui/hm.nix;
gaming = import ./gaming/hm.nix;
work = import ./hostconfig/thinkpad-nixos/work.nix;
@ -187,6 +188,7 @@
nixosModules = {
minimal = import ./minimal/nixos.nix { inherit extraInfo; };
personal-cli = import ./personal-cli/nixos.nix;
gui = import ./gui/nixos.nix;
personal-gui = import ./personal-gui/nixos.nix;
roaming = import ./roaming/nixos.nix;
gaming = import ./gaming/nixos.nix;

87
gui/hm.nix Normal file
View file

@ -0,0 +1,87 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./wm ];
xdg.portal = {
enable = true;
config = {
sway = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
home.packages = with pkgs; [
# IM
(discord.override { inherit (pkgs) nss; })
element-desktop
signal-desktop
# Mail
thunderbird
# Media
gromit-mpx
krita
pavucontrol
spotify
vlc
# Libreoffice
hunspell
hunspellDicts.fr-any
hyphen
libreoffice
# Misc
eog
# Broken as of 15 July
# freecad
wdisplays
wl-clipboard
xdg-utils
fzf
waypipe
];
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
};
home.sessionVariables = {
BROWSER = "firefox";
NIXOS_OZONE_WL = 1;
ANDROID_HOME = "${config.home.sessionVariables.XDG_DATA_HOME}/android";
};
programs.zathura.enable = true;
programs.rofi = {
enable = true;
theme = "solarized_alternate";
terminal = "${config.terminal.command}";
};
xdg.desktopEntries.zklist = {
name = "zklist";
exec = ''${pkgs.foot}/bin/foot nvim "+ZkNotes"'';
};
xdg.desktopEntries.zksearch = {
name = "zksearch";
exec = ''${pkgs.foot}/bin/foot nvim "+ZkNotes { match = { vim.fn.input('Search: ') } }"'';
};
}

55
gui/nixos.nix Normal file
View file

@ -0,0 +1,55 @@
{ pkgs, config, ... }:
{
services.gnome.gnome-keyring.enable = true;
services.flatpak.enable = true;
xdg.portal = {
enable = true;
config = {
sway = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
programs.dconf.enable = true;
security.pam.services.swaylock.text = ''
auth include login
'';
services.printing = {
enable = true;
drivers = with pkgs; [
hplip
gutenprint
cnijfilter2
];
};
hardware.sane.enable = true;
hardware.graphics = {
enable = true;
enable32Bit = true;
};
users.users."${config.extraInfo.username}".extraGroups = [
"scanner"
"lp"
];
}

View file

@ -9,6 +9,7 @@
./nixos.nix
minimal
personal-cli
gui
personal-gui
gaming
];
@ -17,6 +18,7 @@
./hm.nix
minimal
personal-cli
gui
personal-gui
gaming
];

View file

@ -8,7 +8,7 @@
./nixos.nix
minimal
personal-cli
personal-gui
gui
gaming
];
hmModules = with self.hmModules; [
@ -16,7 +16,7 @@
./hm.nix
minimal
personal-cli
personal-gui
gui
gaming
];
};

View file

@ -9,6 +9,7 @@
./hardware-configuration.nix
minimal
personal-cli
gui
personal-gui
];
hmModules = with self.hmModules; [
@ -16,6 +17,7 @@
./hm.nix
minimal
personal-cli
gui
personal-gui
];
unfreePackages = [

View file

@ -17,14 +17,14 @@
./nixos.nix
minimal
personal-cli
personal-gui
gui
];
hmModules = with self.hmModules; [
./extra_info.nix
./hm.nix
minimal
personal-cli
personal-gui
gui
];
};
@ -34,7 +34,7 @@
minimal
work
personal-cli
personal-gui
gui
])
++ [
./extra_info.nix

View file

@ -1,89 +1,7 @@
{ pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./wm ];
xdg.portal = {
enable = true;
config = {
sway = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
home.packages = with pkgs; [
# IM
(discord.override { inherit (pkgs) nss; })
element-desktop
signal-desktop
# Mail
thunderbird
# Media
gromit-mpx
krita
pavucontrol
spotify
vlc
# Libreoffice
hunspell
hunspellDicts.fr-any
hyphen
libreoffice
# Misc
eog
# Broken as of 15 July
# freecad
plasma5Packages.kdeconnect-kde
wdisplays
wl-clipboard
xdg-utils
fzf
waypipe
glaurung
];
programs.firefox = {
enable = true;
nativeMessagingHosts = [ pkgs.firefoxpwa ];
};
home.sessionVariables = {
BROWSER = "firefox";
NIXOS_OZONE_WL = 1;
ANDROID_HOME = "${config.home.sessionVariables.XDG_DATA_HOME}/android";
};
programs.zathura.enable = true;
programs.rofi = {
enable = true;
theme = "solarized_alternate";
terminal = "${config.terminal.command}";
};
xdg.desktopEntries.zklist = {
name = "zklist";
exec = ''${pkgs.foot}/bin/foot nvim "+ZkNotes"'';
};
xdg.desktopEntries.zksearch = {
name = "zksearch";
exec = ''${pkgs.foot}/bin/foot nvim "+ZkNotes { match = { vim.fn.input('Search: ') } }"'';
};
}

View file

@ -1,94 +1,42 @@
{
pkgs,
config,
lib,
...
}:
{ pkgs, config, ... }:
{
networking.firewall = {
enable = true;
allowedTCPPortRanges = [
{
# KDE connect
from = 1714;
to = 1764;
} # KDE Connect
}
];
allowedUDPPortRanges = [
{
# KDE connect
from = 1714;
to = 1764;
} # KDE Connect
}
];
};
services.gnome.gnome-keyring.enable = true;
services.flatpak.enable = true;
xdg.portal = {
enable = true;
config = {
sway = {
default = "gtk";
"org.freedesktop.impl.portal.Screenshot" = "wlr";
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
programs.noisetorch.enable = true;
programs.adb.enable = true;
programs.dconf.enable = true;
virtualisation.waydroid.enable = true;
hardware.opentabletdriver.enable = true;
hardware.bluetooth.enable = true;
security.pam.yubico = {
enable = true;
debug = false;
mode = "challenge-response";
module = "challenge-response";
};
services.udev.packages = with pkgs; [ yubikey-personalization ];
security.pam.services.swaylock.text = ''
auth include login
'';
virtualisation.waydroid.enable = true;
hardware.opentabletdriver.enable = true;
hardware.bluetooth.enable = true;
services.printing = {
enable = true;
drivers = with pkgs; [
hplip
gutenprint
cnijfilter2
];
};
hardware.sane.enable = true;
services.avahi = {
nssmdns4 = true;
enable = true;
};
hardware.graphics = {
enable = true;
enable32Bit = true;
};
users.users."${config.extraInfo.username}".extraGroups = [
"adbusers"
"scanner"
"lp"
];
users.users.${config.extraInfo.username}.extraGroups = [ "adbusers" ];
}