Skip to content

Commit

Permalink
+
Browse files Browse the repository at this point in the history
  • Loading branch information
oluceps committed Dec 4, 2024
1 parent 3bc3d72 commit 8ebad66
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 117 deletions.
5 changes: 2 additions & 3 deletions home/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ let
recursiveUpdate acc (
setAttrByPath [ "${configPlace}${pathStr}/${(removeSuffix ".nix" f)}" ] (
if lib.hasSuffix ".nix" f then
(writeText (removeSuffix ".nix" f) (import (toPath f) args))
(writeText (removeSuffix ".nix" f) (import (/. + f) args))
else
toPath f
/. + f
)

)
) { } (attrNames files);
in
Expand Down
12 changes: 7 additions & 5 deletions hosts/kaambl/hardware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
extraPackages32 = [ pkgs.driversi686Linux.amdvlk ];
};
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
bluetooth.enable = true; # enables support for Bluetooth
bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot
bluetooth.settings = {
General = {
Enable = "Source,Sink,Media,Socket";
bluetooth = {
enable = true; # enables support for Bluetooth
powerOnBoot = true; # powers up the default Bluetooth controller on boot
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
};
Expand Down
36 changes: 19 additions & 17 deletions hosts/kaambl/network.nix
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,28 @@
"wg0"
];
};
links = {

links."30-rndis" = {
matchConfig.Driver = "rndis_host";
linkConfig = {
NamePolicy = "keep";
Name = "rndis";
MACAddressPolicy = "persistent";
"30-rndis" = {
matchConfig.Driver = "rndis_host";
linkConfig = {
NamePolicy = "keep";
Name = "rndis";
MACAddressPolicy = "persistent";
};
};
};
links."20-ncm" = {
matchConfig.Driver = "cdc_ncm";
linkConfig = {
NamePolicy = "keep";
Name = "ncm";
MACAddressPolicy = "persistent";
"20-ncm" = {
matchConfig.Driver = "cdc_ncm";
linkConfig = {
NamePolicy = "keep";
Name = "ncm";
MACAddressPolicy = "persistent";
};
};
"40-wlan" = {
matchConfig.Driver = "ath11k_pci";
linkConfig.Name = "wlan0";
};
};
links."40-wlan" = {
matchConfig.Driver = "ath11k_pci";
linkConfig.Name = "wlan0";
};

netdevs = {
Expand Down
28 changes: 14 additions & 14 deletions hosts/resq/hastur-network-compatible.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,23 @@
anyInterface = true;
ignoredInterfaces = [ "wlan0" ];
};
links = {

links."10-eth0" = {
matchConfig.MACAddress = "3c:7c:3f:22:49:80";
linkConfig.Name = "eth0";
};
"10-eth0".matchConfig.MACAddress = "3c:7c:3f:22:49:80";
"10-eth0".linkConfig.Name = "eth0";

links."30-rndis" = {
matchConfig.Driver = "rndis_host";
linkConfig = {
NamePolicy = "keep";
Name = "rndis";
MACAddressPolicy = "persistent";
"30-rndis" = {
matchConfig.Driver = "rndis_host";
linkConfig = {
NamePolicy = "keep";
Name = "rndis";
MACAddressPolicy = "persistent";
};
};
"40-wlan0" = {
matchConfig.MACAddress = "70:66:55:e7:1c:b1";
linkConfig.Name = "wlan0";
};
};
links."40-wlan0" = {
matchConfig.MACAddress = "70:66:55:e7:1c:b1";
linkConfig.Name = "wlan0";
};

netdevs = {
Expand Down
82 changes: 42 additions & 40 deletions misc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -209,19 +209,55 @@

};
boot.enableContainers = false;
environment.defaultPackages = [ ];
environment = {
defaultPackages = [ ];

# srv.earlyoom.enable = true;
systemPackages = [
pkgs.eza
];

etc = {
"NIXOS".text = "";
"machine-id".text = "b08dfa6083e7567a1921a715000001fb\n";
"sbctl/sbctl.conf".source =
let
sbctlVar = "/var/lib/sbctl";
in
(pkgs.formats.yaml { }).generate "sbctl.conf" {
bundles_db = "${sbctlVar}/bundles.json";
db_additions = [ "microsoft" ];
files_db = "${sbctlVar}/files.json";
guid = "${sbctlVar}/GUID";
keydir = "${sbctlVar}/keys";
keys = {
db = {
privkey = "${sbctlVar}/keys/db/db.key";
pubkey = "${sbctlVar}/keys/db/db.pem";
type = "file";
};
kek = {
privkey = "${sbctlVar}/keys/KEK/KEK.key";
pubkey = "${sbctlVar}/keys/KEK/KEK.pem";
type = "file";
};
pk = {
privkey = "${sbctlVar}/keys/PK/PK.key";
pubkey = "${sbctlVar}/keys/PK/PK.pem";
type = "file";
};
};
landlock = true;
};
};
};
documentation.info.enable = false;

systemd.services.nix-daemon.serviceConfig = {
LimitNOFILE = lib.mkForce 500000000;
Environment = [ "TMPDIR=/var/tmp/nix-daemon" ];
};

# srv.earlyoom.enable = true;
environment.systemPackages = [
pkgs.eza
];

boot.tmp.useTmpfs = true;
# powerManagement.powertop.enable = true;

Expand Down Expand Up @@ -386,38 +422,4 @@
];

i18n.defaultLocale = "en_GB.UTF-8";

environment.etc = {
"NIXOS".text = "";
"machine-id".text = "b08dfa6083e7567a1921a715000001fb\n";
"sbctl/sbctl.conf".source =
let
sbctlVar = "/var/lib/sbctl";
in
(pkgs.formats.yaml { }).generate "sbctl.conf" {
bundles_db = "${sbctlVar}/bundles.json";
db_additions = [ "microsoft" ];
files_db = "${sbctlVar}/files.json";
guid = "${sbctlVar}/GUID";
keydir = "${sbctlVar}/keys";
keys = {
db = {
privkey = "${sbctlVar}/keys/db/db.key";
pubkey = "${sbctlVar}/keys/db/db.pem";
type = "file";
};
kek = {
privkey = "${sbctlVar}/keys/KEK/KEK.key";
pubkey = "${sbctlVar}/keys/KEK/KEK.pem";
type = "file";
};
pk = {
privkey = "${sbctlVar}/keys/PK/PK.key";
pubkey = "${sbctlVar}/keys/PK/PK.pem";
type = "file";
};
};
landlock = true;
};
};
}
72 changes: 34 additions & 38 deletions modules/swayidle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,49 +36,45 @@ in
options.services.swayidle =
let

timeoutModule =
{ ... }:
{
options = {
timeout = mkOption {
type = types.ints.positive;
example = 60;
description = "Timeout in seconds.";
};

command = mkOption {
type = types.str;
description = "Command to run after timeout seconds of inactivity.";
};

resumeCommand = mkOption {
type = with types; nullOr str;
default = null;
description = "Command to run when there is activity again.";
};
timeoutModule = _: {
options = {
timeout = mkOption {
type = types.ints.positive;
example = 60;
description = "Timeout in seconds.";
};

command = mkOption {
type = types.str;
description = "Command to run after timeout seconds of inactivity.";
};

resumeCommand = mkOption {
type = with types; nullOr str;
default = null;
description = "Command to run when there is activity again.";
};
};
};

eventModule = _: {
options = {
event = mkOption {
type = types.enum [
"before-sleep"
"after-resume"
"lock"
"unlock"
];
description = "Event name.";
};

eventModule =
{ ... }:
{
options = {
event = mkOption {
type = types.enum [
"before-sleep"
"after-resume"
"lock"
"unlock"
];
description = "Event name.";
};

command = mkOption {
type = types.str;
description = "Command to run when event occurs.";
};
command = mkOption {
type = types.str;
description = "Command to run when event occurs.";
};
};
};

in
{
Expand Down

0 comments on commit 8ebad66

Please sign in to comment.