working on screens and power stuff
This commit is contained in:
parent
6d3a143ce2
commit
2002da4dcf
14 changed files with 237 additions and 150 deletions
|
@ -1,7 +1,3 @@
|
|||
# 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’).
|
||||
|
||||
{
|
||||
nix-config,
|
||||
config,
|
||||
|
@ -13,11 +9,13 @@
|
|||
{
|
||||
|
||||
imports = with nix-config.nixosModules; [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./razer-speaker-fix.nix
|
||||
|
||||
sops-config
|
||||
niri
|
||||
kanata
|
||||
filesystems
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
@ -42,8 +40,6 @@
|
|||
};
|
||||
|
||||
nix = {
|
||||
# registry.nixpkgs.flake = nixpkgs;
|
||||
# channel.enable = false;
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
|
@ -57,79 +53,14 @@
|
|||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
|
||||
];
|
||||
# Workaround for https://github.com/NixOS/nix/issues/9574
|
||||
nix-path = config.nix.nixPath;
|
||||
};
|
||||
};
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/emenel/.config/sops/age/keys.txt"; # must have no password!
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets = {
|
||||
filez = {};
|
||||
};
|
||||
templates."smb-secrets".content = ''
|
||||
username=admin
|
||||
password=${config.sops.placeholder.filez}
|
||||
# '';
|
||||
};
|
||||
|
||||
|
||||
environment.etc = {
|
||||
"nixos/smb-secrets" = {
|
||||
source = config.sops.templates."smb-secrets".path;
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems =
|
||||
let
|
||||
automount_opts = "x-systemd.automount,noauto,users,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,uid=1000,credentials=/etc/nixos/smb-secrets";
|
||||
in {
|
||||
|
||||
"/mnt/filez/media" = {
|
||||
device = "//100.70.114.113/Media";
|
||||
fsType = "smb3";
|
||||
options = [
|
||||
"${automount_opts}"
|
||||
];
|
||||
};
|
||||
|
||||
"/mnt/filez/music-production" = {
|
||||
device = "//100.70.114.113/Music Production";
|
||||
fsType = "smb3";
|
||||
options = [
|
||||
"${automount_opts}"
|
||||
];
|
||||
};
|
||||
|
||||
"/mnt/filez/storage" = {
|
||||
device = "//100.70.114.113/Storage";
|
||||
fsType = "smb3";
|
||||
options = [
|
||||
"${automount_opts}"
|
||||
];
|
||||
};
|
||||
|
||||
"/mnt/filez/photos" = {
|
||||
device = "//100.70.114.113/Photo Storage";
|
||||
fsType = "smb3";
|
||||
options = [
|
||||
"${automount_opts}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# fileSystems."/mnt/beets-import" = {
|
||||
# device = "//100.103.170.132/media";
|
||||
# fsType = "smb3";
|
||||
# options = let
|
||||
# automount_opts = "x-systemd.automount,noauto,users,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s,uid=1000";
|
||||
# in [
|
||||
# "${automount_opts}"
|
||||
# ];
|
||||
# };
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Toronto";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
|
@ -264,10 +195,11 @@ password=${config.sops.placeholder.filez}
|
|||
services.udev = {
|
||||
extraRules = ''
|
||||
DEVPATH=="/devices/virtual/misc/cpu_dma_latency", OWNER="root", GROUP="audio", MODE="0660"
|
||||
ACTION=="add", SUBSYSTEM=="i2c-dev", ATTR{name}=="AMDGPU DM*", TAG+="ddcci", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ddcci@$kernel.service"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="ddcci*", RUN+="${pkgs.coreutils-full}/bin/chgrp video /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="ddcci*", RUN+="${pkgs.coreutils-full}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||
ACTION=="add", SUBSYSTEM=="i2c-dev", ATTR{name}=="AMDGPU DM*", TAG+="ddcci", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ddcci@$kernel.service"
|
||||
ACTION=="add", SUBSYSTEM=="i2c-dev", ATTR{name}=="NVIDIA i2c adapter*", TAG+="ddcci", TAG+="systemd", ENV{SYSTEMD_WANTS}+="ddcci@$kernel.service"
|
||||
SUBSYSTEM=="i2c", ACTION=="add", ATTR{name}=="AMDGPU DM aux hw bus 3", RUN+="${pkgs.bash}/bin/bash -c 'sleep 30; printf ddcci\ 0x37 > /sys/bus/i2c/devices/i2c-17/new_device'"
|
||||
'';
|
||||
packages = [
|
||||
pkgs.via
|
||||
|
@ -313,6 +245,7 @@ password=${config.sops.placeholder.filez}
|
|||
security.rtkit.enable = true;
|
||||
security.pam.services.swaylock = { };
|
||||
security.pam.services.hyprlock = { };
|
||||
security.pam.services.greetd.enableGnomeKeyring = true;
|
||||
|
||||
services.xserver.videoDrivers = [
|
||||
"nvidia"
|
||||
|
@ -356,12 +289,6 @@ password=${config.sops.placeholder.filez}
|
|||
'';
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Toronto";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_CA.UTF-8";
|
||||
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the GNOME Desktop Environment.
|
||||
|
@ -541,21 +468,6 @@ password=${config.sops.placeholder.filez}
|
|||
services.accounts-daemon.enable = true;
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
|
||||
services.kmonad = {
|
||||
enable = true;
|
||||
keyboards = {
|
||||
sinc = {
|
||||
device = "/dev/input/by-id/usb-Keebio_Sinc_Rev._4-event-kbd";
|
||||
config = builtins.readFile ../../homes/emenel/dotfiles/dot_config/kmonad/sinc.kbd;
|
||||
};
|
||||
razer = {
|
||||
extraGroups = [ "openrazer" ];
|
||||
device = "/dev/input/by-id/usb-Razer_Razer_Blade-if01-event-kbd";
|
||||
config = builtins.readFile ../../homes/emenel/dotfiles/dot_config/kmonad/razer.kbd;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
virtualisation = {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{ ... }:
|
||||
{
|
||||
systemd.services.razer-speaker-fix = {
|
||||
enable = true;
|
||||
|
@ -2010,10 +2009,10 @@ hda-verb /dev/snd/hwC3D0 0x20 0x400 0xb031
|
|||
hda-verb /dev/snd/hwC3D0 0x20 0x400 0x0
|
||||
hda-verb /dev/snd/hwC3D0 0x20 0x500 0x23
|
||||
hda-verb /dev/snd/hwC3D0 0x20 0x400 0xdd00
|
||||
|
||||
wpctl set-volume 95 1
|
||||
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
# amixer sset Master unmute
|
||||
# amixer sset Speaker unmute
|
||||
# amixer sset Headphone unmute
|
||||
|
|
|
@ -1,21 +0,0 @@
|
|||
filez: ENC[AES256_GCM,data:pOnl/B+dFc+Fks7Yb3c=,iv:V99CfTUmFq9ijFHU88OIvySvKw91a9hx0fXLikaAOdY=,tag:L1E2Wur2yVYaGeY+3Ku1WA==,type:str]
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age10k8v6pfm3p7cmsgn6wu5ufpcquqgpvqh76l23xf326et55dacc0qlr8fe8
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBFS1BoNnpoWnZGNGQreXVZ
|
||||
RjNGUWhoYmJPbWplcFIwOU1mdlNOYmhkblU0CmFkNkg1ZDVxU1FNbnlUMXpKWXR1
|
||||
elZ0RFZaRDRsMkVjcFhkMXU4Q1RYTDQKLS0tIHBRZlovWlFJUDFidzBnby9VNzlm
|
||||
OFJGS2ljaTVFcWJDL3h2S0tLR3pyekkKBY4veCtc5cmVxoDeFf1LufbFhMHnYu7U
|
||||
jWaEgDUHHPpiR7+4XZI+Es71kyM+0q2UK0KSU5227eDCLkFvRN5uYg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2025-02-12T01:06:05Z"
|
||||
mac: ENC[AES256_GCM,data:H6vfNxeGOBFtKpQr/sdtbbUX6WmV7dFN37QdAhfYJlVnUJbJqhzuyfVKUCceTwZVf18MIXKJAaGzoDUr0bL5ljA2immqmvWGSVAhmztHueRXIzWbOQVYLP5djSvFzp0yWttzG9W7j9hANkyaLsyrC9PArucWnvrwQuFf9ZA0TGM=,iv:4KcjbarJFpUcNUE06jiA43cMGGYE4GY8DgPMsnNn3iY=,tag:MWn+q4SwxWltNEfFN6HZgQ==,type:str]
|
||||
pgp: []
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.9.4
|
Loading…
Add table
Add a link
Reference in a new issue