Compare commits
5 commits
9cefcd2509
...
f7a10421a5
Author | SHA1 | Date | |
---|---|---|---|
Kevin Baensch | f7a10421a5 | ||
Kevin Baensch | ff13888684 | ||
Kevin Baensch | 4305b3f653 | ||
Kevin Baensch | 29b64aadfd | ||
Kevin Baensch | 7a3b464306 |
|
@ -12,16 +12,9 @@ new_window pixel
|
||||||
hide_edge_borders both
|
hide_edge_borders both
|
||||||
|
|
||||||
exec setxkbmap de
|
exec setxkbmap de
|
||||||
exec xinput --map-to-output "ipts 045E:001F Pen Pen (0)" eDP1
|
|
||||||
exec xinput --map-to-output "ipts 045E:001F Pen Eraser (0)" eDP1
|
|
||||||
exec xinput --map-to-output "ipts 045E:001F Touchscreen" eDP1
|
|
||||||
|
|
||||||
bindsym $mod+Shift+s exec xinput --map-to-output "ipts 045E:001F Pen Pen (0)" eDP1; exec xinput --map-to-output "ipts 045E:001F Pen Eraser (0)" eDP1; exec xinput --map-to-output "ipts 045E:001F Touchscreen" eDP1
|
|
||||||
bindsym $mod+Shift+a exec xinput --enable "ipts 045E:001F Touchscreen"
|
|
||||||
bindsym $mod+Shift+d exec xinput --disable "ipts 045E:001F Touchscreen"
|
|
||||||
|
|
||||||
#exec compton -f
|
#exec compton -f
|
||||||
exec feh --bg-scale Pictures/wallpaper.jpg
|
exec feh --bg-scale $(xdg-user-dir PICTURES)/wallpaper.jpg
|
||||||
#exec pulseaudio -D
|
#exec pulseaudio -D
|
||||||
#exec fcitx
|
#exec fcitx
|
||||||
#exec env=LC_CTYPE=zh_CN.UTF-8 emacs --daemon
|
#exec env=LC_CTYPE=zh_CN.UTF-8 emacs --daemon
|
||||||
|
|
|
@ -18,6 +18,7 @@ order += "backlight"
|
||||||
order += "volume_status"
|
order += "volume_status"
|
||||||
order += "cpu_temperature 0"
|
order += "cpu_temperature 0"
|
||||||
order += "load"
|
order += "load"
|
||||||
|
order += "battery 0"
|
||||||
order += "group tz"
|
order += "group tz"
|
||||||
|
|
||||||
group network {
|
group network {
|
||||||
|
@ -65,6 +66,17 @@ group tz {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
battery 0 {
|
||||||
|
format = "%status %percentage %remaining %emptytime"
|
||||||
|
format_down = "No battery"
|
||||||
|
status_chr = "⚡ CHR"
|
||||||
|
status_bat = "🔋 BAT"
|
||||||
|
status_unk = "? UNK"
|
||||||
|
status_full = "☻ FULL"
|
||||||
|
path = "/sys/class/power_supply/BAT%d/uevent"
|
||||||
|
low_threshold = 10
|
||||||
|
}
|
||||||
|
|
||||||
volume_status {
|
volume_status {
|
||||||
button_up = 4
|
button_up = 4
|
||||||
button_down = 5
|
button_down = 5
|
||||||
|
|
|
@ -1,7 +1,42 @@
|
||||||
{ config, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = config.machine.hostName;
|
hostName = config.machine.hostName;
|
||||||
|
useNetworkd = config.machine.useNetworkd;
|
||||||
|
useDHCP = !config.machine.useNetworkd;
|
||||||
|
dhcpcd.enable = !config.machine.useNetworkd;
|
||||||
};
|
};
|
||||||
|
# Based on
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/10001#issuecomment-905532069
|
||||||
|
systemd.network = mkIf config.machine.useNetworkd {
|
||||||
|
enable = true;
|
||||||
|
networks = let
|
||||||
|
networkConfig = {
|
||||||
|
DHCP = "yes";
|
||||||
|
DNSSEC = "yes";
|
||||||
|
DNSOverTLS = "yes";
|
||||||
|
DNS = [ "1.1.1.1" "1.0.0.1" ];
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
"40-wired" = {
|
||||||
|
enable = true;
|
||||||
|
name = "en*";
|
||||||
|
dhcpV4Config.RouteMetric = 2048;
|
||||||
|
inherit networkConfig;
|
||||||
|
};
|
||||||
|
"40-wireless" = {
|
||||||
|
enable = true;
|
||||||
|
name = "wl*";
|
||||||
|
dhcpV4Config.RouteMetric = 1024;
|
||||||
|
inherit networkConfig;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Wait for any interface to become available, not for all
|
||||||
|
systemd.services."systemd-networkd-wait-online".serviceConfig.ExecStart = [
|
||||||
|
"" "${config.systemd.package}/lib/systemd/systemd-networkd-wait-online --any"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ pkgs, config, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.machine;
|
cfg = config.machine;
|
||||||
|
@ -8,8 +8,11 @@ in {
|
||||||
buildCores = 1;
|
buildCores = 1;
|
||||||
autoOptimiseStore = true;
|
autoOptimiseStore = true;
|
||||||
useSandbox = true;
|
useSandbox = true;
|
||||||
|
package = pkgs.nix_2_4;
|
||||||
|
allowedUsers = [ "root" ] ++ (map (n: n.name) cfg.administrators);
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
build-timeout = 86400 # 24 hours
|
build-timeout = 86400 # 24 hours
|
||||||
|
experimental-features = nix-command flakes
|
||||||
'';
|
'';
|
||||||
binaryCachePublicKeys = [ (lib.fileContents "${cfg.secretPath}/hydra_cache.pub") ];
|
binaryCachePublicKeys = [ (lib.fileContents "${cfg.secretPath}/hydra_cache.pub") ];
|
||||||
trustedBinaryCaches = [
|
trustedBinaryCaches = [
|
||||||
|
|
|
@ -59,6 +59,13 @@ in {
|
||||||
The Machines HostName
|
The Machines HostName
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
useNetworkd = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Disables dhcpcd and enables networkd.
|
||||||
|
'';
|
||||||
|
};
|
||||||
binaryCaches = mkOption {
|
binaryCaches = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [];
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
nix-update-source
|
nix-update-source
|
||||||
nix-zsh-completions
|
nix-zsh-completions
|
||||||
nixbang
|
nixbang
|
||||||
nixops
|
|
||||||
nmap
|
nmap
|
||||||
nox
|
nox
|
||||||
ntfs3g
|
ntfs3g
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
configFile = ../../config/etc/i3/config;
|
configFile = ../../config/etc/i3/config;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
dmenu
|
dmenu
|
||||||
file
|
file
|
||||||
i3lock
|
i3lock
|
||||||
i3status
|
i3status
|
||||||
|
xdg-user-dirs
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
28
services/nspawn.nix
Normal file
28
services/nspawn.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
mkIf (elem "nspawn" config.machine.services) {
|
||||||
|
systemd = let
|
||||||
|
fn = import ../fn.nix { inherit lib; };
|
||||||
|
in {
|
||||||
|
nspawn = recursiveUpdate (listToAttrs (
|
||||||
|
(map (
|
||||||
|
name: {
|
||||||
|
name = name;
|
||||||
|
value = { networkConfig.VirtualEthernet = "no"; };
|
||||||
|
}
|
||||||
|
)
|
||||||
|
(fn.lst { p = /var/lib/machines; t = "directory"; b = false; })
|
||||||
|
))) {
|
||||||
|
"64Arch" = {
|
||||||
|
filesConfig = {
|
||||||
|
"BindReadOnly" = ["/tmp/.X11-unix"];
|
||||||
|
"Bind" = ["/dev/snd" "/dev/dri"];
|
||||||
|
# TODO: Add this to service overrides
|
||||||
|
# "DeviceAllow" = [ "/dev/dri/renderD128" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue