From bcced89cba2d37efa63e41cd8d50198c09a47a79 Mon Sep 17 00:00:00 2001 From: iFargle Date: Wed, 31 Jan 2024 12:51:19 +0900 Subject: [PATCH] Test --- flake.nix | 4 ++-- lib/default.nix | 7 +++++-- nixos/hosts/framework-server/default.nix | 3 --- nixos/hosts/nixos-desktop/default.nix | 2 -- nixos/hosts/nixos-framework/default.nix | 4 +--- nixos/hosts/nixos-iso-console/default.nix | 1 - nixos/hosts/nixos-iso-desktop/default.nix | 1 - nixos/hosts/nixos-linode-img/default.nix | 5 ----- nixos/hosts/nuc-server/default.nix | 3 --- nixos/hosts/osaka-linode-01/default.nix | 1 - 10 files changed, 8 insertions(+), 23 deletions(-) diff --git a/flake.nix b/flake.nix index 8f12a8ff..dc26355d 100644 --- a/flake.nix +++ b/flake.nix @@ -53,8 +53,8 @@ osaka-linode-01 = libx.mkHost { hostname = "osaka-linode-01"; }; framework-server = libx.mkHost { hostname = "framework-server"; }; nuc-server = libx.mkHost { hostname = "nuc-server"; }; - nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "nvidia"; theme = "tokyo-night"; }; - nixos-framework = libx.mkHost { hostname = "nixos-framework"; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "amd"; theme = "tokyo-night"; }; + nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; unfree = true; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "nvidia"; theme = "tokyo-night"; }; + nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; repo = "nixpkgs-unstable"; desktop = "hyprland"; gpu = "amd"; theme = "tokyo-night"; }; backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; }; piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; }; quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; }; diff --git a/lib/default.nix b/lib/default.nix index 9e3937f2..f79f9281 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -41,10 +41,13 @@ system ? "x86_64-linux", theme ? "default", type ? "default", - repo ? "nixpkgs" + repo ? "nixpkgs", + unfree ? false }: inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs outputs desktop hostname username stateVersion gpu system theme; }; - pkgs = import inputs.${repo} { inherit system; }; + pkgs = import inputs.${repo} { + inherit system; + config.allowUnfree = unfree; }; modules = [ # Types are 'default', 'small', and 'minimal' diff --git a/nixos/hosts/framework-server/default.nix b/nixos/hosts/framework-server/default.nix index f2e84e8c..9d37de6b 100644 --- a/nixos/hosts/framework-server/default.nix +++ b/nixos/hosts/framework-server/default.nix @@ -24,9 +24,6 @@ users.users.root.openssh.authorizedKeys.keys = [ ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKp2wgqFcr0LGaUXbom88/zK2631pysePUWIaCMljT0K root@backups-rpi4'' ]; services.openssh.settings.PermitRootLogin = lib.mkForce "prohibit-password"; - # steam, etc - nixpkgs.config.allowUnfree = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "sd_mod" "uas" ]; boot.initrd.kernelModules = [ "r8152" ]; boot.kernelModules = [ "kvm-intel" ]; diff --git a/nixos/hosts/nixos-desktop/default.nix b/nixos/hosts/nixos-desktop/default.nix index aab05c57..1ee69af6 100644 --- a/nixos/hosts/nixos-desktop/default.nix +++ b/nixos/hosts/nixos-desktop/default.nix @@ -7,8 +7,6 @@ ../../common/services/podman.nix ../../common/services/tailscale-autoconnect.nix ]; - # steam, nvidia-x11, etc - nixpkgs.config.allowUnfree = true; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; diff --git a/nixos/hosts/nixos-framework/default.nix b/nixos/hosts/nixos-framework/default.nix index 08a328da..cf215b86 100644 --- a/nixos/hosts/nixos-framework/default.nix +++ b/nixos/hosts/nixos-framework/default.nix @@ -12,9 +12,7 @@ ../../common/services/fwupd.nix ../../common/services/tlp.nix ]; - - # steam , etc - nixpkgs.config.allowUnfree = true; + powerManagement.enable = true; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" ]; diff --git a/nixos/hosts/nixos-iso-console/default.nix b/nixos/hosts/nixos-iso-console/default.nix index 632cc4e0..d50d79f1 100644 --- a/nixos/hosts/nixos-iso-console/default.nix +++ b/nixos/hosts/nixos-iso-console/default.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, modulesPath, desktop, username, ... }: { - nixpkgs.config.allowUnfree = false; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/nixos/hosts/nixos-iso-desktop/default.nix b/nixos/hosts/nixos-iso-desktop/default.nix index 77936156..756cbaff 100644 --- a/nixos/hosts/nixos-iso-desktop/default.nix +++ b/nixos/hosts/nixos-iso-desktop/default.nix @@ -1,5 +1,4 @@ { config, lib, pkgs, modulesPath, desktop, username, ... }: { - nixpkgs.config.allowUnfree = true; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; diff --git a/nixos/hosts/nixos-linode-img/default.nix b/nixos/hosts/nixos-linode-img/default.nix index a630e16c..d1125e84 100644 --- a/nixos/hosts/nixos-linode-img/default.nix +++ b/nixos/hosts/nixos-linode-img/default.nix @@ -6,11 +6,6 @@ }; time.timeZone = "Asia/Tokyo"; - - nixpkgs = { - config.allowUnfree = false; - hostPlatform = lib.mkDefault "x86_64-linux"; - }; networking = { hostName = "nixos-linode-img"; diff --git a/nixos/hosts/nuc-server/default.nix b/nixos/hosts/nuc-server/default.nix index ea6604f4..522b0e81 100644 --- a/nixos/hosts/nuc-server/default.nix +++ b/nixos/hosts/nuc-server/default.nix @@ -14,9 +14,6 @@ inputs.deploy-rs.packages.${system}.deploy-rs ]; - # steam , etc - nixpkgs.config.allowUnfree = true; - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "sd_mod" "uas" ]; boot.initrd.kernelModules = [ "r8152" ]; boot.kernelModules = [ "kvm-intel" ]; diff --git a/nixos/hosts/osaka-linode-01/default.nix b/nixos/hosts/osaka-linode-01/default.nix index f860df52..773eb88c 100644 --- a/nixos/hosts/osaka-linode-01/default.nix +++ b/nixos/hosts/osaka-linode-01/default.nix @@ -32,7 +32,6 @@ # Distributed Builds nix.distributedBuilds = true; - nixpkgs.config.allowUnfree = false; networking.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";