diff --git a/README.md b/README.md index 3176c0c..307e889 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # Nixos-config My flake based nixos configuration. To use this, just rebuild your system using `sudo nixos-rebuild switch --flake .` while in the project directory. + +## TODO: +- make special separate dir for dotfiles. Would makes it easier to share them specifically diff --git a/flake.lock b/flake.lock index d254706..a86e949 100644 --- a/flake.lock +++ b/flake.lock @@ -100,6 +100,22 @@ "type": "github" } }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1643087856, + "narHash": "sha256-EreC7gP/T566PDRZjqNoTvByTyvABEpJpWFtyNUDS0Y=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "8bd55a6a5ab05942af769c2aa2494044bff7f625", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "agnoster": "agnoster", @@ -108,6 +124,7 @@ "home-manager": "home-manager", "nixos-unstable": "nixos-unstable", "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "z": "z" } }, diff --git a/flake.nix b/flake.nix index 10ad44c..5886056 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/release-21.11"; nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; @@ -21,35 +22,16 @@ agnoster.flake = false; }; - outputs = { self, nixpkgs, home-manager, nixos-unstable, easy-purescript-nix - , easy-dhall-nix, z, agnoster, ... }: { + outputs = inputs@{ self, nixpkgs, home-manager, ... }: + let provideInputs = import ./modules/overlays/flakes.nix inputs; + in { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ home-manager.nixosModules.home-manager + provideInputs ./hardware/laptop.nix ./configuration.nix - - # Make inputs available inside the config - ({ pkgs, ... }: { - nixpkgs.overlays = [ - (self: super: { - easy-purescript-nix = - import easy-purescript-nix { inherit pkgs; }; - easy-dhall-nix = import easy-dhall-nix { inherit pkgs; }; - - z = { - src = z; - name = "z"; - }; - - agnoster = { - src = agnoster; - name = "agnoster"; - }; - }) - ]; - }) ]; }; }; diff --git a/modules/applications/misc.nix b/modules/applications/misc.nix index f365f76..3ea9e5c 100644 --- a/modules/applications/misc.nix +++ b/modules/applications/misc.nix @@ -24,7 +24,7 @@ gnumake # unison-ucm xorg.libX11 - texlive.combined.scheme-full + texlive.combined.scheme-full # latex stuff okular zathura cmake @@ -51,6 +51,7 @@ firefox # other stuff + obsidian # knowedge base # milkytracker # music tracker thingy spectacle # take screenshots vlc # video player @@ -70,6 +71,7 @@ # fceux # games + tetrio-desktop # mindustry ]; } diff --git a/modules/dev/javascript.nix b/modules/dev/javascript.nix index bb8aa5c..2b766de 100644 --- a/modules/dev/javascript.nix +++ b/modules/dev/javascript.nix @@ -1,12 +1,10 @@ { pkgs, ... }: let - node = pkgs.nodejs-12_x; + node = pkgs.nodejs-17_x; yarn = pkgs.yarn.override { nodejs = node; }; in { home-manager.users.adrielus.home.packages = with pkgs; - with nodePackages; - # with fromNpm; - [ + with nodePackages; [ node deno node2nix diff --git a/modules/overlays/default.nix b/modules/overlays/default.nix index afeab98..bae92c0 100644 --- a/modules/overlays/default.nix +++ b/modules/overlays/default.nix @@ -1,5 +1,4 @@ -{ ... }: -{ - # nixpkgs.overlays = [ import ./discord ]; +{ ... }: { + nixpkgs.overlays = [ import ./discord ]; # imports = [ ./legacy.nix ]; } diff --git a/modules/overlays/flakes.nix b/modules/overlays/flakes.nix new file mode 100644 index 0000000..365245c --- /dev/null +++ b/modules/overlays/flakes.nix @@ -0,0 +1,26 @@ +{ home-manager, nixpkgs-unstable, nixos-unstable, easy-purescript-nix +, easy-dhall-nix, z, agnoster, ... }: +({ pkgs, ... }: { + nixpkgs.overlays = [ + (self: super: { + # inherit nixos-unstable; + unstable = import nixpkgs-unstable { + config.allowUnfree = true; + config.allowBroken = true; + }; + + easy-purescript-nix = import easy-purescript-nix { inherit pkgs; }; + easy-dhall-nix = import easy-dhall-nix { inherit pkgs; }; + + z = { + src = z; + name = "z"; + }; + + agnoster = { + src = agnoster; + name = "agnoster"; + }; + }) + ]; +})