Reorganize repository
This commit is contained in:
parent
da1824edb6
commit
0fc6c32a47
124 changed files with 16295 additions and 1229 deletions
17
modules/programs/calibre/default.nix
Normal file
17
modules/programs/calibre/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.programs.calibre.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.calibre.enable {
|
||||
chvp.base.zfs.homeLinks = [
|
||||
{ path = ".config/calibre"; type = "cache"; }
|
||||
];
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = [ pkgs.calibre ];
|
||||
};
|
||||
};
|
||||
}
|
12
modules/programs/default.nix
Normal file
12
modules/programs/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./calibre
|
||||
./deluge
|
||||
./dropbox
|
||||
./eid
|
||||
./hledger
|
||||
./obs
|
||||
];
|
||||
}
|
18
modules/programs/deluge/default.nix
Normal file
18
modules/programs/deluge/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.programs.deluge.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.deluge.enable {
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
home.packages = with pkgs; [ deluge ];
|
||||
};
|
||||
|
||||
chvp.base.zfs.homeLinks = [
|
||||
{ path = ".config/deluge"; type = "data"; }
|
||||
];
|
||||
};
|
||||
}
|
44
modules/programs/dropbox/default.nix
Normal file
44
modules/programs/dropbox/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.programs.dropbox.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.dropbox.enable {
|
||||
chvp.base = {
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
21
modules/programs/eid/default.nix
Normal file
21
modules/programs/eid/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.programs.eid.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.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 ];
|
||||
};
|
||||
};
|
||||
}
|
50
modules/programs/hledger/default.nix
Normal file
50
modules/programs/hledger/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
hledger-repo = pkgs.fetchFromGitHub {
|
||||
owner = "chvp";
|
||||
repo = "hledger";
|
||||
rev = "feature/gain-reports";
|
||||
sha256 = "07qsrq71pnkys11q6k2zc20xc9l3yp8dhzp1ar5bnkgcwbm69rcx";
|
||||
};
|
||||
in
|
||||
{
|
||||
options.chvp.programs.hledger.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.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" { };
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
chvp.base.emacs.extraConfig = [
|
||||
''
|
||||
;; Ledger syntax support
|
||||
(use-package ledger-mode
|
||||
:mode "\\.journal\\'"
|
||||
:custom
|
||||
(ledger-binary-path "hledger" "Use hledger instead of ledger")
|
||||
(ledger-highlight-xact-under-point nil "Remove distracting highlight")
|
||||
(ledger-mode-should-check-version nil "Remove version check, since it doesn't work with hledger anyway")
|
||||
(ledger-post-account-alignment-column 4 "Indent postings with 4 spaces")
|
||||
(ledger-post-amount-alignment-at :decimal "Align on the decimal")
|
||||
(ledger-post-amount-alignment-column 59 "Align on column 60")
|
||||
(ledger-post-auto-align t "Align when moving to the next line")
|
||||
)
|
||||
''
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { ... }: {
|
||||
home.packages = [ pkgs.hledger ];
|
||||
};
|
||||
};
|
||||
}
|
27
modules/programs/obs/default.nix
Normal file
27
modules/programs/obs/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
options.chvp.programs.obs.enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.chvp.programs.obs.enable {
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback video_nr=9 card_label="obs"
|
||||
'';
|
||||
|
||||
chvp.base.zfs.homeLinks = [
|
||||
{ path = ".config/obs-studio"; type = "data"; }
|
||||
];
|
||||
|
||||
home-manager.users.charlotte = { pkgs, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue