mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: update to 24.11
Reviewed-on: https://codeberg.org/leana8959/.files/pulls/1 Co-authored-by: Léana 江 <leana.jiang+git@icloud.com> Co-committed-by: Léana 江 <leana.jiang+git@icloud.com>
This commit is contained in:
parent
57ed96f0ea
commit
f6a89cba08
60 changed files with 696 additions and 752 deletions
|
|
@ -1,10 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
sound = {
|
||||
enable = true;
|
||||
mediaKeys.enable = true;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
|
||||
|
|
@ -25,11 +19,6 @@
|
|||
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.helvum
|
||||
pkgs.pavucontrol
|
||||
pkgs.easyeffects
|
||||
];
|
||||
|
||||
users.users."leana".extraGroups = [ "audio" ];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=2hour
|
||||
|
|
@ -24,32 +22,4 @@
|
|||
SOUND_POWER_SAVE_CONTROLLER = "N";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."battery-notify" = {
|
||||
enable = true;
|
||||
description = "Scream when battery is dying";
|
||||
startAt = [ "*:0/5" ];
|
||||
unitConfig.After = "multi-user.target";
|
||||
serviceConfig.ExecStart =
|
||||
let
|
||||
script = pkgs.writeShellApplication {
|
||||
name = "battery-notify";
|
||||
runtimeInputs = [
|
||||
pkgs.bc
|
||||
pkgs.libnotify
|
||||
];
|
||||
text = ''
|
||||
battery="/sys/class/power_supply/BAT1"
|
||||
thres="0.2"
|
||||
isLow=$(echo "($(cat $battery/energy_now) / $(cat $battery/energy_full)) < $thres" | bc -l)
|
||||
|
||||
if [ "$isLow" -eq 1 ]; then
|
||||
echo "You're battery level is below $thres"
|
||||
notify-send -u critical "Battery Low" "Please charge your battery"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
in
|
||||
lib.getExe script;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
{
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
# FIXME: this breaks the handsfree microphone mode for XM4
|
||||
# environment.etc = {
|
||||
# "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
# bluez_monitor.properties = {
|
||||
# ["bluez5.enable-sbc-xq"] = true,
|
||||
# ["bluez5.enable-msbc"] = true,
|
||||
# ["bluez5.enable-hw-volume"] = true,
|
||||
# ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
# }
|
||||
# '';
|
||||
# };
|
||||
}
|
||||
69
nix/nixosModules/named/carbon/connectivity.nix
Normal file
69
nix/nixosModules/named/carbon/connectivity.nix
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = lib.mkForce false;
|
||||
|
||||
firewall.allowedTCPPorts = [ 8080 ];
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
secretsFile = config.age.secrets.wpa_password.path;
|
||||
networks =
|
||||
let
|
||||
ordered =
|
||||
nss:
|
||||
lib.pipe nss [
|
||||
lib.lists.reverseList
|
||||
(lib.lists.imap0 (i: lib.mapAttrs (_: n: n // { priority = i; })))
|
||||
lib.mergeAttrsList
|
||||
];
|
||||
in
|
||||
ordered [
|
||||
# first in list is tried first
|
||||
{
|
||||
"HiddenParadize@Earth2077".pskRaw = "ext:HOME";
|
||||
"Pei’s Wifi".pskRaw = "ext:PEI";
|
||||
}
|
||||
{
|
||||
"_SNCF_WIFI_INOUI" = { };
|
||||
"EurostarTrainsWiFi" = { };
|
||||
}
|
||||
{
|
||||
eduroam = {
|
||||
authProtocols = [ "WPA-EAP" ];
|
||||
auth = ''
|
||||
pairwise=CCMP
|
||||
group=CCMP TKIP
|
||||
eap=PEAP
|
||||
ca_cert="${./certs/universite_de_rennes.pem}"
|
||||
identity="ychiang@etudiant.univ-rennes.fr"
|
||||
altsubject_match="DNS:radius.univ-rennes1.fr;DNS:radius1.univ-rennes1.fr;DNS:radius2.univ-rennes1.fr;DNS:vmradius-psf1.univ-rennes1.fr;DNS:vmradius-psf2.univ-rennes1.fr"
|
||||
phase2="auth=MSCHAPV2"
|
||||
password=ext:EDUROAM
|
||||
anonymous_identity="anonymous@univ-rennes.fr"
|
||||
'';
|
||||
};
|
||||
}
|
||||
{ "iPhone de Léana 江".pskRaw = "ext:PHONE"; }
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth.enable = true;
|
||||
services.blueman.enable = true;
|
||||
# FIXME: this breaks the handsfree microphone mode for XM4
|
||||
# environment.etc = {
|
||||
# "wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
# bluez_monitor.properties = {
|
||||
# ["bluez5.enable-sbc-xq"] = true,
|
||||
# ["bluez5.enable-msbc"] = true,
|
||||
# ["bluez5.enable-hw-volume"] = true,
|
||||
# ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
# }
|
||||
# '';
|
||||
# };
|
||||
|
||||
}
|
||||
|
|
@ -3,19 +3,18 @@
|
|||
./hardware-configuration.nix # generated
|
||||
|
||||
./battery.nix
|
||||
|
||||
./audio.nix
|
||||
./networking.nix
|
||||
./bluetooth.nix
|
||||
./connectivity.nix
|
||||
./input.nix
|
||||
|
||||
./display.nix
|
||||
./scanner.nix
|
||||
./gui.nix
|
||||
|
||||
./restic.nix
|
||||
./fs.nix
|
||||
|
||||
./packages.nix
|
||||
|
||||
./gui.nix
|
||||
|
||||
./db.nix # M1 BDD course
|
||||
];
|
||||
|
||||
|
|
@ -66,7 +65,5 @@
|
|||
restic_backblaze_env.file = ../../../secrets/restic_backblaze_env.age;
|
||||
};
|
||||
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,25 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
services.xserver.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
autoRepeatDelay = 300;
|
||||
autoRepeatInterval = 40;
|
||||
};
|
||||
|
||||
windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
};
|
||||
|
||||
displayManager.lightdm = {
|
||||
enable = true;
|
||||
background = "#000000";
|
||||
greeters.gtk.cursorTheme = {
|
||||
name = "volantes_cursors";
|
||||
package = pkgs.volantes-cursors;
|
||||
size = 64;
|
||||
};
|
||||
services.xserver.displayManager.lightdm = {
|
||||
enable = true;
|
||||
background = "#000000";
|
||||
greeters.gtk.cursorTheme = {
|
||||
name = "volantes_cursors";
|
||||
package = pkgs.volantes-cursors;
|
||||
size = 64;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -36,14 +37,4 @@
|
|||
];
|
||||
};
|
||||
|
||||
services.libinput = {
|
||||
mouse = {
|
||||
naturalScrolling = true;
|
||||
accelSpeed = "-0.5";
|
||||
};
|
||||
touchpad = {
|
||||
naturalScrolling = true;
|
||||
tapping = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
22
nix/nixosModules/named/carbon/input.nix
Normal file
22
nix/nixosModules/named/carbon/input.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
|
||||
hardware.keyboard.zsa.enable = true;
|
||||
|
||||
services.libinput = {
|
||||
mouse = {
|
||||
naturalScrolling = true;
|
||||
accelSpeed = "-0.5";
|
||||
};
|
||||
touchpad = {
|
||||
naturalScrolling = true;
|
||||
tapping = false;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.leana.extraGroups = [ "scanner" ];
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
brscan5.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,53 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
networking.networkmanager.enable = lib.mkForce false;
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 8080 ];
|
||||
|
||||
services.hoogle.port = 1992;
|
||||
|
||||
networking.wireless = {
|
||||
enable = true;
|
||||
userControlled.enable = true;
|
||||
environmentFile = config.age.secrets.wpa_password.path;
|
||||
networks =
|
||||
let
|
||||
ordered =
|
||||
nss:
|
||||
lib.pipe nss [
|
||||
lib.lists.reverseList
|
||||
(lib.lists.imap0 (i: lib.mapAttrs (_: n: n // { priority = i; })))
|
||||
lib.mergeAttrsList
|
||||
];
|
||||
in
|
||||
ordered [
|
||||
# first in list is tried first
|
||||
{
|
||||
"HiddenParadize@Earth2077".psk = "@HOME@";
|
||||
"Pei’s Wifi".psk = "@PEI_PASSWORD@";
|
||||
}
|
||||
{
|
||||
"_SNCF_WIFI_INOUI" = { };
|
||||
"EurostarTrainsWiFi" = { };
|
||||
}
|
||||
{
|
||||
eduroam = {
|
||||
authProtocols = [ "WPA-EAP" ];
|
||||
auth = ''
|
||||
pairwise=CCMP
|
||||
group=CCMP TKIP
|
||||
eap=PEAP
|
||||
ca_cert="${./certs/universite_de_rennes.pem}"
|
||||
identity="@EDUROAM_ID@"
|
||||
altsubject_match="DNS:radius.univ-rennes1.fr;DNS:radius1.univ-rennes1.fr;DNS:radius2.univ-rennes1.fr;DNS:vmradius-psf1.univ-rennes1.fr;DNS:vmradius-psf2.univ-rennes1.fr"
|
||||
phase2="auth=MSCHAPV2"
|
||||
password="@EDUROAM_PSK@"
|
||||
anonymous_identity="anonymous@univ-rennes.fr"
|
||||
'';
|
||||
};
|
||||
}
|
||||
{ "iPhone de Léana 江".psk = "@PHONE@"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.curl
|
||||
pkgs.stow
|
||||
pkgs.gcc
|
||||
pkgs.agenix
|
||||
pkgs.deploy-rs
|
||||
];
|
||||
|
||||
programs.vim.defaultEditor = true;
|
||||
programs.vim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
};
|
||||
programs.git.enable = true;
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
|
@ -15,18 +17,6 @@
|
|||
|
||||
# programs.steam.enable = true;
|
||||
|
||||
services.hoogle = {
|
||||
enable = true;
|
||||
packages =
|
||||
self:
|
||||
map pkgs.haskell.lib.doHaddock [
|
||||
self.xmonad
|
||||
self.xmonad-contrib
|
||||
self.xmonad-extras
|
||||
self.hip # image processing
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
virtualbox.host.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
users.users.leana.extraGroups = [ "scanner" ];
|
||||
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
brscan5.enable = true;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue