From b9e2ab01f281a0d1591d85f21c737b08d9e45e6c Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Thu, 28 Nov 2024 22:49:44 +0000 Subject: [PATCH] Adding desktop config --- home/desktop/default.nix | 49 +++++++++++++++++++++++++++++++++ hosts/desktop/default.nix | 58 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+) create mode 100644 home/desktop/default.nix create mode 100644 hosts/desktop/default.nix diff --git a/home/desktop/default.nix b/home/desktop/default.nix new file mode 100644 index 0000000..686dd93 --- /dev/null +++ b/home/desktop/default.nix @@ -0,0 +1,49 @@ +{ + inputs, + lib, + pkgs, + config, + outputs, + catppuccin, + ... +}: +{ + imports = [ + inputs.nix-colors.homeManagerModule + inputs.nixvim.homeManagerModules.nixvim + catppuccin.homeManagerModules.catppuccin + ../common/programs/default.nix + ../common/programs/desktop + ../common/programs/hyprland + ../common/programs/kitty.nix + ../common/programs/syncthing.nix + ../common/programs/gpg.nix + ../common/features/colorscheme.nix + ../common/features/xdg.nix + ../common/features/bluetooth.nix + ]; + + home.sessionVariables = { + LIBVA_DRIVER_NAME = "nvidia"; + XDG_SESSION_TYPE = "wayland"; + GDM_BACKEND = "nvidia-drm"; + __GLX_VENDOR_LIBRARY_NAME = "nvidia"; + }; + + wayland.windowManager.hyprland.settings = { + monitor = [ "eDP-1, preferred, 0x1080, 1, bitdepth, 8" ]; + windowrulev2 = [ + "float, class:thunar" + "move cursor -50% -50%, class:thunar" + "size 800 600, class:thunar" + ]; + }; + + programs.kitty.settings.font_size = 12; + + home = { + username = lib.mkDefault "naps62"; + stateVersion = lib.mkDefault "24.05"; + }; + +} diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix new file mode 100644 index 0000000..4aa1e37 --- /dev/null +++ b/hosts/desktop/default.nix @@ -0,0 +1,58 @@ +{ + inputs, + pkgs, + config, + ... +}: +let + tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; + hyprland-session = "${pkgs.hyprland}/share/wayland-sessions"; +in +{ + imports = [ + ./hardware-configuration.nix + ../common/global + ../common/features/networking.nix + ../common/features/nvidia.nix + ../common/features/wayland.nix + ../common/features/pipewire.nix + ../common/features/docker.nix + ../common/features/fonts.nix + ../common/features/nix-ld.nix + ../common/features/bluetooth.nix + ]; + + networking.hostName = "konishi"; + + boot = { + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + }; + + system.stateVersion = "24.05"; + + programs.zsh.enable = true; + + users.users.naps62 = { + isNormalUser = true; + description = "Miguel Palhas"; + extraGroups = [ + "networkmanager" + "input" + "wheel" + "docker" + ]; + shell = pkgs.zsh; + initialHashedPassword = "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D"; + openssh.authorizedKeys.keys = + let + authorizedKeys = pkgs.fetchurl { + url = "https://github.com/naps62.keys"; + sha256 = "sha256-rDWxVY9NqeMs/BhShf4a0++KCPCgPmy2QPFehBvsmnk="; + }; + in + pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys); + }; +}