diff --git a/configuration.nix b/configuration.nix index f039ac3a..45f5ddb0 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,11 +1,5 @@ { lib, config, pkgs, ... }: { - imports = - [ - # Desktop Environments - ./desktops/common.nix - # ./desktops/gnome.nix - ./desktops/hyprland.nix - + imports = [ # Services ./services/openssh.nix ./services/promtail.nix diff --git a/flake.nix b/flake.nix index a5bec424..fcfeba34 100644 --- a/flake.nix +++ b/flake.nix @@ -5,9 +5,7 @@ inputs = { # NixOS packages - # stable-nixpkgs.url = "nixpkgs/nixos-23.05"; unstable-nixpkgs.url = "nixpkgs/nixos-unstable"; - # master-nixpkgs.url = "nixpkgs/master"; # Manage dotfiles in a home directory home-manager.url = "github:nix-community/home-manager/release-23.05"; @@ -21,7 +19,7 @@ nur.url = "github:nix-community/NUR"; # Hardware support - # nixos-hardware.url = "github:NixOS/nixos-hardware/master"; + nixos-hardware.url = "github:NixOS/nixos-hardware/master"; # Encrypted secrets in Nix configuration files # https://github.com/Mic92/sops-nix @@ -29,20 +27,17 @@ }; outputs = { - # stable-nixpkgs, unstable-nixpkgs, - # master-nixpkgs, home-manager, lanzaboote, nur, sops-nix, - # nixos-hardware, - # hyprland, + nixos-hardware, ... }@inputs: let # Variables - Remember to set these - hostname = "nixos-laptop"; # Should probably set this in a minimal configuration.nix + hostname = "nixos-laptop"; # Should probably set this in a minimal configuration.nix? system = "x86_64-linux"; pkgs = import unstable-nixpkgs { @@ -50,16 +45,6 @@ config = { allowUnfree = true; }; }; - # unstable = import unstable-nixpkgs { - # inherit system; - # config = { allowUnfree = true; }; - # }; - # - # master = import master-nixpkgs { - # inherit system; - # config = { allowUnfree = true; }; - # } - lib = unstable-nixpkgs.lib; in { # NixOS Configuration files: @@ -68,15 +53,12 @@ ${hostname} = lib.nixosSystem { inherit system; specialArgs = { - # inherit unstable; - # inherit master; inherit hostname; }; modules = [ # Configuration Imports - ./hosts/${hostname}/hardware-configuration.nix # Hardware Configuration - ./hosts/${hostname}/configuration.nix # Extra options for the host configuration ./configuration.nix # Common NixOS Configuration + ./hosts/${hostname}/nixos/configuration.nix # Hardware-specific Configuration # Flake Imports sops-nix.nixosModules.sops # Handle secrets diff --git a/hosts/nixos-laptop/home-manager/default.nix b/hosts/nixos-laptop/home-manager/default.nix new file mode 100644 index 00000000..d72d2cc0 --- /dev/null +++ b/hosts/nixos-laptop/home-manager/default.nix @@ -0,0 +1,7 @@ +{ config, pkgs, hostname, ... }: { + imports = [ + ./hyprland-conf.nix + ./waybar-conf.nix + # ./gnome-dconf.nix + ]; +} \ No newline at end of file diff --git a/hosts/nixos-laptop/configuration.nix b/hosts/nixos-laptop/nixos/configuration.nix similarity index 84% rename from hosts/nixos-laptop/configuration.nix rename to hosts/nixos-laptop/nixos/configuration.nix index b1c9dec9..6d79fc39 100644 --- a/hosts/nixos-laptop/configuration.nix +++ b/hosts/nixos-laptop/nixos/configuration.nix @@ -1,5 +1,22 @@ { lib, config, pkgs, ... }: { + imports = [ + # Hardware Configuration + ./hardware-configuration.nix + # ./networking.nix s called from the root repo/modules/networking.nix file + + # Desktop Environments + # Common configuration + ../../desktops/common.nix + # Hyprland + ../../desktops/hyprland.nix + # Gnome + # ../../desktops/gnome.nix + # KDE + # ../../desktops/kde.nix + + ]; + # Set your time zone. time.timeZone = "Asia/Tokyo"; @@ -19,9 +36,6 @@ # https://libreddit.kavin.rocks/r/NixOS/comments/x04dyv/optimus_help/ # boot.kernelParams = [ "nomodeset" ]; - # - # - # # nVidia information: # https://github.com/NixOS/nixpkgs/pull/211300 # https://github.com/NixOS/nixpkgs/pull/244060 @@ -77,7 +91,7 @@ # support both 32- and 64-bit applications wineWowPackages.stable # support 32-bit only - # wine + wine # support 64-bit only # (wine.override { wineBuild = "wine64"; }) # wine-staging (version with experimental features) diff --git a/hosts/nixos-laptop/hardware-configuration.nix b/hosts/nixos-laptop/nixos/hardware-configuration.nix similarity index 100% rename from hosts/nixos-laptop/hardware-configuration.nix rename to hosts/nixos-laptop/nixos/hardware-configuration.nix diff --git a/hosts/nixos-laptop/networking.nix b/hosts/nixos-laptop/nixos/networking.nix similarity index 100% rename from hosts/nixos-laptop/networking.nix rename to hosts/nixos-laptop/nixos/networking.nix diff --git a/users/albert/home.nix b/users/albert/home.nix index 018ba373..afca234d 100644 --- a/users/albert/home.nix +++ b/users/albert/home.nix @@ -2,9 +2,7 @@ home.stateVersion = "23.05"; imports = [ # Host specific Configs: - # ../../hosts/${hostname}/home-manager/gnome-dconf.nix - ../../hosts/${hostname}/home-manager/hyprland-conf.nix - ../../hosts/${hostname}/home-manager/waybar-conf.nix + ../../hosts/${hostname}/home-manager/default.nix # Universal Configs: ../../home-manager/git.nix