From 360067b244ec19086fea6919584a6f9417c3fb35 Mon Sep 17 00:00:00 2001 From: Felix Suchert Date: Fri, 14 Apr 2023 09:40:57 +0200 Subject: [PATCH] Add hydra jobs, make flake pure --- entropy/nixos/configuration.nix | 13 ++++++++---- entropy/nixos/flake.lock | 30 +++++++++++++++++++++------- entropy/nixos/flake.nix | 15 +++++++++++--- entropy/nixos/modules/networking.nix | 2 +- 4 files changed, 45 insertions(+), 15 deletions(-) diff --git a/entropy/nixos/configuration.nix b/entropy/nixos/configuration.nix index a728b8a..a3cf365 100644 --- a/entropy/nixos/configuration.nix +++ b/entropy/nixos/configuration.nix @@ -2,14 +2,14 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ config, pkgs, ... }: +{ config, pkgs, unstable, ... }: -let +#let # use unstable nixpkgs for some specific packages that are still in-dev: # sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos-unstable # sudo nix-channel --update - unstable = import { config = config.nixpkgs.config; }; -in + #unstable = import { config = config.nixpkgs.config; }; +#in { imports = [ @@ -50,6 +50,11 @@ in boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; + boot.plymouth = { + enable = true; + theme = "breeze"; + }; + # ------------ kernel ------------------------------------------------------- boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_1; diff --git a/entropy/nixos/flake.lock b/entropy/nixos/flake.lock index 1d7f438..9f66af5 100644 --- a/entropy/nixos/flake.lock +++ b/entropy/nixos/flake.lock @@ -23,11 +23,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1680070330, - "narHash": "sha256-aoT2YZCd9LEtiEULFLIF0ykKydgE72X8gw/k9/pRS5I=", + "lastModified": 1680876084, + "narHash": "sha256-eP9yxP0wc7XuVaODugh+ajgbFGaile2O1ihxiLxOuvU=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "a6aa8174fa61e55bd7e62d35464d3092aefe0421", + "rev": "3006d2860a6ed5e01b0c3e7ffb730e9b293116e2", "type": "github" }, "original": { @@ -39,11 +39,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1679966490, - "narHash": "sha256-k0jV+y1jawE6w4ZvKgXDNg4+O9NNtcaWwzw8gufv0b4=", + "lastModified": 1681269223, + "narHash": "sha256-i6OeI2f7qGvmLfD07l1Az5iBL+bFeP0RHixisWtpUGo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5b7cd5c39befee629be284970415b6eb3b0ff000", + "rev": "87edbd74246ccdfa64503f334ed86fa04010bab9", "type": "github" }, "original": { @@ -56,7 +56,23 @@ "inputs": { "mlir": "mlir", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "unstable": "unstable" + } + }, + "unstable": { + "locked": { + "lastModified": 1681303793, + "narHash": "sha256-JEdQHsYuCfRL2PICHlOiH/2ue3DwoxUX7DJ6zZxZXFk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fe2ecaf706a5907b5e54d979fbde4924d84b65fc", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-unstable", + "type": "indirect" } } }, diff --git a/entropy/nixos/flake.nix b/entropy/nixos/flake.nix index c170a4b..5b839df 100644 --- a/entropy/nixos/flake.nix +++ b/entropy/nixos/flake.nix @@ -3,6 +3,7 @@ inputs = { nixpkgs.url = "nixpkgs/nixos-22.11"; + unstable.url = "nixpkgs/nixos-unstable"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; #home-manager = { #url = "github:nix-community/home-manager"; @@ -18,9 +19,9 @@ # TODO: define nixos-unstable and nixos-hardware as dependencies here # outputs = inputs@{ nixpkgs, nixos-hardware, home-manager, mlir, ... }: { - outputs = inputs@{ nixpkgs, nixos-hardware, mlir, ... }: { + outputs = inputs@{ self, nixpkgs, unstable, nixos-hardware, mlir, ... }: { nixosConfigurations = { - entropy = nixpkgs.lib.nixosSystem { + entropy = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; modules = [ ./configuration.nix @@ -34,11 +35,19 @@ ## Optionally, use home-manager.extraSpecialArgs to pass ## arguments to home.nix #} - (_: { + ({ config, ... }: { nixpkgs.overlays = [ mlir.overlay ]; + _module.args = { + unstable = import inputs.unstable { + inherit (config.nixpkgs) config; + inherit system; + }; + }; }) ]; }; }; + + hydraJobs.entropy."x86_64-linux" = self.nixosConfigurations.entropy.config.system.build.toplevel; }; } diff --git a/entropy/nixos/modules/networking.nix b/entropy/nixos/modules/networking.nix index cccfede..e2de4d5 100644 --- a/entropy/nixos/modules/networking.nix +++ b/entropy/nixos/modules/networking.nix @@ -30,7 +30,7 @@ user = "s6525655@vpn-cfaed-cpb-ma"; protocol = "anyconnect"; gateway = "vpn2.zih.tu-dresden.de"; - passwordFile = /home/felix/.config/vpn/openconnect.txt; + passwordFile = "/home/felix/.config/vpn/openconnect.txt"; extraOptions = { authgroup = "A-Tunnel-TU-Networks"; compression = "stateless";