diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-08-25 18:43:16 +0800 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-08-25 18:43:16 +0800 |
commit | 5a2116572d97128c750ba8ecb4aa24991622501e (patch) | |
tree | 129d6f83424b0519cb0e23c53f7fa6b543e96997 | |
parent | 61202b51c7212088989e9627755d2e2e0474f2d3 (diff) | |
download | nixos-configuration-5a2116572d97128c750ba8ecb4aa24991622501e.tar.gz nixos-configuration-5a2116572d97128c750ba8ecb4aa24991622501e.tar.bz2 nixos-configuration-5a2116572d97128c750ba8ecb4aa24991622501e.zip |
feat: included additional system components
Moved proxy declaration to specialisation
Enabled avahi
Enabled CUPS printing services
-rw-r--r-- | nixos/configuration.nix | 10 | ||||
-rw-r--r-- | nixos/services/avahi.service.nix | 7 | ||||
-rw-r--r-- | nixos/services/laptop.preset.nix | 2 | ||||
-rw-r--r-- | nixos/services/printing.service.nix | 6 |
4 files changed, 22 insertions, 3 deletions
diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 2ef2d79..af1a358 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -37,9 +37,13 @@ enable = true; powerOnBoot = true; }; - networking.proxy = { - default = "http://127.0.0.1:7897/"; - noProxy = "127.0.0.1,localhost,internal.domain"; + specialisation = { + in-china.configuration = { + networking.proxy = { + default = "http://127.0.0.1:7897/"; + noProxy = "127.0.0.1,localhost,internal.domain"; + }; + }; }; systemd.user.services.mpris-proxy = { diff --git a/nixos/services/avahi.service.nix b/nixos/services/avahi.service.nix new file mode 100644 index 0000000..54bf88c --- /dev/null +++ b/nixos/services/avahi.service.nix @@ -0,0 +1,7 @@ +{...}: { + services.avahi = { + enable = true; + nssmdns = true; + openFirewall = true; + }; +} diff --git a/nixos/services/laptop.preset.nix b/nixos/services/laptop.preset.nix index 4199353..31d0137 100644 --- a/nixos/services/laptop.preset.nix +++ b/nixos/services/laptop.preset.nix @@ -4,5 +4,7 @@ ./pipewire.service.nix ./syncthing.service.nix ./misc.service.nix + ./avahi.service.nix + ./printing.service.nix ]; } diff --git a/nixos/services/printing.service.nix b/nixos/services/printing.service.nix new file mode 100644 index 0000000..a89c732 --- /dev/null +++ b/nixos/services/printing.service.nix @@ -0,0 +1,6 @@ +{...}: { + services.printing = { + enable = true; + drivers = []; + }; +} |