more explicit unfree handling

This commit is contained in:
Cyryl Płotnicki 2022-03-02 12:45:32 +00:00
parent 8b0b8bca10
commit 96d988c130
8 changed files with 17 additions and 29 deletions

View file

@ -1,6 +1,6 @@
{
description = "NixOS configuration with flakes";
outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable, nixpkgs-stable, nixos-hardware, nur, agenix, neuron, sops, discord } @ inputs:
outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable, nixpkgs-stable, nixos-hardware, nur, agenix, neuron, sops } @ inputs:
let
mkServer = pkgs: system: hostname:
@ -42,8 +42,7 @@
];
specialArgs = {
inherit inputs system;
unstableAndUnfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; };
discord = import discord { inherit system; config = { allowUnfree = true; }; };
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; };
};
};
in
@ -154,12 +153,6 @@
ref = "master";
};
discord = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "e0c8e584ae000051db50c70cf6882e12e91b5e9f";
};
};
}

View file

@ -17,8 +17,6 @@
'';
};
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
];
hardware.printers.ensurePrinters = [{
description = "Epson XP-540";
location = "connected to bolty";

View file

@ -1,10 +1,9 @@
{ config, pkgs, inputs, lib, ... }:
{ config, pkgs, inputs, lib, nixpkgs-nixos-unstable-and-unfree, ... }:
{
networking.hostName = "foureighty";
imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
./custom-kernel.nix
./hardware-configuration.nix
./tailscale-foureighty.nix
../../boot.nix
@ -23,6 +22,7 @@
options = [ "compress=zstd" ];
};
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
zramSwap = {
@ -47,7 +47,6 @@
};
fonts.fontconfig.enable = true;
programs.steam.enable = true;
home-manager.users.cyryl = { ... }: {
imports = [

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, nixpkgs-nixos-unstable-and-unfree, lib, ... }:
{
boot.kernelModules = [ "fuse" ];
services.smartd.enable = true;
@ -58,7 +58,7 @@
services.printing = {
enable = true;
drivers = with pkgs; [ epson-escpr samsung-unified-linux-driver ];
drivers = with pkgs; [ epson-escpr nixpkgs-nixos-unstable-and-unfree.samsung-unified-linux-driver ];
};
hardware.printers.ensurePrinters = [
@ -80,7 +80,7 @@
hardware.sane = {
enable = true;
extraBackends = with pkgs; [ samsung-unified-linux-driver ];
extraBackends = with pkgs; [ nixpkgs-nixos-unstable-and-unfree.samsung-unified-linux-driver ];
};
powerManagement = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, inputs, ... }:
{ config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
{
imports =
[
@ -12,7 +12,6 @@
environment.enableDebugInfo = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
wget
git
@ -27,7 +26,7 @@
fd
dnsutils
usbutils
veracrypt
nixpkgs-nixos-unstable-and-unfree.veracrypt
];
i18n.defaultLocale = "en_GB.UTF-8";

View file

@ -1,4 +1,4 @@
{ config, pkgs, discord, inputs, ... }:
{ config, pkgs, discord, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in
@ -31,7 +31,6 @@ in
};
imports = [
./vscode.nix
./firejail.nix
];
@ -42,7 +41,6 @@ in
brave
cheese
digikam
discord.discord
electrum
element-desktop
eog
@ -54,7 +52,6 @@ in
glxinfo
gnome-screenshot
gsettings-desktop-schemas
hopper
inkscape
keybase-gui
libreoffice
@ -72,8 +69,6 @@ in
shotwell
signal-desktop
simple-scan
slack
spotify
ssb-patchwork
tlaplusToolbox
tlaps
@ -87,7 +82,13 @@ in
yubikey-manager-qt
yubikey-personalization
yubikey-personalization-gui
zoom-us
] ++
[
nixpkgs-nixos-unstable-and-unfree.discord
nixpkgs-nixos-unstable-and-unfree.hopper
nixpkgs-nixos-unstable-and-unfree.slack
nixpkgs-nixos-unstable-and-unfree.spotify
nixpkgs-nixos-unstable-and-unfree.zoom-us
];
};
}

View file

@ -42,7 +42,6 @@
tmux
topgrade
unzip
veracrypt
wget
whois
wirelesstools

View file

@ -1,6 +1,5 @@
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
virtualisation.virtualbox.host = {
enable = true;
enableExtensionPack = true;