devos/nix: add nix module
This commit is contained in:
parent
c9835984c0
commit
2dd4d9860f
3 changed files with 18 additions and 19 deletions
|
@ -1,5 +1,8 @@
|
|||
{ config, lib, ... }: {
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
|
||||
extraSpecialArgs = {
|
||||
main = config;
|
||||
};
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{ channel, inputs, ... }: {
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${channel.input}"
|
||||
"nixos-config=${../../lib/compat/nixos}"
|
||||
"home-manager=${inputs.home}"
|
||||
];
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
{ config, pkgs, self, lib, ... }: {
|
||||
|
||||
{ channel, inputs, pkgs, lib, ... }:
|
||||
with lib;
|
||||
{
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
|
||||
|
@ -23,13 +24,24 @@
|
|||
keep-derivations = true
|
||||
fallback = true
|
||||
'';
|
||||
|
||||
nixPath = [
|
||||
"nixpkgs=${channel.input}"
|
||||
"nixos-config=${../../lib/compat/nixos}"
|
||||
"home-manager=${inputs.home}"
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ];
|
||||
|
||||
shellAliases =
|
||||
let ifSudo = lib.mkIf config.security.sudo.enable;
|
||||
let ifSudo = mkIf config.security.sudo.enable;
|
||||
in
|
||||
{
|
||||
# nix
|
||||
|
@ -50,13 +62,4 @@
|
|||
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue