diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-18 13:12:33 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2025-10-18 13:12:33 +0530 |
| commit | 9ec569a1b34f17d32894d51614cff84d8952d868 (patch) | |
| tree | d5f3c27bd4654d90a69f77a569ef1d67b76861dc /flake.nix | |
| parent | 1638c8711b4a56347d0c1a4da4d949d71978915c (diff) | |
setup flake!!
now editing username is easier than ever! and no longer nix-channels.txt
with the long script installation
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..d081fe6 --- /dev/null +++ b/flake.nix @@ -0,0 +1,44 @@ +{ + description = "System"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-25.05"; + home-manager = { + url = "github:nix-community/home-manager/release-25.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs: + let + system = "x86_64-linux"; + username = "aargh"; + hostname = "pegasus"; + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfree = true; + }; + in { + nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs username hostname unstable; }; + + modules = [ + ./nixos/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit username unstable; }; + home-manager.backupFileExtension = "hm-backup"; + home-manager.users.${username} = import ./home-manager/home.nix; + } + ]; + }; + }; +} |
