From 6849194702ecbd1b7c38f7e14253cd0a8ddfce36 Mon Sep 17 00:00:00 2001 From: Andrea Ciceri Date: Mon, 13 Jan 2025 16:43:32 +0100 Subject: [PATCH] Update `deltaflyer` config Still not working --- hosts/default.nix | 10 ++++--- hosts/deltaflyer/default.nix | 33 +++++++++++++-------- hosts/deltaflyer/plasma-mobile.nix | 46 ++++++++++++++++-------------- 3 files changed, 52 insertions(+), 37 deletions(-) diff --git a/hosts/default.nix b/hosts/default.nix index 9b4c7c9..b76a20d 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -14,20 +14,22 @@ deltaflyer = { nixpkgs = let - # keep in sync with https://github.com/NixOS/mobile-nixos/blob/development/pkgs.nix - rev = "44d0940ea560dee511026a53f0e2e2cde489b4d4"; + # keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json + rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33"; in builtins.getFlake "github:NixOS/nixpkgs/${rev}"; extraHmModules = [ - # inputs.ccrEmacs.hmModules.default + inputs.catppuccin.homeManagerModules.catppuccin ]; vpn = { ip = "10.100.0.5"; publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc="; }; - homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e"; + # homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e"; extraModules = [ (import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; }) + inputs.catppuccin.nixosModules.catppuccin + inputs.lix-module.nixosModules.default ]; secrets = { "deltaflyer-wireguard-private-key" = { }; diff --git a/hosts/deltaflyer/default.nix b/hosts/deltaflyer/default.nix index 70f479f..7e68982 100644 --- a/hosts/deltaflyer/default.nix +++ b/hosts/deltaflyer/default.nix @@ -30,6 +30,13 @@ # INSECURE STUFF FIRST # Users and hardcoded passwords. { + nixpkgs.overlays = [ + (prev: final: { + gcc7 = final.gcc; + gcc8 = final.gcc; + }) + ]; + users.users.root.password = "nixos"; # users.users.ccr.password = "1234"; @@ -66,11 +73,13 @@ "git" "shell" "helix" - "hyprland" + # "hyprland" + "niri" "emacs" "firefox" "mpv" "xdg" + "catppuccin" ]; extraGroups = [ "dialout" @@ -99,18 +108,18 @@ ccr.extraModules = [ { programs.fish.loginShellInit = '' - pgrep Hypr >/dev/null || exec dbus-run-session Hyprland - ''; - wayland.windowManager.hyprland.extraConfig = lib.mkAfter '' - monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1 - input { - touchdevice { - transform = 1 - } - } - bind = $mod, r, exec, rotate-screen hor - bind = $mod SHIFT, r, exec, rotate-screen ver + pgrep niri >/dev/null || exec niri-session ''; + # wayland.windowManager.hyprland.extraConfig = lib.mkAfter '' + # monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1 + # input { + # touchdevice { + # transform = 1 + # } + # } + # bind = $mod, r, exec, rotate-screen hor + # bind = $mod SHIFT, r, exec, rotate-screen ver + # ''; home.packages = let rotateScript = pkgs.writeShellApplication { diff --git a/hosts/deltaflyer/plasma-mobile.nix b/hosts/deltaflyer/plasma-mobile.nix index 35c6f86..11eb446 100644 --- a/hosts/deltaflyer/plasma-mobile.nix +++ b/hosts/deltaflyer/plasma-mobile.nix @@ -3,6 +3,7 @@ # { lib, + pkgs, ... }: { @@ -16,35 +17,38 @@ # # desktopManager.plasma5.mobile.enable = true; - # displayManager.autoLogin = { - # enable = true; - # }; + displayManager.autoLogin = { + enable = true; + user = "ccr"; + }; - # displayManager.session = [{ - # manage = "desktop"; - # name = "hyprland"; - # start = '' - # ${pkgs.hyprland}/bin/Hyprland & - # waitPID=$! - # ''; - # }]; + displayManager.session = [ + { + manage = "desktop"; + name = "niri"; + start = '' + ${pkgs.niri}/bin/niri-session & + waitPID=$! + ''; + } + ]; - # displayManager.defaultSession = "hyprland"; + displayManager.defaultSession = "niri"; - # displayManager.lightdm = { - # enable = true; - # # Workaround for autologin only working at first launch. - # # A logout or session crashing will show the login screen otherwise. - # extraSeatDefaults = '' - # session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm - # ''; - # }; + displayManager.lightdm = { + enable = true; + # Workaround for autologin only working at first launch. + # A logout or session crashing will show the login screen otherwise. + extraSeatDefaults = '' + session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm + ''; + }; libinput.enable = true; }; hardware.bluetooth.enable = true; - hardware.pulseaudio.enable = lib.mkDefault true; # mkDefault to help out users wanting pipewire + hardware.pulseaudio.enable = lib.mkDefault false; # mkDefault to help out users wanting pipewire networking.networkmanager.enable = true; networking.wireless.enable = false; powerManagement.enable = true;