From 7a6d3dca537c50131e2c43386706273c79623a57 Mon Sep 17 00:00:00 2001 From: Daniel Kempkens Date: Sun, 14 Jul 2024 23:05:41 +0200 Subject: [PATCH] flake: less nixpkgs --- flake.lock | 31 +++++++------------------------ flake.nix | 29 +++++++++-------------------- system/flakes/tanker.nix | 31 +++++++++++++++---------------- system/hosts/Styx.nix | 2 -- system/hosts/tanker.nix | 3 ++- 5 files changed, 33 insertions(+), 63 deletions(-) diff --git a/flake.lock b/flake.lock index ba435d6..e834f24 100644 --- a/flake.lock +++ b/flake.lock @@ -9,7 +9,7 @@ "home-manager" ], "nixpkgs": [ - "nixos-unstable" + "nixpkgs" ], "systems": "systems" }, @@ -75,7 +75,7 @@ "disko": { "inputs": { "nixpkgs": [ - "nixos-unstable" + "nixpkgs" ] }, "locked": { @@ -307,7 +307,7 @@ "home-manager": { "inputs": { "nixpkgs": [ - "nixos-unstable" + "nixpkgs" ] }, "locked": { @@ -506,13 +506,13 @@ "type": "github" } }, - "nixos-unstable": { + "nixpkgs": { "locked": { - "lastModified": 1720890539, - "narHash": "sha256-1K32XHPcQBo8XdLDQNybfLQc9I8hqSZdjA/Ur3zW/io=", + "lastModified": 1720933452, + "narHash": "sha256-HJhBuKZcmZSrAXukaIus9SsXahIVuo4/zdAhxSJrSQ4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "19116ccf234e32acf133863d430506da68008550", + "rev": "3e7eb6610f8b7003416b2bffdd8865b85326db18", "type": "github" }, "original": { @@ -522,22 +522,6 @@ "type": "github" } }, - "nixpkgs": { - "locked": { - "lastModified": 1720875497, - "narHash": "sha256-1Al1qDC8Q/s4viPq4ln8jfHWZxYl+Nb49dNFISFpqBY=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "b729601a9e6c459fd8884dea513af143111bed54", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "nixpkgs-lib": { "locked": { "lastModified": 1719876945, @@ -644,7 +628,6 @@ "nifoc-overlay": "nifoc-overlay", "nix-darwin": "nix-darwin", "nixos-hardware": "nixos-hardware", - "nixos-unstable": "nixos-unstable", "nixpkgs": "nixpkgs", "pre-commit-hooks-nix": "pre-commit-hooks-nix", "treefmt-nix": "treefmt-nix_2" diff --git a/flake.nix b/flake.nix index 2de4498..b8e0eb5 100644 --- a/flake.nix +++ b/flake.nix @@ -1,7 +1,6 @@ { inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable-small"; + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable-small"; # nixpkgs-master.url = "github:nixos/nixpkgs/master"; # Lix @@ -31,7 +30,7 @@ disko = { url = "github:nix-community/disko?ref=refs/tags/v1.3.0"; - inputs.nixpkgs.follows = "nixos-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; nix-darwin = { @@ -41,7 +40,7 @@ home-manager = { url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixos-unstable"; + inputs.nixpkgs.follows = "nixpkgs"; }; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; @@ -49,7 +48,7 @@ agenix = { url = "github:ryantm/agenix"; inputs = { - nixpkgs.follows = "nixos-unstable"; + nixpkgs.follows = "nixpkgs"; darwin.follows = "nix-darwin"; home-manager.follows = "home-manager"; }; @@ -93,37 +92,27 @@ }; tanker = import ./system/flakes/tanker.nix { - nixpkgs = inputs.nixos-unstable; - - inherit (inputs) disko home-manager agenix attic; + inherit (inputs) nixpkgs disko home-manager agenix attic; inherit inputs; }; mediaserver = import ./system/flakes/mediaserver.nix { - nixpkgs = inputs.nixos-unstable; - - inherit (inputs) home-manager agenix; + inherit (inputs) nixpkgs home-manager agenix; inherit inputs; }; argon = import ./system/flakes/argon.nix { - nixpkgs = inputs.nixos-unstable; - - inherit (inputs) nixos-hardware home-manager agenix; + inherit (inputs) nixpkgs nixos-hardware home-manager agenix; inherit inputs; }; neon = import ./system/flakes/neon.nix { - nixpkgs = inputs.nixos-unstable; - - inherit (inputs) nixos-hardware home-manager agenix; + inherit (inputs) nixpkgs nixos-hardware home-manager agenix; inherit inputs; }; adsb-antenna = import ./system/flakes/adsb-antenna.nix { - nixpkgs = inputs.nixos-unstable; - - inherit (inputs) nixos-hardware home-manager; + inherit (inputs) nixpkgs nixos-hardware home-manager; inherit inputs; }; in diff --git a/system/flakes/tanker.nix b/system/flakes/tanker.nix index 44d9b19..65d2e2e 100644 --- a/system/flakes/tanker.nix +++ b/system/flakes/tanker.nix @@ -15,10 +15,6 @@ let config = { allowUnfree = true; allowBroken = true; - - permittedInsecurePackages = [ - "openssl-1.1.1t" - ]; }; }; in @@ -26,27 +22,30 @@ rec { system = nixpkgs.lib.nixosSystem { system = default-system; modules = [ - disko.nixosModules.disko - - ../hosts/tanker.nix - - home-manager.nixosModules.home-manager - - agenix.nixosModules.default - - attic.nixosModules.atticd - { nixpkgs = nixpkgsConfig; - nix.nixPath = [ "nixpkgs=${nixpkgs}" ]; - nix.registry.nixpkgs.flake = nixpkgs; + nix = { + registry.nixpkgs.to = { type = "path"; path = nixpkgs.outPath; }; + nixPath = nixpkgs.lib.mkForce [ "nixpkgs=flake:nixpkgs" ]; + }; + } + disko.nixosModules.disko + + home-manager.nixosModules.home-manager + { home-manager = { useGlobalPkgs = true; useUserPackages = true; users.daniel = import ../../home/hosts/tanker.nix; }; } + + agenix.nixosModules.default + + attic.nixosModules.atticd + + ../hosts/tanker.nix ]; }; diff --git a/system/hosts/Styx.nix b/system/hosts/Styx.nix index 6d8cbab..3691c80 100644 --- a/system/hosts/Styx.nix +++ b/system/hosts/Styx.nix @@ -16,8 +16,6 @@ in ]; nix = { - # package = pkgs.nixVersions.stable; - settings = { experimental-features = [ "nix-command" "flakes" ]; extra-platforms = [ "x86_64-darwin" ]; diff --git a/system/hosts/tanker.nix b/system/hosts/tanker.nix index 79a7c74..f80a6e0 100644 --- a/system/hosts/tanker.nix +++ b/system/hosts/tanker.nix @@ -79,6 +79,7 @@ in "https://attic.cache.daniel.sx/nifoc-ci?priority=35" "https://nix-community.cachix.org?priority=50" "https://cache.garnix.io?priority=60" + "https://cache.lix.systems?priority=70" ]; extra-trusted-public-keys = [ @@ -86,6 +87,7 @@ in "nifoc-ci:JpD9zqVQi8JuS7B8htPDOQZh08rhInMnGFS9RVhiuwk=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" + "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o=" ]; connect-timeout = 5; @@ -175,7 +177,6 @@ in }; fonts.fontconfig.enable = false; - sound.enable = false; programs.fish.enable = true; programs.htop.enable = true;