Create module for desktop
This commit is contained in:
parent
7312d03b61
commit
da3e3e621e
4 changed files with 41 additions and 34 deletions
|
@ -10,7 +10,6 @@ in {
|
|||
config = {
|
||||
pim = {
|
||||
cinnamon.enable = true;
|
||||
inWheel = false;
|
||||
};
|
||||
|
||||
facter.reportPath = ./facter.json;
|
||||
|
@ -18,9 +17,19 @@ in {
|
|||
home-manager.users.pim.imports = [./home.nix];
|
||||
programs.steam.enable = true;
|
||||
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keys = config.pim.ssh.keys.pim;
|
||||
|
||||
pim = {
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = config.pim.ssh.keys.pim;
|
||||
};
|
||||
};
|
||||
|
||||
deployment = {
|
||||
targetHost = "gamepc";
|
||||
targetUser = "root";
|
||||
tags = ["desktop"];
|
||||
|
||||
keys = {
|
||||
root-sops-age-key = {
|
||||
|
@ -44,11 +53,6 @@ in {
|
|||
tailscale.enable = true;
|
||||
};
|
||||
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keys = config.pim.ssh.keys.pim;
|
||||
pim.openssh.authorizedKeys.keys = config.pim.ssh.keys.pim;
|
||||
};
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
|
|
|
@ -16,9 +16,15 @@ in {
|
|||
compliance.enable = true;
|
||||
};
|
||||
|
||||
users.users.pim = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "docker" "input" "wireshark" "dialout"];
|
||||
};
|
||||
|
||||
deployment = {
|
||||
allowLocalDeployment = true;
|
||||
targetHost = null;
|
||||
tags = ["desktop"];
|
||||
|
||||
keys = {
|
||||
# TODO: Create macro for this
|
||||
|
|
|
@ -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…
Reference in a new issue