Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nixos/ly module and package update #297434

Merged
merged 2 commits into from
Aug 6, 2024
Merged

Conversation

Vonfry
Copy link
Member

@Vonfry Vonfry commented Mar 20, 2024

Description of changes

Tow notes:

  1. I updated ly to the unstable one due to the fixes of config reading.
  2. I made a wrapper for all ly necessary files which is linked into /run/current-system/sw/ due to the line length restriction of configator used by ly.

Test method

NixOS Test

nix-build -A nixosTests.ly <your nixpkgs repo on this pr>

This is successed.

NixOS VM

An example flake is here:

{
  inputs = {
    nixpkgs.url = "github:Vonfry/nixpkgs/init-ly-module";
  };
  outputs = { self, nixpkgs }:
    let
      system = "x86_64-linux";
      pkgs = import nixpkgs { localSystem = system; };
      flakeSpecialConfig = { pkgs, ... }: {
        nix = {
          package = pkgs.nixFlakes;
          registry = {
            sys.flake = nixpkgs;
            nixpkgs.flake = nixpkgs;
            nixos.flake = nixpkgs;
          };
          channel.enable = false;
          nixPath = [ "nixos-config=${./.}" "nixpkgs=${nixpkgs}" ];
          extraOptions = ''
            flake-registry = /etc/nix/registry.json
            experimental-features = nix-command flakes
          '';
        };
      };

      nixosConfig = { ... }: {
        nixpkgs.hostPlatform = "x86_64-linux";

        users.users.alice = {
          isNormalUser = true;
          description = "Alice Foobar";
          password = "foobar";
          uid = 1000;
          extraGroups = [ "wheel" ];
        };

        i18n.defaultLocale = "en_US.UTF-8";
        time.timeZone = "Asia/Shanghai";
        console.keyMap = "dvorak-programmer";

        virtualisation.vmVariant.virtualisation.cores = 8;
        virtualisation.vmVariant.virtualisation.memorySize = 8192;
        services.xserver.enable = true;
        services.xserver.displayManager.ly.enable = true;
        services.xserver.displayManager.ly.settings = {
          load = false;
          save = false;
        };
        services.xserver.displayManager.defaultSession = "none+icewm";
        services.xserver.windowManager.icewm.enable = true;

        environment.systemPackages = with pkgs; [ vim ];
      };
      nixosOutputs = {
        nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem {
          modules = [
            flakeSpecialConfig
            nixosConfig
          ];
        };
      };
    in nixosOutputs // {
      devShells."${system}".default = pkgs.mkShell {
        packages = [ ];
        SHARED_DIR = "/tmp/shared";
        NIX_DISK_IMAGE = "/tmp/nixos.qcow2";
      };
    };
}

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@@ -0,0 +1,39 @@
{ system ? builtins.currentSystem,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this test to ly's passthru.tests so a bump from r-ryantm also runs this test.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find that neither sddm and lightdm set passthru.tests, and the tests is for nixos, I don't think it should be added for the package.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that's the point of passthru.tests basically.

NixOS in this context works like a framework.

@lucasew
Copy link
Contributor

lucasew commented Mar 20, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools

nixos/tests/ly.nix Outdated Show resolved Hide resolved
@Vonfry Vonfry changed the title nixos/ly: init module [WIP] nixos/ly: init module Mar 21, 2024
@lucasew
Copy link
Contributor

lucasew commented Mar 21, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools

@Vonfry
Copy link
Member Author

Vonfry commented Mar 21, 2024

I meets a wired problem. Only parts config in /etc/ly/config.ini takes effect. According to strace, the file is read successfully. However, some configured dirs are read but some aren't (the default one is used). There is no output in stderr as well.

Edit:
I think I find the reason. ly uses configator and configator parses a line with max length 80.

@lucasew
Copy link
Contributor

lucasew commented Mar 21, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test

@Vonfry Vonfry force-pushed the init-ly-module branch 3 times, most recently from d5a6bb4 to f900c51 Compare March 22, 2024 10:49
@Vonfry Vonfry changed the title [WIP] nixos/ly: init module [WIP] ly update to unstable version and add nixos/ly module Mar 22, 2024
@lucasew
Copy link
Contributor

lucasew commented Mar 22, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

1 package blacklisted:
  • nixos-install-tools
1 package built:
  • ly

@ofborg ofborg bot requested a review from vidister March 22, 2024 11:11
@Vonfry Vonfry force-pushed the init-ly-module branch 2 times, most recently from 59732be to 307b59a Compare March 22, 2024 13:25
@Vonfry Vonfry marked this pull request as ready for review March 22, 2024 13:26
@Vonfry Vonfry changed the title update ly to unstable version and add nixos/ly module add nixos/ly module and package update Jul 3, 2024
@lucasew
Copy link
Contributor

lucasew commented Jul 4, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
1 package built:
  • ly

hash = "sha256-78XD6DK9aQi8hITWJWnFZ3U9zWTcuw3vtRiU3Lhu7O4=";
fetchSubmodules = true;
rev = "v1.0.0";
hash = "sha256-IwZ9QWVrQz/DIIcR4XOW5q54gYDFn5prmujnS3sSquc=";
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expose nixosTests.ly in passthru.tests

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @Vonfry.

@lucasew
Copy link
Contributor

lucasew commented Jul 4, 2024

icewm
ly

Functionality wise LGTM

@Vonfry
Copy link
Member Author

Vonfry commented Jul 28, 2024

v1.0.1 released, rebased on master and format files.

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/how-to-use-ly-display-manager/13753/8

@arjan-s
Copy link
Contributor

arjan-s commented Aug 1, 2024

https://github.com/fairyglade/ly/releases/tag/v1.0.2

Since this PR still didn't get merged... :(

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-ready-for-review/3032/4365

@lucasew
Copy link
Contributor

lucasew commented Aug 4, 2024

Result of nixpkgs-review pr 297434 run on x86_64-linux 1

2 packages blacklisted:
  • nixos-install-tools
  • tests.nixos-functions.nixos-test
1 package built:
  • ly

@lucasew
Copy link
Contributor

lucasew commented Aug 5, 2024

image
image

Copy link
Member

@phanirithvij phanirithvij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using it for a month with no issues

@phanirithvij phanirithvij mentioned this pull request Aug 6, 2024
13 tasks
@thiagokokada thiagokokada merged commit cb91750 into NixOS:master Aug 6, 2024
28 of 29 checks passed
@Vonfry Vonfry deleted the init-ly-module branch August 7, 2024 05:35
Anomalocaridid added a commit to Anomalocaridid/dotfiles that referenced this pull request Aug 10, 2024
Flake lock file updates:

• Updated input 'catppuccin':
    'github:catppuccin/nix/d34a94a17c6ec4a0c4e24b3e4336ea504d021f6d?narHash=sha256-Syt2bvPvzcdx%2BVQEXckhfLw96Q2yY%2B%2Bvw0wHQK1NkhQ%3D' (2024-06-12)
  → 'github:catppuccin/nix/66f4ea170093b62f319f41cebd2337a51b225c5a?narHash=sha256-vE5FcKVQ3E0txJKt5w3vOlfcN1XoTAlxK9PnQ/CJavA%3D' (2024-08-07)
• Updated input 'catppuccin-catwalk':
    'github:catppuccin/catwalk/b1dede25722da515fd1498c6bfb5c83d7ec0f9c5?narHash=sha256-UEIyX%2B3Uz9UMFZ%2BxIjCKv1Tci/aysYVnTUfVbq3mftc%3D' (2024-06-10)
  → 'github:catppuccin/catwalk/8a212da54dac7c7035130f97827d6e39eaa3f2cf?narHash=sha256-%2B%2BdPQDn%2Bw6/%2BJEuX3/YgjveYxA8DXmt9JIpbFvNpQcU%3D' (2024-07-18)
• Updated input 'catppuccin-whiskers':
    'github:catppuccin/whiskers/eb1958e4227d5c8808c9e819837043fe13a7e29c?narHash=sha256-5EjED8nDM34BD7c50DZ3KZP97gx/Atjtx7bJWLSfjmM%3D' (2024-06-12)
  → 'github:catppuccin/whiskers/ee6471b4b66f45a85fa61220908d228eec4c2ae5?narHash=sha256-YhBtawEc6Doh6UBKbv1GvO/AVYDhJMeMNvahYeGWbQk%3D' (2024-08-07)
• Updated input 'disko':
    'github:nix-community/disko/832a9f2c81ff3485404bd63952eadc17bf7ccef2?narHash=sha256-n3AWItJ4a94GT0cray/eUV7tt3mulQ52L%2BlWJN9d1E8%3D' (2024-06-13)
  → 'github:nix-community/disko/ffc1f95f6c28e1c6d1e587b51a2147027a3e45ed?narHash=sha256-C5LbM5VMdcolt9zHeLQ0bYMRjUL%2BN%2BAL5pK7/tVTdes%3D' (2024-08-08)
• Updated input 'exifaudio-yazi':
    'github:Sonico98/exifaudio.yazi/92366cf0b024a05cb80c9e245408026dcabe94f2?narHash=sha256-QAIUwArdMvTxSRTXDg72rk1E2JresC4KzADqIPXnKLE%3D' (2024-06-30)
  → 'github:Sonico98/exifaudio.yazi/6205460405fa39c017d0eef12997c1180658e695?narHash=sha256-mYvq7xnd4gI0KoG5G%2BygDxqCWdpZbMn3Im1EiW3eSyI%3D' (2024-08-05)
• Updated input 'flake-utils':
    'github:gytis-ivaskevicius/flake-utils-plus/3542fe9126dc492e53ddd252bb0260fe035f2c0f?narHash=sha256-fT4ppWeCJ0uR300EH3i7kmgRZnAVxrH%2BXtK09jQWihk%3D' (2024-05-12)
  → 'github:gytis-ivaskevicius/flake-utils-plus/6b10f51ff73a66bb29f3bc8151a59d217713f496?narHash=sha256-XCf2PIAT6lH7BwytgioPmVf/wkzXjSKScC4KzcZgb64%3D' (2024-07-30)
• Updated input 'home-manager':
    'github:nix-community/home-manager/8d5e27b4807d25308dfe369d5a923d87e7dbfda3?narHash=sha256-abBpj2VU8p6qlRzTU8o22q68MmOaZ4v8zZ4UlYl5YRU%3D' (2024-06-13)
  → 'github:nix-community/home-manager/b3d5ea65d88d67d4ec578ed11d4d2d51e3de525e?narHash=sha256-jQnFEtH20/OsDPpx71ntZzGdRlpXhUENSQCGTjn//NA%3D' (2024-08-07)
• Updated input 'hyprland-contrib':
    'github:hyprwm/contrib/33b38358559054d316eb605ccb733980dfa7dc63?narHash=sha256-y%2BLOXuSRMfkR2Vfwl5K2NVrszi1h5MJpML%2BmsLnVS8U%3D' (2024-05-20)
  → 'github:hyprwm/contrib/9d67858b437d4a1299be496d371b66fc0d3e01f6?narHash=sha256-%2B7IS0n3/F0I5j6ZbrVlLcIIPHY3o%2B/vLAqg/G48sG%2Bw%3D' (2024-08-02)
• Updated input 'impermanence':
    'github:nix-community/impermanence/27979f1c3a0d3b9617a3563e2839114ba7d48d3f?narHash=sha256-7C5lCpiWiyPoIACOcu2mukn/1JRtz6HC/1aEMhUdcw0%3D' (2024-06-09)
  → 'github:nix-community/impermanence/23c1f06316b67cb5dabdfe2973da3785cfe9c34a?narHash=sha256-AxaLX5cBEcGtE02PeGsfscSb/fWMnyS7zMWBXQWDKbE%3D' (2024-06-22)
• Updated input 'ly-module-patch':
    'NixOS/nixpkgs#297434'
  → 'NixOS/nixpkgs#297434'
• Updated input 'nix-gaming':
    'github:fufexan/nix-gaming/58f43669b808e4a2679ce0e5ff12665e7082cc85?narHash=sha256-wt9iAsStd4ghkkxKgByOnRfQ%2B9VRQoCc06nQ%2BVvsH/E%3D' (2024-06-11)
  → 'github:fufexan/nix-gaming/88aa6c5d59424d979741bc7fc817f02f5b200c08?narHash=sha256-3Fk8o9WR1oVroPx3hDhmLguzhaFz0OifsIpLXLbef/Q%3D' (2024-08-04)
• Updated input 'nix-gaming/flake-parts':
    'github:hercules-ci/flake-parts/2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8?narHash=sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw%3D' (2024-06-01)
  → 'github:hercules-ci/flake-parts/8471fe90ad337a8074e957b69ca4d0089218391d?narHash=sha256-XOQkdLafnb/p9ij77byFQjDf5m5QYl9b2REiVClC%2Bx4%3D' (2024-08-01)
• Updated input 'nix-gaming/flake-parts/nixpkgs-lib':
    'https://github.com/NixOS/nixpkgs/archive/eb9ceca17df2ea50a250b6b27f7bf6ab0186f198.tar.gz?narHash=sha256-lIbdfCsf8LMFloheeE6N31%2BBMIeixqyQWbSr2vk79EQ%3D' (2024-06-01)
  → 'https://github.com/NixOS/nixpkgs/archive/a5d394176e64ab29c852d03346c1fc9b0b7d33eb.tar.gz?narHash=sha256-uFf2QeW7eAHlYXuDktm9c25OxOyCoUOQmh5SZ9amE5Q%3D' (2024-08-01)
• Updated input 'nix-gaming/nixpkgs':
    'github:NixOS/nixpkgs/d226935fd75012939397c83f6c385e4d6d832288?narHash=sha256-HV97wqUQv9wvptiHCb3Y0/YH0lJ60uZ8FYfEOIzYEqI%3D' (2024-06-07)
  → 'github:NixOS/nixpkgs/81610abc161d4021b29199aa464d6a1a521e0cc9?narHash=sha256-TcXjLVNd3VeH1qKPH335Tc4RbFDbZQX%2Bd7rqnDUoRaY%3D' (2024-08-02)
• Added input 'nix-gaming/umu':
    'git+https://github.com/Open-Wine-Components/umu-launcher/?dir=packaging/nix&ref=refs/heads/main&rev=babc7214d9bc5007eb6c0d59a720dea59fa694ac&submodules=1' (2024-08-03)
• Added input 'nix-gaming/umu/nixpkgs':
    follows 'nix-gaming/nixpkgs'
• Updated input 'nix-index-database':
    'github:Mic92/nix-index-database/88ad3d7501e22b2401dd72734b032b7baa794434?narHash=sha256-sFXI%2BZANp/OC%2BMwfJoZgPSf4xMdtzQMe1pS3FGti4C8%3D' (2024-06-10)
  → 'github:Mic92/nix-index-database/97ca0a0fca0391de835f57e44f369a283e37890f?narHash=sha256-UQPgA5d8azLZuDHZMPmvDszhuKF1Ek89SrTRtqsQ4Ss%3D' (2024-08-04)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/57d6973abba7ea108bac64ae7629e7431e0199b6?narHash=sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus%3D' (2024-06-12)
  → 'github:NixOS/nixpkgs/5e0ca22929f3342b19569b21b2f3462f053e497b?narHash=sha256-M0xJ3FbDUc4fRZ84dPGx5VvgFsOzds77KiBMW/mMTnI%3D' (2024-08-09)
• Updated input 'stylix':
    'github:danth/stylix/73c6955b4572346cc10f43a459949fe646efbde0?narHash=sha256-XAwxzCDfExqIj0PIjEpjt3eOzsosxOCLx6sQWHPSrSg%3D' (2024-06-13)
  → 'github:danth/stylix/5853f1a8bd072f2ebabfc3de3973084353cf6f1e?narHash=sha256-mxtnMye8gs82tdQbVC%2Bg6v3aPOZlH150f9WyntHIkTg%3D' (2024-08-06)
• Updated input 'stylix/base16-helix':
    'github:tinted-theming/base16-helix/dbe1480d99fe80f08df7970e471fac24c05f2ddb?narHash=sha256-FVrbPk%2BNtMra0jtlC5oxyNchbm8FosmvXIatkRbYy1g%3D' (2023-10-08)
  → 'github:tinted-theming/base16-helix/34f41987bec14c0f3f6b2155c19787b1f6489625?narHash=sha256-numb3xigRGnr/deF7wdjBwVg7fpbTH7reFDkJ75AJkY%3D' (2024-07-12)
• Updated input 'stylix/base16-vim':
    'github:chriskempson/base16-vim/3be3cd82cd31acfcab9a41bad853d9c68d30478d?narHash=sha256-uJvaYYDMXvoo0fhBZUhN8WBXeJ87SRgof6GEK2efFT0%3D' (2022-09-20)
  → 'github:tinted-theming/base16-vim/6e955d704d046b0dc3e5c2d68a2a6eeffd2b5d3d?narHash=sha256-ZMhnNmw34ogE5rJZrjRv5MtG3WaqKd60ds2VXvT6hEc%3D' (2024-05-19)
• Updated input 'stylix/home-manager':
    'github:nix-community/home-manager/6ebe7be2e67be7b9b54d61ce5704f6fb466c536f?narHash=sha256-b3/U21CJjCjJKmA9WqUbZGZgCvospO3ArOUTgJugkOY%3D' (2024-05-06)
  → 'github:nix-community/home-manager/e3ad5108f54177e6520535768ddbf1e6af54b59d?narHash=sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ%2BNqp%2Bi58O46LI%3D' (2024-05-17)
• Updated input 'unison-nix':
    'github:ceedubs/unison-nix/923749a56cb1b36291b420c53d49f180d992c304?narHash=sha256-yfXZASCGefqmttxWahmVO7d9WdF4ed5/S1sdOMIVKUc%3D' (2024-06-05)
  → 'github:ceedubs/unison-nix/3f10238cfbdc6395ef0b56d8c6e659585df13d6a?narHash=sha256-KGbUQYy15W820QnQNmcOWuV7q7GJS9jrg1Zdyz3Co7o%3D' (2024-07-23)
• Updated input 'yazi-plugins':
    'github:yazi-rs/plugins/06e5fe1c7a2a4009c483b28b298700590e7b6784?narHash=sha256-jg8%2BGDsHOSIh8QPYxCvMde1c1D9M78El0PljSerkLQc%3D' (2024-07-18)
  → 'github:yazi-rs/plugins/ba2a7d7633f2a859bfbf81d3721af965f5a09fec?narHash=sha256-MwVyII9hDwtDJ3tcgcAmpLM2Q6zqdNL97HzHLg1TTcU%3D' (2024-08-06)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet