From 664df9210d7239ff34c7e14b8d75d85d7d79e0d5 Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Sun, 6 Oct 2024 11:10:51 +0100 Subject: [PATCH] Adding asdf --- flake.lock | 17 ++++++++++++++ flake.nix | 1 + home/arrakis/default.nix | 15 ++++++++++--- home/common/programs/asdf.nix | 4 ++++ home/common/programs/default.nix | 12 ++++++++-- home/common/programs/hyprland/default.nix | 27 ++++++++++++++--------- hosts/arrakis/default.nix | 21 +++++++++++++----- hosts/arrakis/hardware-configuration.nix | 7 +++--- hosts/common/features/hyprland.nix | 2 -- hosts/common/features/nvidia.nix | 2 +- hosts/common/global/default.nix | 1 - 11 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 home/common/programs/asdf.nix diff --git a/flake.lock b/flake.lock index 243f3ac..088b64e 100644 --- a/flake.lock +++ b/flake.lock @@ -348,6 +348,22 @@ "type": "github" } }, + "hardware": { + "locked": { + "lastModified": 1728056216, + "narHash": "sha256-IrO06gFUDTrTlIP3Sz+mRB6WUoO2YsgMtOD3zi0VEt0=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "b7ca02c7565fbf6d27ff20dd6dbd49c5b82eef28", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, "hercules-ci-effects": { "inputs": { "flake-parts": "flake-parts_2", @@ -837,6 +853,7 @@ "inputs": { "catppuccin": "catppuccin", "foundry": "foundry", + "hardware": "hardware", "home-manager": "home-manager", "hyprland": "hyprland", "neovim-nightly-overlay": "neovim-nightly-overlay", diff --git a/flake.nix b/flake.nix index c3477dd..a4a0dd8 100644 --- a/flake.nix +++ b/flake.nix @@ -38,6 +38,7 @@ url = "github:shazow/foundry.nix/monthly"; }; utils.url = "github:numtide/flake-utils"; + hardware.url = "github:NixOS/nixos-hardware/master"; }; outputs = diff --git a/home/arrakis/default.nix b/home/arrakis/default.nix index f7020c9..c841c5f 100644 --- a/home/arrakis/default.nix +++ b/home/arrakis/default.nix @@ -1,4 +1,13 @@ -{ inputs, lib, pkgs, config, outputs, catppuccin, ... }: { +{ + inputs, + lib, + pkgs, + config, + outputs, + catppuccin, + ... +}: +{ imports = [ inputs.nix-colors.homeManagerModule inputs.nixvim.homeManagerModules.nixvim @@ -19,7 +28,7 @@ }; wayland.windowManager.hyprland.settings = { - monitor = [ "eDP-1, preferred, 0x1080, 1.2, bitdepth, 8" ]; + monitor = [ "eDP-1, preferred, 0x1080, 1, bitdepth, 8" ]; windowrulev2 = [ "float, class:thunar" "move cursor -50% -50%, class:thunar" @@ -27,7 +36,7 @@ ]; }; - programs.kitty.settings.font_size = 8; + programs.kitty.settings.font_size = 12; home = { username = lib.mkDefault "naps62"; diff --git a/home/common/programs/asdf.nix b/home/common/programs/asdf.nix new file mode 100644 index 0000000..017baf3 --- /dev/null +++ b/home/common/programs/asdf.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ asdf-vm ]; +} diff --git a/home/common/programs/default.nix b/home/common/programs/default.nix index da3d409..3cee4cd 100644 --- a/home/common/programs/default.nix +++ b/home/common/programs/default.nix @@ -1,5 +1,13 @@ -{ lib, config, ... }: { - imports = [ ./zsh.nix ./neovim ./rust.nix ./git ./solidity.nix ]; +{ lib, config, ... }: +{ + imports = [ + ./zsh.nix + ./neovim + ./rust.nix + ./git + ./solidity.nix + ./asdf.nix + ]; programs = { home-manager.enable = true; diff --git a/home/common/programs/hyprland/default.nix b/home/common/programs/hyprland/default.nix index f6fe2fa..16bb2f2 100644 --- a/home/common/programs/hyprland/default.nix +++ b/home/common/programs/hyprland/default.nix @@ -1,17 +1,20 @@ -{ config, pkgs, ... }: let - rofiLaunchers = import ../../../pkgs/rofi-launchers/package.nix {}; -in { - imports = [./rofi.nix]; +{ config, pkgs, ... }: +let + rofiLaunchers = import ../../../pkgs/rofi-launchers/package.nix { }; +in +{ + imports = [ ./rofi.nix ]; + + home.packages = with pkgs; [ hyprcursor ]; home.sessionVariables = { - HYPRCURSOR_THEME = "Phinger Cursors"; - HYPRCURSOR_SIZE = 32; ELECTRON_OZONE_PLATFORM_HINT = "auto"; XCURSOR_SIZE = 32; }; wayland.windowManager.hyprland = { enable = true; + catppuccin.enable = true; settings = { decoration = { blur = { @@ -33,11 +36,15 @@ in { repeat_delay = 150; repeat_rate = 25; - touchpad = { natural_scroll = "yes"; }; + touchpad = { + natural_scroll = "yes"; + }; numlock_by_default = "true"; }; - cursor = { no_hardware_cursors = "yes"; }; + cursor = { + no_hardware_cursors = "yes"; + }; general = { gaps_in = 2; @@ -81,8 +88,8 @@ in { "$mod, f, fullscreen, 0" "$mod SHIFT, f, fullscreen, 1" -# rofi -"$mod, space, exec, launcher_t2" + # rofi + "$mod, space, exec, launcher_t2" # move focus with mod + arrows "$mod, h, movefocus, l" diff --git a/hosts/arrakis/default.nix b/hosts/arrakis/default.nix index 3eeb1f0..34abaab 100644 --- a/hosts/arrakis/default.nix +++ b/hosts/arrakis/default.nix @@ -1,12 +1,19 @@ -{ inputs, pkgs, ... }: +{ + inputs, + pkgs, + config, + ... +}: let tuigreet = "${pkgs.greetd.tuigreet}/bin/tuigreet"; hyprland-session = "${pkgs.hyprland}/share/wayland-sessions"; -in { +in +{ imports = [ ./hardware-configuration.nix ../common/global ../common/features/networking.nix + ../common/features/nvidia.nix ../common/features/hyprland.nix ../common/features/pipewire.nix ../common/features/docker.nix @@ -30,9 +37,13 @@ in { users.users.naps62 = { isNormalUser = true; description = "Miguel Palhas"; - extraGroups = [ "networkmanager" "input" "wheel" "docker" ]; + extraGroups = [ + "networkmanager" + "input" + "wheel" + "docker" + ]; shell = pkgs.zsh; - initialHashedPassword = - "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D"; + initialHashedPassword = "$y$j9T$uRTzF/sBdrqVGZTRhPuR00$wgLgEGlq.lEmlCPiy69jkbtfC9HKpyaVPDHDdBGtE5D"; }; } diff --git a/hosts/arrakis/hardware-configuration.nix b/hosts/arrakis/hardware-configuration.nix index b887b5d..94dbaac 100644 --- a/hosts/arrakis/hardware-configuration.nix +++ b/hosts/arrakis/hardware-configuration.nix @@ -8,7 +8,7 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -26,15 +26,14 @@ options = [ "fmask=0077" "dmask=0077" ]; }; - swapDevices = - [ { device = "/dev/disk/by-uuid/bf830d6d-0a67-4d26-a6a9-e7954269d71d"; } - ]; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; + # networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.wlo1.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/hosts/common/features/hyprland.nix b/hosts/common/features/hyprland.nix index db4bfc0..7edda10 100644 --- a/hosts/common/features/hyprland.nix +++ b/hosts/common/features/hyprland.nix @@ -6,8 +6,6 @@ in { programs.hyprland.enable = true; - environment.systemPackages = [ pkgs.hyprcursor ]; - services.greetd = { enable = true; settings = { diff --git a/hosts/common/features/nvidia.nix b/hosts/common/features/nvidia.nix index 0d5f8ef..26c6721 100644 --- a/hosts/common/features/nvidia.nix +++ b/hosts/common/features/nvidia.nix @@ -6,7 +6,7 @@ modesetting.enable = true; open = false; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.stable; + package = config.boot.kernelPackages.nvidiaPackages.production; }; programs.xwayland.enable = true; diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 25ce4cb..3bb71f7 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -10,7 +10,6 @@ environment.systemPackages = [ pkgs.home-manager pkgs.zsh - pkgs.asdf-vm ]; time = {