From a8cae15240fbc148dc755e8ddd13c599b4668613 Mon Sep 17 00:00:00 2001 From: Nathan McCarty Date: Wed, 25 May 2022 19:21:31 -0400 Subject: [PATCH] Tenatively upgrade main desktop to 22.05-staging --- applications/emacs.nix | 4 ++-- applications/utils-core.nix | 4 ++-- flake.lock | 17 +++++++++++++++++ flake.nix | 24 ++++++++++++++++++++---- home.nix | 2 +- modules/audio.nix | 31 +------------------------------ modules/docker.nix | 4 ++-- modules/games.nix | 8 ++++---- modules/printing.nix | 19 ++++++++++++------- modules/sway.nix | 2 +- 10 files changed, 62 insertions(+), 53 deletions(-) diff --git a/applications/emacs.nix b/applications/emacs.nix index 0a41bcc..ca4acc8 100644 --- a/applications/emacs.nix +++ b/applications/emacs.nix @@ -1,4 +1,4 @@ -{ config, pkgs, unstable, doomEmacs, ... }: +{ config, pkgs, doomEmacs, ... }: let emacsPackage = (pkgs.emacsPackagesFor pkgs.emacsPgtkNativeComp).emacsWithPackages (epkgs: with epkgs; [ vterm @@ -10,7 +10,7 @@ in environment.systemPackages = [ emacsPackage # For markdown rendering - pkgs.pythonPackages.grip + pkgs.python310Packages.grip # For graph generation pkgs.graphviz ]; diff --git a/applications/utils-core.nix b/applications/utils-core.nix index 6ed060c..76f1cfa 100644 --- a/applications/utils-core.nix +++ b/applications/utils-core.nix @@ -13,7 +13,7 @@ hunspell hunspellDicts.en-us # Rust rewrites of common shell utilities - unstable.starship + starship exa bat fd @@ -32,7 +32,7 @@ # Command line file manager broot # Much better curl - unstable.httpie + httpie # CLI spreadsheets visidata # User friendly cut diff --git a/flake.lock b/flake.lock index 5c730ef..697a73f 100644 --- a/flake.lock +++ b/flake.lock @@ -394,6 +394,22 @@ "type": "github" } }, + "nixpkgs-staging": { + "locked": { + "lastModified": 1653437856, + "narHash": "sha256-ONO0zbEhvFjVIbIMnYsq0GjGrKSZuKjLqZhEw2Zqoh4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1774dcc1ca62f9deb31f776512e9482bcaf56192", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "staging-next-22.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-unstable": { "locked": { "lastModified": 1653060744, @@ -586,6 +602,7 @@ "mozilla": "mozilla", "nix-doom-emacs": "nix-doom-emacs", "nixpkgs": "nixpkgs_2", + "nixpkgs-staging": "nixpkgs-staging", "nixpkgs-unstable": "nixpkgs-unstable", "polymc": "polymc", "sops-nix": "sops-nix" diff --git a/flake.nix b/flake.nix index 0fee1ae..ed1b082 100644 --- a/flake.nix +++ b/flake.nix @@ -4,6 +4,7 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs-staging.url = "github:NixOS/nixpkgs/staging-next-22.05"; fenix = { url = "github:nix-community/fenix"; inputs.nixpgks.follows = "nixpkgs"; @@ -39,7 +40,20 @@ }; }; - outputs = { self, nixpkgs, nixpkgs-unstable, fenix, emacs, mozilla, sops-nix, home-manager, darwin, polymc, nix-doom-emacs }: + outputs = + { self + , nixpkgs + , nixpkgs-unstable + , nixpkgs-staging + , fenix + , emacs + , mozilla + , sops-nix + , home-manager + , darwin + , polymc + , nix-doom-emacs + }: let baseModules = [ ./applications/utils-core.nix @@ -64,7 +78,9 @@ ''; }; # Setup overlays - nixpkgs.overlays = [ emacs.overlay ]; + nixpkgs.overlays = [ emacs.overlay polymc.overlay ]; + # System state version for compat + system.stateVersion = "21.11"; }) ]; sopsModules = [ @@ -135,12 +151,12 @@ in { nixosConfigurations = { - levitation = nixpkgs.lib.nixosSystem { + levitation = nixpkgs-staging.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { unstable = import nixpkgs-unstable { config = { allowUnfree = true; }; - overlays = [ mozillaOverlay polymc.overlay ]; + overlays = [ mozillaOverlay ]; system = "x86_64-linux"; }; fenix = fenix.packages.x86_64-linux; diff --git a/home.nix b/home.nix index f9aa90f..ceca74f 100644 --- a/home.nix +++ b/home.nix @@ -1,4 +1,4 @@ -{ pkgs, config, unstable, ... }: +{ pkgs, config, ... }: { ## Some general settings that were in the user configuration # Set time zone diff --git a/modules/audio.nix b/modules/audio.nix index 054e1f2..bf6752c 100644 --- a/modules/audio.nix +++ b/modules/audio.nix @@ -1,5 +1,5 @@ ## Setup pipewire, including bluetooth audio -{ config, pkgs, unstable, ... }: +{ config, pkgs, ... }: { # Disable normal audio subsystem explicitly sound.enable = false; @@ -15,35 +15,6 @@ }; pulse.enable = true; jack.enable = true; - # Turn on the media session manager, and setup bluetooth - media-session = { - enable = true; - # Configure bluetooth support - config.bluez-monitor.rules = [ - { - # Matches all cards - matches = [{ "device.name" = "~bluez_card.*"; }]; - actions = { - "update-props" = { - "bluez5.reconnect-profiles" = [ "a2dp_sink" ]; - # SBC-XQ is not expected to work on all headset + adapter combinations. - "bluez5.sbc-xq-support" = true; - }; - }; - } - { - matches = [ - # Matches all sources - { "node.name" = "~bluez_input.*"; } - # Matches all outputs - { "node.name" = "~bluez_output.*"; } - ]; - actions = { - "node.pause-on-idle" = false; - }; - } - ]; - }; }; # Turn on bluetooth services services.blueman.enable = true; diff --git a/modules/docker.nix b/modules/docker.nix index 8f1f401..1980d11 100644 --- a/modules/docker.nix +++ b/modules/docker.nix @@ -1,9 +1,9 @@ -{ config, pkgs, unstable, ... }: +{ config, pkgs, ... }: { # Enable docker and use unstable version virtualisation.docker = { enable = true; - package = unstable.docker; + package = pkgs.docker; # Automatically prune to keep things lean autoPrune.enable = true; }; diff --git a/modules/games.nix b/modules/games.nix index 583c664..630d649 100644 --- a/modules/games.nix +++ b/modules/games.nix @@ -1,13 +1,13 @@ -{ pkgs, unstable, ... }: { +{ pkgs, ... }: { environment.systemPackages = let - glfw-patched = unstable.glfw-wayland.overrideAttrs (attrs: { + glfw-patched = pkgs.glfw-wayland.overrideAttrs (attrs: { patches = attrs.patches ++ [ ../patches/minecraft/0003-Don-t-crash-on-calls-to-focus-or-icon.patch ]; }); in - with unstable; [ + with pkgs; [ # Dwarf fortress - (pkgs.dwarf-fortress-packages.dwarf-fortress-full.override { + (dwarf-fortress-packages.dwarf-fortress-full.override { enableFPS = true; }) # PolyMC minecraft stuff diff --git a/modules/printing.nix b/modules/printing.nix index b52f734..e342982 100644 --- a/modules/printing.nix +++ b/modules/printing.nix @@ -1,18 +1,23 @@ -{ config, pkgs, unstable, ... }: +{ config, pkgs, ... }: { - nixpkgs.config.packageOverrides = pkgs: { - canon-cups-ufr2 = unstable.canon-cups-ufr2; - }; - services.printing = { enable = true; - drivers = [ - pkgs.canon-cups-ufr2 + drivers = with pkgs; [ + canon-cups-ufr2 + carps-cups + cnijfilter2 ]; }; + # Enable avahi for printer discovery + services.avahi = { + enable = true; + nssmdns = true; + }; + environment.systemPackages = with pkgs; [ canon-cups-ufr2 cups + cups-filters ]; } diff --git a/modules/sway.nix b/modules/sway.nix index 2c9605c..3fc083d 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -61,7 +61,7 @@ # glib for sound stuff glib # Glpaper for the background - glpaper + unstable.glpaper # Screenshots sway-contrib.grimshot # Albert for launcher