aboutsummaryrefslogtreecommitdiff
path: root/nixos
diff options
context:
space:
mode:
Diffstat (limited to 'nixos')
-rw-r--r--nixos/configuration.nix10
-rw-r--r--nixos/services/avahi.service.nix7
-rw-r--r--nixos/services/laptop.preset.nix2
-rw-r--r--nixos/services/printing.service.nix6
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 = [];
+ };
+}