refactor flake.nix

This commit is contained in:
notohh 2022-12-19 17:55:54 -05:00
parent 56b2a00b0a
commit 6b1c70bffd
5 changed files with 51 additions and 63 deletions

View file

@ -134,6 +134,7 @@
drawio drawio
imv imv
zathura zathura
playerctl
opentabletdriver opentabletdriver
# entertainment # entertainment
@ -144,11 +145,14 @@
steam steam
wine wine
lutris lutris
gamemode
bottles bottles
osu-lazer osu-lazer
prismlauncher
# theming # theming
catppuccin-gtk catppuccin-gtk
catppuccin-cursors
# fun stuff # fun stuff
cbonsai cbonsai
@ -171,6 +175,7 @@
cargo cargo
jre jre
jdk jdk
jdk17
jq jq
nodejs nodejs
polkit_gnome polkit_gnome

View file

@ -24,9 +24,7 @@
"hyprland": { "hyprland": {
"inputs": { "inputs": {
"hyprland-protocols": "hyprland-protocols", "hyprland-protocols": "hyprland-protocols",
"nixpkgs": [ "nixpkgs": "nixpkgs",
"nixpkgs"
],
"wlroots": "wlroots", "wlroots": "wlroots",
"xdph": "xdph" "xdph": "xdph"
}, },
@ -77,6 +75,22 @@
} }
}, },
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1671359686,
"narHash": "sha256-3MpC6yZo+Xn9cPordGz2/ii6IJpP2n8LE8e/ebUXLrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "04f574a1c0fde90b51bf68198e2297ca4e7cccf4",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1671108576, "lastModified": 1671108576,
"narHash": "sha256-6ggOL6KoaELNA1562tnPjtAnQ9SwsKRTgeuaXvPzCwI=", "narHash": "sha256-6ggOL6KoaELNA1562tnPjtAnQ9SwsKRTgeuaXvPzCwI=",
@ -96,7 +110,7 @@
"inputs": { "inputs": {
"home-manager": "home-manager", "home-manager": "home-manager",
"hyprland": "hyprland", "hyprland": "hyprland",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
} }
}, },
"utils": { "utils": {

View file

@ -1,48 +1,37 @@
{ {
description = "notohh's flake";
inputs = { inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Call hyprland
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home manager
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
};
}; hyprland.url = "github:hyprwm/Hyprland";
}; };
outputs = { self, nixpkgs, home-manager, hyprland, ... }:
outputs = { nixpkgs, home-manager, self, hyprland, ... }@inputs: { let
system = "x86_64-linux";
nixosConfigurations = { pkgs = import nixpkgs {
nixos = nixpkgs.lib.nixosSystem { inherit system;
specialArgs = { inherit inputs; flake-self = self; }; config.allowUnfree = true;
modules = [ ./configuration.nix
hyprland.nixosModules.default
{ programs.hyprland.enable = true; }
];
}; };
};
homeConfigurations = { lib = nixpkgs.lib;
"notoh@nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux;
extraSpecialArgs = { inherit inputs; };
modules = [./home.nix]; in {
nixosConfigurations = {
nixos = lib.nixosSystem {
inherit system;
modules = [
./configuration.nix
hyprland.nixosModules.default
{programs.hyprland.enable = true;}
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.notoh = import ./modules/home/home.nix;
}
];
}; };
}; };
}; };
} }

View file

@ -7,26 +7,6 @@
]; ];
nixpkgs = {
overlays = [
];
config = {
allowUnfree = true;
allowUnfreePredicate = (_: true);
};
};
home = {
username = "notoh";
homeDirectory = "/home/notoh/";
};
programs.home-manager.enable = true; programs.home-manager.enable = true;
programs.git.enable = true; programs.git.enable = true;