diff --git a/home/default.nix b/home/default.nix index 6c08ffe7..df65667b 100755 --- a/home/default.nix +++ b/home/default.nix @@ -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 diff --git a/hosts/kaambl/hardware.nix b/hosts/kaambl/hardware.nix index e08bac10..fb3cb41b 100755 --- a/hosts/kaambl/hardware.nix +++ b/hosts/kaambl/hardware.nix @@ -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"; + }; }; }; }; diff --git a/hosts/kaambl/network.nix b/hosts/kaambl/network.nix index 10443751..a582ff94 100755 --- a/hosts/kaambl/network.nix +++ b/hosts/kaambl/network.nix @@ -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 = { diff --git a/hosts/resq/hastur-network-compatible.nix b/hosts/resq/hastur-network-compatible.nix index 5d3b80c9..2a225909 100755 --- a/hosts/resq/hastur-network-compatible.nix +++ b/hosts/resq/hastur-network-compatible.nix @@ -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 = { diff --git a/misc.nix b/misc.nix index 0b5191de..8540178c 100755 --- a/misc.nix +++ b/misc.nix @@ -209,7 +209,48 @@ }; 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 = { @@ -217,11 +258,6 @@ Environment = [ "TMPDIR=/var/tmp/nix-daemon" ]; }; - # srv.earlyoom.enable = true; - environment.systemPackages = [ - pkgs.eza - ]; - boot.tmp.useTmpfs = true; # powerManagement.powertop.enable = true; @@ -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; - }; - }; } diff --git a/modules/swayidle.nix b/modules/swayidle.nix index e4486c3b..2c949651 100644 --- a/modules/swayidle.nix +++ b/modules/swayidle.nix @@ -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 {