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"; 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 let
mkServer = pkgs: system: hostname: mkServer = pkgs: system: hostname:
@ -42,8 +42,7 @@
]; ];
specialArgs = { specialArgs = {
inherit inputs system; inherit inputs system;
unstableAndUnfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; }; nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable { inherit system; config = { allowUnfree = true; }; };
discord = import discord { inherit system; config = { allowUnfree = true; }; };
}; };
}; };
in in
@ -154,12 +153,6 @@
ref = "master"; 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 = [{ hardware.printers.ensurePrinters = [{
description = "Epson XP-540"; description = "Epson XP-540";
location = "connected to bolty"; 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"; networking.hostName = "foureighty";
imports = [ imports = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480
./custom-kernel.nix
./hardware-configuration.nix ./hardware-configuration.nix
./tailscale-foureighty.nix ./tailscale-foureighty.nix
../../boot.nix ../../boot.nix
@ -23,6 +22,7 @@
options = [ "compress=zstd" ]; options = [ "compress=zstd" ];
}; };
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
zramSwap = { zramSwap = {
@ -47,7 +47,6 @@
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
programs.steam.enable = true;
home-manager.users.cyryl = { ... }: { home-manager.users.cyryl = { ... }: {
imports = [ imports = [

View file

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

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, nixpkgs-nixos-unstable-and-unfree, ... }:
{ {
imports = imports =
[ [
@ -12,7 +12,6 @@
environment.enableDebugInfo = true; environment.enableDebugInfo = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
wget wget
git git
@ -27,7 +26,7 @@
fd fd
dnsutils dnsutils
usbutils usbutils
veracrypt nixpkgs-nixos-unstable-and-unfree.veracrypt
]; ];
i18n.defaultLocale = "en_GB.UTF-8"; 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 let
unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system}; unstable = inputs.nixpkgs-nixos-unstable.legacyPackages.${pkgs.system};
in in
@ -31,7 +31,6 @@ in
}; };
imports = [ imports = [
./vscode.nix
./firejail.nix ./firejail.nix
]; ];
@ -42,7 +41,6 @@ in
brave brave
cheese cheese
digikam digikam
discord.discord
electrum electrum
element-desktop element-desktop
eog eog
@ -54,7 +52,6 @@ in
glxinfo glxinfo
gnome-screenshot gnome-screenshot
gsettings-desktop-schemas gsettings-desktop-schemas
hopper
inkscape inkscape
keybase-gui keybase-gui
libreoffice libreoffice
@ -72,8 +69,6 @@ in
shotwell shotwell
signal-desktop signal-desktop
simple-scan simple-scan
slack
spotify
ssb-patchwork ssb-patchwork
tlaplusToolbox tlaplusToolbox
tlaps tlaps
@ -87,7 +82,13 @@ in
yubikey-manager-qt yubikey-manager-qt
yubikey-personalization yubikey-personalization
yubikey-personalization-gui 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 tmux
topgrade topgrade
unzip unzip
veracrypt
wget wget
whois whois
wirelesstools wirelesstools

View file

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