Finish modularising config
There are still some things I want to change, but at least there aren't two systems now.
This commit is contained in:
parent
9f04c5d815
commit
0df4d5654f
68 changed files with 860 additions and 1441 deletions
|
@ -1,6 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.charlotte.extraGroups = [ "adbusers" ];
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.startx.enable = true;
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
disableWhileTyping = true;
|
||||
scrollMethod = "twofinger";
|
||||
tapping = true;
|
||||
tappingDragLock = true;
|
||||
};
|
||||
};
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.file.".xinitrc".text = "source ~/.xsession";
|
||||
xsession = {
|
||||
enable = true;
|
||||
numlock.enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/calibre"; type = "cache"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.calibre ];
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }: {
|
||||
chvp = {
|
||||
nix.unfreePackages = [ "citrix-workspace" ];
|
||||
zfs.homeLinks = [
|
||||
{ path = ".ICAClient"; type = "data"; }
|
||||
];
|
||||
};
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ citrix_workspace ];
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ deluge ];
|
||||
};
|
||||
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/deluge"; type = "data"; }
|
||||
];
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".dropbox"; type = "cache"; }
|
||||
{ path = "Dropbox"; type = "data"; }
|
||||
];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
systemd.user.services = {
|
||||
dropbox = {
|
||||
Unit = {
|
||||
Description = "Dropbox";
|
||||
};
|
||||
Service = {
|
||||
Environment = "QT_PLUGIN_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtPluginPrefix}\" QML2_IMPORT_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtQmlPrefix}\"";
|
||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
||||
KillMode = "control-group";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
Nice = 10;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
chvp.nix.unfreePackages = [ "dropbox" ];
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ ... }: {
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ firefox ];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
firefox = super.firefox.override { extraNativeMessagingHosts = [ self.passff-host ]; pkcs11Modules = [ self.eid-mw ]; };
|
||||
# Avoids a double firefox install, see https://github.com/NixOS/nixpkgs/pull/31772
|
||||
firefox-bin = self.firefox;
|
||||
})
|
||||
];
|
||||
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".cache/mozilla"; type = "cache"; }
|
||||
{ path = ".mozilla"; type = "data"; }
|
||||
];
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
monospace = [ "Fira Code" ];
|
||||
sansSerif = [ "Noto Sans" ];
|
||||
serif = [ "Noto Serif" ];
|
||||
};
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome_4
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
hledger-repo = pkgs.fetchFromGitHub {
|
||||
owner = "chvp";
|
||||
repo = "hledger";
|
||||
rev = "feature/gain-reports";
|
||||
sha256 = "07qsrq71pnkys11q6k2zc20xc9l3yp8dhzp1ar5bnkgcwbm69rcx";
|
||||
};
|
||||
in
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
haskellPackages = super.haskellPackages.override {
|
||||
overrides = hself: hsuper: rec {
|
||||
hledger = hsuper.callCabal2nixWithOptions "hledger" hledger-repo "--subpath hledger" { };
|
||||
hledger-lib = hsuper.callCabal2nixWithOptions "hledger-lib" hledger-repo "--subpath hledger-lib" { };
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.hledger ];
|
||||
};
|
||||
}
|
|
@ -1,43 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
launcher = import ./sway/launcher.nix { inherit pkgs; stdenv = pkgs.stdenv; };
|
||||
status-configuration = import ./sway/status-configuration.nix { inherit pkgs config; };
|
||||
in
|
||||
{
|
||||
imports = [ ./base-x.nix ];
|
||||
|
||||
config = {
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
xsession = {
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
bars = [
|
||||
{
|
||||
colors = {
|
||||
background = "#fbffff";
|
||||
statusline = "#535c65";
|
||||
focusedWorkspace = { background = "#2b7ab2"; border = "#2b7ab2"; text = "#fbffff"; };
|
||||
activeWorkspace = { background = "#6d7782"; border = "#6d7782"; text = "#fbffff"; };
|
||||
inactiveWorkspace = { background = "#fbffff"; border = "#fbffff"; text = "535c65"; };
|
||||
urgentWorkspace = { background = "#ae5865"; border = "#ae5865"; text = "#fbffff"; };
|
||||
};
|
||||
fonts = { names = [ "Fira Code" ]; size = 9.0; style = "Normal"; };
|
||||
position = "top";
|
||||
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${status-configuration}";
|
||||
}
|
||||
];
|
||||
floating.criteria = [{ class = "launcher"; } { class = "accentor.Main"; }];
|
||||
fonts = { names = [ "Fira Code" ]; size = 9.0; style = "Normal"; };
|
||||
menu = "${pkgs.kitty}/bin/kitty --class launcher -e ${launcher}/bin/launcher";
|
||||
modifier = "Mod4";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
};
|
||||
extraConfig = ''
|
||||
default_border pixel
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,45 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = "Fira Code";
|
||||
font_size = 9;
|
||||
disable_ligatures = "cursor";
|
||||
background = "#ffffff";
|
||||
foreground = "#000000";
|
||||
cursor = "#777777";
|
||||
url_color = "#0031a9";
|
||||
# black
|
||||
color0 = "#282828";
|
||||
color8 = "#000000";
|
||||
# red
|
||||
color1 = "#a60000";
|
||||
color9 = "#972500";
|
||||
# green
|
||||
color2 = "#005e00";
|
||||
color10 = "#315b00";
|
||||
# yellow
|
||||
color3 = "#813e00";
|
||||
color11 = "#70480f";
|
||||
# blue
|
||||
color4 = "#0031a9";
|
||||
color12 = "#2544bb";
|
||||
# magenta
|
||||
color5 = "#721045";
|
||||
color13 = "#8f0075";
|
||||
# cyan
|
||||
color6 = "#00538b";
|
||||
color14 = "#30517f";
|
||||
# white
|
||||
color7 = "#f8f8f8";
|
||||
color15 = "#ffffff";
|
||||
enable_audio_bell = false;
|
||||
visual_bell_duration = "0.25";
|
||||
remember_window_size = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
i18n = {
|
||||
defaultLocale = "en_IE.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "us";
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
# Some applications overwrite mimeapps.list with an identical file
|
||||
xdg.configFile."mimeapps.list".force = true;
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"image/png" = [ "org.kde.okular.desktop" ];
|
||||
"image/jpg" = [ "org.kde.okular.desktop" ];
|
||||
"image/jpeg" = [ "org.kde.okular.desktop" ];
|
||||
"application/pdf" = [ "org.kde.okular.desktop" ];
|
||||
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
|
||||
"x-scheme-handler/msteams" = [ "teams.desktop" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,59 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
in
|
||||
{
|
||||
fileSystems = {
|
||||
"/mnt/ugent/files" = {
|
||||
device = "//files.ugent.be/ecvpeteg";
|
||||
fsType = "cifs";
|
||||
options = [ "credentials=/run/secrets/passwords/ugent-mount-credentials,${automount_opts},users,vers=3.0,noperm,domain=UGENT,sec=ntlmv2i" ];
|
||||
noCheck = true;
|
||||
};
|
||||
"/mnt/ugent/webhost" = {
|
||||
device = "//webhost.ugent.be/ecvpeteg";
|
||||
fsType = "cifs";
|
||||
options = [ "credentials=/run/secrets/passwords/ugent-mount-credentials,${automount_opts},users,vers=3.0" ];
|
||||
noCheck = true;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."passwords/ugent-mount-credentials".file = ../secrets/passwords/ugent-mount-credentials.age;
|
||||
|
||||
environment.systemPackages = [ pkgs.keyutils ];
|
||||
# Remove this once https://github.com/NixOS/nixpkgs/issues/34638 is resolved
|
||||
# The TL;DR is: the kernel calls out to the hard-coded path of
|
||||
# /sbin/request-key as part of its CIFS auth process, which of course does
|
||||
# not exist on NixOS due to the usage of Nix store paths.
|
||||
system.activationScripts.symlink-requestkey = ''
|
||||
if [ ! -d /sbin ]; then
|
||||
mkdir /sbin
|
||||
fi
|
||||
ln -sfn /run/current-system/sw/bin/request-key /sbin/request-key
|
||||
'';
|
||||
# request-key expects a configuration file under /etc
|
||||
environment.etc."request-key.conf" = {
|
||||
text =
|
||||
let
|
||||
upcall = "${pkgs.cifs-utils}/bin/cifs.upcall";
|
||||
keyctl = "${pkgs.keyutils}/bin/keyctl";
|
||||
in
|
||||
''
|
||||
#OP TYPE DESCRIPTION CALLOUT_INFO PROGRAM
|
||||
# -t is required for DFS share servers...
|
||||
create cifs.spnego * * ${upcall} -t %k
|
||||
create dns_resolver * * ${upcall} %k
|
||||
# Everything below this point is essentially the default configuration,
|
||||
# modified minimally to work under NixOS. Notably, it provides debug
|
||||
# logging.
|
||||
create user debug:* negate ${keyctl} negate %k 30 %S
|
||||
create user debug:* rejected ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* expired ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* revoked ${keyctl} reject %k 30 %c %S
|
||||
create user debug:loop:* * |${pkgs.coreutils}/bin/cat
|
||||
create user debug:* * ${pkgs.keyutils}/share/keyutils/request-key-debug.sh %k %d %c %S
|
||||
negate * * * ${keyctl} negate %k 30 %S
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ ... }: {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/Mumble"; type = "data"; }
|
||||
{ path = ".local/share/Mumble"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ mumble ];
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.systemLinks = [
|
||||
{ path = "/etc/NetworkManager/system-connections"; type = "data"; }
|
||||
];
|
||||
|
||||
networking = {
|
||||
hosts = { "127.0.0.1" = [ "dodona.localhost" "sandbox.localhost" ]; };
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
packages = [ pkgs.networkmanager-vpnc ];
|
||||
wifi.macAddress = "random";
|
||||
};
|
||||
};
|
||||
|
||||
users.users.charlotte.extraGroups = [
|
||||
"networkmanager"
|
||||
];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
networkmanagerapplet
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [ ./base-x.nix ];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
xdg.configFile."openbox/rc.xml".source = ./openbox/rc.xml;
|
||||
xsession = {
|
||||
windowManager.command = "${pkgs.openbox}/bin/openbox";
|
||||
initExtra = ''
|
||||
${pkgs.tint2}/bin/tint2 &
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,723 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Do not edit this file, it will be overwritten on install.
|
||||
Copy the file to $HOME/.config/openbox/ instead. -->
|
||||
|
||||
<openbox_config xmlns="http://openbox.org/3.4/rc"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
|
||||
<resistance>
|
||||
<strength>10</strength>
|
||||
<screen_edge_strength>20</screen_edge_strength>
|
||||
</resistance>
|
||||
|
||||
<focus>
|
||||
<focusNew>yes</focusNew>
|
||||
<!-- always try to focus new windows when they appear. other rules do
|
||||
apply -->
|
||||
<followMouse>no</followMouse>
|
||||
<!-- move focus to a window when you move the mouse into it -->
|
||||
<focusLast>yes</focusLast>
|
||||
<!-- focus the last used window when changing desktops, instead of the one
|
||||
under the mouse pointer. when followMouse is enabled -->
|
||||
<underMouse>no</underMouse>
|
||||
<!-- move focus under the mouse, even when the mouse is not moving -->
|
||||
<focusDelay>200</focusDelay>
|
||||
<!-- when followMouse is enabled, the mouse must be inside the window for
|
||||
this many milliseconds (1000 = 1 sec) before moving focus to it -->
|
||||
<raiseOnFocus>no</raiseOnFocus>
|
||||
<!-- when followMouse is enabled, and a window is given focus by moving the
|
||||
mouse into it, also raise the window -->
|
||||
</focus>
|
||||
|
||||
<placement>
|
||||
<policy>Smart</policy>
|
||||
<!-- 'Smart' or 'UnderMouse' -->
|
||||
<center>yes</center>
|
||||
<!-- whether to place windows in the center of the free area found or
|
||||
the top left corner -->
|
||||
<monitor>Primary</monitor>
|
||||
<!-- with Smart placement on a multi-monitor system, try to place new windows
|
||||
on: 'Any' - any monitor, 'Mouse' - where the mouse is, 'Active' - where
|
||||
the active window is, 'Primary' - only on the primary monitor -->
|
||||
<primaryMonitor>1</primaryMonitor>
|
||||
<!-- The monitor where Openbox should place popup dialogs such as the
|
||||
focus cycling popup, or the desktop switch popup. It can be an index
|
||||
from 1, specifying a particular monitor. Or it can be one of the
|
||||
following: 'Mouse' - where the mouse is, or
|
||||
'Active' - where the active window is -->
|
||||
</placement>
|
||||
|
||||
<theme>
|
||||
<name>Clearlooks</name>
|
||||
<titleLayout>NLIMC</titleLayout>
|
||||
<!--
|
||||
available characters are NDSLIMC, each can occur at most once.
|
||||
N: window icon
|
||||
L: window label (AKA title).
|
||||
I: iconify
|
||||
M: maximize
|
||||
C: close
|
||||
S: shade (roll up/down)
|
||||
D: omnipresent (on all desktops).
|
||||
-->
|
||||
<keepBorder>yes</keepBorder>
|
||||
<animateIconify>yes</animateIconify>
|
||||
<font place="ActiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveWindow">
|
||||
<name>sans</name>
|
||||
<size>8</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuHeader">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="MenuItem">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>normal</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="ActiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
<font place="InactiveOnScreenDisplay">
|
||||
<name>sans</name>
|
||||
<size>9</size>
|
||||
<!-- font size in points -->
|
||||
<weight>bold</weight>
|
||||
<!-- 'bold' or 'normal' -->
|
||||
<slant>normal</slant>
|
||||
<!-- 'italic' or 'normal' -->
|
||||
</font>
|
||||
</theme>
|
||||
|
||||
<desktops>
|
||||
<!-- this stuff is only used at startup, pagers allow you to change them
|
||||
during a session
|
||||
these are default values to use when other ones are not already set
|
||||
by other applications, or saved in your session
|
||||
use obconf if you want to change these without having to log out
|
||||
and back in -->
|
||||
<number>4</number>
|
||||
<firstdesk>1</firstdesk>
|
||||
<names>
|
||||
<!-- set names up here if you want to, like this:
|
||||
<name>desktop 1</name>
|
||||
<name>desktop 2</name>
|
||||
-->
|
||||
</names>
|
||||
<popupTime>875</popupTime>
|
||||
<!-- The number of milliseconds to show the popup for when switching
|
||||
desktops. Set this to 0 to disable the popup. -->
|
||||
</desktops>
|
||||
|
||||
<resize>
|
||||
<drawContents>yes</drawContents>
|
||||
<popupShow>Nonpixel</popupShow>
|
||||
<!-- 'Always', 'Never', or 'Nonpixel' (xterms and such) -->
|
||||
<popupPosition>Center</popupPosition>
|
||||
<!-- 'Center', 'Top', or 'Fixed' -->
|
||||
<popupFixedPosition>
|
||||
<!-- these are used if popupPosition is set to 'Fixed' -->
|
||||
|
||||
<x>10</x>
|
||||
<!-- positive number for distance from left edge, negative number for
|
||||
distance from right edge, or 'Center' -->
|
||||
<y>10</y>
|
||||
<!-- positive number for distance from top edge, negative number for
|
||||
distance from bottom edge, or 'Center' -->
|
||||
</popupFixedPosition>
|
||||
</resize>
|
||||
|
||||
<!-- You can reserve a portion of your screen where windows will not cover when
|
||||
they are maximized, or when they are initially placed.
|
||||
Many programs reserve space automatically, but you can use this in other
|
||||
cases. -->
|
||||
<margins>
|
||||
<top>0</top>
|
||||
<bottom>0</bottom>
|
||||
<left>0</left>
|
||||
<right>0</right>
|
||||
</margins>
|
||||
|
||||
<dock>
|
||||
<position>TopLeft</position>
|
||||
<!-- (Top|Bottom)(Left|Right|)|Top|Bottom|Left|Right|Floating -->
|
||||
<floatingX>0</floatingX>
|
||||
<floatingY>0</floatingY>
|
||||
<noStrut>no</noStrut>
|
||||
<stacking>Above</stacking>
|
||||
<!-- 'Above', 'Normal', or 'Below' -->
|
||||
<direction>Vertical</direction>
|
||||
<!-- 'Vertical' or 'Horizontal' -->
|
||||
<autoHide>no</autoHide>
|
||||
<hideDelay>300</hideDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<showDelay>300</showDelay>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<moveButton>Middle</moveButton>
|
||||
<!-- 'Left', 'Middle', 'Right' -->
|
||||
</dock>
|
||||
|
||||
<keyboard>
|
||||
<chainQuitKey>C-g</chainQuitKey>
|
||||
|
||||
<!-- Keybindings for desktop switching -->
|
||||
<keybind key="C-A-Left">
|
||||
<action name="GoToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Right">
|
||||
<action name="GoToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Up">
|
||||
<action name="GoToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Down">
|
||||
<action name="GoToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Left">
|
||||
<action name="SendToDesktop"><to>left</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Right">
|
||||
<action name="SendToDesktop"><to>right</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Up">
|
||||
<action name="SendToDesktop"><to>up</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="S-A-Down">
|
||||
<action name="SendToDesktop"><to>down</to><wrap>no</wrap></action>
|
||||
</keybind>
|
||||
<keybind key="W-F1">
|
||||
<action name="GoToDesktop"><to>1</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F2">
|
||||
<action name="GoToDesktop"><to>2</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F3">
|
||||
<action name="GoToDesktop"><to>3</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-F4">
|
||||
<action name="GoToDesktop"><to>4</to></action>
|
||||
</keybind>
|
||||
<keybind key="W-d">
|
||||
<action name="ToggleShowDesktop"/>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for windows -->
|
||||
<keybind key="A-F4">
|
||||
<action name="Close"/>
|
||||
</keybind>
|
||||
<keybind key="A-Escape">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</keybind>
|
||||
<keybind key="A-space">
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching -->
|
||||
<keybind key="A-Tab">
|
||||
<action name="NextWindow">
|
||||
<finalactions>
|
||||
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="A-S-Tab">
|
||||
<action name="PreviousWindow">
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="C-A-Tab">
|
||||
<action name="NextWindow">
|
||||
<panels>yes</panels><desktop>yes</desktop>
|
||||
<finalactions>
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</finalactions>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for window switching with the arrow keys -->
|
||||
<keybind key="W-S-Right">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>right</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Left">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>left</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Up">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>up</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
<keybind key="W-S-Down">
|
||||
<action name="DirectionalCycleWindows">
|
||||
<direction>down</direction>
|
||||
</action>
|
||||
</keybind>
|
||||
|
||||
<!-- Keybindings for running applications -->
|
||||
<keybind key="W-e">
|
||||
<action name="Execute">
|
||||
<startupnotify>
|
||||
<enabled>true</enabled>
|
||||
<name>Kitty</name>
|
||||
</startupnotify>
|
||||
<command>kitty</command>
|
||||
</action>
|
||||
</keybind>
|
||||
</keyboard>
|
||||
|
||||
<mouse>
|
||||
<dragThreshold>1</dragThreshold>
|
||||
<!-- number of pixels the mouse must move before a drag begins -->
|
||||
<doubleClickTime>500</doubleClickTime>
|
||||
<!-- in milliseconds (1000 = 1 second) -->
|
||||
<screenEdgeWarpTime>400</screenEdgeWarpTime>
|
||||
<!-- Time before changing desktops when the pointer touches the edge of the
|
||||
screen while moving a window, in milliseconds (1000 = 1 second).
|
||||
Set this to 0 to disable warping -->
|
||||
<screenEdgeWarpMouse>false</screenEdgeWarpMouse>
|
||||
<!-- Set this to TRUE to move the mouse pointer across the desktop when
|
||||
switching due to hitting the edge of the screen -->
|
||||
|
||||
<context name="Frame">
|
||||
<mousebind button="A-Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Click">
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="A-Right" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Up" action="Click">
|
||||
<action name="SendToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-S-Down" action="Click">
|
||||
<action name="SendToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Move"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="DoubleClick">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="if">
|
||||
<shaded>no</shaded>
|
||||
<then>
|
||||
<action name="Shade"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
<action name="Lower"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="if">
|
||||
<shaded>yes</shaded>
|
||||
<then>
|
||||
<action name="Unshade"/>
|
||||
<action name="Raise"/>
|
||||
</then>
|
||||
</action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Titlebar Top Right Bottom Left TLCorner TRCorner BRCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Lower"/>
|
||||
<action name="FocusToBottom"/>
|
||||
<action name="Unfocus"/>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Top">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>top</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Left">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>left</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Right">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>right</edge></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Bottom">
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"><edge>bottom</edge></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="TRCorner BRCorner TLCorner BLCorner">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Drag">
|
||||
<action name="Resize"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Client">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Icon">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="ShowMenu"><menu>client-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="AllDesktops">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleOmnipresent"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Shade">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleShade"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Iconify">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Iconify"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Maximize">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="ToggleMaximize"/>
|
||||
</mousebind>
|
||||
<mousebind button="Middle" action="Click">
|
||||
<action name="ToggleMaximize"><direction>vertical</direction></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Click">
|
||||
<action name="ToggleMaximize"><direction>horizontal</direction></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Close">
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
<action name="Unshade"/>
|
||||
</mousebind>
|
||||
<mousebind button="Left" action="Click">
|
||||
<action name="Close"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Desktop">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="C-A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
|
||||
<mousebind button="Left" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="Focus"/>
|
||||
<action name="Raise"/>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="Root">
|
||||
<!-- Menus -->
|
||||
<mousebind button="Middle" action="Press">
|
||||
<action name="ShowMenu"><menu>client-list-combined-menu</menu></action>
|
||||
</mousebind>
|
||||
<mousebind button="Right" action="Press">
|
||||
<action name="ShowMenu"><menu>root-menu</menu></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
|
||||
<context name="MoveResize">
|
||||
<mousebind button="Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Up" action="Click">
|
||||
<action name="GoToDesktop"><to>previous</to></action>
|
||||
</mousebind>
|
||||
<mousebind button="A-Down" action="Click">
|
||||
<action name="GoToDesktop"><to>next</to></action>
|
||||
</mousebind>
|
||||
</context>
|
||||
</mouse>
|
||||
|
||||
<menu>
|
||||
<!-- You can specify more than one menu file in here and they are all loaded,
|
||||
just don't make menu ids clash or, well, it'll be kind of pointless -->
|
||||
|
||||
<!-- default menu file (or custom one in $HOME/.config/openbox/) -->
|
||||
<file>menu.xml</file>
|
||||
<hideDelay>200</hideDelay>
|
||||
<!-- if a press-release lasts longer than this setting (in milliseconds), the
|
||||
menu is hidden again -->
|
||||
<middle>no</middle>
|
||||
<!-- center submenus vertically about the parent entry -->
|
||||
<submenuShowDelay>100</submenuShowDelay>
|
||||
<!-- time to delay before showing a submenu after hovering over the parent
|
||||
entry.
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be shown until it is clicked on -->
|
||||
<submenuHideDelay>400</submenuHideDelay>
|
||||
<!-- time to delay before hiding a submenu when selecting another
|
||||
entry in parent menu
|
||||
if this is a negative value, then the delay is infinite and the
|
||||
submenu will not be hidden until a different submenu is opened -->
|
||||
<showIcons>yes</showIcons>
|
||||
<!-- controls if icons appear in the client-list-(combined-)menu -->
|
||||
<manageDesktops>yes</manageDesktops>
|
||||
<!-- show the manage desktops section in the client-list-(combined-)menu -->
|
||||
</menu>
|
||||
|
||||
<applications>
|
||||
<!--
|
||||
# this is an example with comments through out. use these to make your
|
||||
# own rules, but without the comments of course.
|
||||
# you may use one or more of the name/class/role/title/type rules to specify
|
||||
# windows to match
|
||||
<application name="the window's _OB_APP_NAME property (see obxprop)"
|
||||
class="the window's _OB_APP_CLASS property (see obxprop)"
|
||||
groupname="the window's _OB_APP_GROUP_NAME property (see obxprop)"
|
||||
groupclass="the window's _OB_APP_GROUP_CLASS property (see obxprop)"
|
||||
role="the window's _OB_APP_ROLE property (see obxprop)"
|
||||
title="the window's _OB_APP_TITLE property (see obxprop)"
|
||||
type="the window's _OB_APP_TYPE property (see obxprob)..
|
||||
(if unspecified, then it is 'dialog' for child windows)">
|
||||
# you may set only one of name/class/role/title/type, or you may use more
|
||||
# than one together to restrict your matches.
|
||||
# the name, class, role, and title use simple wildcard matching such as those
|
||||
# used by a shell. you can use * to match any characters and ? to match
|
||||
# any single character.
|
||||
# the type is one of: normal, dialog, splash, utility, menu, toolbar, dock,
|
||||
# or desktop
|
||||
# when multiple rules match a window, they will all be applied, in the
|
||||
# order that they appear in this list
|
||||
# each rule element can be left out or set to 'default' to specify to not
|
||||
# change that attribute of the window
|
||||
<decor>yes</decor>
|
||||
# enable or disable window decorations
|
||||
<shade>no</shade>
|
||||
# make the window shaded when it appears, or not
|
||||
<position force="no">
|
||||
# the position is only used if both an x and y coordinate are provided
|
||||
# (and not set to 'default')
|
||||
# when force is "yes", then the window will be placed here even if it
|
||||
# says you want it placed elsewhere. this is to override buggy
|
||||
# applications who refuse to behave
|
||||
<x>center</x>
|
||||
# a number like 50, or 'center' to center on screen. use a negative number
|
||||
# to start from the right (or bottom for <y>), ie -50 is 50 pixels from
|
||||
# the right edge (or bottom). use 'default' to specify using value
|
||||
# provided by the application, or chosen by openbox, instead.
|
||||
<y>200</y>
|
||||
<monitor>1</monitor>
|
||||
# specifies the monitor in a xinerama setup.
|
||||
# 1 is the first head, or 'mouse' for wherever the mouse is
|
||||
</position>
|
||||
<size>
|
||||
# the size to make the window.
|
||||
<width>20</width>
|
||||
# a number like 20, or 'default' to use the size given by the application.
|
||||
# you can use fractions such as 1/2 or percentages such as 75% in which
|
||||
# case the value is relative to the size of the monitor that the window
|
||||
# appears on.
|
||||
<height>30%</height>
|
||||
</size>
|
||||
<focus>yes</focus>
|
||||
# if the window should try be given focus when it appears. if this is set
|
||||
# to yes it doesn't guarantee the window will be given focus. some
|
||||
# restrictions may apply, but Openbox will try to
|
||||
<desktop>1</desktop>
|
||||
# 1 is the first desktop, 'all' for all desktops
|
||||
<layer>normal</layer>
|
||||
# 'above', 'normal', or 'below'
|
||||
<iconic>no</iconic>
|
||||
# make the window iconified when it appears, or not
|
||||
<skip_pager>no</skip_pager>
|
||||
# asks to not be shown in pagers
|
||||
<skip_taskbar>no</skip_taskbar>
|
||||
# asks to not be shown in taskbars. window cycling actions will also
|
||||
# skip past such windows
|
||||
<fullscreen>yes</fullscreen>
|
||||
# make the window in fullscreen mode when it appears
|
||||
<maximized>true</maximized>
|
||||
# 'Horizontal', 'Vertical' or boolean (yes/no)
|
||||
</application>
|
||||
# end of the example
|
||||
-->
|
||||
</applications>
|
||||
|
||||
</openbox_config>
|
|
@ -1,15 +0,0 @@
|
|||
{ lib, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
pass = (super.pass.override { pass = super.pass-wayland; }).withExtensions (ext: [ ext.pass-otp ]);
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = { PASSWORD_STORE_DIR = "/home/charlotte/repos/passwords"; };
|
||||
};
|
||||
services.password-store-sync.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/pipewire"; type = "cache"; }
|
||||
];
|
||||
|
||||
sound.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/syncthing"; type = "data"; }
|
||||
{ path = "sync"; type = "cache"; }
|
||||
];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
services.syncthing.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ teams ];
|
||||
};
|
||||
|
||||
chvp = {
|
||||
nix.unfreePackages = [ "teams" ];
|
||||
zfs.homeLinks = [
|
||||
{ path = ".config/Microsoft"; type = "data"; }
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.vanilla-dmz ];
|
||||
home.file = {
|
||||
".icons/default/index.theme".text = ''
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=Vanilla-DMZ
|
||||
'';
|
||||
};
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
gtk-theme = "Arc";
|
||||
icon-theme = "Arc";
|
||||
cursor-theme = "Vanilla-DMZ";
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
size = 10;
|
||||
};
|
||||
gtk2.extraConfig = ''
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ"
|
||||
gtk-cursor-theme-size = 0
|
||||
'';
|
||||
gtk3.extraConfig = {
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ";
|
||||
gtk-cursor-theme-size = 0;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.arc-icon-theme;
|
||||
name = "Arc";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.arc-theme;
|
||||
name = "Arc";
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = "desktop"; type = "data"; }
|
||||
{ path = "documents"; type = "data"; }
|
||||
{ path = "downloads"; type = "cache"; }
|
||||
{ path = "music"; type = "data"; }
|
||||
{ path = "pictures"; type = "cache"; }
|
||||
{ path = "repos"; type = "cache"; }
|
||||
{ path = "templates"; type = "data"; }
|
||||
{ path = "videos"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ xdg-user-dirs ];
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
enable = true;
|
||||
desktop = "\$HOME/desktop";
|
||||
documents = "\$HOME/documents";
|
||||
download = "\$HOME/downloads";
|
||||
music = "\$HOME/music";
|
||||
pictures = "\$HOME/pictures";
|
||||
publicShare = "\$HOME/desktop";
|
||||
templates = "\$HOME/templates";
|
||||
videos = "\$HOME/videos";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
flake.lock
generated
12
flake.lock
generated
|
@ -22,11 +22,11 @@
|
|||
},
|
||||
"emacs-overlay": {
|
||||
"locked": {
|
||||
"lastModified": 1624698592,
|
||||
"narHash": "sha256-or3VxpmerZHAMuhpoA++cj51yopYaRe72triC+4Nq1k=",
|
||||
"lastModified": 1624727938,
|
||||
"narHash": "sha256-w6vdESHOlSVaa+ts7HB2Yi7zxZepjHnXArdTiauk/2o=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "67fe74d6e73e3c8a983b09a76d809acc730ad911",
|
||||
"rev": "d756e841ef2d30dcb9d831f47c2f2bc9b7eaaabf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -58,11 +58,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1624612706,
|
||||
"narHash": "sha256-HfuNvpN/T8TZrOTyjbLCjI4GqbYuQ5oAWZO/4T2Mj34=",
|
||||
"lastModified": 1624742990,
|
||||
"narHash": "sha256-Bl+3y9bn/217kDV8HkyCA3ldfry5hUGXpUrgiWFb4ag=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "0ada50fc9c620f7ad9f7c6ff70bf40514f4400a9",
|
||||
"rev": "8eee5f5272ac21df2f2db4b51eed28820c499930",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -1,25 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
../../profiles/graphical.nix
|
||||
];
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
networking.hostId = "e718389d";
|
||||
|
||||
time.timeZone = "Europe/Brussels";
|
||||
|
||||
# Machine-specific application settings
|
||||
# Machine-specific module settings
|
||||
chvp = {
|
||||
stateVersion = "20.09";
|
||||
graphical = true;
|
||||
bluetooth.enable = true;
|
||||
docker.enable = true;
|
||||
eid.enable = true;
|
||||
git.email = "charlotte.vanpetegem@ugent.be";
|
||||
sshd.enable = true;
|
||||
vpn.ugent.enable = true;
|
||||
zfs = {
|
||||
enable = true;
|
||||
encrypted = true;
|
||||
|
@ -33,6 +26,5 @@
|
|||
];
|
||||
rootDataset = "rpool/local/root";
|
||||
};
|
||||
zotero.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,42 +1,24 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware.nix
|
||||
../../profiles/graphical.nix
|
||||
];
|
||||
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback video_nr=9 card_label="obs"
|
||||
'';
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
package = pkgs.wrapOBS {
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
};
|
||||
};
|
||||
imports = [ ./hardware.nix ];
|
||||
|
||||
networking.hostId = "3cc1a4b2";
|
||||
|
||||
time.timeZone = "Europe/Brussels";
|
||||
|
||||
# Machine-specific settings
|
||||
# Machine-specific module settings
|
||||
chvp = {
|
||||
stateVersion = "20.09";
|
||||
graphical = true;
|
||||
android.enable = true;
|
||||
bluetooth.enable = true;
|
||||
docker.enable = true;
|
||||
eid.enable = true;
|
||||
dropbox.enable = true;
|
||||
git.email = "charlotte@vanpetegem.me";
|
||||
minecraft.client = true;
|
||||
sshd.enable = true;
|
||||
mumble.enable = true;
|
||||
obs.enable = true;
|
||||
steam.enable = true;
|
||||
vpn.ugent.enable = true;
|
||||
zeroad.enable = true;
|
||||
zfs = {
|
||||
enable = true;
|
||||
|
@ -51,6 +33,5 @@
|
|||
];
|
||||
rootDataset = "rpool/local/root";
|
||||
};
|
||||
zotero.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
networking.hostId = "b352adfe";
|
||||
|
||||
# Machine-specific module settings
|
||||
chvp = {
|
||||
stateVersion = "20.09";
|
||||
docker.enable = true;
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
environment.etc = lib.mapAttrs' (n: v: { name = "pinned-hosts/${n}"; value = { source = v.config.system.build.toplevel.outPath; }; })
|
||||
(lib.filterAttrs (n: _: n != "urithiru") nixosConfigurations);
|
||||
|
||||
# Machine-specific module settings
|
||||
chvp = {
|
||||
stateVersion = "20.09";
|
||||
accentor.enable = true;
|
||||
|
|
Binary file not shown.
14
modules/android.nix
Normal file
14
modules/android.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.chvp.android.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.android.enable {
|
||||
chvp.zfs.homeLinks = [{ path = ".android"; type = "cache"; }];
|
||||
programs.adb.enable = true;
|
||||
users.users.charlotte.extraGroups = [ "adbusers" ];
|
||||
};
|
||||
}
|
17
modules/calibre.nix
Normal file
17
modules/calibre.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.calibre.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.calibre.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/calibre"; type = "cache"; }
|
||||
];
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = [ pkgs.calibre ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,26 +3,46 @@
|
|||
{
|
||||
imports = [
|
||||
./accentor.nix
|
||||
./android.nix
|
||||
./bluetooth.nix
|
||||
./calibre.nix
|
||||
./docker.nix
|
||||
./deluge-client.nix
|
||||
./deluge-server.nix
|
||||
./dropbox.nix
|
||||
./eid.nix
|
||||
./emacs.nix
|
||||
./firefox.nix
|
||||
./git.nix
|
||||
./global-mailer.nix
|
||||
./gnupg.nix
|
||||
./graphical.nix
|
||||
./hledger.nix
|
||||
./mail-client.nix
|
||||
./minecraft.nix
|
||||
./mumble.nix
|
||||
./networkmanager.nix
|
||||
./nextcloud.nix
|
||||
./nix.nix
|
||||
./nginx.nix
|
||||
./obs.nix
|
||||
./ovh.nix
|
||||
./pass.nix
|
||||
./smartd.nix
|
||||
./sound.nix
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./steam.nix
|
||||
./sway
|
||||
./syncthing-client.nix
|
||||
./syncthing-server.nix
|
||||
./teeworlds.nix
|
||||
./terminal.nix
|
||||
./tetris.nix
|
||||
./theming.nix
|
||||
./tmux.nix
|
||||
./vpn.nix
|
||||
./ugent
|
||||
./xdg.nix
|
||||
./zeroad.nix
|
||||
./zfs.nix
|
||||
./zotero.nix
|
||||
|
@ -44,11 +64,6 @@
|
|||
example = "/cache";
|
||||
};
|
||||
|
||||
graphical = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
hasContainers = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
|
@ -68,11 +83,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
ncdu
|
||||
ripgrep
|
||||
];
|
||||
environment.systemPackages = with pkgs; [ htop moreutils ncdu ripgrep sshfs unzip ];
|
||||
|
||||
console = {
|
||||
colors = [
|
||||
|
@ -124,6 +135,8 @@
|
|||
];
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
|
@ -132,7 +145,7 @@
|
|||
isNormalUser = true;
|
||||
home = "/home/charlotte";
|
||||
description = "Charlotte Van Petegem";
|
||||
extraGroups = [ "systemd-journal" ] ++ lib.optionals config.chvp.graphical [ "input" "video" ];
|
||||
extraGroups = [ "systemd-journal" ];
|
||||
passwordFile = config.age.secrets."passwords/users/charlotte".path;
|
||||
};
|
||||
root.passwordFile = config.age.secrets."passwords/users/root".path;
|
||||
|
|
18
modules/deluge-client.nix
Normal file
18
modules/deluge-client.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.deluge-client.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.deluge-client.enable {
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ deluge ];
|
||||
};
|
||||
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/deluge"; type = "data"; }
|
||||
];
|
||||
};
|
||||
}
|
66
modules/deluge-server.nix
Normal file
66
modules/deluge-server.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.deluge-server = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
count = lib.mkOption {
|
||||
default = 1;
|
||||
example = 6;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.deluge-server.enable {
|
||||
chvp.nginx.hosts = builtins.genList
|
||||
(n: {
|
||||
fqdn = "del${toString (n + 1)}.vanpetegem.me";
|
||||
basicProxy = "http://localhost:${toString (8112 + n)}";
|
||||
})
|
||||
config.chvp.deluge-server.count;
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 60000; to = 60000 + config.chvp.deluge-server.count - 1; }
|
||||
{ from = 58846; to = 58846 + config.chvp.deluge-server.count - 1; }
|
||||
];
|
||||
};
|
||||
|
||||
systemd.services = builtins.foldl' (x: y: x // y) { } (builtins.genList
|
||||
(n:
|
||||
let num = toString (n + 1); in
|
||||
{
|
||||
"del${num}" = {
|
||||
after = [ "network.target" ];
|
||||
description = "Deluge daemon ${num}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.deluge ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.deluge}/bin/deluged --do-not-daemonize --config /data/var/lib/deluge/del${toString (n + 1)}
|
||||
'';
|
||||
Restart = "on-success";
|
||||
User = "charlotte";
|
||||
Group = "users";
|
||||
UMask = "022";
|
||||
};
|
||||
};
|
||||
"del${num}-web" = {
|
||||
after = [ "network.target" "del${num}.service" ];
|
||||
requires = [ "del${num}.service" ];
|
||||
description = "Deluge Web UI for daemon ${num}";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
path = [ pkgs.deluge ];
|
||||
serviceConfig = {
|
||||
ExecStart = ''
|
||||
${pkgs.deluge}/bin/deluge-web --do-not-daemonize --config /data/var/lib/deluge/del${toString (n + 1)} --port ${toString (8112 + n)}
|
||||
'';
|
||||
User = "charlotte";
|
||||
Group = "users";
|
||||
};
|
||||
};
|
||||
})
|
||||
config.chvp.deluge-server.count);
|
||||
};
|
||||
}
|
44
modules/dropbox.nix
Normal file
44
modules/dropbox.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.dropbox.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.dropbox.enable {
|
||||
chvp = {
|
||||
nix.unfreePackages = [ "dropbox" ];
|
||||
zfs.homeLinks = [
|
||||
{ path = ".dropbox"; type = "cache"; }
|
||||
{ path = "Dropbox"; type = "data"; }
|
||||
];
|
||||
};
|
||||
|
||||
# Avoids a double firefox install, see https://github.com/NixOS/nixpkgs/pull/31772
|
||||
nixpkgs.overlays = [ (self: super: { firefox-bin = self.firefox; }) ];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
systemd.user.services = {
|
||||
dropbox = {
|
||||
Unit = {
|
||||
Description = "Dropbox";
|
||||
};
|
||||
Service = {
|
||||
Environment = "QT_PLUGIN_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtPluginPrefix}\" QML2_IMPORT_PATH=\"/run/current-system/sw/${pkgs.qt5.qtbase.qtQmlPrefix}\"";
|
||||
ExecStart = "${pkgs.dropbox.out}/bin/dropbox";
|
||||
ExecReload = "${pkgs.coreutils.out}/bin/kill -HUP $MAINPID";
|
||||
KillMode = "control-group";
|
||||
Restart = "on-failure";
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
Nice = 10;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -8,6 +8,11 @@
|
|||
|
||||
config = lib.mkIf config.chvp.eid.enable {
|
||||
environment.systemPackages = [ pkgs.eid-mw ];
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
firefox = super.firefox.override { pkcs11Modules = [ self.eid-mw ]; };
|
||||
})
|
||||
];
|
||||
services.pcscd = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.ccid ];
|
||||
|
|
19
modules/firefox.nix
Normal file
19
modules/firefox.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.firefox.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.firefox.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".cache/mozilla"; type = "cache"; }
|
||||
{ path = ".mozilla"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = with pkgs; [ firefox ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.chvp.gnupg.pinentryFlavor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "curses";
|
||||
example = "qt";
|
||||
description = ''
|
||||
Pinentry flavor for gnupg.
|
||||
'';
|
||||
options.chvp.gnupg = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
pinentryFlavor = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "curses";
|
||||
example = "qt";
|
||||
description = ''
|
||||
Pinentry flavor for gnupg.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
config = lib.mkIf config.chvp.gnupg.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".gnupg/crls.d"; type = "data"; }
|
||||
{ path = ".gnupg/private-keys-v1.d"; type = "data"; }
|
||||
|
@ -19,6 +25,7 @@
|
|||
];
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = config.chvp.gnupg.pinentryFlavor;
|
||||
};
|
||||
home-manager.users.charlotte = { lib, ... }: {
|
||||
home.activation.fixPermissionsCommands = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
50
modules/graphical.nix
Normal file
50
modules/graphical.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.graphical = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.graphical {
|
||||
users.users.charlotte.extraGroups = [ "input" "video" ];
|
||||
chvp = {
|
||||
calibre.enable = lib.mkDefault true;
|
||||
deluge-client.enable = lib.mkDefault true;
|
||||
docker.enable = lib.mkDefault true;
|
||||
eid.enable = lib.mkDefault true;
|
||||
firefox.enable = lib.mkDefault true;
|
||||
mail-client.enable = lib.mkDefault true;
|
||||
gnupg = {
|
||||
enable = lib.mkDefault true;
|
||||
pinentryFlavor = lib.mkDefault "qt";
|
||||
};
|
||||
hledger.enable = lib.mkDefault true;
|
||||
networkmanager.enable = lib.mkDefault true;
|
||||
nix.unfreePackages = [ "google-chrome" ];
|
||||
pass.enable = lib.mkDefault true;
|
||||
sound.enable = lib.mkDefault true;
|
||||
syncthing-client.enable = lib.mkDefault true;
|
||||
sway.enable = lib.mkDefault true;
|
||||
terminal.enable = lib.mkDefault true;
|
||||
theming.enable = lib.mkDefault true;
|
||||
ugent.enable = lib.mkDefault true;
|
||||
xdg.enable = lib.mkDefault true;
|
||||
zotero.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
libreoffice-fresh
|
||||
mpv
|
||||
okular
|
||||
pandoc
|
||||
ranger
|
||||
texlive.combined.scheme-small
|
||||
ungoogled-chromium
|
||||
youtube-dl
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
32
modules/hledger.nix
Normal file
32
modules/hledger.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hledger-repo = pkgs.fetchFromGitHub {
|
||||
owner = "chvp";
|
||||
repo = "hledger";
|
||||
rev = "feature/gain-reports";
|
||||
sha256 = "07qsrq71pnkys11q6k2zc20xc9l3yp8dhzp1ar5bnkgcwbm69rcx";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.chvp.hledger.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.hledger.enable {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
haskellPackages = super.haskellPackages.override {
|
||||
overrides = hself: hsuper: rec {
|
||||
hledger = hsuper.callCabal2nixWithOptions "hledger" hledger-repo "--subpath hledger" { };
|
||||
hledger-lib = hsuper.callCabal2nixWithOptions "hledger-lib" hledger-repo "--subpath hledger-lib" { };
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = [ pkgs.hledger ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
passwordScript = pkgs.writeShellScript "get_mail_password" ''${pkgs.pass}/bin/pass show "$@" | head -n1 | tr -d "\n"'';
|
||||
notifyScript = name: pkgs.writeShellScript "notify_${name}_mail" ''
|
||||
notifyScript = name: pkgs.writeShellScript "notify_${name}_mail" (if config.chvp.graphical then ''
|
||||
unseen_count=$(${pkgs.mblaze}/bin/mlist -N ~/mail/*/INBOX | wc -l)
|
||||
|
||||
if [ "$unseen_count" = "1" ]
|
||||
|
@ -11,7 +12,7 @@ let
|
|||
then
|
||||
${pkgs.libnotify}/bin/notify-send -t 5000 'New ${name} mail arrived' "$unseen_count unseen mails"
|
||||
fi
|
||||
'';
|
||||
'' else ''true'');
|
||||
makeAccount = { name, address, host ? "", imapHost ? host, smtpHost ? host, useStartTls ? false, passFile, extraConfig ? { } }: (lib.recursiveUpdate
|
||||
{
|
||||
inherit address;
|
||||
|
@ -75,7 +76,12 @@ let
|
|||
toRecursiveINIBase 1;
|
||||
in
|
||||
{
|
||||
config = {
|
||||
options.chvp.mail-client.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.mail-client.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = "mail"; type = "data"; }
|
||||
{ path = ".cache/mu"; type = "cache"; }
|
19
modules/mumble.nix
Normal file
19
modules/mumble.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.mumble.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.mumble.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/Mumble"; type = "data"; }
|
||||
{ path = ".local/share/Mumble"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = with pkgs; [ mumble ];
|
||||
};
|
||||
};
|
||||
}
|
23
modules/networkmanager.nix
Normal file
23
modules/networkmanager.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.networkmanager.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.networkmanager.enable {
|
||||
chvp.zfs.systemLinks = [
|
||||
{ path = "/etc/NetworkManager/system-connections"; type = "data"; }
|
||||
];
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
wifi.macAddress = "random";
|
||||
};
|
||||
|
||||
users.users.charlotte.extraGroups = [ "networkmanager" ];
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = with pkgs; [ networkmanagerapplet ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -46,7 +46,7 @@
|
|||
security.acme = {
|
||||
certs."vanpetegem.me" = {
|
||||
dnsProvider = "cloudflare";
|
||||
credentialsFile = config.age.secrets."passwords/services/acme".path;
|
||||
credentialsFile = config.age.secrets."passwords/services/acme".path;
|
||||
extraDomainNames = [
|
||||
"*.vanpetegem.me"
|
||||
"cvpetegem.be"
|
||||
|
|
27
modules/obs.nix
Normal file
27
modules/obs.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.obs.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.obs.enable {
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback video_nr=9 card_label="obs"
|
||||
'';
|
||||
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/obs-studio"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/pass.nix
Normal file
25
modules/pass.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.chvp.pass.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.pass.enable {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
firefox = super.firefox.override { extraNativeMessagingHosts = [ self.passff-host ]; };
|
||||
pass = (super.pass.override { pass = super.pass-wayland; }).withExtensions (ext: [ ext.pass-otp ]);
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
programs.password-store = {
|
||||
enable = true;
|
||||
settings = { PASSWORD_STORE_DIR = "/home/charlotte/repos/passwords"; };
|
||||
};
|
||||
services.password-store-sync.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
29
modules/sound.nix
Normal file
29
modules/sound.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.sound.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.sound.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/pipewire"; type = "cache"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = with pkgs; [
|
||||
pavucontrol
|
||||
qjackctl
|
||||
];
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
{
|
||||
options.chvp.sshd.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
default = true;
|
||||
example = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.sshd.enable {
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
launcher = import ./sway/launcher.nix { inherit pkgs; stdenv = pkgs.stdenv; };
|
||||
color-picker = import ./sway/color-picker.nix { inherit pkgs; };
|
||||
screenshot = import ./sway/screenshot.nix { inherit pkgs; };
|
||||
status-configuration = import ./sway/status-configuration.nix { inherit pkgs config; };
|
||||
launcher = import ./launcher.nix { inherit pkgs; stdenv = pkgs.stdenv; };
|
||||
color-picker = import ./color-picker.nix { inherit pkgs; };
|
||||
screenshot = import ./screenshot.nix { inherit pkgs; };
|
||||
status-configuration = import ./status-configuration.nix { inherit pkgs config; };
|
||||
in
|
||||
{
|
||||
config = {
|
||||
options.chvp.sway.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.sway.enable {
|
||||
services.dbus.packages = with pkgs; [ gnome3.dconf ];
|
||||
security.pam.services.swaylock = { };
|
||||
xdg.portal = {
|
||||
|
@ -14,11 +20,23 @@ in
|
|||
gtkUsePortal = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-wlr ];
|
||||
};
|
||||
home-manager.users.charlotte = { pkgs, lib, ... }: {
|
||||
home.packages = [ color-picker screenshot ];
|
||||
programs.mako = {
|
||||
enable = true;
|
||||
font = "Fira Code Normal 9";
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
color-picker
|
||||
screenshot
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
];
|
||||
programs = {
|
||||
mako = {
|
||||
enable = true;
|
||||
font = "Fira Code Normal 9";
|
||||
};
|
||||
zsh.loginExtra = ''
|
||||
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
|
||||
exec sway
|
||||
fi
|
||||
'';
|
||||
};
|
||||
services.kanshi = {
|
||||
enable = true;
|
18
modules/syncthing-client.nix
Normal file
18
modules/syncthing-client.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.syncthing-client.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.syncthing-client.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = ".config/syncthing"; type = "data"; }
|
||||
{ path = "sync"; type = "cache"; }
|
||||
];
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
services.syncthing.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
52
modules/terminal.nix
Normal file
52
modules/terminal.nix
Normal file
|
@ -0,0 +1,52 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.terminal.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.terminal.enable {
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = "Fira Code";
|
||||
font_size = 9;
|
||||
disable_ligatures = "cursor";
|
||||
background = "#ffffff";
|
||||
foreground = "#000000";
|
||||
cursor = "#777777";
|
||||
url_color = "#0031a9";
|
||||
# black
|
||||
color0 = "#282828";
|
||||
color8 = "#000000";
|
||||
# red
|
||||
color1 = "#a60000";
|
||||
color9 = "#972500";
|
||||
# green
|
||||
color2 = "#005e00";
|
||||
color10 = "#315b00";
|
||||
# yellow
|
||||
color3 = "#813e00";
|
||||
color11 = "#70480f";
|
||||
# blue
|
||||
color4 = "#0031a9";
|
||||
color12 = "#2544bb";
|
||||
# magenta
|
||||
color5 = "#721045";
|
||||
color13 = "#8f0075";
|
||||
# cyan
|
||||
color6 = "#00538b";
|
||||
color14 = "#30517f";
|
||||
# white
|
||||
color7 = "#f8f8f8";
|
||||
color15 = "#ffffff";
|
||||
enable_audio_bell = false;
|
||||
visual_bell_duration = "0.25";
|
||||
remember_window_size = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
77
modules/theming.nix
Normal file
77
modules/theming.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.theming.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.theming.enable {
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
monospace = [ "Fira Code" ];
|
||||
sansSerif = [ "Noto Sans" ];
|
||||
serif = [ "Noto Serif" ];
|
||||
};
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
font-awesome_4
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
noto-fonts-extra
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = [ pkgs.vanilla-dmz ];
|
||||
home.file = {
|
||||
".icons/default/index.theme".text = ''
|
||||
[Icon Theme]
|
||||
Name=Default
|
||||
Comment=Default Cursor Theme
|
||||
Inherits=Vanilla-DMZ
|
||||
'';
|
||||
};
|
||||
dconf.settings."org/gnome/desktop/interface" = {
|
||||
gtk-theme = "Arc";
|
||||
icon-theme = "Arc";
|
||||
cursor-theme = "Vanilla-DMZ";
|
||||
};
|
||||
gtk = {
|
||||
enable = true;
|
||||
font = {
|
||||
package = pkgs.noto-fonts;
|
||||
name = "Noto Sans";
|
||||
size = 10;
|
||||
};
|
||||
gtk2.extraConfig = ''
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ"
|
||||
gtk-cursor-theme-size = 0
|
||||
'';
|
||||
gtk3.extraConfig = {
|
||||
gtk-cursor-theme-name = "Vanilla-DMZ";
|
||||
gtk-cursor-theme-size = 0;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.arc-icon-theme;
|
||||
name = "Arc";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.arc-theme;
|
||||
name = "Arc";
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
20
modules/ugent/citrix.nix
Normal file
20
modules/ugent/citrix.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options.chvp.ugent.citrix.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.ugent.citrix.enable {
|
||||
chvp = {
|
||||
nix.unfreePackages = [ "citrix-workspace" ];
|
||||
zfs.homeLinks = [
|
||||
{ path = ".ICAClient"; type = "data"; }
|
||||
];
|
||||
};
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ citrix_workspace ];
|
||||
};
|
||||
};
|
||||
}
|
24
modules/ugent/default.nix
Normal file
24
modules/ugent/default.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vpn.nix
|
||||
./citrix.nix
|
||||
./mounts.nix
|
||||
./teams.nix
|
||||
];
|
||||
|
||||
options.chvp.ugent.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.ugent.enable {
|
||||
chvp.ugent = {
|
||||
citrix.enable = lib.mkDefault true;
|
||||
vpn.enable = lib.mkDefault true;
|
||||
mounts.enable = lib.mkDefault true;
|
||||
teams.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
66
modules/ugent/mounts.nix
Normal file
66
modules/ugent/mounts.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
|
||||
in
|
||||
{
|
||||
options.chvp.ugent.mounts.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.ugent.mounts.enable {
|
||||
fileSystems = {
|
||||
"/mnt/ugent/files" = {
|
||||
device = "//files.ugent.be/ecvpeteg";
|
||||
fsType = "cifs";
|
||||
options = [ "credentials=/run/secrets/passwords/ugent-mount-credentials,${automount_opts},users,vers=3.0,noperm,domain=UGENT,sec=ntlmv2i" ];
|
||||
noCheck = true;
|
||||
};
|
||||
"/mnt/ugent/webhost" = {
|
||||
device = "//webhost.ugent.be/ecvpeteg";
|
||||
fsType = "cifs";
|
||||
options = [ "credentials=/run/secrets/passwords/ugent-mount-credentials,${automount_opts},users,vers=3.0" ];
|
||||
noCheck = true;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets."passwords/ugent-mount-credentials".file = ../../secrets/passwords/ugent-mount-credentials.age;
|
||||
|
||||
environment.systemPackages = [ pkgs.keyutils ];
|
||||
# Remove this once https://github.com/NixOS/nixpkgs/issues/34638 is resolved
|
||||
# The TL;DR is: the kernel calls out to the hard-coded path of
|
||||
# /sbin/request-key as part of its CIFS auth process, which of course does
|
||||
# not exist on NixOS due to the usage of Nix store paths.
|
||||
system.activationScripts.symlink-requestkey = ''
|
||||
if [ ! -d /sbin ]; then
|
||||
mkdir /sbin
|
||||
fi
|
||||
ln -sfn /run/current-system/sw/bin/request-key /sbin/request-key
|
||||
'';
|
||||
# request-key expects a configuration file under /etc
|
||||
environment.etc."request-key.conf" = {
|
||||
text =
|
||||
let
|
||||
upcall = "${pkgs.cifs-utils}/bin/cifs.upcall";
|
||||
keyctl = "${pkgs.keyutils}/bin/keyctl";
|
||||
in
|
||||
''
|
||||
#OP TYPE DESCRIPTION CALLOUT_INFO PROGRAM
|
||||
# -t is required for DFS share servers...
|
||||
create cifs.spnego * * ${upcall} -t %k
|
||||
create dns_resolver * * ${upcall} %k
|
||||
# Everything below this point is essentially the default configuration,
|
||||
# modified minimally to work under NixOS. Notably, it provides debug
|
||||
# logging.
|
||||
create user debug:* negate ${keyctl} negate %k 30 %S
|
||||
create user debug:* rejected ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* expired ${keyctl} reject %k 30 %c %S
|
||||
create user debug:* revoked ${keyctl} reject %k 30 %c %S
|
||||
create user debug:loop:* * |${pkgs.coreutils}/bin/cat
|
||||
create user debug:* * ${pkgs.keyutils}/share/keyutils/request-key-debug.sh %k %d %c %S
|
||||
negate * * * ${keyctl} negate %k 30 %S
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
21
modules/ugent/teams.nix
Normal file
21
modules/ugent/teams.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.ugent.teams.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.ugent.teams.enable {
|
||||
chvp = {
|
||||
nix.unfreePackages = [ "teams" ];
|
||||
zfs.homeLinks = [
|
||||
{ path = ".config/Microsoft"; type = "data"; }
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ teams ];
|
||||
};
|
||||
};
|
||||
}
|
38
modules/ugent/vpn.nix
Normal file
38
modules/ugent/vpn.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vpn.secret.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
chvp.ugent.vpn.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.ugent.vpn.enable {
|
||||
systemd.services = {
|
||||
ugent-global-vpn = {
|
||||
after = [ "network.target" ];
|
||||
conflicts = [ "ugent-local-vpn.service" ];
|
||||
};
|
||||
ugent-local-vpn = {
|
||||
after = [ "network.target" ];
|
||||
conflicts = [ "ugent-global-vpn.service" ];
|
||||
};
|
||||
};
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-global-vpn.service") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-local-vpn.service") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
age.secrets."passwords/ugent-vpn".file = ../../secrets/passwords/ugent-vpn.age;
|
||||
};
|
||||
}
|
BIN
modules/ugent/vpn.secret.nix
Normal file
BIN
modules/ugent/vpn.secret.nix
Normal file
Binary file not shown.
|
@ -1,38 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./vpn/secret.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
chvp.vpn.ugent.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.vpn.ugent.enable {
|
||||
systemd.services = {
|
||||
ugent-global-vpn = {
|
||||
after = [ "network.target" ];
|
||||
conflicts = [ "ugent-local-vpn.service" ];
|
||||
};
|
||||
ugent-local-vpn = {
|
||||
after = [ "network.target" ];
|
||||
conflicts = [ "ugent-global-vpn.service" ];
|
||||
};
|
||||
};
|
||||
security.polkit.extraConfig = ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-global-vpn.service") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-local-vpn.service") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
age.secrets."passwords/ugent-vpn".file = ../secrets/passwords/ugent-vpn.age;
|
||||
};
|
||||
}
|
Binary file not shown.
58
modules/xdg.nix
Normal file
58
modules/xdg.nix
Normal file
|
@ -0,0 +1,58 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.xdg.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.xdg.enable {
|
||||
chvp.zfs.homeLinks = [
|
||||
{ path = "desktop"; type = "data"; }
|
||||
{ path = "documents"; type = "data"; }
|
||||
{ path = "downloads"; type = "cache"; }
|
||||
{ path = "music"; type = "data"; }
|
||||
{ path = "pictures"; type = "cache"; }
|
||||
{ path = "repos"; type = "cache"; }
|
||||
{ path = "templates"; type = "data"; }
|
||||
{ path = "videos"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ xdg-user-dirs ];
|
||||
xdg = {
|
||||
enable = true;
|
||||
# Some applications overwrite mimeapps.list with an identical file
|
||||
configFile."mimeapps.list".force = true;
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"image/png" = [ "org.kde.okular.desktop" ];
|
||||
"image/jpg" = [ "org.kde.okular.desktop" ];
|
||||
"image/jpeg" = [ "org.kde.okular.desktop" ];
|
||||
"application/pdf" = [ "org.kde.okular.desktop" ];
|
||||
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
|
||||
"x-scheme-handler/msteams" = [ "teams.desktop" ];
|
||||
};
|
||||
};
|
||||
userDirs = {
|
||||
enable = true;
|
||||
desktop = "\$HOME/desktop";
|
||||
documents = "\$HOME/documents";
|
||||
download = "\$HOME/downloads";
|
||||
music = "\$HOME/music";
|
||||
pictures = "\$HOME/pictures";
|
||||
publicShare = "\$HOME/desktop";
|
||||
templates = "\$HOME/templates";
|
||||
videos = "\$HOME/videos";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,67 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../configurations/adb.nix
|
||||
../configurations/calibre.nix
|
||||
../configurations/citrix.nix
|
||||
../configurations/deluge.nix
|
||||
../configurations/dropbox.nix
|
||||
../configurations/firefox.nix
|
||||
../configurations/fonts.nix
|
||||
../configurations/gnupg.nix
|
||||
../configurations/hledger.nix
|
||||
../configurations/i3.nix
|
||||
../configurations/kitty.nix
|
||||
../configurations/mail.nix
|
||||
../configurations/mime.nix
|
||||
../configurations/mounts.nix
|
||||
../configurations/mumble.nix
|
||||
../configurations/networkmanager.nix
|
||||
../configurations/pass.nix
|
||||
../configurations/sound.nix
|
||||
../configurations/sway.nix
|
||||
../configurations/syncthing.nix
|
||||
../configurations/teams.nix
|
||||
../configurations/themes.nix
|
||||
../configurations/xdg-dirs.nix
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
google-chrome
|
||||
libreoffice-fresh
|
||||
moreutils
|
||||
mpv
|
||||
okular
|
||||
pandoc
|
||||
pavucontrol
|
||||
qjackctl
|
||||
ranger
|
||||
slurp
|
||||
sshfs
|
||||
texlive.combined.scheme-small
|
||||
ungoogled-chromium
|
||||
unzip
|
||||
wf-recorder
|
||||
wl-clipboard
|
||||
youtube-dl
|
||||
];
|
||||
programs.zsh.loginExtra = ''
|
||||
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty1" ]]; then
|
||||
exec sway
|
||||
fi
|
||||
|
||||
if [[ -z "$DISPLAY" ]] && [[ $(tty) = "/dev/tty2" ]]; then
|
||||
exec startx
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
services.fwupd.enable = true;
|
||||
|
||||
chvp = {
|
||||
gnupg.pinentryFlavor = "qt";
|
||||
nix.unfreePackages = [ "google-chrome" ];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue