Add few packages, use overlays, add separate inputs

This commit is contained in:
Lgmrszd 2023-11-24 15:22:22 +03:00
parent 426cbf395d
commit 6d78a9ac8d
No known key found for this signature in database
GPG key ID: 9396B8BA6FBB14DE
4 changed files with 81 additions and 20 deletions

View file

@ -150,6 +150,7 @@
# VirtualBox # VirtualBox
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
virtualisation.virtualbox.host.enable = true; virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.package = pkgs.locked.virtualbox;
virtualisation.virtualbox.host.enableExtensionPack = true; virtualisation.virtualbox.host.enableExtensionPack = true;
users.extraGroups.vboxusers.members = [ "lgm" ]; users.extraGroups.vboxusers.members = [ "lgm" ];

View file

@ -92,6 +92,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-fresh": {
"locked": {
"lastModified": 1699781429,
"narHash": "sha256-UYefjidASiLORAjIvVsUHG6WBtRhM67kTjEY4XfZOFs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e44462d6021bfe23dfb24b775cc7c390844f773d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"dir": "lib", "dir": "lib",
@ -110,6 +126,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-locked": {
"locked": {
"lastModified": 1699781429,
"narHash": "sha256-UYefjidASiLORAjIvVsUHG6WBtRhM67kTjEY4XfZOFs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e44462d6021bfe23dfb24b775cc7c390844f773d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1699596684, "lastModified": 1699596684,
@ -131,6 +163,8 @@
"home-manager": "home-manager", "home-manager": "home-manager",
"nh": "nh", "nh": "nh",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-fresh": "nixpkgs-fresh",
"nixpkgs-locked": "nixpkgs-locked",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
} }
} }

View file

@ -7,20 +7,19 @@
# which represents the GitHub repository URL + branch/commit-id/tag. # which represents the GitHub repository URL + branch/commit-id/tag.
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# separate inputs to lock some packages
# locked - stuff to be updated very unfrequently
# fresh - mostly desktop apps
nixpkgs-locked.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-fresh.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05"; nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.05";
# nix-index-database.url = "github:nix-community/nix-index-database"; # nix-index-database.url = "github:nix-community/nix-index-database";
# nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; # nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
# nur = { # nur = {
# url = "github:nix-community/NUR"; # url = "github:nix-community/NUR";
# }; # };
# nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
# home-manager, used for managing user configuration
home-manager = { home-manager = {
url = "github:nix-community/home-manager/master"; url = "github:nix-community/home-manager/master";
# The `follows` keyword in inputs is used for inheritance.
# Here, `inputs.nixpkgs` of home-manager is kept consistent with
# the `inputs.nixpkgs` of the current flake,
# to avoid problems caused by different versions of nixpkgs.
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
nh = { nh = {
@ -31,22 +30,48 @@
outputs = inputs@{ outputs = inputs@{
nixpkgs, nixpkgs,
nixpkgs-locked,
nixpkgs-fresh,
nixpkgs-stable, nixpkgs-stable,
# nix-index-database, # nix-index-database,
# nur, # nur,
home-manager, home-manager,
... ...
}: { }:
let
system = "x86_64-linux";
overlay-locked = final: prev: {
locked = import nixpkgs-locked {
inherit system;
config.allowUnfree = true;
};
};
overlay-fresh = final: prev: {
fresh = import nixpkgs-fresh {
inherit system;
config.allowUnfree = true;
};
};
overlay-stable = final: prev: {
stable = import nixpkgs-stable {
inherit system;
config.allowUnfree = true;
};
};
my-overlays = [
overlay-locked
overlay-fresh
overlay-stable
];
in
{
nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec { nixosConfigurations.lgm-nixos = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system;
specialArgs = { specialArgs = {
pkgs-stable = import nixpkgs-stable {
system = system;
config.allowUnfree = true;
};
secrets = import ./secrets {}; secrets = import ./secrets {};
}; };
modules = [ modules = [
({ config, pkgs, ... }: { nixpkgs.overlays = my-overlays; })
# nur.nixosModules.nur # nur.nixosModules.nur
inputs.nh.nixosModules.default inputs.nh.nixosModules.default
./configuration.nix ./configuration.nix
@ -63,7 +88,6 @@
home-manager.users.lgm = import ./home.nix; home-manager.users.lgm = import ./home.nix;
home-manager.extraSpecialArgs = with specialArgs; { home-manager.extraSpecialArgs = with specialArgs; {
inherit pkgs-stable;
inherit secrets; inherit secrets;
}; };
} }

View file

@ -1,4 +1,4 @@
{ config, osConfig, secrets, pkgs, pkgs-stable, ... }: { config, osConfig, secrets, pkgs, ... }:
{ {
home.username = "lgm"; home.username = "lgm";
@ -12,7 +12,6 @@
((import ./scripts/rebuild.nix) {inherit pkgs;}) ((import ./scripts/rebuild.nix) {inherit pkgs;})
wineWowPackages.waylandFull wineWowPackages.waylandFull
openconnect openconnect
ani-cli
# file editing # file editing
onlyoffice-bin onlyoffice-bin
# theming # theming
@ -41,7 +40,7 @@
protonvpn-gui protonvpn-gui
protonvpn-cli protonvpn-cli
# security # security
keepassxc fresh.keepassxc
onlykey onlykey
onlykey-agent onlykey-agent
libsForQt5.plasma-vault libsForQt5.plasma-vault
@ -52,12 +51,11 @@
libsForQt5.kgpg libsForQt5.kgpg
# messaging # messaging
(discord.override { (fresh.discord.override {
withOpenASAR = true; withOpenASAR = true;
withVencord = true;
}) })
vesktop fresh.vesktop
telegram-desktop fresh.telegram-desktop
libsForQt5.tokodon libsForQt5.tokodon
libsForQt5.neochat libsForQt5.neochat
# pkgs-unstable.cinny-desktop # pkgs-unstable.cinny-desktop
@ -75,6 +73,7 @@
lutris lutris
# dev # dev
jetbrains.idea-community jetbrains.idea-community
packwiz
# vscodium # see programs.vscode # vscodium # see programs.vscode
rnix-lsp rnix-lsp
#nnn # terminal file manager #nnn # terminal file manager
@ -86,6 +85,9 @@
# p7zip # p7zip
# utils # utils
ani-cli
yt-dlp
mosh
appimage-run appimage-run
kate kate
ncdu ncdu