From 8c5d99b2315eebe367aea36223d66f48b0c3912c Mon Sep 17 00:00:00 2001 From: Sojus07 Date: Thu, 7 Aug 2025 08:15:59 +0200 Subject: [PATCH] kekl --- flake.lock | 21 -------- flake.nix | 19 ++++++- hosts/meteor/configuration.nix | 61 +++++++++++++++++++++++ hosts/meteor/hardware-configuration.nix | 39 +++++++++++++++ modules/default.nix | 11 ++-- modules/{system => }/firefox.nix | 0 modules/git.nix | 12 +++++ modules/{home/alacritty.nix => home.nix} | 14 ++++++ modules/home/git.nix | 10 ---- modules/home/home.nix | 19 ------- modules/{system => }/pkgs.nix | 0 modules/{home => }/raw/wp/eye.png | Bin modules/{home => }/raw/wp/galaxy.png | Bin modules/{system => }/services.nix | 0 modules/{home => }/tmux.nix | 2 - modules/{system => }/users.nix | 0 16 files changed, 151 insertions(+), 57 deletions(-) create mode 100644 hosts/meteor/configuration.nix create mode 100644 hosts/meteor/hardware-configuration.nix rename modules/{system => }/firefox.nix (100%) create mode 100644 modules/git.nix rename modules/{home/alacritty.nix => home.nix} (79%) delete mode 100644 modules/home/git.nix delete mode 100644 modules/home/home.nix rename modules/{system => }/pkgs.nix (100%) rename modules/{home => }/raw/wp/eye.png (100%) rename modules/{home => }/raw/wp/galaxy.png (100%) rename modules/{system => }/services.nix (100%) rename modules/{home => }/tmux.nix (96%) rename modules/{system => }/users.nix (100%) diff --git a/flake.lock b/flake.lock index 97fad52..93133c2 100644 --- a/flake.lock +++ b/flake.lock @@ -56,26 +56,6 @@ "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1754527677, - "narHash": "sha256-qAzCtmKkMz40xFgP9KN+TCKjVieK4u04EWwl2KvVk0E=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "475d35797d9537354d825260cf583114537affc2", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, "mnw": { "locked": { "lastModified": 1748710831, @@ -233,7 +213,6 @@ "root": { "inputs": { "dwm-nix": "dwm-nix", - "home-manager": "home-manager", "nix-sdr": "nix-sdr", "nixpkgs": "nixpkgs_3", "nvf-config": "nvf-config" diff --git a/flake.nix b/flake.nix index b35c28c..a0a1029 100644 --- a/flake.nix +++ b/flake.nix @@ -31,7 +31,24 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - users.fabian = import ./hosts/default/home/home.nix; + users.fabian = import ./modules/home.nix; + }; + } + ]; + }; + nixosConfigurations.meteor = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/meteor/configuration.nix + home-manager.nixosModules.home-manager + nix-sdr.nixosModules.default + dwm-nix.nixosModules.default + nvf-config.nixosModules.default + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.fabian = import ./modules/home.nix; }; } ]; diff --git a/hosts/meteor/configuration.nix b/hosts/meteor/configuration.nix new file mode 100644 index 0000000..f86b0a3 --- /dev/null +++ b/hosts/meteor/configuration.nix @@ -0,0 +1,61 @@ +{ + config, + lib, + pkgs, + ... +}: +{ + networking.hostName = "meteor"; + + imports = [ + ./hardware-configuration.nix + ../../modules/default.nix + ]; + + boot = { + loader = { + systemd-boot = { + enable = true; + }; + }; + supportedFilesystems = [ "ntfs" ]; + }; + + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "freeimage-unstable-2021-11-01" + ]; + }; + }; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + systemd = { + services = { + modem-manager.enable = false; + mpd.environment = { + XDG_RUNTIME_DIR = "/run/user/1000"; + }; + }; + }; + + time.timeZone = "Europe/Berlin"; + console = { + font = "Lat2-Terminus16"; + useXkbConfig = true; + }; + + programs = { + nix-ld.enable = true; + dconf = { + enable = true; + }; + }; + + system.stateVersion = "25.05"; + +} diff --git a/hosts/meteor/hardware-configuration.nix b/hosts/meteor/hardware-configuration.nix new file mode 100644 index 0000000..487a692 --- /dev/null +++ b/hosts/meteor/hardware-configuration.nix @@ -0,0 +1,39 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/04b38f31-ff39-4bd9-9958-1ab012bdbd37"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/EA73-5CEC"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/modules/default.nix b/modules/default.nix index 4464d06..5837e2c 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,10 +1,13 @@ { config, pkgs, ... }: { imports = [ - ./system/pkgs.nix - ./system/services.nix - ./system/users.nix - ./system/firefox.nix + ./pkgs.nix + ./services.nix + ./users.nix + ./firefox.nix + ./git.nix + ./tmux.nix + #./alacritty.nix ]; hardware = { diff --git a/modules/system/firefox.nix b/modules/firefox.nix similarity index 100% rename from modules/system/firefox.nix rename to modules/firefox.nix diff --git a/modules/git.nix b/modules/git.nix new file mode 100644 index 0000000..f12b2ee --- /dev/null +++ b/modules/git.nix @@ -0,0 +1,12 @@ +{ config, ... }: +{ + programs.git = { + enable = true; + config = { + user.name = "Sojus07"; + user.email = "Sojus07@0xcc01.de"; + init.defaultBranch = "master"; + core.editor = "nvim"; + }; + }; +} diff --git a/modules/home/alacritty.nix b/modules/home.nix similarity index 79% rename from modules/home/alacritty.nix rename to modules/home.nix index 248fd5f..d89e45e 100644 --- a/modules/home/alacritty.nix +++ b/modules/home.nix @@ -1,5 +1,19 @@ { config, pkgs, ... }: { + imports = [ + ./git.nix + ./tmux.nix + ./alacritty.nix + ]; + home = { + enableNixpkgsReleaseCheck = false; + stateVersion = "24.11"; + file = { + ".wp/galaxy.png".source = ./raw/wp/galaxy.png; + ".wp/eye.png".source = ./raw/wp/eye.png; + }; + }; + programs.alacritty = { enable = true; settings = { diff --git a/modules/home/git.nix b/modules/home/git.nix deleted file mode 100644 index 70b11f5..0000000 --- a/modules/home/git.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, pkgs, ... }: -{ - programs = { - git = { - enable = true; - userName = "Sojus07"; - userEmail = "Sojus07"; - }; - }; -} diff --git a/modules/home/home.nix b/modules/home/home.nix deleted file mode 100644 index a06481d..0000000 --- a/modules/home/home.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - config, - pkgs, - ... -}: { - imports = [ - ./git.nix - ./tmux.nix - ./alacritty.nix - ]; - home = { - enableNixpkgsReleaseCheck = false; - stateVersion = "24.11"; - file = { - ".wp/galaxy.png".source = ./raw/wp/galaxy.png; - ".wp/eye.png".source = ./raw/wp/eye.png; - }; - }; -} diff --git a/modules/system/pkgs.nix b/modules/pkgs.nix similarity index 100% rename from modules/system/pkgs.nix rename to modules/pkgs.nix diff --git a/modules/home/raw/wp/eye.png b/modules/raw/wp/eye.png similarity index 100% rename from modules/home/raw/wp/eye.png rename to modules/raw/wp/eye.png diff --git a/modules/home/raw/wp/galaxy.png b/modules/raw/wp/galaxy.png similarity index 100% rename from modules/home/raw/wp/galaxy.png rename to modules/raw/wp/galaxy.png diff --git a/modules/system/services.nix b/modules/services.nix similarity index 100% rename from modules/system/services.nix rename to modules/services.nix diff --git a/modules/home/tmux.nix b/modules/tmux.nix similarity index 96% rename from modules/home/tmux.nix rename to modules/tmux.nix index c352156..9ab1a95 100644 --- a/modules/home/tmux.nix +++ b/modules/tmux.nix @@ -3,8 +3,6 @@ programs = { tmux = { enable = true; - disableConfirmationPrompt = true; - mouse = true; keyMode = "vi"; extraConfig = '' unbind C-b diff --git a/modules/system/users.nix b/modules/users.nix similarity index 100% rename from modules/system/users.nix rename to modules/users.nix