From f7c5abff625885ed9479318040294d2a219d92f1 Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Fri, 13 Oct 2023 19:51:53 +0200 Subject: [PATCH] chore: update to nixos-unstable --- flake.lock | 40 +++++++++--------- flake.nix | 12 +++--- hosts/configuration.nix | 2 +- hosts/default.nix | 16 ++++---- hosts/desktop/home.nix | 6 +-- hosts/home.nix | 6 +-- hosts/laptop/home.nix | 8 ++-- modules/desktop/qtile/config/config.py | 9 +++++ modules/desktop/qtile/home.nix | 11 +---- modules/programs/games.nix | 10 ++--- modules/services/syncthing.nix | 56 ++++++++++++++------------ modules/shell/zsh.nix | 2 +- 12 files changed, 92 insertions(+), 86 deletions(-) diff --git a/flake.lock b/flake.lock index 27a4703..fcda0be 100644 --- a/flake.lock +++ b/flake.lock @@ -56,16 +56,16 @@ ] }, "locked": { - "lastModified": 1695108154, - "narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=", + "lastModified": 1696940889, + "narHash": "sha256-p2Wic74A1tZpFcld1wSEbFQQbrZ/tPDuLieCnspamQo=", "owner": "nix-community", "repo": "home-manager", - "rev": "07682fff75d41f18327a871088d20af2710d4744", + "rev": "6bba64781e4b7c1f91a733583defbd3e46b49408", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.05", + "ref": "master", "repo": "home-manager", "type": "github" } @@ -79,11 +79,11 @@ ] }, "locked": { - "lastModified": 1697073746, - "narHash": "sha256-069D60IbxFqAAFDlFZuOHtJcvY4AhlEO2VhIQx/BuZM=", + "lastModified": 1697160521, + "narHash": "sha256-+AtNj68qtib9/zehKpgActGdj63vFe1fIupJ3Nr9sKQ=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "ca11c9ddf80bcdffbb57e722888cda1832e9f4d7", + "rev": "86e879077c11c76c6cc9abeb782b688c42338db7", "type": "github" }, "original": { @@ -115,43 +115,43 @@ }, "nixpkgs": { "locked": { - "lastModified": 1696983906, - "narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=", + "lastModified": 1697059129, + "narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bd1cde45c77891214131cbbea5b1203e485a9d51", + "rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-23.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } }, - "nixpkgs-unstable": { + "nixpkgs-stable": { "locked": { - "lastModified": 1696879762, - "narHash": "sha256-Ud6bH4DMcYHUDKavNMxAhcIpDGgHMyL/yaDEAVSImQY=", + "lastModified": 1696983906, + "narHash": "sha256-L7GyeErguS7Pg4h8nK0wGlcUTbfUMDu+HMf1UcyP72k=", "owner": "nixos", "repo": "nixpkgs", - "rev": "f99e5f03cc0aa231ab5950a15ed02afec45ed51a", + "rev": "bd1cde45c77891214131cbbea5b1203e485a9d51", "type": "github" }, "original": { "owner": "nixos", - "ref": "nixos-unstable", + "ref": "nixos-23.05", "repo": "nixpkgs", "type": "github" } }, "nur": { "locked": { - "lastModified": 1697137728, - "narHash": "sha256-vU+3GFDoeFil6R9yWHF1QKe2aEWBKxNXvRN5UcuniiY=", + "lastModified": 1697215604, + "narHash": "sha256-wiFgfp35SWrAap0vVNndLUGG/bEOacmGdWoUvq0rLMw=", "owner": "nix-community", "repo": "NUR", - "rev": "acfa10bb52860a52481fb61e86e71e8e7c33dfd1", + "rev": "25c9cb7886a35210137f08938ea6e8484c41eb61", "type": "github" }, "original": { @@ -166,7 +166,7 @@ "nix-vscode-extensions": "nix-vscode-extensions", "nixgl": "nixgl", "nixpkgs": "nixpkgs", - "nixpkgs-unstable": "nixpkgs-unstable", + "nixpkgs-stable": "nixpkgs-stable", "nur": "nur" } }, diff --git a/flake.nix b/flake.nix index 6ce24bd..24176a2 100644 --- a/flake.nix +++ b/flake.nix @@ -11,11 +11,11 @@ inputs = # All flake references used to build my NixOS setup. These are dependencies. { - nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; # Default Stable Nix Packages - nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; # Unstable Nix Packages + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.05"; home-manager = { # User Package Management - url = "github:nix-community/home-manager/release-23.05"; + url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; @@ -34,7 +34,7 @@ }; }; - outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, home-manager, nur, nixgl, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. + outputs = inputs @ { self, nixpkgs, nixpkgs-stable, home-manager, nur, nixgl, ... }: # Function that tells my flake which to use and what do what to do with the dependencies. let # Variables that can be used in the config files. user = "ruther"; location = "$HOME/.setup"; @@ -43,14 +43,14 @@ nixosConfigurations = ( # NixOS configurations import ./hosts { # Imports ./hosts/default.nix inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable home-manager nur user location; # Also inherit home-manager so it does not need to be defined here. + inherit inputs nixpkgs nixpkgs-stable home-manager nur user location; # Also inherit home-manager so it does not need to be defined here. } ); homeConfigurations = ( # Non-NixOS configurations import ./nix { inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-unstable home-manager nixgl user location; + inherit inputs nixpkgs nixpkgs-stable home-manager nixgl user location; } ); }; diff --git a/hosts/configuration.nix b/hosts/configuration.nix index 65113e8..b50684d 100644 --- a/hosts/configuration.nix +++ b/hosts/configuration.nix @@ -64,7 +64,7 @@ security.polkit.enable = true; - fonts.fonts = with pkgs; [ # Fonts + fonts.packages = with pkgs; [ # Fonts ubuntu_font_family fira-code roboto diff --git a/hosts/default.nix b/hosts/default.nix index 63b0400..086d504 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -11,7 +11,7 @@ # └─ ./home.nix # -{ lib, inputs, nixpkgs, nixpkgs-unstable, home-manager, nur, user, location, ... }: +{ lib, inputs, nixpkgs, nixpkgs-stable, home-manager, nur, user, location, ... }: let system = "x86_64-linux"; # System architecture @@ -21,7 +21,7 @@ let config.allowUnfree = true; # Allow proprietary software }; - unstable = import nixpkgs-unstable { + stable = import nixpkgs-stable { inherit system; config.allowUnfree = true; # Allow proprietary software }; @@ -33,7 +33,7 @@ in laptop = lib.nixosSystem { # Laptop profile inherit system; specialArgs = { - inherit inputs unstable user location; + inherit inputs stable user location; }; modules = [ nur.nixosModules.nur @@ -44,7 +44,7 @@ in home-manager.nixosModules.home-manager { home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { - inherit inputs unstable user location; + inherit inputs stable user location; }; home-manager.users.${user} = { imports = [ @@ -61,7 +61,7 @@ in vm = lib.nixosSystem { # VM profile inherit system; specialArgs = { - inherit inputs unstable user location; + inherit inputs stable user location; }; modules = [ nur.nixosModules.nur @@ -72,7 +72,7 @@ in home-manager.nixosModules.home-manager { home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { - inherit inputs unstable user location; + inherit inputs stable user location; }; home-manager.users.${user} = { imports = [ @@ -89,7 +89,7 @@ in desktop = lib.nixosSystem { # Desktop profile inherit system; specialArgs = { - inherit inputs unstable system user location; + inherit inputs stable system user location; }; # Pass flake variable modules = [ # Modules that are used. nur.nixosModules.nur @@ -100,7 +100,7 @@ in home-manager.nixosModules.home-manager { # Home-Manager module that is used. home-manager.useUserPackages = true; home-manager.extraSpecialArgs = { - inherit inputs unstable user location; + inherit inputs stable user location; }; # Pass flake variable home-manager.users.${user} = { imports = [ diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index f54d2f7..9acb98a 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -11,7 +11,7 @@ # └─ home.nix # -{ pkgs, lib, config, unstable, ... }: +{ pkgs, lib, config, ... }: { imports = @@ -24,8 +24,8 @@ ]; home = { # Specific packages for desktop - packages = with pkgs; [ - unstable.distrobox + packages = [ + pkgs.distrobox ]; }; } diff --git a/hosts/home.nix b/hosts/home.nix index 128f388..da4fc8c 100644 --- a/hosts/home.nix +++ b/hosts/home.nix @@ -11,7 +11,7 @@ # └─ default.nix # -{ config, lib, nixpkgs, pkgs, unstable, user, location, ... }: +{ config, lib, nixpkgs, stable, pkgs, user, location, ... }: { imports = # Home Manager Modules @@ -101,11 +101,11 @@ # Desktop discord # Chat telegram-desktop # Chat - unstable.cinny-desktop # Chat + cinny-desktop # Chat ffmpeg # Video Support (dslr) spotify - obsidian # Text Editor + stable.obsidian # Text Editor ]; file.".config/wall".source = ../modules/themes/wall; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 3ccc9d7..44c037d 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -11,7 +11,7 @@ # └─ home.nix # -{ pkgs, lib, config, unstable, ... }: +{ pkgs, lib, config, ... }: { imports = @@ -24,11 +24,11 @@ ]; home = { # Specific packages for laptop - packages = with pkgs; [ - unstable.distrobox + packages = [ + pkgs.distrobox # Power Management - acpi + pkgs.acpi ]; }; diff --git a/modules/desktop/qtile/config/config.py b/modules/desktop/qtile/config/config.py index 6eb6fc8..88b7689 100644 --- a/modules/desktop/qtile/config/config.py +++ b/modules/desktop/qtile/config/config.py @@ -513,6 +513,15 @@ groups.append( width = 0.95, height = 0.95, opacity = 1, ), + DropDown( + 'proton', + ['firefoxpwa', 'site', 'launch', '01HBD772V37WPQ3B2T7TQJ81PM'], + match = Match(wm_class = 'FFPWA-01HBD772V37WPQ3B2T7TQJ81PM'), + on_focus_lost_hide = True, + x = 0.025, y = 0.025, + width = 0.95, height = 0.95, + opacity = 1, + ), ]) ) diff --git a/modules/desktop/qtile/home.nix b/modules/desktop/qtile/home.nix index fbee5c1..2594941 100644 --- a/modules/desktop/qtile/home.nix +++ b/modules/desktop/qtile/home.nix @@ -1,14 +1,7 @@ -{ inputs, lib, unstable, pkgs, user, location, ... }: +{ config, lib, pkgs, user, location, ... }: let - unstablePkgs = import inputs.nixpkgs-unstable { - system = "x86_64-linux"; - }; - nurRaw = import inputs.nur { - nurpkgs = unstablePkgs; - pkgs = unstablePkgs; - }; - nur = nurRaw.repos; + nur = config.nur.repos; in { # services.udev.extraRules = # ''ACTION=="change", SUBSYSTEM=="drm", RUN+="${pkgs.autorandr}/bin/autorandr -c"''; diff --git a/modules/programs/games.nix b/modules/programs/games.nix index ee97cb3..108900c 100644 --- a/modules/programs/games.nix +++ b/modules/programs/games.nix @@ -5,7 +5,7 @@ # Do not forget to enable Steam play for all title in the settings menu # -{ config, pkgs, nur, lib, unstable, ... }: +{ config, pkgs, nur, lib, ... }: let # No longer required because of retroarch but let's keep it for testing purposes pcsx2 = pkgs.pcsx2.overrideAttrs (old: { # PCSX2 runs way better on x11. This wrappers makes it use the correct GDK Backend @@ -19,11 +19,11 @@ in { environment.systemPackages = [ pkgs.lunar-client - unstable.heroic - unstable.lutris - unstable.prismlauncher + pkgs.heroic + pkgs.lutris + pkgs.prismlauncher pkgs.retroarchFull - unstable.steam + pkgs.steam pcsx2 ]; diff --git a/modules/services/syncthing.nix b/modules/services/syncthing.nix index 11ee3e9..61aa017 100644 --- a/modules/services/syncthing.nix +++ b/modules/services/syncthing.nix @@ -12,35 +12,39 @@ configDir = "/home/${user}/.config/syncthing"; overrideDevices = true; overrideFolders = true; - devices = { - "phone" = { id = inputs.semi-secrets.syncthing.devices.phone; }; - "nixos-desktop" = { id = inputs.semi-secrets.syncthing.devices.desktop; }; - "nixos-laptop" = { id = inputs.semi-secrets.syncthing.devices.laptop; }; - }; - folders = { - "uni" = { - path = "/home/${user}/doc/uni"; - devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; - }; - "notes" = { - path = "/home/${user}/doc/notes/obsidian/Notes"; - devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + settings = { + + devices = { + "phone" = { id = inputs.semi-secrets.syncthing.devices.phone; }; + "nixos-desktop" = { id = inputs.semi-secrets.syncthing.devices.desktop; }; + "nixos-laptop" = { id = inputs.semi-secrets.syncthing.devices.laptop; }; }; - "camera" = { - path = "/home/${user}/doc/camera"; - devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + + folders = { + "uni" = { + path = "/home/${user}/doc/uni"; + devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + }; + "notes" = { + path = "/home/${user}/doc/notes/obsidian/Notes"; + devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + }; + "camera" = { + path = "/home/${user}/doc/camera"; + devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + }; + "study" = { + path = "/home/${user}/doc/study"; + devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + }; }; - "study" = { - path = "/home/${user}/doc/study"; - devices = [ "phone" "nixos-desktop" "nixos-laptop" ]; + options = { + natenabled = false; + relaysEnabled = false; + globalAnnounceEnabled = false; + localAnnounceEnabled = true; + #alwaysLocalNets = true; }; }; - extraOptions.options = { - natenabled = false; - relaysEnabled = false; - globalAnnounceEnabled = false; - localAnnounceEnabled = true; - #alwaysLocalNets = true; - }; }; } diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index 94e9598..cf939e2 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -12,7 +12,7 @@ zsh = { enable = true; enableAutosuggestions = true; - enableSyntaxHighlighting = true; + syntaxHighlighting.enable = true; enableCompletion = true; history.size = 100000; -- 2.48.1