diff --git a/flake.lock b/flake.lock index aeb4e66..5509e46 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,44 @@ { "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1720188602, + "narHash": "sha256-lC3byBmhVZFzWl/dCic8+cKUEEAXAswWOYjq4paFmbo=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "e3582e5151498bc4d757e8361431ace8529e7bb7", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1717179513, - "narHash": "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "nixos", "repo": "nixpkgs", - "rev": "63dacb46bf939521bdc93981b4cbb7ecb58427a0", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { "owner": "nixos", - "ref": "24.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, "root": { "inputs": { + "home-manager": "home-manager", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index a1b5510..6953a80 100644 --- a/flake.nix +++ b/flake.nix @@ -2,14 +2,24 @@ description = "Nettika NixOS Configurations"; inputs = { - nixpkgs.url = "github:nixos/nixpkgs/24.05"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs }: { + outputs = { self, nixpkgs, home-manager } @inputs: { nixosConfigurations = { marauder = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ ./marauder.nix ]; + specialArgs = { + inherit inputs; + }; + modules = [ + ./hosts/marauder + home-manager.nixosModules.default + ]; }; }; }; diff --git a/hosts/marauder/default.nix b/hosts/marauder/default.nix new file mode 100644 index 0000000..b71d661 --- /dev/null +++ b/hosts/marauder/default.nix @@ -0,0 +1,19 @@ +{ config, lib, pkgs, inputs, ... }: +{ + imports = [ + ../../modules/nixos + ]; + + time.timeZone = "America/Los_Angeles"; + + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + home-manager.users.nettika = import ./home.nix; + + system.stateVersion = "24.05"; +} diff --git a/hosts/marauder/home.nix b/hosts/marauder/home.nix new file mode 100644 index 0000000..06866b8 --- /dev/null +++ b/hosts/marauder/home.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + home = { + username = "nettika"; + homeDirectory = "/home/nettika"; + stateVersion = "24.05"; + }; +} diff --git a/backup.nix b/modules/nixos/backup.nix similarity index 100% rename from backup.nix rename to modules/nixos/backup.nix diff --git a/boot.nix b/modules/nixos/boot.nix similarity index 100% rename from boot.nix rename to modules/nixos/boot.nix diff --git a/chat.nix b/modules/nixos/chat.nix similarity index 100% rename from chat.nix rename to modules/nixos/chat.nix diff --git a/coding.nix b/modules/nixos/coding.nix similarity index 100% rename from coding.nix rename to modules/nixos/coding.nix diff --git a/marauder.nix b/modules/nixos/default.nix similarity index 50% rename from marauder.nix rename to modules/nixos/default.nix index 5642ea3..a7c97fa 100644 --- a/marauder.nix +++ b/modules/nixos/default.nix @@ -1,33 +1,19 @@ -{ config, lib, pkgs, ... }: +{ ... }: { imports = [ - ./hardware.nix + ./backup.nix ./boot.nix - ./interface.nix - ./networking.nix - ./users.nix - ./web.nix ./chat.nix ./coding.nix ./gaming.nix - ./media.nix + ./hardware.nix ./illustration.nix - ./productivity.nix + ./interface.nix + ./media.nix ./modelling.nix - ./backup.nix + ./networking.nix + ./productivity.nix + ./users.nix + ./web.nix ]; - - time.timeZone = "America/Los_Angeles"; - - nixpkgs = { - hostPlatform = "x86_64-linux"; - config.allowUnfree = true; - }; - - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - - system.stateVersion = "24.05"; -} +} \ No newline at end of file diff --git a/gaming.nix b/modules/nixos/gaming.nix similarity index 100% rename from gaming.nix rename to modules/nixos/gaming.nix diff --git a/hardware.nix b/modules/nixos/hardware.nix similarity index 100% rename from hardware.nix rename to modules/nixos/hardware.nix diff --git a/illustration.nix b/modules/nixos/illustration.nix similarity index 100% rename from illustration.nix rename to modules/nixos/illustration.nix diff --git a/interface.nix b/modules/nixos/interface.nix similarity index 100% rename from interface.nix rename to modules/nixos/interface.nix diff --git a/media.nix b/modules/nixos/media.nix similarity index 100% rename from media.nix rename to modules/nixos/media.nix diff --git a/modelling.nix b/modules/nixos/modelling.nix similarity index 100% rename from modelling.nix rename to modules/nixos/modelling.nix diff --git a/networking.nix b/modules/nixos/networking.nix similarity index 100% rename from networking.nix rename to modules/nixos/networking.nix diff --git a/productivity.nix b/modules/nixos/productivity.nix similarity index 100% rename from productivity.nix rename to modules/nixos/productivity.nix diff --git a/users.nix b/modules/nixos/users.nix similarity index 100% rename from users.nix rename to modules/nixos/users.nix diff --git a/vscode-extensions.nix b/modules/nixos/vscode-extensions.nix similarity index 100% rename from vscode-extensions.nix rename to modules/nixos/vscode-extensions.nix diff --git a/web.nix b/modules/nixos/web.nix similarity index 100% rename from web.nix rename to modules/nixos/web.nix