Create module for desktop
This commit is contained in:
parent
7312d03b61
commit
da3e3e621e
4 changed files with 41 additions and 34 deletions
|
@ -19,17 +19,12 @@
|
|||
./compliance.nix
|
||||
./cinnamon.nix
|
||||
./ssh.nix
|
||||
./desktop.nix
|
||||
];
|
||||
|
||||
options.pim.inWheel = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
};
|
||||
|
||||
config = {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
programs.ssh.startAgent = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
systemd = {
|
||||
|
@ -38,23 +33,10 @@
|
|||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
excludePackages = [pkgs.xterm];
|
||||
};
|
||||
|
||||
tailscale = {
|
||||
useRoutingFeatures = "client";
|
||||
extraSetFlags = ["--accept-routes"];
|
||||
};
|
||||
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = [pkgs.hplip pkgs.gutenprint];
|
||||
};
|
||||
xserver.excludePackages = [pkgs.xterm];
|
||||
printing.drivers = [pkgs.hplip pkgs.gutenprint];
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
|
@ -62,13 +44,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
users.users.pim = {
|
||||
isNormalUser = true;
|
||||
extraGroups =
|
||||
["docker" "input" "wireshark" "dialout"]
|
||||
++ lib.optional config.pim.inWheel "wheel";
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
age
|
||||
|
@ -114,6 +89,7 @@
|
|||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
# TODO: "pim" shouldn't be here by default
|
||||
settings.trusted-users = ["root" "pim"];
|
||||
|
||||
extraOptions = ''
|
||||
|
@ -170,6 +146,7 @@
|
|||
useUserPackages = true;
|
||||
extraSpecialArgs = {inherit self inputs;};
|
||||
|
||||
# TODO: shouldn't be here by default
|
||||
users.pim.imports = ["${self}/home-manager"];
|
||||
};
|
||||
};
|
||||
|
|
20
nixos/desktop.nix
Normal file
20
nixos/desktop.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf (builtins.elem "desktop" config.deployment.tags) {
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
printing.enable = true;
|
||||
pipewire.enable = true;
|
||||
|
||||
tailscale = {
|
||||
useRoutingFeatures = "client";
|
||||
extraSetFlags = ["--accept-routes"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue