diff --git a/flake.nix b/flake.nix index 36e0372..4a7c86c 100644 --- a/flake.nix +++ b/flake.nix @@ -9,7 +9,7 @@ }; }; - outputs = { self, nixpkgs, ... }@inputs: + outputs = { self, nixpkgs, ... }@inputs: let system = "x86_64-linux"; user = "torjus"; @@ -17,9 +17,7 @@ nixosConfigurations.prismo = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs self user; }; - modules = [ - ./hosts/prismo - ]; + modules = [ ./hosts/prismo ]; }; - }; + }; } diff --git a/home/default.nix b/home/default.nix index 2cf0557..5165218 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,8 +1,8 @@ -{ inputs, self, user, ...}: { +{ inputs, self, user, ... }: { imports = [ inputs.home-manager.nixosModules.home-manager ]; home-manager = { useUserPackages = true; - useGlobalPkgs= true; + useGlobalPkgs = true; extraSpecialArgs = { inherit inputs user; }; users.${user} = { imports = [ @@ -11,7 +11,7 @@ ./programs/tmux ./zsh ./packages - ./hyprland + ./hyprland ]; firefox.enable = true; tmux.enable = true; diff --git a/home/editor/neovim/default.nix b/home/editor/neovim/default.nix index 079409e..1b6c16e 100644 --- a/home/editor/neovim/default.nix +++ b/home/editor/neovim/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: { +{ pkgs, ... }: { programs = { neovim = { enable = true; @@ -6,17 +6,17 @@ vimAlias = true; plugins = with pkgs.vimPlugins; [ vim-fugitive - undotree - telescope-nvim - lsp-zero-nvim - (nvim-treesitter.withPlugins (p: [ - p.tree-sitter-nix - p.tree-sitter-go - p.tree-sitter-vim - p.tree-sitter-bash - p.tree-sitter-json - p.tree-sitter-python - ])) + undotree + telescope-nvim + lsp-zero-nvim + (nvim-treesitter.withPlugins (p: [ + p.tree-sitter-nix + p.tree-sitter-go + p.tree-sitter-vim + p.tree-sitter-bash + p.tree-sitter-json + p.tree-sitter-python + ])) ]; extraLuaConfig = '' ${builtins.readFile ./options.lua} diff --git a/home/hyprland/default.nix b/home/hyprland/default.nix index 642a652..ed7da74 100644 --- a/home/hyprland/default.nix +++ b/home/hyprland/default.nix @@ -1,6 +1 @@ -{ - imports = [ - ./hyprland.nix - ./waybar.nix - ]; -} +{ imports = [ ./hyprland.nix ./waybar.nix ]; } diff --git a/home/hyprland/hyprland.nix b/home/hyprland/hyprland.nix index 6756095..0adda58 100644 --- a/home/hyprland/hyprland.nix +++ b/home/hyprland/hyprland.nix @@ -1,95 +1,89 @@ -{ inputs, pkgs, lib, ...}: { +{ inputs, pkgs, lib, ... }: { options.hyprland.enable = lib.mkEnableOption "Hyprland"; config = { - home.packages = with pkgs; [ - swww - wl-clipboard - cliphist - ]; + home.packages = with pkgs; [ swww wl-clipboard cliphist ]; wayland.windowManager.hyprland = { enable = true; settings = { "$mainMod" = "SUPER"; - "$term" = "alacritty"; + "$term" = "alacritty"; - monitor = [ "eDP-1,1920x1080@60,0x0,1" ]; - input = { - kb_layout = "no"; - follow_mouse = 1; - }; + monitor = [ "eDP-1,1920x1080@60,0x0,1" ]; + input = { + kb_layout = "no"; + follow_mouse = 1; + }; - decoration = { - rounding = 0; - drop_shadow = true; - shadow_range = 4; - shadow_render_power = 3; - blur = { - enabled = true; - size = 3; - passes = 1; - xray = true; - }; - }; + decoration = { + rounding = 0; + drop_shadow = true; + shadow_range = 4; + shadow_render_power = 3; + blur = { + enabled = true; + size = 3; + passes = 1; + xray = true; + }; + }; - general = { - gaps_in = 4; - gaps_out = 10; - border_size = 2; - layout = "dwindle"; - }; + general = { + gaps_in = 4; + gaps_out = 10; + border_size = 2; + layout = "dwindle"; + }; - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - dwindle = { - pseudotile = true; - preserve_split = true; - }; - master.new_is_master = true; - misc.force_default_wallpaper = -1; + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; + dwindle = { + pseudotile = true; + preserve_split = true; + }; + master.new_is_master = true; + misc.force_default_wallpaper = -1; - bind = [ - # term - "$mainMod,Return,exec,$term" - # rofi - "$mainMod,D,exec,rofi -show drun" - # hyprland - "$mainMod,Q,killactive," - "CTRLALT,Delete,exit," - "$mainMod,Space,togglefloating," - "$mainMod,F,fullscreen," + bind = [ + # term + "$mainMod,Return,exec,$term" + # rofi + "$mainMod,D,exec,rofi -show drun" + # hyprland + "$mainMod,Q,killactive," + "CTRLALT,Delete,exit," + "$mainMod,Space,togglefloating," + "$mainMod,F,fullscreen," - # focus - "$mainMod,l,movefocus,l" - "$mainMod,h,movefocus,r" - "$mainMod,k,movefocus,u" - "$mainMod,j,movefocus,d" + # focus + "$mainMod,l,movefocus,l" + "$mainMod,h,movefocus,r" + "$mainMod,k,movefocus,u" + "$mainMod,j,movefocus,d" - # move - "$mainMod,h,movewindow,l" - "$mainMod,l,movewindow,r" - "$mainMod,k,movewindow,u" - "$mainMod,j,movewindow,d" - ] ++ (builtins.concatLists (builtins.genList(x: - let - ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); - in [ - "$mainMod, ${ws}, workspace, ${toString( x + 1)}" - "ALT, ${ws}, workspace, ${toString( x + 1)}" - ]) 10)); - exec-once = [ - "waybar &" - ]; + # move + "$mainMod,h,movewindow,l" + "$mainMod,l,movewindow,r" + "$mainMod,k,movewindow,u" + "$mainMod,j,movewindow,d" + ] ++ (builtins.concatLists (builtins.genList (x: + let + ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10)); + in [ + "$mainMod, ${ws}, workspace, ${toString (x + 1)}" + "ALT, ${ws}, workspace, ${toString (x + 1)}" + ]) 10)); + exec-once = [ "waybar &" ]; }; }; }; diff --git a/home/hyprland/waybar.nix b/home/hyprland/waybar.nix index e6e2dba..5739b37 100644 --- a/home/hyprland/waybar.nix +++ b/home/hyprland/waybar.nix @@ -130,8 +130,7 @@ settings = [{ "layer" = "top"; "position" = "top"; - modules-left = - [ "custom/launcher" "hyprland/workspaces" ]; + modules-left = [ "custom/launcher" "hyprland/workspaces" ]; modules-center = [ "clock" ]; modules-right = [ "pulseaudio" "pulseaudio#microphone" "memory" "cpu" "tray" ]; diff --git a/home/packages/default.nix b/home/packages/default.nix index 0bb0600..2f7dc44 100644 --- a/home/packages/default.nix +++ b/home/packages/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: { +{ pkgs, ... }: { home.packages = with pkgs; [ # Generic tools age @@ -21,7 +21,7 @@ # Editors vscode - + # Go stuff go delve diff --git a/home/programs/firefox/default.nix b/home/programs/firefox/default.nix index f064244..e6d3445 100644 --- a/home/programs/firefox/default.nix +++ b/home/programs/firefox/default.nix @@ -1,9 +1,6 @@ -{ pkgs, config, lib, inputs, user, ...}: { +{ pkgs, config, lib, inputs, user, ... }: { options.firefox.enable = lib.mkEnableOption "Firefox"; - config = lib.mkIf config.firefox.enable { - programs.firefox = { - enable = true; - }; - }; + config = + lib.mkIf config.firefox.enable { programs.firefox = { enable = true; }; }; } diff --git a/home/programs/tmux/default.nix b/home/programs/tmux/default.nix index 4e04bca..25f11f4 100644 --- a/home/programs/tmux/default.nix +++ b/home/programs/tmux/default.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, config, ...}: +{ pkgs, lib, config, ... }: with lib; let cfg = config.tmux.enable; in { diff --git a/home/zsh/default.nix b/home/zsh/default.nix index 4d11eef..bf69896 100644 --- a/home/zsh/default.nix +++ b/home/zsh/default.nix @@ -1,4 +1,4 @@ -{ user, pkgs, ...}: { +{ user, pkgs, ... }: { home.packages = with pkgs; [ fd ]; programs.zsh = { enable = true; diff --git a/hosts/prismo/configuration.nix b/hosts/prismo/configuration.nix index 6bac5e7..1396047 100644 --- a/hosts/prismo/configuration.nix +++ b/hosts/prismo/configuration.nix @@ -1,20 +1,11 @@ { config, lib, pkgs, ... }: { - imports = - [ - ./hardware-configuration.nix - ]; - + imports = [ ./hardware-configuration.nix ]; # Bootloader stuff - boot.loader.systemd-boot = { - enable = true; - }; - boot.loader.efi = { - canTouchEfiVariables = true; - }; - + boot.loader.systemd-boot = { enable = true; }; + boot.loader.efi = { canTouchEfiVariables = true; }; # Networking stuff networking.hostName = "prismo"; # Define your hostname. @@ -37,17 +28,15 @@ XDG_DATA_HOME = "$HOME/.local/share"; XDG_STATE_HOME = "$HOME/.local/state"; XDG_BIN_HOME = "$HOME/.local/bin"; - PATH = [ - "${XDG_BIN_HOME}" - ]; - }; + PATH = [ "${XDG_BIN_HOME}" ]; + }; # Enable sudo security.sudo.enable = true; # Enable flakes nix.settings.experimental-features = [ "nix-command" "flakes" ]; - + nixpkgs.config.allowUnfree = true; # Install system-wide packages environment.systemPackages = with pkgs; [ diff --git a/hosts/prismo/default.nix b/hosts/prismo/default.nix index 11f5b71..f39e696 100644 --- a/hosts/prismo/default.nix +++ b/hosts/prismo/default.nix @@ -1,4 +1,4 @@ -{ inputs, self, pks, ...}: { +{ inputs, self, pks, ... }: { imports = [ ./configuration.nix ./hardware-configuration.nix diff --git a/hosts/prismo/hardware-configuration.nix b/hosts/prismo/hardware-configuration.nix index 952f24e..1910b75 100644 --- a/hosts/prismo/hardware-configuration.nix +++ b/hosts/prismo/hardware-configuration.nix @@ -4,30 +4,29 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.availableKernelModules = + [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/91a0dbc4-426f-4b7b-a49e-063d1d0e59fb"; - fsType = "xfs"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/91a0dbc4-426f-4b7b-a49e-063d1d0e59fb"; + fsType = "xfs"; + }; - boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919"; + boot.initrd.luks.devices."cryptroot".device = + "/dev/disk/by-uuid/f71b0ace-f38f-435f-a07a-007f9cfe4919"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/AF2D-FAD0"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/AF2D-FAD0"; + fsType = "vfat"; + }; swapDevices = - [ { device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; } - ]; + [{ device = "/dev/disk/by-uuid/67da36a8-69df-4541-88cd-cba7cbc40b4c"; }]; # 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 @@ -38,5 +37,6 @@ # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/system/default.nix b/system/default.nix index c7ebc4b..6dbaca0 100644 --- a/system/default.nix +++ b/system/default.nix @@ -1,8 +1 @@ -{ - imports = [ - ./podman.nix - ./fonts.nix - ./users.nix - ./services.nix - ]; -} +{ imports = [ ./podman.nix ./fonts.nix ./users.nix ./services.nix ]; } diff --git a/system/fonts.nix b/system/fonts.nix index 2e72d3d..cbf1e03 100644 --- a/system/fonts.nix +++ b/system/fonts.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { environment.systemPackages = with pkgs; [ twemoji-color-font ]; fonts.packages = with pkgs; [ fira-code diff --git a/system/podman.nix b/system/podman.nix index 36f3b52..aad967c 100644 --- a/system/podman.nix +++ b/system/podman.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: +{ pkgs, ... }: { virtualisation = { diff --git a/system/users.nix b/system/users.nix index 2cdce6a..e14519d 100644 --- a/system/users.nix +++ b/system/users.nix @@ -1,4 +1,4 @@ -{ pkgs, ...}: +{ pkgs, ... }: { programs.zsh.enable = true;