Move Nix files back to the root of the project
This commit is contained in:
parent
52044d9995
commit
087153a16d
223 changed files with 12 additions and 12 deletions
12
hosts/t490/services/cron.nix
Normal file
12
hosts/t490/services/cron.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
services.cron = {
|
||||
enable = true;
|
||||
|
||||
systemCronJobs = [
|
||||
"*/15 * * * * opdavies ${pkgs.imapfilter}/bin/imapfilter -c ~/Code/email-filters/config.lua"
|
||||
"0 8,20 * * * opdavies ${pkgs.isync}/bin/mbsync -a"
|
||||
];
|
||||
};
|
||||
}
|
31
hosts/t490/services/default.nix
Normal file
31
hosts/t490/services/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
imports = [
|
||||
./cron.nix
|
||||
./interception-tools.nix
|
||||
./redshift.nix
|
||||
./sound.nix
|
||||
./udev.nix
|
||||
./xserver.nix
|
||||
];
|
||||
|
||||
services = {
|
||||
auto-cpufreq.enable = true;
|
||||
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
blueman.enable = true;
|
||||
|
||||
gvfs.enable = true;
|
||||
openssh.enable = true;
|
||||
power-profiles-daemon.enable = false;
|
||||
printing.enable = true;
|
||||
pulseaudio.enable = false;
|
||||
throttled.enable = true;
|
||||
thermald.enable = true;
|
||||
upower.enable = true;
|
||||
};
|
||||
}
|
25
hosts/t490/services/interception-tools.nix
Normal file
25
hosts/t490/services/interception-tools.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Make Caps lock work as an Escape key on press and Ctrl on hold.
|
||||
services.interception-tools =
|
||||
let
|
||||
dfkConfig = pkgs.writeText "dual-function-keys.yaml" ''
|
||||
MAPPINGS:
|
||||
- KEY: KEY_CAPSLOCK
|
||||
TAP: KEY_ESC
|
||||
HOLD: KEY_LEFTCTRL
|
||||
'';
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
plugins = pkgs.lib.mkForce [ pkgs.interception-tools-plugins.dual-function-keys ];
|
||||
udevmonConfig = ''
|
||||
- JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c ${dfkConfig} | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE"
|
||||
DEVICE:
|
||||
NAME: "AT Translated Set 2 keyboard"
|
||||
EVENTS:
|
||||
EV_KEY: [[KEY_CAPSLOCK, KEY_ESC, KEY_LEFTCTRL]]
|
||||
'';
|
||||
};
|
||||
}
|
31
hosts/t490/services/redshift.nix
Normal file
31
hosts/t490/services/redshift.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.nixosModules.redshift;
|
||||
in
|
||||
{
|
||||
options.nixosModules.redshift.enable = mkEnableOption "Enable redshift";
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
location = {
|
||||
latitude = 51.48;
|
||||
longitude = -3.17;
|
||||
};
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
|
||||
brightness = {
|
||||
day = "1";
|
||||
night = "1";
|
||||
};
|
||||
|
||||
temperature = {
|
||||
day = 5500;
|
||||
night = 3700;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
12
hosts/t490/services/sound.nix
Normal file
12
hosts/t490/services/sound.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
|
||||
pulse.enable = true;
|
||||
};
|
||||
}
|
9
hosts/t490/services/udev.nix
Normal file
9
hosts/t490/services/udev.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
services.udev = {
|
||||
enable = true;
|
||||
|
||||
extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
};
|
||||
}
|
10
hosts/t490/services/xserver.nix
Normal file
10
hosts/t490/services/xserver.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
|
||||
xkb = {
|
||||
layout = "gb";
|
||||
variant = "";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue