diff --git a/.sops.yaml b/.sops.yaml index 775afce..af138fa 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -12,6 +12,7 @@ keys: - &testmodules age1zkzpnfeakyvg3fqtyay32sushjx2hqe28y6hs6ss7plemzqjqa5s6s5yu3 - &ldap-server-arm age1jyeppc8yl2twnv8fwcewutd5gjewnxl59lmhev6ygds9qel8zf8syt7zz4 - &netboot age14uarclad0ty5supc8ep09793xrnwkv8a4h9j0fq8d8lc92n2dadqkf64vw + - &phone age12zmq67s0cykfxw9st9j4qqsus4saye96lsv3dpkmhfwsw325rvgst56hj3 creation_rules: - path_regex: ^[^/]+\.yaml$ key_groups: diff --git a/fleet.nix b/fleet.nix index d4f03a3..ccd21ae 100644 --- a/fleet.nix +++ b/fleet.nix @@ -36,6 +36,10 @@ username = "nb-01.cloonar.com"; key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDN/2SAFm50kraB1fepAizox/QRXxB7WbqVbH+5OPalDT47VIJGNKOKhixQoqhABHxEoLxdf/C83wxlCVlPV9poLfDgVkA3Lyt5r3tSFQ6QjjOJAgchWamMsxxyGBedhKvhiEzcr/Lxytnoz3kjDG8fqQJwEpdqMmJoMUfyL2Rqp16u+FQ7d5aJtwO8EUqovhMaNO7rggjPpV/uMOg+tBxxmscliN7DLuP4EMTA/FwXVzcFNbOx3K9BdpMRAaSJt4SWcJO2cS2KHA5n/H+PQI7nz5KN3Yr/upJN5fROhi/SHvK39QOx12Pv7FCuWlc+oR68vLaoCKYhnkl3DnCfc7A7"; } + { + username = "phone"; + key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQD5MRLTtrATbWhADMe5Pm6DCLZDQf6T8fdMO1lg8mAAB8PmAI3VYW4JrqEBusX0EYR1rRdDB9YxPr9wAroSPK+nT5Gr/FNgzI5N2Pg+r+jf+pnzntHYb7ALpb18FcHDGiYRUHVrceX15XZSV4gKLzE/DA38G9qFiMlnI3xKmC8Vblzuk+ljLKJZDYmWHhi4MYr5eB4KPZcTovSjPmNybi98hLKvqXH+r/lHGAqBfBIM9IF0dNkLtaTpY97PpIJYkqKA6RPs7Hj2BfbcdlB7KXMoEyUOuQLA//QinY5BbeOXH4EteEofm6385PHil7rq48YSnbANAImkuwoIbGJ2x980Cg2EGviYh24w/5lbXrsM4acXMb6wSVcEkejykoZalhgRz+XvBJKjDKtXjwoiPNT8jt5tqU0Qxs8y/VGR1QEozjCahYFyNPHPJWEk3nD1nZDRFmcGVk+zmTSMEwglMSQsR7hSUcy101lRT9aL9GZYO5J+/5szAxR6K96RCeBoUSE= root@mobile-nixos"; + } ]; in { imports = builtins.map create_users users; diff --git a/hosts/phone/configuration.nix b/hosts/phone/configuration.nix new file mode 100644 index 0000000..3bc565b --- /dev/null +++ b/hosts/phone/configuration.nix @@ -0,0 +1,68 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + (import { device = "pine64-pinephone"; }) + ./hardware-configuration.nix + + + ./utils/bento.nix + ]; + + networking.hostName = "mobile-nixos"; + + services.openssh.enable = true; + + # + # Opinionated defaults + # + + # Use Network Manager + networking.wireless.enable = false; + networking.networkmanager.enable = true; + + # Use PulseAudio + hardware.pulseaudio.enable = true; + + # Enable Bluetooth + hardware.bluetooth.enable = true; + + # Bluetooth audio + hardware.pulseaudio.package = pkgs.pulseaudioFull; + + # Enable power management options + powerManagement.enable = true; + + # It's recommended to keep enabled on these constrained devices + zramSwap.enable = true; + + # Auto-login for phosh + services.xserver.desktopManager.phosh = { + user = "dominik"; + }; + + # + # User configuration + # + + users.users."dominik" = { + isNormalUser = true; + description = "Dominik"; + hashedPassword = "$6$9XPnHmmAyS.Y9wOa$Jkugv90xKzpRM6LWbDU0vIWcWC/7LTNuqoRSwNhhpBuXNY499DlSvcW3uh/AUBdVdlm6k18Z.N8FAWPEWBD0E/"; + extraGroups = [ + "dialout" + "feedbackd" + "networkmanager" + "video" + "wheel" + ]; + }; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.11"; # Did you read the comment? +} diff --git a/hosts/phone/hardware-configuration.nix b/hosts/phone/hardware-configuration.nix new file mode 100644 index 0000000..0800196 --- /dev/null +++ b/hosts/phone/hardware-configuration.nix @@ -0,0 +1,19 @@ +# NOTE: this file was generated by the Mobile NixOS installer. +{ config, lib, pkgs, ... }: + +{ + fileSystems = { + "/" = { + device = "/dev/disk/by-uuid/d9b3519e-7b26-495b-8aa2-601cac773f07"; + fsType = "ext4"; + }; + }; + + boot.initrd.luks.devices = { + "LUKS-MOBILE-NIXOS-ROOTFS" = { + device = "/dev/disk/by-uuid/6ac23f93-cea1-454e-bae8-3edc07cb2d30"; + }; + }; + + nix.settings.max-jobs = lib.mkDefault 2; +} diff --git a/hosts/phone/utils b/hosts/phone/utils new file mode 120000 index 0000000..6b18391 --- /dev/null +++ b/hosts/phone/utils @@ -0,0 +1 @@ +../../utils \ No newline at end of file