From 654fa9e430be421df30ee79e7ea5f4e40b39dddc Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Tue, 4 Jun 2024 14:38:25 +0530 Subject: home, os: refactor --- os/cez/modules/getty.nix | 15 --------------- os/cez/modules/network.nix | 15 --------------- os/cez/modules/sshfs.nix | 27 --------------------------- os/cez/modules/wayland.nix | 41 ----------------------------------------- os/cez/modules/wireguard.nix | 7 ++----- 5 files changed, 2 insertions(+), 103 deletions(-) delete mode 100644 os/cez/modules/getty.nix delete mode 100644 os/cez/modules/network.nix delete mode 100644 os/cez/modules/sshfs.nix delete mode 100644 os/cez/modules/wayland.nix (limited to 'os/cez/modules') diff --git a/os/cez/modules/getty.nix b/os/cez/modules/getty.nix deleted file mode 100644 index 8c7f57e..0000000 --- a/os/cez/modules/getty.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, ... }: let - user = config.global.userdata.name; -in { - systemd.services."getty@".serviceConfig.TTYVTDisallocate = "no"; - - services.getty = { - loginOptions = "-f ${user}"; - extraArgs = [ - "--nonewline" - "--skip-login" - "--noclear" - "--noissue" - ]; - }; -} diff --git a/os/cez/modules/network.nix b/os/cez/modules/network.nix deleted file mode 100644 index fb30056..0000000 --- a/os/cez/modules/network.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ ... }: - -{ - networking = { - firewall.enable = false; - - wireless.iwd = { - enable = true; - settings = { - General.EnableNetworkConfiguration = true; - Network.NameResolvingService = "resolvconf"; - }; - }; - }; -} diff --git a/os/cez/modules/sshfs.nix b/os/cez/modules/sshfs.nix deleted file mode 100644 index 5fdbeaf..0000000 --- a/os/cez/modules/sshfs.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ config, pkgs, ... }: - -let - domain = config.global.userdata.domain; - user = config.global.userdata.name; - uid = config.users.users.${user}.uid; - gid = config.users.groups.users.gid; -in -{ - sops.secrets."misc/sftp" = {}; - system.fsPackages = with pkgs; [ sshfs ]; - - fileSystems."/media/kay" = { - device = "sftp@${domain}:"; - fsType = "sshfs"; - options = [ - "allow_other" # for non-root access - "uid=${toString uid}" - "gid=${toString gid}" - "_netdev" # this is a network fs - "x-systemd.automount" # mount on demand - "reconnect" # handle connection drops - "ServerAliveInterval=15" # keep connections alive - "IdentityFile=${config.sops.secrets."misc/sftp".path}" - ]; - }; -} diff --git a/os/cez/modules/wayland.nix b/os/cez/modules/wayland.nix deleted file mode 100644 index 872c7fb..0000000 --- a/os/cez/modules/wayland.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ config, pkgs, ... }: let - user = config.global.userdata.name; - - fontSans = config.global.font.sans.name; - fontMonospace = config.global.font.monospace.name; - fontPackages = config.global.font.monospace.packages - ++ config.global.font.sans.packages; -in { - fonts = { - packages = fontPackages; - enableDefaultPackages = true; - fontconfig = { - hinting.style = "full"; - subpixel.rgba = "rgb"; - defaultFonts = { - monospace = [ fontMonospace ]; - serif = [ fontSans ]; - sansSerif = [ fontSans ]; - }; - }; - }; - - users.users.${user}.extraGroups = [ "seat" ]; - services = { - seatd.enable = true; - dbus = { - enable = true; - implementation = "broker"; - }; - }; - - programs = { - gnupg.agent = { - enable = true; - pinentryPackage = pkgs.pinentry-bemenu; - }; - }; - - security.pam.services.swaylock = {}; - hardware.opengl.enable = true; -} diff --git a/os/cez/modules/wireguard.nix b/os/cez/modules/wireguard.nix index 706751c..40dd796 100644 --- a/os/cez/modules/wireguard.nix +++ b/os/cez/modules/wireguard.nix @@ -1,9 +1,6 @@ -{ config, ... }: - -let +{ config, ... }: let domain = config.global.userdata.domain; -in -{ +in { sops.secrets."misc/wireguard" = {}; networking.wg-quick.interfaces."kay" = { -- cgit v1.2.3