diff --git a/configuration-server.nix b/configuration-server.nix index c2388ba..e7b6d16 100644 --- a/configuration-server.nix +++ b/configuration-server.nix @@ -7,10 +7,10 @@ { imports = [ # Include the results of the hardware scan. - ./xps13-hardware-configuration.nix + ./hardware-configuration.nix + ./server-partitioning.nix ./modules/shares.nix ./modules/sops.nix - ./modules/laptop.nix ]; nix.settings.experimental-features = [ "nix-command" "flakes" ]; # Bootloader. @@ -19,15 +19,13 @@ initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - kernelModules = [ "fuse" "coretemp" "cifs" "kvm-intel" ]; - initrd.kernelModules = [ "ath10k_pci" ]; + kernelModules = [ "fuse" "cifs" ]; + initrd.kernelModules = [ ]; loader.systemd-boot.enable = true; loader.efi.canTouchEfiVariables = true; - supportedFilesystems = [ "vfat" "ext4" "cifs" ]; + supportedFilesystems = [ "vfat" "btrfs" "cifs" ]; extraModulePackages = [ ]; extraModprobeConfig = '' - options ath10k_pcs irq_mode=1 - options ath10k_core rawmode=1 ''; }; # Set your time zone. @@ -64,44 +62,17 @@ # Enable CUPS to print documents. services.printing.enable = true; - programs.uwsm.enable = true; - programs.hyprland.withUWSM = true; # Enable sound with pipewire. services.pulseaudio.enable = false; security.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - - # use the example session manager (no others are packaged yet so this is enabled by default, - # no need to redefine it in your config for now) - #media-session.enable = true; - }; # Enable touchpad support (enabled default in most desktopManager). - services.libinput.enable = true; fonts = { enableDefaultPackages = true; fontDir.enable = true; packages = with pkgs; [ - # nerd-fonts.fira-code - # nerd-fonts.space-mono - # nerd-fonts.sauce-code-pro - # nerd-fonts.monofur - # nerd-fonts.noto - # nerd-fonts.fira-mono - noto-fonts - noto-fonts-cjk-sans - noto-fonts-emoji - font-awesome - material-design-icons - noto-fonts-emoji - ]++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); - + ]; }; # Define a user account. Don't forget to set a password with ‘passwd’. @@ -116,11 +87,6 @@ }; # Enable automatic login for the user. - services.displayManager.autoLogin.enable = true; - services.displayManager.autoLogin.user = "th3r00t"; - - programs.firefox.enable = true; - programs.hyprland.enable = true; nixpkgs.config.allowUnfree = true; diff --git a/flake.nix b/flake.nix index d7753d9..33ba709 100644 --- a/flake.nix +++ b/flake.nix @@ -5,19 +5,16 @@ nixpkgs.url = "github:NixOs/nixpkgs/nixos-25.05"; home-manager = { url = "github:nix-community/home-manager/release-25.05"; - # The `follows` keyword in inputs is used for inheritance. - # Here, `inputs.nixpkgs` of home-manager is kept consistent with - # the `inputs.nixpkgs` of the current flake, - # to avoid problems caused by different versions of nixpkgs. inputs.nixpkgs.follows = "nixpkgs"; }; nix-index-database.url = "github:nix-community/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + disko.url = "github:nix-community/disko"; sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, home-manager, nix-index-database, sops-nix, ... }@inputs: + outputs = { self, nixpkgs, home-manager, nix-index-database, sops-nix, disko, ... }@inputs: let overlays = [ inputs.neovim-nightly-overlay.overlays.default @@ -38,7 +35,7 @@ modules = [ { nixpkgs.overlays = overlays; } sops-nix.nixosModules.sops - ./configuration.nix + ./xps13-hardware-configuration.nix.nix home-manager.nixosModules.home-manager { # home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; @@ -59,8 +56,10 @@ specialArgs = { inherit overlays; }; modules = [ { nixpkgs.overlays = overlays; } + disko.nixosModules.disko sops-nix.nixosModules.sops - ./configuration.nix + ./hardware-configuration.nix + ./configuration-server.nix home-manager.nixosModules.home-manager { # home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..ac2c0ba --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,24 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + # 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.ens18.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} diff --git a/home/config/nvim/init.lua b/home/config/nvim/init.lua index b6522ed..297c98b 100644 --- a/home/config/nvim/init.lua +++ b/home/config/nvim/init.lua @@ -33,7 +33,7 @@ end local function want_truecolor() if is_linux_console() then return false end return vim.fn.has("termguicolors") == 1 - or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil) + or ((vim.env.COLORTERM or ""):lower():find("truecolor") ~= nil) end local function set_colorscheme() diff --git a/modules/hyprland.nix b/modules/hyprland.nix index 71d2735..6b119ea 100644 --- a/modules/hyprland.nix +++ b/modules/hyprland.nix @@ -172,8 +172,8 @@ ipc = "on"; splash = false; splash_offset = 2.0; - preload = [ "~/.nixos/home/Wallpapers/tokyonight1.jpg" "~/.nixos/home/Wallpapers/nord1.jpg" ]; - wallpaper = [ "eDP-1,~/.nixos/home/Wallpapers/nord1.jpg" ]; + preload = [ "/etc/nixos/home/Wallpapers/tokyonight1.jpg" "/etc/nixos/home/Wallpapers/nord1.jpg" ]; + wallpaper = [ "eDP-1,/etc/nixos/home/Wallpapers/nord1.jpg" ]; }; }; }