diff --git a/configuration.nix b/configuration.nix index 7e9fee5..2abdcd9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, pkgs-stable,... }: +{ config, lib, pkgs, inputs, ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; in @@ -24,11 +24,6 @@ in }; services = { - xserver = { - enable = true; - displayManager.startx.enable = true; - windowManager.i3.enable = true; - }; pipewire = { enable = true; pulse.enable = true; @@ -54,7 +49,11 @@ in }; programs = { - nix-ld.enable = true; + hyprland = { + enable = true; + xwayland.enable = true; + }; + nix-ld.enable = true; }; virtualisation = { @@ -86,6 +85,7 @@ in neofetch fastfetch onefetch + neovim vim weechat ranger @@ -99,6 +99,8 @@ in gccgo14 go + nixd + # radio sdrplay sdrpp @@ -118,14 +120,10 @@ in libplist libimobiledevice usbmuxd - pulseaudio - ]) - ++ - (with pkgs-stable; [ - wezterm - ]); - + ]); + + nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; networking = { diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 3356e33..0000000 --- a/flake.lock +++ /dev/null @@ -1,42 +0,0 @@ -{ - "nodes": { - "nixpkgs": { - "locked": { - "lastModified": 1730785428, - "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs-stable": { - "locked": { - "lastModified": 1730963269, - "narHash": "sha256-rz30HrFYCHiWEBCKHMffHbMdWJ35hEkcRVU0h7ms3x0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "83fb6c028368e465cd19bb127b86f971a5e41ebc", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-24.05", - "type": "indirect" - } - }, - "root": { - "inputs": { - "nixpkgs": "nixpkgs", - "nixpkgs-stable": "nixpkgs-stable" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix index 16c98ef..7ec1ffa 100644 --- a/flake.nix +++ b/flake.nix @@ -1,9 +1,13 @@ { - description = "My NixOS Configuration"; + description = "My first flake!"; inputs = { nixpkgs-stable.url = "nixpkgs/nixos-24.05"; nixpkgs.url = "nixpkgs/nixos-unstable"; + nixvim = { + url = "github:nix-community/nixvim"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = { self, nixpkgs, nixpkgs-stable, ... }: @@ -12,15 +16,13 @@ lib = nixpkgs.lib; pkgs = nixpkgs.legacyPackages.${system}; pkgs-stable = nixpkgs-stable.legacyPackages.${system}; - in { - nixosConfigurations = { - default = lib.nixosSystem { - system = "x86_64-linux"; - modules = [ ./configuration.nix ]; - specialArgs = { - inherit pkgs-stable; - }; + nixosConfigurations = { + poggers = lib.nixosSystem { + inherit system; + modules = [ ./configuration.nix ]; + specialArgs = { + inherit pkgs-stable; }; }; }; diff --git a/hardware-configuration.nix b/hardware-configuration.nix index 8083356..1b15fd5 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -8,18 +8,18 @@ [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/0869359e-4c7e-4410-aab0-55bc72a45e0b"; + { device = "/dev/disk/by-label/NIXROOT"; fsType = "ext4"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7C74-E1AE"; + { device = "/dev/disk/by-label/ESP"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; @@ -31,8 +31,10 @@ # 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.enp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wwp0s20f0u3i12.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/modules/home.nix b/modules/home.nix index 5595449..b46ecbe 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -2,10 +2,11 @@ { imports = [ - ./nix/sway.nix ./nix/user.nix - ./nix/nvim.nix - ]; + ./nix/hypr.nix + ./nix/kitty.nix + ./nix/nixvim.nix + ]; home.enableNixpkgsReleaseCheck = false; home.stateVersion = "24.05"; diff --git a/modules/nix/hypr.nix b/modules/nix/hypr.nix new file mode 100644 index 0000000..c3dd536 --- /dev/null +++ b/modules/nix/hypr.nix @@ -0,0 +1,58 @@ +{config, pkgs, ... }: +{ + wayland.windowManager.hyprland = { + enable = true; + xwayland.enable = true; + plugins = [ + pkgs.hyprlandPlugins.borders-plus-plus + ]; + settings = { + "monitor" = "eDP-1, 1920x1080@60, 0x0, 1"; + "$mod" = "SUPER"; + bind = [ + "$mod, RETURN, exec, ${pkgs.kitty}/bin/kitty" + "$mod, space, exec, ${pkgs.wofi}/bin/wofi --show drun" + "$mod, Q, killactive" + + "$mod, 1, workspace, 1" + "$mod, 2, workspace, 2" + "$mod, 3, workspace, 3" + "$mod, 4, workspace, 4" + "$mod, 5, workspace, 5" + "$mod, 6, workspace, 6" + "$mod, 7, workspace, 7" + "$mod, 8, workspace, 8" + "$mod, 9, workspace, 9" + + "bind = $mod SHIFT, 1, movetoworkspace, 1" + "bind = $mod SHIFT, 2, movetoworkspace, 2" + "bind = $mod SHIFT, 3, movetoworkspace, 3" + "bind = $mod SHIFT, 4, movetoworkspace, 4" + "bind = $mod SHIFT, 5, movetoworkspace, 5" + "bind = $mod SHIFT, 6, movetoworkspace, 6" + "bind = $mod SHIFT, 7, movetoworkspace, 7" + "bind = $mod SHIFT, 8, movetoworkspace, 8" + "bind = $mod SHIFT, 9, movetoworkspace, 9" + + ]; + decoration = { + rounding = 0; + }; + general = { + gaps_in = 8; + gaps_out = 8; + border_size = 1; + resize_on_border = true; + }; + input = { + kb_layout = "us"; + natural_scroll = true; + }; + gestures = { + workspace_swipe = true; + workspace_swipe_forever = true; + }; + }; + }; +} + diff --git a/modules/nix/kitty.nix b/modules/nix/kitty.nix new file mode 100644 index 0000000..1684707 --- /dev/null +++ b/modules/nix/kitty.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: +{ + programs = { + kitty = { + enable = true; + extraConfig = '' + font_size 15.0 + cursor_shape beam + close_window + ''; + }; + tmux = { + enable = true; + }; + }; +} diff --git a/modules/nix/nixvim.nix b/modules/nix/nixvim.nix new file mode 100644 index 0000000..db0d318 --- /dev/null +++ b/modules/nix/nixvim.nix @@ -0,0 +1,16 @@ +{ config, pkgs, inputs, ... }: +{ + imports = [ + .homeManagerModules.nixvim + ]; + programs.nixvim = { + enable = true; + colorschemes.oxocarbon.enable = true; + plugins = { + lualine = { + enable = true; + }; + }; + }; +} + diff --git a/modules/nix/nvim.nix b/modules/nix/nvim.nix deleted file mode 100644 index cd0b803..0000000 --- a/modules/nix/nvim.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, pkgs, ... }: -{ - programs.neovim = { - enable = true; - plugins = with pkgs.vimPlugins; [ - vimsence - ] - }; -} diff --git a/modules/nix/sway.nix b/modules/nix/sway.nix deleted file mode 100644 index 66e79ae..0000000 --- a/modules/nix/sway.nix +++ /dev/null @@ -1,109 +0,0 @@ -{config, pkgs, ... }: -{ - wayland.windowManager.sway = { - enable = true; - xwayland = true; - package = pkgs.swayfx-unwrapped; - wrapperFeatures.gtk = true; - checkConfig = false; - extraSessionCommands = '' - ''; - - config = rec { - modifier = "Mod4"; - terminal = "wezterm"; - menu = "${pkgs.rofi}/bin/rofi -show drun -c .config/rofi/config.rasi"; - startup = [ - {command = "${pkgs.swaybg}/bin/swaybg -i $HOME/.wp/skull_purple.png";} - ]; - bars = [{ command = "waybar"; }]; - gaps = { - outer = 5; - inner = 10; - }; - - window = { - border = 0; - }; - - keybindings = { - # IMPORTANT STUFF # - "${modifier}+Return" = "exec ${terminal}"; - "${modifier}+F" = "exec firefox"; - "${modifier}+space" = "exec ${menu}"; - "${modifier}+D" = "exec discord"; - "${modifier}+C" = "exec code"; - "${modifier}+Q" = "kill"; - "${modifier}+Shift+R" = "reload"; - "${modifier}+Shift+S" = "grim -g '$(slurp)'"; - # WINDOW STUFF # - "${modifier}+Shift+space" = "floating toggle"; - "${modifier}+Shift+F" = "fullscreen toggle"; - "${modifier}+Left" = "focus left"; - "${modifier}+Down" = "focus down"; - "${modifier}+Up" = "focus up"; - "${modifier}+Right" = "focus right"; - - "${modifier}+Ctrl+Right" = "resize shrink width 3 px or 3 ppt"; - "${modifier}+Ctrl+Down" = "resize grow height 3 px or 3 ppt"; - "${modifier}+Ctrl+Up" = "resize shrink height 3 px or 3 ppt"; - "${modifier}+Ctrl+Left" = "resize grow width 3 px or 3 ppt"; - - "${modifier}+Shift+Left" = "move left"; - "${modifier}+Shift+Down" = "move down"; - "${modifier}+Shift+Up" = "move up"; - "${modifier}+Shift+Right" = "move right"; - - # WORKSPACES # - "${modifier}+1" = "workspace number 1"; - "${modifier}+2" = "workspace number 2"; - "${modifier}+3" = "workspace number 3"; - "${modifier}+4" = "workspace number 4"; - "${modifier}+5" = "workspace number 5"; - "${modifier}+6" = "workspace number 6"; - "${modifier}+7" = "workspace number 7"; - "${modifier}+8" = "workspace number 8"; - "${modifier}+9" = "workspace number 9"; - - # MOVE WINDOW TO OTHER WS # - "${modifier}+Shift+1" = "move container to workspace number 1"; - "${modifier}+Shift+2" = "move container to workspace number 2"; - "${modifier}+Shift+3" = "move container to workspace number 3"; - "${modifier}+Shift+4" = "move container to workspace number 4"; - "${modifier}+Shift+5" = "move container to workspace number 5"; - "${modifier}+Shift+6" = "move container to workspace number 6"; - "${modifier}+Shift+7" = "move container to workspace number 7"; - "${modifier}+Shift+8" = "move container to workspace number 8"; - "${modifier}+Shift+9" = "move container to workspace number 9"; - - # Audio - "XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +10%"; - "XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -10%"; - "XF86AudioMute" = "exec set-volume toggle-mute"; - "XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop"; - "XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous"; - "XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next"; - "XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - - "XF86MonBrightnessDown" = "exec brightnessctl set 15%-"; - "XF86MonBrightnessUp" = "exec brightnessctl set +15%"; - }; - }; - - extraConfig = '' - shadows enable - corner_radius 12 - blur_radius 7 - blur_passes 4 - default_dim_inactive 0.2 - - for_window [app_id="wezterm"] blur enable - for_window [app_id="code"] blur enable - for_window [app_id="rofi"] blur enable - - default_border pixel 0px - default_floating_border none - titlebar_border_thickness 0 - ''; - }; -}