123 lines
3.0 KiB
Nix
123 lines
3.0 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
let
|
|
clean-nixos-git-check-script = pkgs.writeScript "clean-nixos-git-check" ''
|
|
if [ -z "$(${pkgs.git}/bin/git -C /etc/nixos status -u --porcelain)" ]
|
|
then
|
|
echo "/etc/nixos is clean !"
|
|
exit 0
|
|
else
|
|
${pkgs.zenity}/bin/zenity --info --text="/etc/nixos/ is not clean, don't forget to commit !"
|
|
exit 0
|
|
fi
|
|
'';
|
|
in
|
|
{
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
discord
|
|
];
|
|
|
|
home-manager.users.mysaa.home.packages = with pkgs; [
|
|
firefox
|
|
vlc
|
|
(vscode-with-extensions.override {
|
|
vscode = vscodium;
|
|
vscodeExtensions = with vscode-marketplace; [
|
|
maximedenes.vscoq
|
|
myriad-dreamin.tinymist
|
|
vmware.vscode-boot-dev-pack
|
|
ms-python.python
|
|
edwinkofler.vscode-hyperupcall-pack-java
|
|
];
|
|
})
|
|
libreoffice
|
|
#hyphenDicts.fr_FR
|
|
hyphenDicts.en_US
|
|
hyphenDicts.de_DE
|
|
heroic
|
|
spotify
|
|
kdiff3
|
|
pdfarranger
|
|
anki-bin # Register addons here (and login to anki-server)
|
|
];
|
|
|
|
programs.steam.enable = true;
|
|
|
|
home-manager.users.mysaa.programs.keepassxc.enable = true;
|
|
home-manager.users.mysaa.programs.keepassxc.settings = {
|
|
General.NumberOfRememberedLastDatabases = 1;
|
|
General.UseAtomicSaves = false;
|
|
Browser.Enabled = true;
|
|
Browser.AlwaysAllowAccess = true;
|
|
Browser.MatchUrlScheme = false;
|
|
GUI.MinimizeOnStartup = true;
|
|
GUI.ShowExpiredEntriesOnDatabaseUnlock = false;
|
|
PasswordGenerator.Length = 24;
|
|
};
|
|
|
|
virtualisation.virtualbox.host.enable = true;
|
|
users.extraGroups.vboxusers.members = [ "mysaa" ];
|
|
|
|
virtualisation.virtualbox.host.enableKvm = true;
|
|
virtualisation.virtualbox.host.addNetworkInterface = false;
|
|
|
|
home-manager.users.mysaa.systemd.user.services.heroic-launcher = {
|
|
Unit = {
|
|
Description = "Launching the heroic game launcher";
|
|
After = "network.target";
|
|
};
|
|
Service = {
|
|
Type = "simple";
|
|
ExecStart = "${pkgs.heroic}/bin/heroic";
|
|
};
|
|
};
|
|
|
|
home-manager.users.mysaa.systemd.user.timers.weekly-heroic-launcher = {
|
|
Unit = {
|
|
Description = "Run the heroic game launcher weekly for downloading the free game";
|
|
};
|
|
Timer = {
|
|
OnCalendar = "Mon *-*-* 08:00:00 Europe/Paris";
|
|
Persistent = "true";
|
|
Unit = "heroic-launcher.service";
|
|
};
|
|
Install = {
|
|
WantedBy = [ "timers.target" ];
|
|
};
|
|
};
|
|
|
|
home-manager.users.mysaa.systemd.user = {
|
|
services.check-nixos-git-clean = {
|
|
Unit = {
|
|
Description = "Sends a notification if /etc/nixos is not clean";
|
|
};
|
|
Service = {
|
|
Type = "oneshot";
|
|
ExecStart = "${pkgs.bash}/bin/bash ${clean-nixos-git-check-script}";
|
|
};
|
|
};
|
|
timers.check-nixos-git-clean = {
|
|
Unit = {
|
|
Description = "Bi-hourly reminder that /etc/nixos should be clean";
|
|
};
|
|
Timer = {
|
|
OnBootSec = "5min";
|
|
OnUnitActiveSec = "30min";
|
|
Persistent = "true";
|
|
Unit = "check-nixos-git-clean.service";
|
|
};
|
|
Install = {
|
|
WantedBy = [ "timers.target" ];
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
|
|
}
|