diff options
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..3c4415a --- /dev/null +++ b/flake.nix @@ -0,0 +1,94 @@ +{ + description = "Mora Unie Youer's NixOS configuration"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nurpkgs.url = "github:nix-community/NUR"; + nyxpkgs.url = "github:chaotic-cx/nyx"; + home-manager.url = "github:nix-community/home-manager"; + + # Secure Boot bootloader + lanzaboote.url = "github:nix-community/lanzaboote"; + + # Setup NixOS sound subsystem better + musnix.url = "github:musnix/musnix"; + + # Applications + fjordlauncher.url = "github:unmojang/FjordLauncher"; + wezterm.url = "github:wezterm/wezterm?dir=nix"; + }; + + nixConfig = { + extra-substituters = [ + "https://nix-community.cachix.org/" + "https://chaotic-nyx.cachix.org/" + "https://unmojang.cachix.org" + ]; + + extra-trusted-public-keys = [ + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8=" + "unmojang.cachix.org-1:OfHnbBNduZ6Smx9oNbLFbYyvOWSoxb2uPcnXPj4EDQY=" + ]; + }; + + outputs = { + self, + + nixpkgs, + nurpkgs, + nyxpkgs, + home-manager, + + lanzaboote, + + musnix, + + fjordlauncher, + wezterm, + + ... + } @ inputs: + let + system = "x86_64-linux"; + in { + nixosConfigurations.sapphire = nixpkgs.lib.nixosSystem rec { + inherit system; + specialArgs = { inherit inputs; }; + + modules = [ + nurpkgs.modules.nixos.default + nyxpkgs.nixosModules.default + home-manager.nixosModules.home-manager + + lanzaboote.nixosModules.lanzaboote + + musnix.nixosModules.default + + { + nixpkgs.overlays = [ + fjordlauncher.overlays.default + ]; + } + + # System Configuration + ./system-sapphire.nix + + # User Configurations + # mora@sapphire + ({ pkgs, ... }: { + users.users.mora = { + isNormalUser = true; + extraGroups = [ "audio" "docker" "libvirtd" "lp" "scanner" "video" "wireshark" "wheel" ]; + shell = pkgs.nushell; + }; + + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = specialArgs; + home-manager.users.mora = import ./user-mora.nix; + }) + ]; + }; + }; +} |