Autostart
This commit is contained in:
parent
ee3d4bc34f
commit
d6fb0e2c1c
|
@ -7,6 +7,11 @@ let
|
|||
};
|
||||
in {
|
||||
apollo = let
|
||||
makeAutostart = name:
|
||||
{ config, ... }: {
|
||||
config.home.file.".config/autostart/${name}.desktop".source =
|
||||
"${config.home.path}/share/applications/${name}.desktop";
|
||||
};
|
||||
setStartpage = startpage:
|
||||
{ ... }: {
|
||||
programs.firefox.profiles."fz2sm95u.default".settings = {
|
||||
|
@ -15,18 +20,15 @@ in {
|
|||
};
|
||||
makeBlock = list:
|
||||
{ pkgs, lib, ... }: {
|
||||
systemd.user = {
|
||||
services.blockserver = {
|
||||
Unit = { Description = "Serve a blocklist"; };
|
||||
systemd.user.services.blockserver = {
|
||||
Unit.Description = "Serve a blocklist";
|
||||
Service = {
|
||||
ExecStart = "${pkgs.python3}/bin/python -m http.server 8842 -d ${
|
||||
pkgs.writeTextDir "blocklist"
|
||||
(lib.concatStringsSep "\r\n" list)
|
||||
pkgs.writeTextDir "blocklist" (lib.concatStringsSep "\r\n" list)
|
||||
}";
|
||||
Restart = "always";
|
||||
};
|
||||
Install = { WantedBy = [ "default.target" ]; };
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
tinkerPages = [
|
||||
|
@ -81,6 +83,8 @@ in {
|
|||
./roles/chat.nix
|
||||
(setStartpage "https://stats.maralorn.de/d/health-status")
|
||||
(makeBlock [ ])
|
||||
(makeAutostart "firefox")
|
||||
(makeAutostart "chat")
|
||||
];
|
||||
in {
|
||||
unrestricted = apolloConfig unrestricted;
|
||||
|
@ -90,6 +94,9 @@ in {
|
|||
./roles/pythia.nix
|
||||
(setStartpage "https://habitica.com")
|
||||
(makeBlock (tinkerPages ++ leisurePages))
|
||||
(makeAutostart "firefox")
|
||||
(makeAutostart "kassandra")
|
||||
(makeAutostart "kassandra2")
|
||||
];
|
||||
research = apolloConfig [
|
||||
./roles/research.nix
|
||||
|
|
|
@ -17,6 +17,13 @@ let
|
|||
terminalDesktopItem = name: namedTerminalDesktopItem name name;
|
||||
|
||||
in {
|
||||
home.packages = map superSimpleDesktopItem [ "kassandra2" ]
|
||||
++ map terminalDesktopItem [ "maintenance" "ncmpcpp" "kassandra" "hotkeys" "vim" "gw2" "chat" ];
|
||||
home.packages = map superSimpleDesktopItem [ "kassandra2" "gw2" "chat" ]
|
||||
++ map terminalDesktopItem [
|
||||
"maintenance"
|
||||
"ncmpcpp"
|
||||
"kassandra"
|
||||
"hotkeys"
|
||||
"vim"
|
||||
"select-mode"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -66,7 +66,13 @@ in {
|
|||
'';
|
||||
selectMode = pkgs.writeHaskellScript {
|
||||
name = "select-mode";
|
||||
bins = [ pkgs.dialog activateMode pkgs.ncurses pkgs.sway pkgs.gnome3.gnome-session ];
|
||||
bins = [
|
||||
pkgs.dialog
|
||||
activateMode
|
||||
pkgs.ncurses
|
||||
pkgs.sway
|
||||
pkgs.gnome3.gnome-session
|
||||
];
|
||||
} ''
|
||||
main = do
|
||||
mode <- decodeUtf8 <$> (dialog "--menu" "Select Mode" "20" "80" "5" ${
|
||||
|
@ -75,7 +81,8 @@ in {
|
|||
clear
|
||||
writeFile "/home/maralorn/volatile/mode" mode
|
||||
activate_mode
|
||||
concurrently_ (swaymsg "exit") gnome_session_quit
|
||||
void $ (try $ swaymsg "exit" :: IO (Either SomeException ()))
|
||||
void $ (try $ gnome_session_quit "--no-prompt" :: IO (Either SomeException ()))
|
||||
'';
|
||||
|
||||
inherit (pkgs.gnome3) nautilus;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
if [[ -n "$SSH_CONNECTION" && -z "$TMUX" ]] {
|
||||
exec mytmux
|
||||
}
|
||||
if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]; then
|
||||
exec sway
|
||||
fi
|
||||
mkdir -p /var/run/user/$UID/tmp/downloads
|
||||
|
||||
setopt prompt_subst
|
||||
|
|
|
@ -21,6 +21,7 @@ self: super: {
|
|||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE NoImplicitPrelude #-}
|
||||
{-# LANGUAGE TupleSections #-}
|
||||
{-# LANGUAGE PartialTypeSignatures #-}
|
||||
|
||||
import Shh
|
||||
import Relude
|
||||
|
|
Loading…
Reference in a new issue