diff options
Diffstat (limited to 'machines/common')
| -rw-r--r-- | machines/common/base.nix | 19 | ||||
| -rw-r--r-- | machines/common/default.nix | 12 | ||||
| -rw-r--r-- | machines/common/pipewire.nix | 18 | ||||
| -rw-r--r-- | machines/common/printer.nix | 17 | ||||
| -rw-r--r-- | machines/common/rip.nix | 3 | ||||
| -rw-r--r-- | machines/common/tailscale.nix | 8 | ||||
| -rw-r--r-- | machines/common/user.nix | 13 | ||||
| -rw-r--r-- | machines/common/x11.nix | 14 |
8 files changed, 104 insertions, 0 deletions
diff --git a/machines/common/base.nix b/machines/common/base.nix new file mode 100644 index 0000000..46c82d9 --- /dev/null +++ b/machines/common/base.nix @@ -0,0 +1,19 @@ +{...}: { + virtualisation.docker = { + enable = true; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + nixpkgs.config.allowUnfree = true; + + programs.steam.enable = true; + + time.timeZone = "America/Los_Angeles"; + i18n.defaultLocale = "en_US.UTF-8"; + + networking.networkmanager.enable = true; +} diff --git a/machines/common/default.nix b/machines/common/default.nix new file mode 100644 index 0000000..df8e60c --- /dev/null +++ b/machines/common/default.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + imports = [ + ./base.nix + ./pipewire.nix + ./printer.nix + ./rip.nix + ./tailscale.nix + ./user.nix + ./x11.nix + ]; +} diff --git a/machines/common/pipewire.nix b/machines/common/pipewire.nix new file mode 100644 index 0000000..662d7fe --- /dev/null +++ b/machines/common/pipewire.nix @@ -0,0 +1,18 @@ +{...}: { + security.rtkit.enable = true; + + services.pipewire = { + enable = true; + pulse.enable = true; + alsa.enable = true; + extraConfig.pipewire."10-clock-rates" = { + "context.properties" = { + "default.clock.rate" = 48000; + "default.clock.allowed-rates" = [ + 44100 + 48000 + ]; + }; + }; + }; +} diff --git a/machines/common/printer.nix b/machines/common/printer.nix new file mode 100644 index 0000000..695d1fe --- /dev/null +++ b/machines/common/printer.nix @@ -0,0 +1,17 @@ +{pkgs, ...}: { + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + + services.printing = { + enable = true; + drivers = with pkgs; [ + cups-filters + cups-browsed + ]; + }; + + services.ipp-usb.enable = true; +} diff --git a/machines/common/rip.nix b/machines/common/rip.nix new file mode 100644 index 0000000..c02ad7f --- /dev/null +++ b/machines/common/rip.nix @@ -0,0 +1,3 @@ +{ ... }: { + boot.kernelModules = [ "sg" ]; +} diff --git a/machines/common/tailscale.nix b/machines/common/tailscale.nix new file mode 100644 index 0000000..4e99eaa --- /dev/null +++ b/machines/common/tailscale.nix @@ -0,0 +1,8 @@ +{pkgs-unstable, ...}: { + services.tailscale = { + package = pkgs-unstable.tailscale; + enable = true; + extraSetFlags = [ "--ssh" ]; + extraDaemonFlags = [ "--no-logs-no-support" ]; + }; +} diff --git a/machines/common/user.nix b/machines/common/user.nix new file mode 100644 index 0000000..adac815 --- /dev/null +++ b/machines/common/user.nix @@ -0,0 +1,13 @@ +{...}: { + users.users.kassouni = { + isNormalUser = true; + home = "/home/kassouni"; + extraGroups = [ + "wheel" + "video" + "docker" + "input" + "audio" + ]; + }; +} diff --git a/machines/common/x11.nix b/machines/common/x11.nix new file mode 100644 index 0000000..ed2084a --- /dev/null +++ b/machines/common/x11.nix @@ -0,0 +1,14 @@ +{...}: { + services.displayManager.ly = { + enable = true; + x11Support = true; + }; + + services.xserver = { + enable = true; + xkb = { + layout = "us"; + options = "caps:escape"; + }; + }; +} |
