diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..faa925e --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1753939845, + "narHash": "sha256-K2ViRJfdVGE8tpJejs8Qpvvejks1+A4GQej/lBk5y7I=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "94def634a20494ee057c76998843c015909d6311", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..4589a22 --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "A very basic flake"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + }; + + outputs = { self, nixpkgs }: + let + system = "x86_64-linux"; + + pkgs = import nixpkgs { + inherit system; + config = { + allowUnfree = true; + }; + }; + in + { + + nixosConfigurations = { + lazyworkhorse = nixpkgs.lib.nixosSystem { + specialArgs = { inherit system; }; + modules = [ + ./hosts/lazyworkhorse/configuration.nix + ]; + }; + }; + }; +} diff --git a/hosts/lazyworkhorse/configuration.nix b/hosts/lazyworkhorse/configuration.nix index 550541e..10c1ef5 100644 --- a/hosts/lazyworkhorse/configuration.nix +++ b/hosts/lazyworkhorse/configuration.nix @@ -8,9 +8,12 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix - ./modules/graphical-desktop.nix + ./nixosModules/default.nix ]; + # Flakesss + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Use the systemd-boot EFI boot loader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = false; @@ -35,16 +38,6 @@ useXkbConfig = true; # use xkb.options in tty. }; - # Enable the X11 windowing system. - services.xserver.enable = true; - - # Hyprland - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - programs.waybar.enable = true; - # Configure keymap in X11 # services.xserver.xkb.layout = "us"; # services.xserver.xkb.options = "eurosign:e,caps:escape"; diff --git a/nixosModules/bundles/graphical-desktop.nix b/nixosModules/bundles/graphical-desktop.nix index 9b2a456..1382e77 100644 --- a/nixosModules/bundles/graphical-desktop.nix +++ b/nixosModules/bundles/graphical-desktop.nix @@ -6,6 +6,15 @@ }; config = lib.mkIf config.grapfical-desktop.enable { - option1.enable = true; + + # Enable the X11 windowing system. + services.xserver.enable = true; + + # Hyprland + programs.hyprland = { + enable = true; + xwayland.enable = true; + }; + programs.waybar.enable = true; } } diff --git a/nixosModules/default.nix b/nixosModules/default.nix new file mode 100644 index 0000000..c0af48c --- /dev/null +++ b/nixosModules/default.nix @@ -0,0 +1,13 @@ +{ pkgs, lib, config, ... }: { + imports = + [ + ./bundles/graphical-desktop.nix + # ./bundles/gaming.nix + # ./bundles/docker-server.nix + # ./bundles/terminal.nix + # ./bundles/csharp-devel.nix + # ./bundles/sound-music.nix + # ./bundles/local-ai.nix + # ./bundles/editors.nix + ]; +}