🧹 restructure layout
|
@ -3,3 +3,4 @@
|
|||
*.log
|
||||
tmp/
|
||||
.direnv/
|
||||
.pre-commit-config.yaml
|
||||
|
|
4
apply.sh
|
@ -1,4 +0,0 @@
|
|||
#!/bin/sh
|
||||
pushd ~/.dotfiles
|
||||
sudo nixos-rebuild switch --flake .#
|
||||
popd
|
|
@ -1,17 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
modules = {
|
||||
gaming = true;
|
||||
|
||||
editors = {
|
||||
idea = true;
|
||||
code = true;
|
||||
};
|
||||
|
||||
desktop.apps.email = {
|
||||
enable = true;
|
||||
passwordFile = ../secrets/email-desktop.age;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
modules = {
|
||||
editors.code = true;
|
||||
desktop.apps.email = {
|
||||
enable = true;
|
||||
passwordFile = ../secrets/email-desktop.age;
|
||||
};
|
||||
};
|
||||
}
|
51
flake.lock
|
@ -232,6 +232,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_4": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"forgit-git": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -417,6 +432,20 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1645655918,
|
||||
"narHash": "sha256-ZfbEFRW7o237+A1P7eTKhXje435FCAoe0blj2n20Was=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "77a7a4197740213879b9a1d2e1788c6c8ade4274",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1657272425,
|
||||
|
@ -432,6 +461,25 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1656169028,
|
||||
"narHash": "sha256-y9DRauokIeVHM7d29lwT8A+0YoGUBXV3H0VErxQeA8s=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "db3bd555d3a3ceab208bed48f983ccaa6a71a25e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"agenix": "agenix",
|
||||
|
@ -447,6 +495,7 @@
|
|||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-review-checks": "nixpkgs-review-checks",
|
||||
"nur": "nur",
|
||||
"pre-commit-hooks": "pre-commit-hooks",
|
||||
"stable": "stable",
|
||||
"statix": "statix",
|
||||
"utils": "utils_3"
|
||||
|
@ -539,7 +588,7 @@
|
|||
},
|
||||
"utils_3": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3"
|
||||
"flake-utils": "flake-utils_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657226504,
|
||||
|
|
67
flake.nix
|
@ -15,6 +15,8 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
||||
|
||||
utils = {
|
||||
url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -80,7 +82,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, utils, ... }:
|
||||
outputs =
|
||||
inputs @ { self
|
||||
, nixpkgs
|
||||
, utils
|
||||
, ...
|
||||
}:
|
||||
utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
|
||||
|
@ -90,11 +97,9 @@
|
|||
### Overlays ###
|
||||
################
|
||||
|
||||
overlay = import ./overlays { inherit inputs; };
|
||||
# overlays = utils.lib.exportOverlays { inherit (self) pkgs inputs; };
|
||||
|
||||
overlays.default = import ./overlays { inherit inputs; };
|
||||
channels.nixpkgs.overlaysBuilder = channels: [
|
||||
self.overlay
|
||||
self.overlays.default
|
||||
inputs.utils.overlay
|
||||
inputs.emacs-overlay.overlay
|
||||
inputs.nur.overlay
|
||||
|
@ -104,9 +109,14 @@
|
|||
### Modules ###
|
||||
###############
|
||||
|
||||
nixosModules = utils.lib.exportModules [ ./modules/default.nix ];
|
||||
nixosModules = utils.lib.exportModules [
|
||||
./modules/profiles/base.nix
|
||||
./modules/profiles/gaming.nix
|
||||
./modules/profiles/desktop.nix
|
||||
];
|
||||
hostDefaults.modules = [
|
||||
./modules
|
||||
./modules/default.nix
|
||||
self.nixosModules.base
|
||||
inputs.home-manager.nixosModule
|
||||
{
|
||||
home-manager = {
|
||||
|
@ -115,16 +125,19 @@
|
|||
extraSpecialArgs = { inherit inputs self; };
|
||||
};
|
||||
}
|
||||
self.nixosModules.default
|
||||
inputs.agenix.nixosModules.age
|
||||
inputs.base16.nixosModule
|
||||
];
|
||||
|
||||
hosts.nixos-laptop.modules =
|
||||
[ ./hosts/nixos-laptop ./config/nixos-laptop.nix ];
|
||||
|
||||
hosts.nixos-desktop.modules =
|
||||
[ ./hosts/nixos-desktop ./config/nixos-desktop.nix ];
|
||||
hosts.nixos-laptop.modules = [
|
||||
./hosts/nixos-laptop
|
||||
self.nixosModules.desktop
|
||||
];
|
||||
hosts.nixos-desktop.modules = [
|
||||
./hosts/nixos-desktop
|
||||
self.nixosModules.desktop
|
||||
self.nixosModules.gaming
|
||||
];
|
||||
|
||||
###############
|
||||
### Outputs ###
|
||||
|
@ -132,30 +145,24 @@
|
|||
|
||||
outputsBuilder = channels:
|
||||
with channels.nixpkgs; {
|
||||
devShell = mkShell {
|
||||
devShells.default = mkShell {
|
||||
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
||||
name = "dotfiles";
|
||||
shellHook = ''
|
||||
alias "lint"='echo "Running nixpkgs-fmt ..."
|
||||
nixpkgs-fmt --check $(find . -name "*.nix")
|
||||
echo ""
|
||||
echo "Running statix ..."
|
||||
statix check'
|
||||
alias "fix"='echo "Running nixpkgs-fmt ..."
|
||||
nixpkgs-fmt $(find . -name "*.nix")
|
||||
echo ""
|
||||
echo "Running statix ..."
|
||||
statix fix'
|
||||
'';
|
||||
packages = [
|
||||
# Linting
|
||||
nixpkgs-fmt
|
||||
statix
|
||||
# Secrets
|
||||
pkgs.agenix
|
||||
# chachix
|
||||
# cachix
|
||||
cachix
|
||||
];
|
||||
};
|
||||
checks.pre-commit-check = inputs.pre-commit-hooks.lib."${system}".run {
|
||||
src = ./.;
|
||||
hooks = {
|
||||
nixpkgs-fmt.enable = true;
|
||||
statix.enable = true;
|
||||
shellcheck.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# MY MODULES
|
||||
my.email = {
|
||||
enable = true;
|
||||
passwordFile = ../../secrets/email-desktop.age;
|
||||
};
|
||||
|
||||
# BOOT
|
||||
boot = {
|
||||
supportedFilesystems = [ "btrfs" "ntfs" ];
|
||||
|
@ -32,14 +39,18 @@
|
|||
nameservers = [ "192.168.0.4" ];
|
||||
useDHCP = false;
|
||||
interfaces.enp42s0 = {
|
||||
ipv4.addresses = [{
|
||||
address = "192.168.0.14";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
ipv6.addresses = [{
|
||||
address = "fe80::60fb:ffc:df6f:e29e";
|
||||
prefixLength = 64;
|
||||
}];
|
||||
ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.0.14";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [
|
||||
{
|
||||
address = "fe80::60fb:ffc:df6f:e29e";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
};
|
||||
networkmanager = {
|
||||
enable = true;
|
||||
|
@ -77,6 +88,4 @@
|
|||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, ...
|
||||
}: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
@ -18,8 +20,7 @@
|
|||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."enc".device =
|
||||
"/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd";
|
||||
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd";
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1";
|
||||
|
@ -56,8 +57,7 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/00ad6f74-f23e-4ac0-abfb-89bdfe5ab8ae"; }];
|
||||
swapDevices = [{ device = "/dev/disk/by-uuid/00ad6f74-f23e-4ac0-abfb-89bdfe5ab8ae"; }];
|
||||
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
|
|
@ -1,15 +1,22 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
{ config
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# MY MODULES
|
||||
my.email = {
|
||||
enable = true;
|
||||
passwordFile = ../../secrets/email-desktop.age;
|
||||
};
|
||||
|
||||
# BOOT
|
||||
boot = {
|
||||
supportedFilesystems = [ "btrfs" ];
|
||||
|
@ -65,32 +72,35 @@
|
|||
OnBootSec = "120";
|
||||
};
|
||||
};
|
||||
systemd.services.hibernate-on-low-battery = let
|
||||
batteryLevelSufficient = let batteryPath = "/sys/class/power_supply/BATT";
|
||||
in pkgs.writeShellScriptBin "battery-level-sufficient" ''
|
||||
test "$(cat ${batteryPath}/status)" != Discharging \
|
||||
|| test "$(cat ${batteryPath}/capacity)" -ge 5
|
||||
'';
|
||||
in {
|
||||
serviceConfig.Type = "oneshot";
|
||||
onFailure = [ "hibernate.target" ];
|
||||
script = "${batteryLevelSufficient}/bin/battery-level-sufficient";
|
||||
};
|
||||
systemd.services.hibernate-on-low-battery =
|
||||
let
|
||||
batteryLevelSufficient =
|
||||
let
|
||||
batteryPath = "/sys/class/power_supply/BATT";
|
||||
in
|
||||
pkgs.writeShellScriptBin "battery-level-sufficient" ''
|
||||
test "$(cat ${batteryPath}/status)" != Discharging \
|
||||
|| test "$(cat ${batteryPath}/capacity)" -ge 5
|
||||
'';
|
||||
in
|
||||
{
|
||||
serviceConfig.Type = "oneshot";
|
||||
onFailure = [ "hibernate.target" ];
|
||||
script = "${batteryLevelSufficient}/bin/battery-level-sufficient";
|
||||
};
|
||||
|
||||
# Trackpad
|
||||
# i2c for https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver
|
||||
hardware.i2c.enable = true;
|
||||
systemd.services.asus-touchpad-numpad = {
|
||||
description =
|
||||
"Activate Numpad inside the touchpad with top right corner switch";
|
||||
documentation =
|
||||
[ "https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver" ];
|
||||
description = "Activate Numpad inside the touchpad with top right corner switch";
|
||||
documentation = [ "https://github.com/mohamed-badaoui/asus-touchpad-numpad-driver" ];
|
||||
path = [ pkgs.i2c-tools ];
|
||||
script = ''
|
||||
cd ${inputs.asus-touchpad-numpad-driver}
|
||||
# In the last argument here you choose your layout.
|
||||
${
|
||||
pkgs.python3.withPackages (ps: [ ps.libevdev ])
|
||||
pkgs.python3.withPackages (ps: [ps.libevdev])
|
||||
}/bin/python asus_touchpad.py m433ia
|
||||
'';
|
||||
# Probably needed because it fails on boot seemingly because the driver
|
||||
|
@ -105,13 +115,15 @@
|
|||
|
||||
nix = {
|
||||
distributedBuilds = true;
|
||||
buildMachines = [{
|
||||
hostName = "builder";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 6;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "nixos.test" "benchmark" "big-parallel" "kvm" ];
|
||||
}];
|
||||
buildMachines = [
|
||||
{
|
||||
hostName = "builder";
|
||||
system = "x86_64-linux";
|
||||
maxJobs = 6;
|
||||
speedFactor = 2;
|
||||
supportedFeatures = [ "nixos.test" "benchmark" "big-parallel" "kvm" ];
|
||||
}
|
||||
];
|
||||
extraOptions = ''
|
||||
builders-use-substitutes = true
|
||||
'';
|
||||
|
@ -134,5 +146,4 @@
|
|||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "21.05"; # Did you read the comment?
|
||||
|
||||
}
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, ...
|
||||
}: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
@ -18,8 +20,7 @@
|
|||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."enc".device =
|
||||
"/dev/disk/by-uuid/078b81ba-238e-471d-9951-b743588532b8";
|
||||
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/078b81ba-238e-471d-9951-b743588532b8";
|
||||
|
||||
fileSystems."/log" = {
|
||||
device = "/dev/disk/by-uuid/4a91d3eb-1633-42d9-8304-c10e49a61154";
|
||||
|
@ -51,7 +52,5 @@
|
|||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; }];
|
||||
|
||||
swapDevices = [{ device = "/dev/disk/by-uuid/29ebf65f-e6ca-4625-9f72-a9321152be1b"; }];
|
||||
}
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
# WARN: this file will get overwritten by $ cachix use <name>
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
folder = ./cachix;
|
||||
toImport = name: value: folder + ("/" + name);
|
||||
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
|
||||
imports = lib.mapAttrsToList toImport
|
||||
(lib.filterAttrs filterCaches (builtins.readDir folder));
|
||||
in {
|
||||
inherit imports;
|
||||
nix.settings.substituters = [ "https://cache.nixos.org/" ];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
nix.settings = {
|
||||
substituters = [ "https://jupyterwith.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"jupyterwith.cachix.org-1:/kDy2B6YEhXGJuNguG1qyqIodMyO4w8KwWH4/vAc7CI="
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
nix.settings = {
|
||||
substituters = [ "https://nix-community.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.moritz.extraGroups = [ "adbusers" ];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cycleSinks = import ./cycleSinks.nix { inherit pkgs; };
|
||||
protonge = import ./protonge.nix { inherit pkgs; };
|
||||
randomWallpaper = import ./randomWallpaper.nix { inherit pkgs; };
|
||||
share = import ./share.nix { inherit pkgs; };
|
||||
sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; };
|
||||
in {
|
||||
home-manager.users.moritz.home.packages =
|
||||
[ cycleSinks protonge randomWallpaper share sxhkdHelp ];
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./adb.nix
|
||||
./bin
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./ledger
|
||||
./nix.nix
|
||||
./shell
|
||||
./spotify.nix
|
||||
./ssh.nix
|
||||
./yubikey.nix
|
||||
];
|
||||
modules.cli.shell = let
|
||||
editor = "emacsclient -t -a 'emacs -t'";
|
||||
cmdSub = command:
|
||||
"${
|
||||
if (config.modules.cli.shell.name == "fish") then "" else "$"
|
||||
}${command}";
|
||||
in {
|
||||
name = "fish";
|
||||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
rs = "doas systemctl";
|
||||
|
||||
ga = "git add";
|
||||
gb = "git branch";
|
||||
gc = "git commit";
|
||||
gco = "git checkout";
|
||||
gd = "git diff";
|
||||
gds = "git diff --staged";
|
||||
gp = "git push";
|
||||
gf = "git fetch";
|
||||
gF = "git pull";
|
||||
gs = "git status";
|
||||
};
|
||||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
cat = "bat";
|
||||
feh = "feh --auto-zoom --scale-down";
|
||||
grep = "rg";
|
||||
rm = "rm -i";
|
||||
mv = "mv -i";
|
||||
|
||||
ssh = "kitty +kitten ssh";
|
||||
|
||||
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles";
|
||||
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles";
|
||||
nix-lock = "pushd ~/.dotfiles && nix flake update && popd";
|
||||
|
||||
emacs = editor;
|
||||
|
||||
nixpkgs-review = "nixpkgs-review-checks";
|
||||
|
||||
latexwatch =
|
||||
''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
|
||||
|
||||
};
|
||||
variables = { EDITOR = editor; };
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [
|
||||
# archives
|
||||
p7zip
|
||||
unzip
|
||||
zip
|
||||
|
||||
# file management
|
||||
ranger
|
||||
trash-cli
|
||||
|
||||
# monitoring
|
||||
htop
|
||||
bottom
|
||||
|
||||
# ripping
|
||||
abcde
|
||||
handbrake
|
||||
|
||||
# nix
|
||||
nixpkgs-review
|
||||
comma
|
||||
nix-index
|
||||
|
||||
# other
|
||||
arduino
|
||||
cht-sh
|
||||
du-dust
|
||||
duf
|
||||
entr
|
||||
hub
|
||||
neofetch
|
||||
tmux
|
||||
ttyper
|
||||
up
|
||||
viu
|
||||
];
|
||||
programs = {
|
||||
bat.enable = true;
|
||||
command-not-found.enable = true;
|
||||
exa.enable = true;
|
||||
fzf.enable = true;
|
||||
gpg.enable = true;
|
||||
starship.enable = true;
|
||||
};
|
||||
};
|
||||
age.secrets = {
|
||||
github = {
|
||||
file = ../../secrets/github.age;
|
||||
owner = "1000";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz.programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Moritz Böhme";
|
||||
userEmail = "mail@moritzboeh.me";
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
delta.enable = true;
|
||||
signing = {
|
||||
key = "0x970C6E89EB0547A9";
|
||||
signByDefault = true;
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config.safe.directory = "/home/moritz/.dotfiles";
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
modules.cli.shell.aliases = {
|
||||
bal = "ledger bal";
|
||||
balcash = "ledger bal -R -X € --current --flat ^assets:bank ^liabilities";
|
||||
balnet = "ledger bal -R -X € --current --depth 2 ^assets ^liabilities";
|
||||
bud = ''ledger --budget --unbudgeted bal ^expenses -p "this month"'';
|
||||
budr = ''ledger --budget reg -p "this month" ^expenses'';
|
||||
reg = "ledger reg -R -V --tail 15";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ ledger ];
|
||||
xdg.configFile = {
|
||||
"fish/completions/ledger.fish" = {
|
||||
text = builtins.readFile ./ledger.fish;
|
||||
};
|
||||
"ledger/ledgerrc".text = ''
|
||||
--strict
|
||||
--explicit
|
||||
--payee note
|
||||
--file ~/Notes/ledger/main.ledger
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
nix = {
|
||||
gc = {
|
||||
automatic = true;
|
||||
options = "--max-freed $((32 * 1024**3)) --delete-older-than 14d";
|
||||
dates = "weekly";
|
||||
};
|
||||
optimise.automatic = true;
|
||||
|
||||
settings.trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let cfg = config.modules.cli.shell;
|
||||
in {
|
||||
config = lib.mkIf (cfg.name == "zsh") {
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
users.users.moritz.shell = pkgs.zsh;
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ du-dust ];
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history.expireDuplicatesFirst = true;
|
||||
localVariables = cfg.variables;
|
||||
shellAliases = lib.trivial.mergeAttrs cfg.aliases cfg.abbreviations;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
initExtra = ''
|
||||
function nix-which() {
|
||||
readlink -f $(which $1)
|
||||
}
|
||||
'';
|
||||
plugins = [{
|
||||
name = "forgit";
|
||||
src = inputs.forgit-git;
|
||||
}];
|
||||
};
|
||||
fzf.enableZshIntegration = true;
|
||||
starship.enableZshIntegration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
age.secrets.spotifyd = {
|
||||
file = ../../secrets/spotifyd.age;
|
||||
owner = "1000";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ spotify-tui sptlrx ];
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
package = pkgs.spotifyd.override { withMpris = true; };
|
||||
settings = {
|
||||
global = {
|
||||
# A command that gets executed and can be used to
|
||||
# retrieve your username.
|
||||
username_cmd = "${pkgs.coreutils}/bin/head -n 1 /run/agenix/spotifyd";
|
||||
|
||||
# A command that gets executed and can be used to
|
||||
# retrieve your password.
|
||||
password_cmd = "${pkgs.coreutils}/bin/tail -n 1 /run/agenix/spotifyd";
|
||||
|
||||
# The name that gets displayed under the connect tab on
|
||||
# official clients. Spaces are not allowed!
|
||||
device_name = "spotifyd";
|
||||
|
||||
# The audio bitrate. 96, 160 or 320 kbit/s
|
||||
bitrate = 320;
|
||||
|
||||
# Volume on startup between 0 and 100
|
||||
initial_volume = "71";
|
||||
|
||||
# The directory used to cache audio data.
|
||||
cache_path = "/tmp/spotifyd-cache";
|
||||
|
||||
# The displayed device type in Spotify clients.
|
||||
device_type = "computer";
|
||||
|
||||
# set backend to pulseaudio
|
||||
backend = "pulseaudio";
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile."spotify-tui/config.yml".text = ''
|
||||
# Dracula theme
|
||||
theme:
|
||||
active: "139,233,253" # current playing song in list
|
||||
banner: "80,250,123" # the "spotify-tui" banner on launch
|
||||
error_border: "241,250,140" # error dialog border
|
||||
error_text: "248,248,242" # error message text (e.g. "Spotify API
|
||||
# reported error 404")
|
||||
hint: "241,250,140" # hint text in errors
|
||||
hovered: "255,184,108" # hovered pane border
|
||||
inactive: "248,248,242" # borders of inactive panes
|
||||
playbar_background: "68,71,90" # background of progress bar
|
||||
playbar_progress: "248,248,242" # filled-in part of the progress bar
|
||||
playbar_progress_text: "248,248,242" # song length and time played/left
|
||||
# indicator in the progress bar
|
||||
playbar_text: "248,248,242" # artist name in player pane
|
||||
selected: "80,250,123" # a) selected pane border, b) hovered item
|
||||
# in list, & c) track title in player
|
||||
text: "248,248,242" # text in panes
|
||||
header: "248,248,242" # header text in panes (e.g. 'Title',
|
||||
# 'Artist', etc.)
|
||||
behavior:
|
||||
volume_increment: 5
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.users.moritz.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO" # Laptop
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI" # Desktop
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHlemuKagHwz2T5rEwgJNlVUdUdOXyPtCEzD73CrwY2zmpR4AMj7y9u3Rm7HwHUDjLap1ZFwg+53bAsVP6HFZccCXoIfO/8BL0WDGQJrfgb+A+UiRhSqSvyZ77bGJkadbBkadguz3qR3PHcb41DOlhuqVcHxsY8ceHMxAuyb0pLJVJLeytMD+CHS/r7hoj2hckTNAZ+VhCXBtdZfZ7uPUBxLfluYRNNMmdwCglsg3RUS242nJUzy3A84+CXIGeWmNG9Fu45IDkwMthxSW9klyU9R38R9DBDcugkyb6vz+JKSuRVAa47qh/kmtsYekfL3ul9D2JN32P8S+6ZoXx+gXupGJ0ltwJWAFkhLJ+yeXj9kCOv/mIUmCB14jMGsvKiSwV25O/twyjqe2LEkMVgimgrjEYoHu+ZTyp0iFtUvSrFo4tsAhfWPV9yj4F/hUksW7xKIwq5Niyx7he5M/XddudtnAximyiBDGCdJm1Ejl0UaGa6ZQv7y6VZdx0PyZuraT7l9ub8so6JlE4cVgSSU9vE0IS2QqBuHhsIjh8RVksoTR2NQbeDdGaGpGnq2C8y0rDXwE/EJA4LK45khX/GPn73n8F0kBG8dBrWgRDAEODpmebScO7d5mCeM0z3lPcRmh+3e3DPnVVOl+uR7udlc7NauLzl7q913UtxZaF1PlD7Q==" # GPG
|
||||
];
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
environment.shellInit = ''
|
||||
export GPG_TTY="$(tty)"
|
||||
gpg-connect-agent /bye
|
||||
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
'';
|
||||
home-manager.users.moritz.home.packages = with pkgs; [
|
||||
# cli
|
||||
yubikey-manager
|
||||
yubikey-personalization
|
||||
paperkey
|
||||
# graphical
|
||||
yubikey-manager-qt
|
||||
yubikey-personalization-gui
|
||||
];
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "cycle_sinks";
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.bin;
|
||||
cycleSinks = import ./cycleSinks.nix { inherit pkgs; };
|
||||
protonge = import ./protonge.nix { inherit pkgs; };
|
||||
randomWallpaper = import ./randomWallpaper.nix { inherit pkgs; };
|
||||
share = import ./share.nix { inherit pkgs; };
|
||||
sxhkdHelp = import ./sxhkdHelp.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
options.my.bin = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cycleSinks
|
||||
protonge
|
||||
randomWallpaper
|
||||
share
|
||||
sxhkdHelp
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "protonge";
|
||||
runtimeInputs = with pkgs; [ curl ];
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "randomWallpaper";
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "share";
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "sxhkd-help";
|
||||
runtimeInputs = with pkgs; [ rofi ];
|
|
@ -0,0 +1,17 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./theming.nix
|
||||
./nix.nix
|
||||
./bin
|
||||
./shell.nix
|
||||
./yubikey.nix
|
||||
./email.nix
|
||||
./wallpapers.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.email;
|
||||
name = "Moritz Böhme";
|
||||
email = "mail@moritzboeh.me";
|
||||
mailDirectory = "/home/moritz/.mail";
|
||||
in
|
||||
{
|
||||
options.my.email = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
passwordFile = mkOption {
|
||||
default = null;
|
||||
type = types.path;
|
||||
description = "File containing the email password.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Protonbridge Setup
|
||||
environment.systemPackages = with pkgs; [ protonmail-bridge ];
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
description = "Protonmail Bridge";
|
||||
enable = true;
|
||||
script = "${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug";
|
||||
path = [
|
||||
pkgs.gnome3.gnome-keyring
|
||||
]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
};
|
||||
age.secrets.email = {
|
||||
file = cfg.passwordFile;
|
||||
owner = "1000";
|
||||
};
|
||||
|
||||
# Email Applications
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ thunderbird ];
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
};
|
||||
services.mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/15";
|
||||
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
||||
postExec = "${pkgs.mu}/bin/mu index -m ${mailDirectory}";
|
||||
};
|
||||
accounts.email = {
|
||||
maildirBasePath = mailDirectory;
|
||||
accounts.default = {
|
||||
address = email;
|
||||
userName = email;
|
||||
flavor = "plain";
|
||||
primary = true;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat /run/agenix/email";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
realName = name;
|
||||
msmtp.enable = true;
|
||||
imap = {
|
||||
host = "127.0.0.1";
|
||||
port = 1143;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile = "/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "127.0.0.1";
|
||||
port = 1025;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile = "/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.nix;
|
||||
in
|
||||
{
|
||||
options.my.nix = {
|
||||
gc.enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
optimise.enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config.nix = {
|
||||
gc = {
|
||||
automatic = cfg.gc.enable;
|
||||
options = "--max-freed $((32 * 1024**3)) --delete-older-than 14d";
|
||||
dates = "weekly";
|
||||
};
|
||||
|
||||
optimise = {
|
||||
automatic = cfg.optimise.enable;
|
||||
dates = [ "weekly" ];
|
||||
};
|
||||
|
||||
settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org/"
|
||||
"https://jupyterwith.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://pre-commit-hooks.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"jupyterwith.cachix.org-1:/kDy2B6YEhXGJuNguG1qyqIodMyO4w8KwWH4/vAc7CI="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
||||
];
|
||||
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +1,15 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let cfg = config.module.cli.shell;
|
||||
in {
|
||||
options.modules.cli.shell = {
|
||||
name = mkOption {
|
||||
default = "fish";
|
||||
type = types.enum [ "fish" "zsh" ];
|
||||
example = "zsh";
|
||||
};
|
||||
let
|
||||
cfg = config.my.shell;
|
||||
in
|
||||
{
|
||||
options.my.shell = {
|
||||
abbreviations = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf str;
|
||||
|
@ -23,6 +24,4 @@ in {
|
|||
type = with types; attrsOf str;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ ./fish.nix ./zsh.nix ];
|
||||
}
|
|
@ -0,0 +1,553 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.theming;
|
||||
schemes = {
|
||||
dracula = {
|
||||
slug = "Dracula";
|
||||
scheme = "Dracula";
|
||||
author = "Moritz Boehme based on Dracula Theme";
|
||||
base00 = "282a36"; # Background
|
||||
base01 = "69ff94"; # Green 2
|
||||
base02 = "ffffa5"; # Yellow 2
|
||||
base03 = "6272a4"; # Black 2
|
||||
base04 = "d6acff"; # Blue 2
|
||||
base05 = "f8f8f2"; # Foreground
|
||||
base06 = "ff92df"; # Magenta 2
|
||||
base07 = "44475a"; # White 2
|
||||
base08 = "ff5555"; # Red 1
|
||||
base09 = "ff6e6e"; # Red 2
|
||||
base0A = "f1fa8c"; # Yellow 1
|
||||
base0B = "50fa7b"; # Green 1
|
||||
base0C = "8be9fd"; # Cyan 1
|
||||
base0D = "bd93f9"; # Blue 1
|
||||
base0E = "ff79c6"; # Magenta 1
|
||||
base0F = "a4ffff"; # Cyan 2
|
||||
};
|
||||
catppuccin = {
|
||||
slug = "Catpuccin";
|
||||
scheme = "Catpuccin";
|
||||
author = "Moritz Boehme based on Catppuccin Theme";
|
||||
base00 = "1e1e2e"; # Background
|
||||
base01 = "abe9b3"; # Green 2
|
||||
base02 = "fae380"; # Yellow 2
|
||||
base03 = "988ba2"; # Black 2
|
||||
base04 = "96cdf8"; # Blue 2
|
||||
base05 = "d9e0ee"; # Foreground
|
||||
base06 = "ddb6f2"; # Magenta 2
|
||||
base07 = "d9e0ee"; # White 2
|
||||
base08 = "f28fad"; # Red 1
|
||||
base09 = "f28fad"; # Red 2
|
||||
base0A = "fae3b0"; # Yellow 1
|
||||
base0B = "abe9b3"; # Green 1
|
||||
base0C = "89dceb"; # Cyan 1
|
||||
base0D = "96cdfb"; # Blue 1
|
||||
base0E = "f5c2e7"; # Magenta 1
|
||||
base0F = "89dceb"; # Cyan 2
|
||||
};
|
||||
nord = {
|
||||
slug = "Nord";
|
||||
scheme = "Nord";
|
||||
author = "arcticicestudio";
|
||||
base00 = "2E3440";
|
||||
base01 = "ECEFF4";
|
||||
base02 = "B48EAD";
|
||||
base03 = "4C566A";
|
||||
base04 = "D8DEE9";
|
||||
base05 = "E5E9F0";
|
||||
base06 = "434C5E";
|
||||
base07 = "8FBCBB";
|
||||
base08 = "BF616A";
|
||||
base09 = "3B4252";
|
||||
base0A = "EBCB8B";
|
||||
base0B = "A3BE8C";
|
||||
base0C = "88C0D0";
|
||||
base0D = "5E81AC";
|
||||
base0E = "D08770";
|
||||
base0F = "81A1C1";
|
||||
};
|
||||
onedark = {
|
||||
slug = "onedark";
|
||||
scheme = "OneDark";
|
||||
author = "Lalit Magant (http://github.com/tilal6991)";
|
||||
base00 = "282c34";
|
||||
base01 = "353b45";
|
||||
base02 = "3e4451";
|
||||
base03 = "545862";
|
||||
base04 = "565c64";
|
||||
base05 = "abb2bf";
|
||||
base06 = "b6bdca";
|
||||
base07 = "c8ccd4";
|
||||
base08 = "e06c75";
|
||||
base09 = "d19a66";
|
||||
base0A = "e5c07b";
|
||||
base0B = "98c379";
|
||||
base0C = "56b6c2";
|
||||
base0D = "61afef";
|
||||
base0E = "c678dd";
|
||||
base0F = "be5046";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.my.theming = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
scheme = mkOption {
|
||||
default = "dracula";
|
||||
type = types.enum (builtins.attrNames schemes);
|
||||
apply = name: schemes."${name}";
|
||||
example = "nord";
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
inherit (cfg) scheme;
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
kitty.extraConfig =
|
||||
mkIf config.my.programs.kitty.enable
|
||||
(builtins.readFile (config.scheme {
|
||||
template = ''
|
||||
# Base16 {{scheme-name}} - kitty color config
|
||||
# Scheme by {{scheme-author}}
|
||||
background #{{base00-hex}}
|
||||
foreground #{{base05-hex}}
|
||||
selection_background #{{base05-hex}}
|
||||
selection_foreground #{{base00-hex}}
|
||||
url_color #{{base04-hex}}
|
||||
cursor #{{base03-hex}}
|
||||
active_border_color #{{base03-hex}}
|
||||
inactive_border_color #{{base01-hex}}
|
||||
active_tab_background #{{base00-hex}}
|
||||
active_tab_foreground #{{base05-hex}}
|
||||
inactive_tab_background #{{base01-hex}}
|
||||
inactive_tab_foreground #{{base04-hex}}
|
||||
tab_bar_background #{{base01-hex}}
|
||||
|
||||
# normal
|
||||
color0 #{{base00-hex}}
|
||||
color1 #{{base08-hex}}
|
||||
color2 #{{base0B-hex}}
|
||||
color3 #{{base0A-hex}}
|
||||
color4 #{{base0D-hex}}
|
||||
color5 #{{base0E-hex}}
|
||||
color6 #{{base0C-hex}}
|
||||
color7 #{{base05-hex}}
|
||||
|
||||
# bright
|
||||
color8 #{{base03-hex}}
|
||||
color9 #{{base09-hex}}
|
||||
color10 #{{base01-hex}}
|
||||
color11 #{{base02-hex}}
|
||||
color12 #{{base04-hex}}
|
||||
color13 #{{base06-hex}}
|
||||
color14 #{{base0F-hex}}
|
||||
color15 #{{base07-hex}}
|
||||
'';
|
||||
}));
|
||||
zathura.extraConfig = builtins.readFile (config.scheme {
|
||||
template = ''
|
||||
# Base16 {{scheme-name}}
|
||||
# Author: {{scheme-author}}
|
||||
|
||||
set completion-bg "#{{base00-hex}}"
|
||||
set completion-fg "#{{base05-hex}}"
|
||||
set completion-group-bg "#{{base00-hex}}"
|
||||
set completion-group-fg "#{{base03-hex}}"
|
||||
set completion-highlight-bg "#{{base07-hex}}"
|
||||
set completion-highlight-fg "#{{base06-hex}}"
|
||||
|
||||
set notification-bg "#{{base00-hex}}"
|
||||
set notification-fg "#{{base05-hex}}"
|
||||
set notification-warning-bg "#{{base0A-hex}}"
|
||||
set notification-warning-fg "#{{base05-hex}}"
|
||||
set notification-error-bg "#{{base08-hex}}"
|
||||
set notification-error-fg "#{{base05-hex}}"
|
||||
|
||||
set index-bg "#{{base00-hex}}"
|
||||
set index-fg "#{{base05-hex}}"
|
||||
set index-active-bg "#{{base07-hex}}"
|
||||
set index-active-fg "#{{base05-hex}}"
|
||||
|
||||
set default-bg "#{{base00-hex}}"
|
||||
set default-fg "#{{base05-hex}}"
|
||||
|
||||
set inputbar-bg "#{{base00-hex}}"
|
||||
set inputbar-fg "#{{base0C-hex}}"
|
||||
set statusbar-bg "#{{base00-hex}}"
|
||||
set statusbar-fg "#{{base05-hex}}"
|
||||
|
||||
set highlight-color "#{{base0A-hex}}"
|
||||
set highlight-active-color "#{{base06-hex}}"
|
||||
|
||||
set recolor-lightcolor "#{{base00-hex}}"
|
||||
set recolor-darkcolor "#{{base05-hex}}"
|
||||
'';
|
||||
});
|
||||
rofi.theme = config.scheme {
|
||||
template = ''
|
||||
* {
|
||||
drac-bgd: #{{base00-hex}};
|
||||
drac-cur: #{{base07-hex}};
|
||||
drac-fgd: #{{base05-hex}};
|
||||
drac-cmt: #{{base03-hex}};
|
||||
drac-cya: #{{base0C-hex}};
|
||||
drac-grn: #{{base0B-hex}};
|
||||
drac-ora: #{{base0A-hex}};
|
||||
drac-pnk: #{{base0E-hex}};
|
||||
drac-pur: #{{base0D-hex}};
|
||||
drac-red: #{{base08-hex}};
|
||||
drac-yel: #{{base0A-hex}};
|
||||
|
||||
font: "FiraCode Nerd Font 14";
|
||||
|
||||
foreground: @drac-fgd;
|
||||
background-color: @drac-bgd;
|
||||
active-background: @drac-pnk;
|
||||
urgent-background: @drac-red;
|
||||
|
||||
selected-background: @active-background;
|
||||
selected-urgent-background: @urgent-background;
|
||||
selected-active-background: @active-background;
|
||||
separatorcolor: @active-background;
|
||||
bordercolor: #6272a4;
|
||||
}
|
||||
|
||||
#window {
|
||||
background-color: @background;
|
||||
border: 3;
|
||||
border-radius: 6;
|
||||
border-color: @bordercolor;
|
||||
padding: 25;
|
||||
}
|
||||
#mainbox {
|
||||
border: 0;
|
||||
padding: 5;
|
||||
}
|
||||
#message {
|
||||
border: 1px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
padding: 1px ;
|
||||
}
|
||||
#textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
#listview {
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @bordercolor;
|
||||
spacing: 2px ;
|
||||
scrollbar: false;
|
||||
padding: 2px 0px 0px ;
|
||||
}
|
||||
#element-text {
|
||||
border: 0;
|
||||
padding: 1px ;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#element-text normal.normal {
|
||||
background-color: @background;
|
||||
}
|
||||
#element-text normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
#element-text normal.active {
|
||||
backgroundr: @active-background;
|
||||
}
|
||||
#element-text selected.normal {
|
||||
background-color: @selected-background;
|
||||
}
|
||||
#element-text selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
}
|
||||
#element-text selected.active {
|
||||
background-color: @selected-active-background;
|
||||
}
|
||||
#element-text alternate.normal {
|
||||
background-color: @background;
|
||||
}
|
||||
#element-text alternate.urgent {
|
||||
background-color: @urgent-background;
|
||||
}
|
||||
#element-text alternate.active {
|
||||
background-color: @active-background;
|
||||
}
|
||||
#scrollbar {
|
||||
width: 2px ;
|
||||
border: 0;
|
||||
handle-width: 8px ;
|
||||
padding: 0;
|
||||
}
|
||||
#sidebar {
|
||||
border: 2px dash 0px 0px ;
|
||||
border-color: @separatorcolor;
|
||||
}
|
||||
#button selected {
|
||||
background-color: @selected-background;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#inputbar {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
padding: 1px ;
|
||||
}
|
||||
#case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @foreground;
|
||||
}
|
||||
#entry {
|
||||
spacing: 0;
|
||||
text-color: @drac-cya;
|
||||
}
|
||||
#prompt {
|
||||
spacing: 0;
|
||||
text-color: @drac-grn;
|
||||
}
|
||||
#inputbar {
|
||||
children: [ prompt,textbox-prompt-colon,entry,case-indicator ];
|
||||
}
|
||||
#textbox-prompt-colon {
|
||||
expand: false;
|
||||
str: ":";
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
text-color: @drac-grn;
|
||||
}
|
||||
'';
|
||||
};
|
||||
firefox.profiles."default" = {
|
||||
userChrome = with config.scheme; ''
|
||||
toolbar#nav-bar, nav-bar-customization-target {
|
||||
background: #${base00} !important;
|
||||
}
|
||||
@-moz-document url("about:newtab"),
|
||||
@-moz-document url("about:blank") {
|
||||
* { background-color: #${base00} !important; }
|
||||
}
|
||||
#urlbar-background {
|
||||
background-color: #${base00} !important
|
||||
}
|
||||
#urlbar {
|
||||
color: #${base05} !important
|
||||
}
|
||||
#sidebar-splitter {
|
||||
border-color: #${base01} !important;
|
||||
color: #${base01} !important;
|
||||
background-color: #${base01} !important;
|
||||
}
|
||||
'';
|
||||
settings = with config.scheme; {
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.anchor_color" = "#${base0D}";
|
||||
"browser.visited_color" = "#${base0C}";
|
||||
};
|
||||
};
|
||||
};
|
||||
xsession.windowManager.bspwm = {
|
||||
settings = with config.scheme.withHashtag; {
|
||||
focused_border_color = base0D;
|
||||
normal_border_color = base03;
|
||||
active_border_color = base03;
|
||||
};
|
||||
};
|
||||
services.polybar = {
|
||||
config = with config.scheme.withHashtag; {
|
||||
"bar/bottom" = {
|
||||
# position
|
||||
monitor = "\${env:MONITOR}";
|
||||
bottom = true;
|
||||
width = "100%";
|
||||
heigth = 20;
|
||||
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
|
||||
border-size = 5;
|
||||
border-color = base00;
|
||||
|
||||
separator = " ";
|
||||
|
||||
font-0 = "FiraCode Nerd Font:size=9;0";
|
||||
font-1 = "FiraCode Nerd Font:size=9;1";
|
||||
font-2 = "FiraCode Nerd Font:size=9;2";
|
||||
|
||||
modules-left = "cpu memory network battery";
|
||||
modules-center = "bspwm";
|
||||
modules-right = "pulseaudio date time";
|
||||
|
||||
tray-position = "right";
|
||||
tray-padding = 2;
|
||||
|
||||
wm-restack = "bspwm";
|
||||
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BATT";
|
||||
adapter = "ACAD";
|
||||
time-format = "%H:%M";
|
||||
|
||||
format-charging = "<animation-charging> <label-charging>";
|
||||
format-discharging = "<animation-discharging> <label-discharging>";
|
||||
format-full = " <label-full>";
|
||||
|
||||
label-charging = "%percentage%% %time% remaining";
|
||||
label-discharging = "%percentage%% %time% remaining";
|
||||
label-full = "Fully charged";
|
||||
|
||||
animation-charging-0 = " ";
|
||||
animation-charging-1 = " ";
|
||||
animation-charging-2 = " ";
|
||||
animation-charging-3 = " ";
|
||||
animation-charging-4 = " ";
|
||||
animation-charging-framerate = 500;
|
||||
|
||||
animation-discharging-0 = " ";
|
||||
animation-discharging-1 = " ";
|
||||
animation-discharging-2 = " ";
|
||||
animation-discharging-3 = " ";
|
||||
animation-discharging-4 = " ";
|
||||
animation-discharging-framerate = 500;
|
||||
};
|
||||
"module/bspwm" = {
|
||||
type = "internal/bspwm";
|
||||
|
||||
label-focused = "";
|
||||
label-focused-foreground = base0E;
|
||||
label-focused-padding = 1;
|
||||
|
||||
label-occupied = "";
|
||||
label-occupied-foreground = base03;
|
||||
label-occupied-padding = 1;
|
||||
|
||||
label-urgent = "";
|
||||
label-urgent-foreground = base08;
|
||||
label-urgent-padding = 1;
|
||||
|
||||
label-empty = "";
|
||||
label-empty-foreground = base03;
|
||||
label-empty-padding = 1;
|
||||
|
||||
label-separator = " ";
|
||||
label-separator-foreground = base0C;
|
||||
label-separator-padding = 1;
|
||||
|
||||
pin-workspaces = true;
|
||||
};
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = 2;
|
||||
|
||||
format = "<ramp-load><label>";
|
||||
format-foreground = base00;
|
||||
format-background = base0B;
|
||||
format-padding = 1;
|
||||
format-font = 3;
|
||||
|
||||
ramp-load-0 = " ";
|
||||
ramp-load-1 = " ";
|
||||
ramp-load-2 = " ";
|
||||
ramp-load-3 = " ";
|
||||
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
"module/time" = {
|
||||
type = "internal/date";
|
||||
interval = 1;
|
||||
|
||||
time = "%H:%M";
|
||||
time-alt = "%H:%M:%S";
|
||||
|
||||
label = "%time%";
|
||||
format-prefix = " ";
|
||||
format-prefix-font = 2;
|
||||
format-foreground = base00;
|
||||
format-background = base0C;
|
||||
format-padding = 1;
|
||||
label-font = 3;
|
||||
};
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
interval = 5;
|
||||
|
||||
format = "<label>";
|
||||
format-prefix = " ";
|
||||
format-prefix-font = 2;
|
||||
format-foreground = base00;
|
||||
format-background = base0A;
|
||||
format-padding = 1;
|
||||
format-font = 3;
|
||||
|
||||
date = "%A";
|
||||
date-alt = "%Y-%m-%d";
|
||||
|
||||
label = "%date%";
|
||||
label-font = 3;
|
||||
};
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
interval = 2;
|
||||
|
||||
format = "<label>";
|
||||
format-prefix = " ";
|
||||
format-foreground = base00;
|
||||
format-background = base0C;
|
||||
format-padding = 1;
|
||||
format-font = 2;
|
||||
|
||||
label = "%gb_used%";
|
||||
label-font = 3;
|
||||
};
|
||||
"module/pulseaudio" = {
|
||||
type = "internal/pulseaudio";
|
||||
|
||||
format-volume = "<ramp-volume> <label-volume>";
|
||||
label-volume = "%percentage%%";
|
||||
|
||||
format-volume-foreground = base00;
|
||||
format-volume-background = base04;
|
||||
format-volume-padding = 1;
|
||||
format-volume-font = 2;
|
||||
|
||||
label-muted = "%{F${base08}}婢 %{F${base00}}muted";
|
||||
format-muted-foreground = base00;
|
||||
format-muted-background = base04;
|
||||
format-muted-padding = 1;
|
||||
format-muted-font = 2;
|
||||
ramp-volume-0 = "奄";
|
||||
ramp-volume-1 = "奄";
|
||||
ramp-volume-2 = "奔";
|
||||
ramp-volume-3 = "墳";
|
||||
ramp-volume-4 = "墳";
|
||||
|
||||
click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
"module/network" = {
|
||||
type = "internal/network";
|
||||
interface =
|
||||
builtins.head (builtins.attrNames config.networking.interfaces);
|
||||
interval = 3;
|
||||
format-connected = "<label-connected>";
|
||||
label-connected = "%{T2}祝%{T3} %upspeed% %{T2}%{T3} %downspeed%";
|
||||
|
||||
format-connected-foreground = base00;
|
||||
format-connected-background = base0E;
|
||||
format-connected-padding = 1;
|
||||
format-connected-font = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.wallpapers;
|
||||
in
|
||||
{
|
||||
options.my.wallpapers = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"wallpapers/" = {
|
||||
source = ./wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |
Before Width: | Height: | Size: 5.2 MiB After Width: | Height: | Size: 5.2 MiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 4.6 MiB After Width: | Height: | Size: 4.6 MiB |
Before Width: | Height: | Size: 4.8 MiB After Width: | Height: | Size: 4.8 MiB |
Before Width: | Height: | Size: 501 KiB After Width: | Height: | Size: 501 KiB |
Before Width: | Height: | Size: 635 KiB After Width: | Height: | Size: 635 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
|
@ -0,0 +1,32 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.yubikey;
|
||||
in
|
||||
{
|
||||
options.my.yubikey = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
# cli
|
||||
yubikey-manager
|
||||
yubikey-personalization
|
||||
paperkey
|
||||
# graphical
|
||||
yubikey-manager-qt
|
||||
yubikey-personalization-gui
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,64 +1,15 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./cachix.nix
|
||||
./cli
|
||||
./desktop
|
||||
./editors
|
||||
./gaming.nix
|
||||
./podman.nix
|
||||
./security.nix
|
||||
./config
|
||||
./programs
|
||||
./security
|
||||
./services
|
||||
./theming.nix
|
||||
./virtualisation
|
||||
];
|
||||
|
||||
# USERS
|
||||
users.users.moritz = {
|
||||
isNormalUser = true;
|
||||
home = "/home/moritz";
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"video"
|
||||
"dialout"
|
||||
]; # Enable ‘sudo’ for the user.
|
||||
initialPassword = "password"; # CHANGE ME PLEASE
|
||||
};
|
||||
|
||||
fonts.fonts = with pkgs;
|
||||
[
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ];
|
||||
})
|
||||
];
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# PACKAGES
|
||||
environment.systemPackages = with pkgs; [ vim wget firefox git ];
|
||||
programs.mtr.enable = true;
|
||||
|
||||
home-manager.users.moritz = {
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
# paths it should manage.
|
||||
home.username = "moritz";
|
||||
home.homeDirectory = "/home/moritz";
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
};
|
||||
|
||||
home.language = {
|
||||
base = "en_US.UTF-8";
|
||||
time = "de_DE.UTF-8";
|
||||
numeric = "de_DE.UTF-8";
|
||||
paper = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
home.stateVersion = "21.05";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./email.nix
|
||||
./firefox.nix
|
||||
./kitty.nix
|
||||
./rofi
|
||||
./zathura.nix
|
||||
./virtualisation.nix
|
||||
];
|
||||
home-manager.users.moritz = {
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
tlaplusToolbox
|
||||
anki
|
||||
calibre
|
||||
gparted
|
||||
jellyfin-media-player
|
||||
keepassxc
|
||||
libreoffice
|
||||
neofetch
|
||||
pavucontrol
|
||||
picard
|
||||
signal-desktop
|
||||
vlc
|
||||
xfce.exo
|
||||
xfce.thunar
|
||||
xfce.tumbler
|
||||
xfce.xfconf
|
||||
];
|
||||
};
|
||||
services.gvfs = {
|
||||
enable = true;
|
||||
package = lib.mkForce pkgs.gnome3.gvfs;
|
||||
};
|
||||
}
|
|
@ -1,98 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.desktop.apps.email;
|
||||
name = "Moritz Böhme";
|
||||
email = "mail@moritzboeh.me";
|
||||
mailDirectory = "/home/moritz/.mail";
|
||||
in {
|
||||
options.modules.desktop.apps.email = {
|
||||
enable = mkEnableOption "email module";
|
||||
passwordFile = mkOption {
|
||||
default = null;
|
||||
type = types.path;
|
||||
description = "File containing the email password.";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Protonbridge Setup
|
||||
environment.systemPackages = with pkgs; [ protonmail-bridge ];
|
||||
systemd.user.services.protonmail-bridge = {
|
||||
description = "Protonmail Bridge";
|
||||
enable = true;
|
||||
script =
|
||||
"${pkgs.protonmail-bridge}/bin/protonmail-bridge --log-level debug";
|
||||
path = [
|
||||
pkgs.gnome3.gnome-keyring
|
||||
]; # HACK: https://github.com/ProtonMail/proton-bridge/issues/176
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
};
|
||||
age.secrets.email = {
|
||||
file = cfg.passwordFile;
|
||||
owner = "1000";
|
||||
};
|
||||
|
||||
# Email Applications
|
||||
home-manager.users.moritz = {
|
||||
home = { packages = with pkgs; [ thunderbird ]; };
|
||||
programs = {
|
||||
msmtp.enable = true;
|
||||
mbsync.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
mbsync = {
|
||||
enable = true;
|
||||
frequency = "*:0/15";
|
||||
preExec = "${pkgs.isync}/bin/mbsync -Ha";
|
||||
postExec = "${pkgs.mu}/bin/mu index -m ${mailDirectory}";
|
||||
};
|
||||
};
|
||||
|
||||
accounts.email = {
|
||||
maildirBasePath = mailDirectory;
|
||||
accounts = {
|
||||
default = {
|
||||
address = email;
|
||||
userName = email;
|
||||
flavor = "plain";
|
||||
primary = true;
|
||||
passwordCommand = "${pkgs.coreutils}/bin/cat /run/agenix/email";
|
||||
mbsync = {
|
||||
enable = true;
|
||||
create = "both";
|
||||
expunge = "both";
|
||||
patterns = [ "*" ];
|
||||
};
|
||||
realName = name;
|
||||
msmtp.enable = true;
|
||||
imap = {
|
||||
host = "127.0.0.1";
|
||||
port = 1143;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile =
|
||||
"/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
smtp = {
|
||||
host = "127.0.0.1";
|
||||
port = 1025;
|
||||
tls = {
|
||||
enable = true;
|
||||
useStartTls = true;
|
||||
certificatesFile =
|
||||
"/home/moritz/.config/protonmail/bridge/cert.pem";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 33728 1025 1143 ];
|
||||
};
|
||||
}
|
|
@ -1,62 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
let
|
||||
arkenfox = builtins.readFile "${inputs.arkenfox-userjs}/user.js";
|
||||
overrides = {
|
||||
## arkenfox overrides
|
||||
# automatic search
|
||||
"keyword.enabled" = true;
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"browser.urlbar.suggest.searches" = true;
|
||||
|
||||
# startup page
|
||||
"browser.startup.homepage" = "https://searxng.moritzboeh.me/";
|
||||
"browser.startup.page" = 1;
|
||||
|
||||
# drm
|
||||
"media.eme.enabled" = true;
|
||||
|
||||
# sanitisation
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
|
||||
# disable letterboxing
|
||||
"privacy.resistFingerprinting.letterboxing" = false;
|
||||
|
||||
## OTHER
|
||||
# Dont show warning when accessing about:config
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
|
||||
# Hide bookmarks
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
|
||||
# Smooth scrolling
|
||||
"general.smoothScroll.lines.durationMaxMS" = 125;
|
||||
"general.smoothScroll.lines.durationMinMS" = 125;
|
||||
"general.smoothScroll.mouseWheel.durationMaxMS" = 200;
|
||||
"general.smoothScroll.mouseWheel.durationMinMS" = 100;
|
||||
"general.smoothScroll.msdPhysics.enabled" = true;
|
||||
"general.smoothScroll.other.durationMaxMS" = 125;
|
||||
"general.smoothScroll.other.durationMinMS" = 125;
|
||||
"general.smoothScroll.pages.durationMaxMS" = 125;
|
||||
"general.smoothScroll.pages.durationMinMS" = 125;
|
||||
"mousewheel.min_line_scroll_amount" = 40;
|
||||
"mousewheel.system_scroll_override_on_root_content.enabled" = true;
|
||||
"mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175;
|
||||
"mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175;
|
||||
"toolkit.scrollbox.horizontalScrollDistance" = 6;
|
||||
"toolkit.scrollbox.verticalScrollDistance" = 2;
|
||||
};
|
||||
|
||||
fullUserJs = ''
|
||||
// Arkenfox user.js
|
||||
${arkenfox}
|
||||
|
||||
// Overrides
|
||||
${lib.concatStrings (lib.mapAttrsToList (name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
'') overrides)}'';
|
||||
in {
|
||||
home-manager.users.moritz.programs.firefox = {
|
||||
enable = true;
|
||||
profiles."default".extraConfig = fullUserJs;
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
cursor_shape = "underline";
|
||||
window_padding_width = 3;
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+plus" = "change_font_size all +2.0";
|
||||
"ctrl+minus" = "change_font_size all -2.0";
|
||||
};
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 10;
|
||||
};
|
||||
};
|
||||
xdg.configFile."kitty/ssh.conf" = {
|
||||
text = ''
|
||||
env TERM=xterm-color
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; };
|
||||
extraConfig = { combi-modi = "drun,window,emoji"; };
|
||||
};
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
|
||||
];
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile."networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = rofi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
package = pkgs.stable.libvirt;
|
||||
};
|
||||
home-manager.users.moritz.home.packages = with pkgs; [ virt-manager ];
|
||||
users.users.moritz.extraGroups = [ "libvirtd" ];
|
||||
}
|
|
@ -1,13 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz.programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
recolor = true;
|
||||
adjust-open = "width";
|
||||
font = "Jetbrains Mono 9";
|
||||
selection-clipboard = "clipboard";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# MONITORS #
|
||||
monitors=($(bspc query -M --names | sort -r))
|
||||
desktops=$(expr 10 / ${#monitors[@]})
|
||||
start=1
|
||||
end=$desktops
|
||||
for monitor in ${monitors[@]}; do
|
||||
bspc monitor $monitor -d $(seq -s ' ' $start $end)
|
||||
start=$(expr $start + $desktops)
|
||||
end=$(expr $end + $desktops)
|
||||
done
|
|
@ -1,76 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop;
|
||||
in {
|
||||
imports = [ ./polybar.nix ];
|
||||
|
||||
config = lib.mkIf (cfg.name == "bspwm") {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "de";
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+bspwm";
|
||||
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
lightdm.enable = true;
|
||||
};
|
||||
windowManager.bspwm.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
home-manager.users.moritz = {
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
rules = {
|
||||
"Zathura" = { state = "tiled"; };
|
||||
"Emacs" = { state = "tiled"; };
|
||||
"feh" = { state = "floating"; };
|
||||
"Vampire_Survivors" = { state = "fullscreen"; };
|
||||
};
|
||||
settings = with config.scheme.withHashtag; {
|
||||
border_width = 2;
|
||||
window_gap = 5;
|
||||
borderless_monocle = true;
|
||||
gapless_monocle = true;
|
||||
focus_follows_pointer = true;
|
||||
|
||||
# Dracula theme #
|
||||
focused_border_color = base0D;
|
||||
normal_border_color = base03;
|
||||
active_border_color = base03;
|
||||
};
|
||||
startupPrograms = [
|
||||
"${pkgs.systemd}/bin/systemctl --user start polybar.service"
|
||||
"randomWallpaper"
|
||||
"synology-drive"
|
||||
];
|
||||
extraConfig = ''
|
||||
# MONITORS #
|
||||
monitors=($(bspc query -M --names | sort -r))
|
||||
desktops=$(expr 10 / ''${#monitors[@]})
|
||||
start=1
|
||||
end=$desktops
|
||||
for monitor in ''${monitors[@]}; do
|
||||
bspc monitor $monitor -d $(seq -s ' ' $start $end)
|
||||
start=$(expr $start + $desktops)
|
||||
end=$(expr $end + $desktops)
|
||||
done
|
||||
'';
|
||||
|
||||
};
|
||||
services.sxhkd = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./sxhkdrc;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ feh playerctl pamixer brightnessctl ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,206 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop;
|
||||
in {
|
||||
config = lib.mkIf (cfg.name == "bspwm") {
|
||||
home-manager.users.moritz = {
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybar.override { pulseSupport = true; };
|
||||
script = ''
|
||||
for m in $(polybar --list-monitors | ${pkgs.coreutils}/bin/cut -d":" -f1); do
|
||||
MONITOR=$m polybar --reload bottom &
|
||||
done
|
||||
'';
|
||||
config = with config.scheme.withHashtag; {
|
||||
"bar/bottom" = {
|
||||
# position
|
||||
monitor = "\${env:MONITOR}";
|
||||
bottom = true;
|
||||
width = "100%";
|
||||
heigth = 20;
|
||||
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
|
||||
border-size = 5;
|
||||
border-color = base00;
|
||||
|
||||
separator = " ";
|
||||
|
||||
font-0 = "FiraCode Nerd Font:size=9;0";
|
||||
font-1 = "FiraCode Nerd Font:size=9;1";
|
||||
font-2 = "FiraCode Nerd Font:size=9;2";
|
||||
|
||||
modules-left = "cpu memory network battery";
|
||||
modules-center = "bspwm";
|
||||
modules-right = "pulseaudio date time";
|
||||
|
||||
tray-position = "right";
|
||||
tray-padding = 2;
|
||||
|
||||
wm-restack = "bspwm";
|
||||
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
};
|
||||
"module/battery" = {
|
||||
type = "internal/battery";
|
||||
battery = "BATT";
|
||||
adapter = "ACAD";
|
||||
time-format = "%H:%M";
|
||||
|
||||
format-charging = "<animation-charging> <label-charging>";
|
||||
format-discharging = "<animation-discharging> <label-discharging>";
|
||||
format-full = " <label-full>";
|
||||
|
||||
label-charging = "%percentage%% %time% remaining";
|
||||
label-discharging = "%percentage%% %time% remaining";
|
||||
label-full = "Fully charged";
|
||||
|
||||
animation-charging-0 = " ";
|
||||
animation-charging-1 = " ";
|
||||
animation-charging-2 = " ";
|
||||
animation-charging-3 = " ";
|
||||
animation-charging-4 = " ";
|
||||
animation-charging-framerate = 500;
|
||||
|
||||
animation-discharging-0 = " ";
|
||||
animation-discharging-1 = " ";
|
||||
animation-discharging-2 = " ";
|
||||
animation-discharging-3 = " ";
|
||||
animation-discharging-4 = " ";
|
||||
animation-discharging-framerate = 500;
|
||||
};
|
||||
"module/bspwm" = {
|
||||
type = "internal/bspwm";
|
||||
|
||||
label-focused = "";
|
||||
label-focused-foreground = base0E;
|
||||
label-focused-padding = 1;
|
||||
|
||||
label-occupied = "";
|
||||
label-occupied-foreground = base03;
|
||||
label-occupied-padding = 1;
|
||||
|
||||
label-urgent = "";
|
||||
label-urgent-foreground = base08;
|
||||
label-urgent-padding = 1;
|
||||
|
||||
label-empty = "";
|
||||
label-empty-foreground = base03;
|
||||
label-empty-padding = 1;
|
||||
|
||||
label-separator = " ";
|
||||
label-separator-foreground = base0C;
|
||||
label-separator-padding = 1;
|
||||
|
||||
pin-workspaces = true;
|
||||
};
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
interval = 2;
|
||||
|
||||
format = "<ramp-load><label>";
|
||||
format-foreground = base00;
|
||||
format-background = base0B;
|
||||
format-padding = 1;
|
||||
format-font = 3;
|
||||
|
||||
ramp-load-0 = " ";
|
||||
ramp-load-1 = " ";
|
||||
ramp-load-2 = " ";
|
||||
ramp-load-3 = " ";
|
||||
|
||||
label = "%percentage:2%%";
|
||||
};
|
||||
"module/time" = {
|
||||
type = "internal/date";
|
||||
interval = 1;
|
||||
|
||||
time = "%H:%M";
|
||||
time-alt = "%H:%M:%S";
|
||||
|
||||
label = "%time%";
|
||||
format-prefix = " ";
|
||||
format-prefix-font = 2;
|
||||
format-foreground = base00;
|
||||
format-background = base0C;
|
||||
format-padding = 1;
|
||||
label-font = 3;
|
||||
};
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
interval = 5;
|
||||
|
||||
format = "<label>";
|
||||
format-prefix = " ";
|
||||
format-prefix-font = 2;
|
||||
format-foreground = base00;
|
||||
format-background = base0A;
|
||||
format-padding = 1;
|
||||
format-font = 3;
|
||||
|
||||
date = "%A";
|
||||
date-alt = "%Y-%m-%d";
|
||||
|
||||
label = "%date%";
|
||||
label-font = 3;
|
||||
|
||||
};
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
interval = 2;
|
||||
|
||||
format = "<label>";
|
||||
format-prefix = " ";
|
||||
format-foreground = base00;
|
||||
format-background = base0C;
|
||||
format-padding = 1;
|
||||
format-font = 2;
|
||||
|
||||
label = "%gb_used%";
|
||||
label-font = 3;
|
||||
};
|
||||
"module/pulseaudio" = {
|
||||
type = "internal/pulseaudio";
|
||||
|
||||
format-volume = "<ramp-volume> <label-volume>";
|
||||
label-volume = "%percentage%%";
|
||||
|
||||
format-volume-foreground = base00;
|
||||
format-volume-background = base04;
|
||||
format-volume-padding = 1;
|
||||
format-volume-font = 2;
|
||||
|
||||
label-muted = "%{F${base08}}婢 %{F${base00}}muted";
|
||||
format-muted-foreground = base00;
|
||||
format-muted-background = base04;
|
||||
format-muted-padding = 1;
|
||||
format-muted-font = 2;
|
||||
ramp-volume-0 = "奄";
|
||||
ramp-volume-1 = "奄";
|
||||
ramp-volume-2 = "奔";
|
||||
ramp-volume-3 = "墳";
|
||||
ramp-volume-4 = "墳";
|
||||
|
||||
click-middle = "${pkgs.pavucontrol}/bin/pavucontrol";
|
||||
};
|
||||
"module/network" = {
|
||||
type = "internal/network";
|
||||
interface =
|
||||
builtins.head (builtins.attrNames config.networking.interfaces);
|
||||
interval = 3;
|
||||
format-connected = "<label-connected>";
|
||||
label-connected = "%{T2}祝%{T3} %upspeed% %{T2}%{T3} %downspeed%";
|
||||
|
||||
format-connected-foreground = base00;
|
||||
format-connected-background = base0E;
|
||||
format-connected-padding = 1;
|
||||
format-connected-font = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let cfg = config.modules.desktop;
|
||||
in {
|
||||
imports = [ ./apps ./bspwm ./gtk.nix ./xmonad ./sway ];
|
||||
|
||||
options.modules.desktop = {
|
||||
name = lib.mkOption {
|
||||
default = "bspwm";
|
||||
type = lib.types.enum [ "bspwm" "xmonad" "sway" ];
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home-manager.users.moritz = {
|
||||
services.unclutter.enable = true;
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile = {
|
||||
"wallpapers/" = {
|
||||
source = ./wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# Remap capslock to esc and shift + capslock to capslock
|
||||
services.xserver.xkbOptions =
|
||||
"terminate:ctrl_alt_bksp,caps:escape_shifted_capslock";
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.dracula-theme;
|
||||
name = "Dracula";
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.dconf.enable = true;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let cfg = config.modules.desktop;
|
||||
in {
|
||||
config = lib.mkIf (cfg.name == "xmonad") {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "de";
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+xmonad";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
lightdm.enable = true;
|
||||
};
|
||||
windowManager.xmonad.enable = true;
|
||||
};
|
||||
};
|
||||
console.keyMap = "de";
|
||||
home-manager.users.moritz = let
|
||||
xmonadPackages = haskellPackages: [
|
||||
haskellPackages.xmonad-contrib
|
||||
haskellPackages.xmonad-extras
|
||||
haskellPackages.xmonad
|
||||
haskellPackages.xmobar
|
||||
];
|
||||
in {
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ./xmonad.hs;
|
||||
# extraPackages = xmonadPackages;
|
||||
};
|
||||
programs.xmobar.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [ ./emacs.nix ./idea.nix ./vim.nix ./code.nix ];
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
options.modules.editors = {
|
||||
idea = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.idea {
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ jdk jetbrains.idea-ultimate ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
options.modules.editors = {
|
||||
vim = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.vim {
|
||||
home-manager.users.moritz.programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
(nvim-treesitter.withPlugins (p: pkgs.tree-sitter.allGrammars))
|
||||
coc-nvim
|
||||
dracula-vim
|
||||
];
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.gaming;
|
||||
in {
|
||||
options.modules.gaming = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
|
||||
config = mkIf cfg {
|
||||
programs.steam.enable = true;
|
||||
home-manager.users.moritz.home.packages = with pkgs; [
|
||||
lutris
|
||||
legendary-gl
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,128 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
{
|
||||
users.users.moritz = {
|
||||
isNormalUser = true;
|
||||
home = "/home/moritz";
|
||||
extraGroups = [ "wheel" ]; # "networkmanager" "video" "dialout"
|
||||
initialPassword = "password"; # CHANGE ME PLEASE
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGoAqa2m7hIzZ2LS96Z+RCIlRvhBM/j7h27tMBCwMT+a" # Moritz
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDhtwHDGAZshiQWKkCcPWV9tC83b+bKBgjDcjP/N2CKO" # Laptop
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKl8gMhwSf1NsP5gp14xbbyjqQLZzcHLb/XKRMoHdXgI" # Desktop
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDHlemuKagHwz2T5rEwgJNlVUdUdOXyPtCEzD73CrwY2zmpR4AMj7y9u3Rm7HwHUDjLap1ZFwg+53bAsVP6HFZccCXoIfO/8BL0WDGQJrfgb+A+UiRhSqSvyZ77bGJkadbBkadguz3qR3PHcb41DOlhuqVcHxsY8ceHMxAuyb0pLJVJLeytMD+CHS/r7hoj2hckTNAZ+VhCXBtdZfZ7uPUBxLfluYRNNMmdwCglsg3RUS242nJUzy3A84+CXIGeWmNG9Fu45IDkwMthxSW9klyU9R38R9DBDcugkyb6vz+JKSuRVAa47qh/kmtsYekfL3ul9D2JN32P8S+6ZoXx+gXupGJ0ltwJWAFkhLJ+yeXj9kCOv/mIUmCB14jMGsvKiSwV25O/twyjqe2LEkMVgimgrjEYoHu+ZTyp0iFtUvSrFo4tsAhfWPV9yj4F/hUksW7xKIwq5Niyx7he5M/XddudtnAximyiBDGCdJm1Ejl0UaGa6ZQv7y6VZdx0PyZuraT7l9ub8so6JlE4cVgSSU9vE0IS2QqBuHhsIjh8RVksoTR2NQbeDdGaGpGnq2C8y0rDXwE/EJA4LK45khX/GPn73n8F0kBG8dBrWgRDAEODpmebScO7d5mCeM0z3lPcRmh+3e3DPnVVOl+uR7udlc7NauLzl7q913UtxZaF1PlD7Q==" # GPG
|
||||
];
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
my = {
|
||||
shell = {
|
||||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
rs = "doas systemctl";
|
||||
};
|
||||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
cat = "bat";
|
||||
grep = "rg";
|
||||
rm = "rm -i";
|
||||
mv = "mv -i";
|
||||
|
||||
nix-switch = "doas nixos-rebuild switch --flake ~/.dotfiles";
|
||||
nix-boot = "doas nixos-rebuild boot --flake ~/.dotfiles";
|
||||
nix-lock = "pushd ~/.dotfiles && nix flake update && popd";
|
||||
|
||||
nixpkgs-review = "nixpkgs-review-checks";
|
||||
|
||||
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
|
||||
};
|
||||
variables = { EDITOR = "vim"; };
|
||||
};
|
||||
};
|
||||
|
||||
console.keyMap = "de";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# archives
|
||||
p7zip
|
||||
unzip
|
||||
zip
|
||||
|
||||
# file management
|
||||
ranger
|
||||
trash-cli
|
||||
|
||||
# monitoring
|
||||
htop
|
||||
bottom
|
||||
|
||||
# nix
|
||||
comma
|
||||
nix-index
|
||||
nixpkgs-fmt
|
||||
statix
|
||||
|
||||
# other
|
||||
arduino
|
||||
bat
|
||||
cht-sh
|
||||
du-dust
|
||||
duf
|
||||
entr
|
||||
exa
|
||||
gparted
|
||||
hub
|
||||
neofetch
|
||||
tmux
|
||||
ttyper
|
||||
up
|
||||
viu
|
||||
wget
|
||||
];
|
||||
|
||||
fonts.fonts = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" "DroidSansMono" "JetBrainsMono" ];
|
||||
})
|
||||
];
|
||||
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
command-not-found.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
sshd.enable = true; # for agenix
|
||||
btrfs.autoScrub.enable =
|
||||
lib.mkDefault
|
||||
(builtins.any (filesystem: filesystem.fsType == "btrfs")
|
||||
(builtins.attrValues config.fileSystems));
|
||||
};
|
||||
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
# Let Home Manager install and manage itself.
|
||||
home-manager.enable = true;
|
||||
fzf.enable = true;
|
||||
starship.enable = true;
|
||||
};
|
||||
home = {
|
||||
username = "moritz";
|
||||
homeDirectory = "/home/moritz";
|
||||
language = {
|
||||
base = "en_US.UTF-8";
|
||||
time = "de_DE.UTF-8";
|
||||
numeric = "de_DE.UTF-8";
|
||||
paper = "de_DE.UTF-8";
|
||||
};
|
||||
stateVersion = "21.05";
|
||||
};
|
||||
xdg.userDirs.enable = true;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,133 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
with lib; {
|
||||
my = {
|
||||
# config
|
||||
yubikey.enable = true;
|
||||
wallpapers.enable = true;
|
||||
theming.enable = true;
|
||||
shell.aliases = {
|
||||
feh = "feh --auto-zoom --scale-down";
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
podman.enable = true;
|
||||
libvirtd.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
adb.enable = true;
|
||||
bspwm.enable = true;
|
||||
code.enable = true;
|
||||
emacs.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
overrides = {
|
||||
## arkenfox overrides
|
||||
# automatic search
|
||||
"keyword.enabled" = true;
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"browser.urlbar.suggest.searches" = true;
|
||||
|
||||
# startup page
|
||||
"browser.startup.homepage" = "https://searxng.moritzboeh.me/";
|
||||
"browser.startup.page" = 1;
|
||||
|
||||
# drm
|
||||
"media.eme.enabled" = true;
|
||||
|
||||
# sanitisation
|
||||
"privacy.clearOnShutdown.history" = false;
|
||||
|
||||
# disable letterboxing
|
||||
"privacy.resistFingerprinting.letterboxing" = false;
|
||||
|
||||
## OTHER
|
||||
# Dont show warning when accessing about:config
|
||||
"browser.aboutConfig.showWarning" = false;
|
||||
|
||||
# Hide bookmarks
|
||||
"browser.toolbars.bookmarks.visibility" = "never";
|
||||
|
||||
# Smooth scrolling
|
||||
"general.smoothScroll.lines.durationMaxMS" = 125;
|
||||
"general.smoothScroll.lines.durationMinMS" = 125;
|
||||
"general.smoothScroll.mouseWheel.durationMaxMS" = 200;
|
||||
"general.smoothScroll.mouseWheel.durationMinMS" = 100;
|
||||
"general.smoothScroll.msdPhysics.enabled" = true;
|
||||
"general.smoothScroll.other.durationMaxMS" = 125;
|
||||
"general.smoothScroll.other.durationMinMS" = 125;
|
||||
"general.smoothScroll.pages.durationMaxMS" = 125;
|
||||
"general.smoothScroll.pages.durationMinMS" = 125;
|
||||
"mousewheel.min_line_scroll_amount" = 40;
|
||||
"mousewheel.system_scroll_override_on_root_content.enabled" = true;
|
||||
"mousewheel.system_scroll_override_on_root_content.horizontal.factor" = 175;
|
||||
"mousewheel.system_scroll_override_on_root_content.vertical.factor" = 175;
|
||||
"toolkit.scrollbox.horizontalScrollDistance" = 6;
|
||||
"toolkit.scrollbox.verticalScrollDistance" = 2;
|
||||
};
|
||||
};
|
||||
git.signing = true;
|
||||
gpg.enable = true;
|
||||
hub.enable = true;
|
||||
kitty.enable = true;
|
||||
ledger.enable = true;
|
||||
rofi.enable = true;
|
||||
spotify.enable = true;
|
||||
thunar.enable = true;
|
||||
zathura.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
dunst.enable = true;
|
||||
kdeconnect.enable = true;
|
||||
openconnect.enable = true;
|
||||
openvpn.enable = true;
|
||||
picom.enable = true;
|
||||
printing.enable = true;
|
||||
redshift.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# nix
|
||||
nixpkgs-review-checks
|
||||
|
||||
# ripping
|
||||
abcde
|
||||
handbrake
|
||||
picard
|
||||
|
||||
# other
|
||||
tlaplusToolbox
|
||||
anki
|
||||
calibre
|
||||
jellyfin-media-player
|
||||
keepassxc
|
||||
libreoffice
|
||||
pavucontrol
|
||||
signal-desktop
|
||||
vlc
|
||||
];
|
||||
|
||||
home-manager.users.moritz = {
|
||||
services.unclutter.enable = true;
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
gnome.gnome-keyring.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
# Remap capslock to esc and shift + capslock to capslock
|
||||
xserver.xkbOptions = "terminate:ctrl_alt_bksp,caps:escape_shifted_capslock";
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
programs.steam.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
legendary-gl
|
||||
];
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.adb;
|
||||
in
|
||||
{
|
||||
options.my.programs.adb = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.adb.enable = true;
|
||||
users.users.moritz.extraGroups = [ "adbusers" ];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
mapfile -t monitors < <(bspc query -M --names | sort -r)
|
||||
desktops=$(( 10 / ${#monitors[@]} ))
|
||||
start=1
|
||||
end=$desktops
|
||||
for monitor in "${monitors[@]}"; do
|
||||
bspc monitor "$monitor" -d $(seq -s ' ' $start $end)
|
||||
start=$(( start + desktops ))
|
||||
end=$(( end + desktops ))
|
||||
done
|
|
@ -0,0 +1,79 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.bspwm;
|
||||
in
|
||||
{
|
||||
options.my.programs.bspwm = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "de";
|
||||
displayManager = {
|
||||
defaultSession = "none+bspwm";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
lightdm.enable = true;
|
||||
};
|
||||
windowManager.bspwm.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
home-manager.users.moritz = {
|
||||
xsession.windowManager.bspwm = {
|
||||
enable = true;
|
||||
rules = {
|
||||
"Zathura".state = "tiled";
|
||||
"Emacs".state = "tiled";
|
||||
"feh".state = "floating";
|
||||
"Vampire_Survivors".state = "fullscreen";
|
||||
};
|
||||
settings = with config.scheme.withHashtag; {
|
||||
border_width = 2;
|
||||
window_gap = 5;
|
||||
borderless_monocle = true;
|
||||
gapless_monocle = true;
|
||||
focus_follows_pointer = true;
|
||||
};
|
||||
startupPrograms = [
|
||||
"${pkgs.systemd}/bin/systemctl --user start polybar.service"
|
||||
"randomWallpaper"
|
||||
"synology-drive"
|
||||
];
|
||||
extraConfig = builtins.readFile ./bspwmrc;
|
||||
};
|
||||
services = {
|
||||
sxhkd = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./sxhkdrc;
|
||||
};
|
||||
polybar = {
|
||||
enable = true;
|
||||
package = pkgs.polybar.override { pulseSupport = true; };
|
||||
script = ''
|
||||
for m in $(polybar --list-monitors | ${pkgs.coreutils}/bin/cut -d":" -f1); do
|
||||
MONITOR=$m polybar --reload bottom &
|
||||
done
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ feh playerctl pamixer brightnessctl ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +1,22 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.editors;
|
||||
in {
|
||||
options.modules.editors = {
|
||||
code = mkOption {
|
||||
let
|
||||
cfg = config.my.programs.code;
|
||||
in
|
||||
{
|
||||
options.my.programs.code = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.code {
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
programs.vscode = {
|
||||
enable = true;
|
|
@ -0,0 +1,30 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./adb.nix
|
||||
./bspwm
|
||||
./code.nix
|
||||
./direnv.nix
|
||||
./emacs.nix
|
||||
./firefox.nix
|
||||
./fish.nix
|
||||
./git.nix
|
||||
./gpg.nix
|
||||
./hub.nix
|
||||
./kitty.nix
|
||||
./ledger
|
||||
./rofi
|
||||
./spotify.nix
|
||||
./sway.nix
|
||||
./thunar.nix
|
||||
./vim.nix
|
||||
./xmonad
|
||||
./zathura.nix
|
||||
./zsh.nix
|
||||
];
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.direnv;
|
||||
in
|
||||
{
|
||||
options.my.programs.direnv = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,20 +1,28 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
myEmacs = with pkgs;
|
||||
((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm ]));
|
||||
cfg = config.modules.editors.emacs;
|
||||
in {
|
||||
options.modules.editors = {
|
||||
emacs = mkOption {
|
||||
default = true;
|
||||
cfg = config.my.programs.emacs;
|
||||
myEmacs = with pkgs; ((emacsPackagesFor emacsPgtkNativeComp).emacsWithPackages
|
||||
(epkgs: [ epkgs.vterm ]));
|
||||
in
|
||||
{
|
||||
options.my.programs.emacs = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg {
|
||||
config = mkIf cfg.enable {
|
||||
my.shell.aliases = {
|
||||
emacs = "emacsclient -t -a 'emacs -t'";
|
||||
};
|
||||
fonts.fonts = [ pkgs.emacs-all-the-icons-fonts ];
|
||||
|
||||
home-manager.users.moritz = {
|
|
@ -0,0 +1,47 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.firefox;
|
||||
arkenfox = builtins.readFile "${inputs.arkenfox-userjs}/user.js";
|
||||
in
|
||||
{
|
||||
options.my.programs.firefox = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
overrides = mkOption {
|
||||
default = { };
|
||||
type = with types; attrsOf (oneOf [ str bool int ]);
|
||||
apply = overrides: lib.concatStrings (
|
||||
lib.mapAttrsToList
|
||||
(
|
||||
name: value: ''
|
||||
user_pref("${name}", ${builtins.toJSON value});
|
||||
''
|
||||
)
|
||||
overrides
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.firefox = {
|
||||
enable = true;
|
||||
profiles."default".extraConfig = ''
|
||||
// Arkenfox user.js
|
||||
${arkenfox}
|
||||
|
||||
// Overrides
|
||||
${cfg.overrides}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,24 +1,40 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.cli.shell;
|
||||
exportedVariables = let
|
||||
exportVariables =
|
||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') cfg.variables;
|
||||
in lib.concatStringsSep "\n" exportVariables;
|
||||
in {
|
||||
config = lib.mkIf (cfg.name == "fish") {
|
||||
cfg = config.my.programs.fish;
|
||||
shellConfig = config.my.shell;
|
||||
exportVariables =
|
||||
lib.mapAttrsToList (n: v: ''set -x ${n} "${v}"'') shellConfig.variables;
|
||||
exportedVariables = lib.concatStringsSep "\n" exportVariables;
|
||||
in
|
||||
{
|
||||
options.my.programs.fish = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# set as default shell
|
||||
users.users.moritz.shell = pkgs.fish;
|
||||
# needed for nix completions
|
||||
programs.fish.enable = true;
|
||||
|
||||
home-manager.users.moritz = {
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
shellAbbrs = cfg.abbreviations;
|
||||
shellAbbrs = shellConfig.abbreviations;
|
||||
|
||||
shellAliases = cfg.aliases;
|
||||
shellAliases = shellConfig.aliases;
|
||||
|
||||
shellInit = ''
|
||||
fzf_configure_bindings --git_log=\cg
|
||||
|
@ -54,10 +70,12 @@ in {
|
|||
fish_greeting = "";
|
||||
cheat = "cht.sh $argv | bat -p";
|
||||
};
|
||||
plugins = [{
|
||||
name = "dracula";
|
||||
src = inputs.dracula-fish;
|
||||
}];
|
||||
plugins = [
|
||||
{
|
||||
name = "dracula";
|
||||
src = inputs.dracula-fish;
|
||||
}
|
||||
];
|
||||
};
|
||||
fzf.enableFishIntegration = true;
|
||||
starship.enableFishIntegration = true;
|
|
@ -0,0 +1,57 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.git;
|
||||
in
|
||||
{
|
||||
options.my.programs.git = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
signing = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.shell.abbreviations = {
|
||||
ga = "git add";
|
||||
gb = "git branch";
|
||||
gc = "git commit";
|
||||
gco = "git checkout";
|
||||
gd = "git diff";
|
||||
gds = "git diff --staged";
|
||||
gp = "git push";
|
||||
gf = "git fetch";
|
||||
gF = "git pull";
|
||||
gs = "git status";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Moritz Böhme";
|
||||
userEmail = "mail@moritzboeh.me";
|
||||
extraConfig.init.defaultBranch = "main";
|
||||
delta.enable = true;
|
||||
signing = mkIf cfg.signing {
|
||||
key = "0x970C6E89EB0547A9";
|
||||
signByDefault = true;
|
||||
};
|
||||
lfs.enable = true;
|
||||
};
|
||||
};
|
||||
programs.git = {
|
||||
enable = true;
|
||||
config.safe.directory = "/home/moritz/.dotfiles";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.gpg;
|
||||
in
|
||||
{
|
||||
options.my.programs.gpg = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.gpg.enable = true;
|
||||
environment.shellInit = ''
|
||||
export GPG_TTY="$(tty)"
|
||||
gpg-connect-agent /bye
|
||||
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
'';
|
||||
programs = {
|
||||
ssh.startAgent = false;
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.hub;
|
||||
in
|
||||
{
|
||||
options.my.programs.hub = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets = {
|
||||
github = {
|
||||
file = ../../secrets/github.age;
|
||||
owner = "1000";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.kitty;
|
||||
in
|
||||
{
|
||||
options.my.programs.kitty = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.shell.aliases.ssh = "kitty +kitten ssh";
|
||||
home-manager.users.moritz = {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrollback_lines = 10000;
|
||||
enable_audio_bell = false;
|
||||
cursor_shape = "underline";
|
||||
window_padding_width = 3;
|
||||
confirm_os_window_close = 0;
|
||||
};
|
||||
keybindings = {
|
||||
"ctrl+plus" = "change_font_size all +2.0";
|
||||
"ctrl+minus" = "change_font_size all -2.0";
|
||||
};
|
||||
font = {
|
||||
name = "FiraCode Nerd Font";
|
||||
size = 10;
|
||||
};
|
||||
};
|
||||
xdg.configFile."kitty/ssh.conf" = {
|
||||
text = ''
|
||||
env TERM=xterm-color
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.ledger;
|
||||
in
|
||||
{
|
||||
options.my.programs.ledger = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
my.shell.aliases = {
|
||||
bal = "ledger bal";
|
||||
balcash = "ledger bal -R -X € --current --flat ^assets:bank ^liabilities";
|
||||
balnet = "ledger bal -R -X € --current --depth 2 ^assets ^liabilities";
|
||||
bud = ''ledger --budget --unbudgeted bal ^expenses -p "this month"'';
|
||||
budr = ''ledger --budget reg -p "this month" ^expenses'';
|
||||
reg = "ledger reg -R -V --tail 15";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ ledger ];
|
||||
xdg.configFile = {
|
||||
"fish/completions/ledger.fish" = {
|
||||
text = builtins.readFile ./ledger.fish;
|
||||
};
|
||||
"ledger/ledgerrc".text = ''
|
||||
--strict
|
||||
--explicit
|
||||
--payee note
|
||||
--file ~/Notes/ledger/main.ledger
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.rofi;
|
||||
in
|
||||
{
|
||||
options.my.programs.rofi = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package =
|
||||
pkgs.rofi.override { plugins = with pkgs; [ rofi-calc rofi-emoji ]; };
|
||||
extraConfig = { combi-modi = "drun,window,emoji"; };
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
(lib.mkIf config.networking.networkmanager.enable networkmanager_dmenu)
|
||||
];
|
||||
xdg = {
|
||||
enable = true;
|
||||
configFile."networkmanager-dmenu/config.ini".text = ''
|
||||
[dmenu]
|
||||
dmenu_command = rofi
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,87 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.spotify;
|
||||
in
|
||||
{
|
||||
options.my.programs.spotify = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age.secrets.spotifyd = {
|
||||
file = ../../secrets/spotifyd.age;
|
||||
owner = "1000";
|
||||
};
|
||||
home-manager.users.moritz = {
|
||||
home.packages = with pkgs; [ spotify-tui sptlrx ];
|
||||
services.spotifyd = {
|
||||
enable = true;
|
||||
package = pkgs.spotifyd.override { withMpris = true; };
|
||||
settings = {
|
||||
global = {
|
||||
# A command that gets executed and can be used to
|
||||
# retrieve your username.
|
||||
username_cmd = "${pkgs.coreutils}/bin/head -n 1 /run/agenix/spotifyd";
|
||||
|
||||
# A command that gets executed and can be used to
|
||||
# retrieve your password.
|
||||
password_cmd = "${pkgs.coreutils}/bin/tail -n 1 /run/agenix/spotifyd";
|
||||
|
||||
# The name that gets displayed under the connect tab on
|
||||
# official clients. Spaces are not allowed!
|
||||
device_name = "spotifyd";
|
||||
|
||||
# The audio bitrate. 96, 160 or 320 kbit/s
|
||||
bitrate = 320;
|
||||
|
||||
# Volume on startup between 0 and 100
|
||||
initial_volume = "71";
|
||||
|
||||
# The directory used to cache audio data.
|
||||
cache_path = "/tmp/spotifyd-cache";
|
||||
|
||||
# The displayed device type in Spotify clients.
|
||||
device_type = "computer";
|
||||
|
||||
# set backend to pulseaudio
|
||||
backend = "pulseaudio";
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile."spotify-tui/config.yml".text = ''
|
||||
# Dracula theme
|
||||
theme:
|
||||
active: "139,233,253" # current playing song in list
|
||||
banner: "80,250,123" # the "spotify-tui" banner on launch
|
||||
error_border: "241,250,140" # error dialog border
|
||||
error_text: "248,248,242" # error message text (e.g. "Spotify API
|
||||
# reported error 404")
|
||||
hint: "241,250,140" # hint text in errors
|
||||
hovered: "255,184,108" # hovered pane border
|
||||
inactive: "248,248,242" # borders of inactive panes
|
||||
playbar_background: "68,71,90" # background of progress bar
|
||||
playbar_progress: "248,248,242" # filled-in part of the progress bar
|
||||
playbar_progress_text: "248,248,242" # song length and time played/left
|
||||
# indicator in the progress bar
|
||||
playbar_text: "248,248,242" # artist name in player pane
|
||||
selected: "80,250,123" # a) selected pane border, b) hovered item
|
||||
# in list, & c) track title in player
|
||||
text: "248,248,242" # text in panes
|
||||
header: "248,248,242" # header text in panes (e.g. 'Title',
|
||||
# 'Artist', etc.)
|
||||
behavior:
|
||||
volume_increment: 5
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +1,23 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.desktop;
|
||||
in {
|
||||
config = mkIf (cfg.name == "sway") {
|
||||
let
|
||||
cfg = config.my.programs.sway;
|
||||
in
|
||||
{
|
||||
options.my.programs.sway = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
|
@ -26,8 +40,7 @@ in {
|
|||
output = [ "eDP-1" "HDMI-A-1" ];
|
||||
modules-left = [ "sway/workspaces" "sway/mode" "wlr/taskbar" ];
|
||||
modules-center = [ "sway/window" "custom/hello-from-waybar" ];
|
||||
modules-right =
|
||||
[ "mpd" "custom/mymodule#with-css-id" "temperature" ];
|
||||
modules-right = [ "mpd" "custom/mymodule#with-css-id" "temperature" ];
|
||||
"sway/workspaces" = { all-outputs = true; };
|
||||
};
|
||||
};
|
||||
|
@ -51,10 +64,11 @@ in {
|
|||
smartBorders = "on";
|
||||
};
|
||||
bars = [ ];
|
||||
keybindings = let
|
||||
modifier =
|
||||
config.home-manager.users.moritz.wayland.windowManager.sway.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
keybindings = lib.mkOptionDefault {
|
||||
inherit
|
||||
(config.home-manager.users.moritz.wayland.windowManager.sway.config)
|
||||
modifier
|
||||
;
|
||||
"${modifier}+f" = "firefox";
|
||||
"${modifier}+e" = "emacsclient -c -a emacs";
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.thunar;
|
||||
in
|
||||
{
|
||||
options.my.programs.thunar = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
xfce.exo
|
||||
xfce.thunar
|
||||
xfce.tumbler
|
||||
xfce.xfconf
|
||||
];
|
||||
services.gvfs = {
|
||||
enable = true;
|
||||
package = lib.mkForce pkgs.gnome3.gvfs;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.vim;
|
||||
in
|
||||
{
|
||||
options.my.programs.vim = {
|
||||
enable = mkOption {
|
||||
default = true;
|
||||
type = types.bool;
|
||||
example = false;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.neovim = {
|
||||
enable = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
withNodeJs = true;
|
||||
withPython3 = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.xmonad;
|
||||
in
|
||||
{
|
||||
options.my.programs.xmonad = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
layout = "de";
|
||||
|
||||
displayManager = {
|
||||
defaultSession = "none+xmonad";
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
lightdm.enable = true;
|
||||
};
|
||||
windowManager.xmonad.enable = true;
|
||||
};
|
||||
};
|
||||
home-manager.users.moritz =
|
||||
let
|
||||
xmonadPackages = haskellPackages: [
|
||||
haskellPackages.xmonad-contrib
|
||||
haskellPackages.xmonad-extras
|
||||
haskellPackages.xmonad
|
||||
haskellPackages.xmobar
|
||||
];
|
||||
in
|
||||
{
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
config = ./xmonad.hs;
|
||||
# extraPackages = xmonadPackages;
|
||||
};
|
||||
programs.xmobar.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.zathura;
|
||||
in
|
||||
{
|
||||
options.my.programs.zathura = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home-manager.users.moritz.programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
recolor = true;
|
||||
adjust-open = "width";
|
||||
font = "Jetbrains Mono 9";
|
||||
selection-clipboard = "clipboard";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.programs.zsh;
|
||||
shellConfig = config.my.shell;
|
||||
in
|
||||
{
|
||||
options.my.programs.zsh = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.pathsToLink = [ "/share/zsh" ];
|
||||
users.users.moritz.shell = pkgs.zsh;
|
||||
home-manager.users.moritz.programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
history.expireDuplicatesFirst = true;
|
||||
localVariables = shellConfig.variables;
|
||||
shellAliases = lib.trivial.mergeAttrs shellConfig.aliases shellConfig.abbreviations;
|
||||
enableSyntaxHighlighting = true;
|
||||
enableAutosuggestions = true;
|
||||
enableCompletion = true;
|
||||
initExtra = ''
|
||||
function nix-which() {
|
||||
readlink -f $(which $1)
|
||||
}
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "forgit";
|
||||
src = inputs.forgit-git;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
{ config
|
||||
, lib
|
||||
, ...
|
||||
}: {
|
||||
## System security tweaks
|
||||
# sets hidepid=2 on /proc (make process info visible only to owning user)
|
||||
# NOTE Was removed on nixpkgs-unstable because it doesn't do anything
|
|
@ -1,11 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
services.sshd.enable = true;
|
||||
age.secrets = {
|
||||
nordvpn = {
|
||||
file = ../../secrets/nordvpn.age;
|
||||
owner = "1000";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,39 +1,15 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}: {
|
||||
imports = [
|
||||
./agenix.nix
|
||||
./dunst.nix
|
||||
./gpg.nix
|
||||
./kdeconnect.nix
|
||||
./keyring.nix
|
||||
./openconnect.nix
|
||||
./openvpn.nix
|
||||
./picom.nix
|
||||
./openconnect.nix
|
||||
./printing.nix
|
||||
./redshift.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs;
|
||||
[ stable.epson-escpr2 ]; # HACK to fix broken upstream package
|
||||
};
|
||||
avahi = lib.mkIf config.services.printing.enable {
|
||||
enable = true;
|
||||
nssmdns = true;
|
||||
};
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
redshift.enable = true;
|
||||
btrfs.autoScrub.enable = lib.mkDefault
|
||||
(builtins.any (filesystem: filesystem.fsType == "btrfs")
|
||||
(builtins.attrValues config.fileSystems));
|
||||
};
|
||||
location = {
|
||||
latitude = 52.3;
|
||||
longitude = 12.4;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,288 +1,303 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.my.services.dunst;
|
||||
in
|
||||
{
|
||||
home-manager.users.moritz = {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
### Display ###
|
||||
options.my.services.dunst = {
|
||||
enable = mkOption {
|
||||
default = false;
|
||||
type = types.bool;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0;
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager.users.moritz = {
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
### Display ###
|
||||
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = "mouse";
|
||||
# Which monitor should the notifications be displayed on.
|
||||
monitor = 0;
|
||||
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "0x4-25+25";
|
||||
# Display notification on focused monitor. Possible modes are:
|
||||
# mouse: follow mouse pointer
|
||||
# keyboard: follow window with keyboard focus
|
||||
# none: don't follow anything
|
||||
#
|
||||
# "keyboard" needs a window manager that exports the
|
||||
# _NET_ACTIVE_WINDOW property.
|
||||
# This should be the case for almost all modern window managers.
|
||||
#
|
||||
# If this option is set to mouse or keyboard, the monitor option
|
||||
# will be ignored.
|
||||
follow = "mouse";
|
||||
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = "yes";
|
||||
# The geometry of the window:
|
||||
# [{width}]x{height}[+/-{x}+/-{y}]
|
||||
# The geometry of the message window.
|
||||
# The height is measured in number of notifications everything else
|
||||
# in pixels. If the width is omitted but the height is given
|
||||
# ("-geometry x2"), the message window expands over the whole screen
|
||||
# (dmenu-like). If width is 0, the window expands to the longest
|
||||
# message displayed. A positive x is measured from the left, a
|
||||
# negative from the right side of the screen. Y is measured from
|
||||
# the top and down respectively.
|
||||
# The width can be negative. In this case the actual width is the
|
||||
# screen width minus the width defined in within the geometry option.
|
||||
geometry = "0x4-25+25";
|
||||
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = "no";
|
||||
# Show how many messages are currently hidden (because of geometry).
|
||||
indicate_hidden = "yes";
|
||||
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = "15";
|
||||
# Shrink window if it's smaller than the width. Will be ignored if
|
||||
# width is 0.
|
||||
shrink = "no";
|
||||
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0;
|
||||
# The transparency of the window. Range: [0; 100].
|
||||
# This option will only work if a compositing window manager is
|
||||
# present (e.g. xcompmgr, compiz, etc.).
|
||||
transparency = "15";
|
||||
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 1;
|
||||
# The height of the entire notification. If the height is smaller
|
||||
# than the font height and padding combined, it will be raised
|
||||
# to the font height and padding.
|
||||
notification_height = 0;
|
||||
|
||||
# Padding between text and separator.
|
||||
padding = 8;
|
||||
# Draw a line of "separator_height" pixel height between two
|
||||
# notifications.
|
||||
# Set to 0 to disable.
|
||||
separator_height = 1;
|
||||
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 10;
|
||||
# Padding between text and separator.
|
||||
padding = 8;
|
||||
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 0;
|
||||
# Horizontal padding.
|
||||
horizontal_padding = 10;
|
||||
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#282a36";
|
||||
# Defines width in pixels of frame around the notification window.
|
||||
# Set to 0 to disable.
|
||||
frame_width = 0;
|
||||
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = "frame";
|
||||
# Defines color of the frame around the notification window.
|
||||
frame_color = "#282a36";
|
||||
|
||||
# Sort messages by urgency.
|
||||
sort = "yes";
|
||||
# Define a color for the separator.
|
||||
# possible values are:
|
||||
# * auto: dunst tries to find a color fitting to the background;
|
||||
# * foreground: use the same color as the foreground;
|
||||
# * frame: use the same color as the frame;
|
||||
# * anything else will be interpreted as a X color.
|
||||
separator_color = "frame";
|
||||
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120;
|
||||
# Sort messages by urgency.
|
||||
sort = "yes";
|
||||
|
||||
### Text ###
|
||||
# Don't remove messages, if the user is idle (no mouse or keyboard input)
|
||||
# for longer than idle_threshold seconds.
|
||||
# Set to 0 to disable.
|
||||
# A client can set the 'transient' hint to bypass this. See the rules
|
||||
# section for how to disable this if necessary
|
||||
idle_threshold = 120;
|
||||
|
||||
font = "Monospace 10";
|
||||
### Text ###
|
||||
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0;
|
||||
font = "Monospace 10";
|
||||
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = "full";
|
||||
# The spacing between lines. If the height is smaller than the
|
||||
# font height, it will get raised to the font height.
|
||||
line_height = 0;
|
||||
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = ''
|
||||
%s %p
|
||||
%b'';
|
||||
# Possible values are:
|
||||
# full: Allow a small subset of html markup in notifications:
|
||||
# <b>bold</b>
|
||||
# <i>italic</i>
|
||||
# <s>strikethrough</s>
|
||||
# <u>underline</u>
|
||||
#
|
||||
# For a complete reference see
|
||||
# <https://developer.gnome.org/pango/stable/pango-Markup.html>.
|
||||
#
|
||||
# strip: This setting is provided for compatibility with some broken
|
||||
# clients that send markup even though it's not enabled on the
|
||||
# server. Dunst will try to strip the markup but the parsing is
|
||||
# simplistic so using this option outside of matching rules for
|
||||
# specific applications *IS GREATLY DISCOURAGED*.
|
||||
#
|
||||
# no: Disable markup parsing, incoming notifications will be treated as
|
||||
# plain text. Dunst will not advertise that it has the body-markup
|
||||
# capability if this is set as a global setting.
|
||||
#
|
||||
# It's important to note that markup inside the format option will be parsed
|
||||
# regardless of what this is set to.
|
||||
markup = "full";
|
||||
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = "left";
|
||||
# The format of the message. Possible variables are:
|
||||
# %a appname
|
||||
# %s summary
|
||||
# %b body
|
||||
# %i iconname (including its path)
|
||||
# %I iconname (without its path)
|
||||
# %p progress value if set ([ 0%] to [100%]) or nothing
|
||||
# %n progress value if set without any extra characters
|
||||
# %% Literal %
|
||||
# Markup is allowed
|
||||
format = ''
|
||||
%s %p
|
||||
%b'';
|
||||
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = "center";
|
||||
# Alignment of message text.
|
||||
# Possible values are "left", "center" and "right".
|
||||
alignment = "left";
|
||||
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60;
|
||||
# Vertical alignment of message text and icon.
|
||||
# Possible values are "top", "center" and "bottom".
|
||||
vertical_alignment = "center";
|
||||
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = "yes";
|
||||
# Show age of message if message is older than show_age_threshold
|
||||
# seconds.
|
||||
# Set to -1 to disable.
|
||||
show_age_threshold = 60;
|
||||
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = "middle";
|
||||
# Split notifications into multiple lines if they don't fit into
|
||||
# geometry.
|
||||
word_wrap = "yes";
|
||||
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = "no";
|
||||
# When word_wrap is set to no, specify where to make an ellipsis in long lines.
|
||||
# Possible values are "start", "middle" and "end".
|
||||
ellipsize = "middle";
|
||||
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true;
|
||||
# Ignore newlines '\n' in notifications.
|
||||
ignore_newline = "no";
|
||||
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false;
|
||||
# Stack together notifications with the same content
|
||||
stack_duplicates = true;
|
||||
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = "yes";
|
||||
# Hide the count of stacked notifications with the same content
|
||||
hide_duplicate_count = false;
|
||||
|
||||
### Icons ###
|
||||
# Display indicators for URLs (U) and actions (A).
|
||||
show_indicators = "yes";
|
||||
|
||||
# Align icons left/right/off
|
||||
icon_position = "left";
|
||||
### Icons ###
|
||||
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
# max_icon_size takes precedence over this.
|
||||
min_icon_size = 0;
|
||||
# Align icons left/right/off
|
||||
icon_position = "left";
|
||||
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 64;
|
||||
# Scale small icons up to this size, set to 0 to disable. Helpful
|
||||
# for e.g. small files or high-dpi screens. In case of conflict,
|
||||
# max_icon_size takes precedence over this.
|
||||
min_icon_size = 0;
|
||||
|
||||
# Paths to default icons.
|
||||
# icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
# Scale larger icons down to this size, set to 0 to disable
|
||||
max_icon_size = 64;
|
||||
|
||||
### History ###
|
||||
# Paths to default icons.
|
||||
# icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
|
||||
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = "yes";
|
||||
### History ###
|
||||
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20;
|
||||
# Should a notification popped up from history be sticky or timeout
|
||||
# as if it would normally do.
|
||||
sticky_history = "yes";
|
||||
|
||||
### Misc/Advanced ###
|
||||
# Maximum amount of notifications kept in history
|
||||
history_length = 20;
|
||||
|
||||
# dmenu path.
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -p dunst";
|
||||
### Misc/Advanced ###
|
||||
|
||||
# Browser for opening urls in context menu.
|
||||
browser = "${pkgs.firefox}/bin/firefox -new-tab";
|
||||
# dmenu path.
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -p dunst";
|
||||
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true;
|
||||
# Browser for opening urls in context menu.
|
||||
browser = "${pkgs.firefox}/bin/firefox -new-tab";
|
||||
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = "Dunst";
|
||||
# Always run rule-defined scripts, even if the notification is suppressed
|
||||
always_run_script = true;
|
||||
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = "Dunst";
|
||||
# Define the title of the windows spawned by dunst
|
||||
title = "Dunst";
|
||||
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false;
|
||||
# Define the class of the windows spawned by dunst
|
||||
class = "Dunst";
|
||||
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = "mesg";
|
||||
# Print a notification on startup.
|
||||
# This is mainly for error detection, since dbus (re-)starts dunst
|
||||
# automatically after a crash.
|
||||
startup_notification = false;
|
||||
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0;
|
||||
# Manage dunst's desire for talking
|
||||
# Can be one of the following values:
|
||||
# crit: Critical features. Dunst aborts
|
||||
# warn: Only non-fatal warnings
|
||||
# mesg: Important Messages
|
||||
# info: all unimportant stuff
|
||||
# debug: all less than unimportant stuff
|
||||
verbosity = "mesg";
|
||||
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||
# parameter, an application may close the notification sent before the
|
||||
# user defined timeout.
|
||||
ignore_dbusclose = false;
|
||||
# Define the corner radius of the notification window
|
||||
# in pixel size. If the radius is 0, you have no rounded
|
||||
# corners.
|
||||
# The radius will be automatically lowered if it exceeds half of the
|
||||
# notification height to avoid clipping text and/or icons.
|
||||
corner_radius = 0;
|
||||
|
||||
### Legacy
|
||||
# Ignore the dbus closeNotification message.
|
||||
# Useful to enforce the timeout set by dunst configuration. Without this
|
||||
# parameter, an application may close the notification sent before the
|
||||
# user defined timeout.
|
||||
ignore_dbusclose = false;
|
||||
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false;
|
||||
### Legacy
|
||||
|
||||
### mouse
|
||||
# Use the Xinerama extension instead of RandR for multi-monitor support.
|
||||
# This setting is provided for compatibility with older nVidia drivers that
|
||||
# do not support RandR and using it on systems that support RandR is highly
|
||||
# discouraged.
|
||||
#
|
||||
# By enabling this setting dunst will not be able to detect when a monitor
|
||||
# is connected or disconnected which might break follow mode if the screen
|
||||
# layout changes.
|
||||
force_xinerama = false;
|
||||
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
urgency_low = {
|
||||
### mouse
|
||||
|
||||
background = "#282a36";
|
||||
foreground = "#6272a4";
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_normal = {
|
||||
|
||||
background = "#282a36";
|
||||
foreground = "#bd93f9";
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
|
||||
background = "#ff5555";
|
||||
foreground = "#f8f8f2";
|
||||
timeout = 0;
|
||||
# Defines list of actions for each mouse event
|
||||
# Possible values are:
|
||||
# * none: Don't do anything.
|
||||
# * do_action: If the notification has exactly one action, or one is marked as default,
|
||||
# invoke it. If there are multiple and no default, open the context menu.
|
||||
# * close_current: Close current notification.
|
||||
# * close_all: Close all notifications.
|
||||
# These values can be strung together for each mouse event, and
|
||||
# will be executed in sequence.
|
||||
mouse_left_click = "close_current";
|
||||
mouse_middle_click = "do_action, close_current";
|
||||
mouse_right_click = "close_all";
|
||||
};
|
||||
urgency_low = {
|
||||
background = "#282a36";
|
||||
foreground = "#6272a4";
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "#282a36";
|
||||
foreground = "#bd93f9";
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
background = "#ff5555";
|
||||
foreground = "#f8f8f2";
|
||||
timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs = {
|
||||
ssh.startAgent = false;
|
||||
gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Create jupyter user
|
||||
users.users.jupyter.group = "jupyter";
|
||||
users.users.jupyter.isSystemUser = true;
|
||||
users.groups.jupyter = { };
|
||||
|
||||
services.jupyter = {
|
||||
enable = true;
|
||||
password =
|
||||
"'argon2:$argon2id$v=19$m=10240,t=10,p=8$rILNOtQ9WhacuEhV5zW2CQ$Gvbql8TEqBxPhKeMVwKZPQ'";
|
||||
kernels = {
|
||||
python3 =
|
||||
let
|
||||
env = pkgs.python3.withPackages (pythonPackages:
|
||||
with pythonPackages; [
|
||||
ipykernel
|
||||
pandas
|
||||
scikit-learn
|
||||
]);
|
||||
in
|
||||
{
|
||||
displayName = "Python 3 for machine learning";
|
||||
argv = [
|
||||
"${env.interpreter}"
|
||||
"-m"
|
||||
"ipykernel_launcher"
|
||||
"-f"
|
||||
"{connection_file}"
|
||||
];
|
||||
language = "python";
|
||||
logo32 = null;
|
||||
logo64 = null;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|